[opencms-dev] Validation on two fields at the same time an xsd

Alejandro GarcĂ­a Gil alejandro.garcia.gil at gmail.com
Thu Jun 9 17:31:45 CEST 2011


Hi,

I need to validate two fields on a xsd at the same time.

Example:

My fields are "Title1" and "Title2". I need only one of two this filling. By
example, if the field "Title1" is filling, the field "Title2" must be empty.


The element <rule> of a xsd allows validation but only on a single field.

Is there any way to get what I want?



---------- Forwarded message ----------
From: <opencms-dev-request at opencms.org>
Date: 2011/6/9
Subject: opencms-dev Digest, Vol 348, Issue 4
To: opencms-dev at opencms.org


Send opencms-dev mailing list submissions to
       opencms-dev at opencms.org

To subscribe or unsubscribe via the World Wide Web, visit
       http://lists.opencms.org/mailman/listinfo/opencms-dev
or, via email, send a message with subject or body 'help' to
       opencms-dev-request at opencms.org

You can reach the person managing the list at
       opencms-dev-owner at opencms.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of opencms-dev digest..."


Today's Topics:

  1. Re: OpenCMS setup progess stops at some stage (Andreas Kuckartz)
  2. Re: Open CMS 8 Upgrade Problem (Dawn Louis)
  3. Login User not found in Database (Christian Funken)


----------------------------------------------------------------------

Message: 1
Date: 8 Jun 2011 20:19:20 +0200
From: "Andreas Kuckartz" <A.Kuckartz at ping.de>
Subject: Re: [opencms-dev] OpenCMS setup progess stops at some stage
To: opencms-dev at opencms.org
Message-ID: <4DEFBD28.9000407 at ping.de>
Content-Type: text/plain; charset=ISO-8859-1

Hint: Several weeks ago I was not able to install OpenCms 7.5.4 on
recent versions of Apache Tomcat 7.0.x and 6.0.x due to SAX parsing
errors. Instead of further investigating the cause I installed OpenCms
7.5.3 and did not get those errors.

Cheers,
Andreas
---

Am 08.06.2011 08:31, schrieb Tobias Herrmann:
> Hi All,
>
> looking at Jakims log excerpts it seems like there may be a library
conflict that causes the parsing of the manifest XML to fail. Some servlet
containers bring along there own SAX parser, check if that is the case.
>
> Regards, Tobias



------------------------------

Message: 2
Date: Thu, 9 Jun 2011 00:00:22 -0700 (PDT)
From: Dawn Louis <dawn.louis at ibsplc.com>
Subject: Re: [opencms-dev] Open CMS 8 Upgrade Problem
To: opencms-dev at opencms.org
Message-ID: <31806970.post at talk.nabble.com>
Content-Type: text/plain; charset=us-ascii


Hi Michael,

Thanks for the reply.

I removed the com.bearingpoint module and tried the update. The upgrade
process was completed and got the following message in the open-cms upgrade
window,
"The OpenCms system used for the update will now shut down. The update is
finished!".

The new cms login page was accessed and after entering the login
credintials, i get the following error in the open-cms.log while logging-in,

[ERROR] [org.opencms.main.OpenCmsCore] - java.lang.Boolean cannot be cast to
java.lang.String
java.lang.ClassCastException: java.lang.Boolean cannot be cast to
java.lang.String
       at org.opencms.db.CmsUserSettings.init(CmsUserSettings.java:935)
       at org.opencms.db.CmsUserSettings.<init>(CmsUserSettings.java:399)
       at
org.opencms.workplace.CmsWorkplaceManager.getI18nInfo(CmsWorkplaceManager.java:944)
       at
org.opencms.i18n.CmsLocaleManager.getI18nInfo(CmsLocaleManager.java:832)
       at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:2270)
       at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:2444)
       at org.opencms.main.OpenCmsCore.initCmsObject(OpenCmsCore.java:2388)
       at org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1602)
       at org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:162)
       at org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:175)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
       at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at
org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)

P.S :  I tried the same process by deleting the entry
"USERPREFERENCE_Workplace-generaloptionsuploadapplet at
java.lang.Boolean=false" in the User Administration settings. But the same
error occurred.

Could you please advise as to what was done wrong?








Michael Emmerich-2 wrote:
>
> Dawn,
>
> I would recommend to remove the module before the update, its possible
> that it is not compatible with OpenCms 8 any more. I don't know this
> module, therefore I cannot say if it works with OpenCms 8 or not.
>
> Kind regards,
> Michael
>
> Am 31.05.2011 15:42, schrieb Dawn Louis:
>>
>> Hi Michael,
>>
>> Thanks for the reply.
>>
>> This change worked and i was able to complete the update process. But in
>> the
>> WEB-INF/logs/update.log, i get the following error,
>>
>> java.lang.AbstractMethodError
>>          at
>>
org.opencms.configuration.A_CmsXmlConfiguration.<init>(A_CmsXmlConfiguration.java:62)
>>          at
>>
com.bearingpoint.opencms.commons.springmanager.SpringManagerConfiguration.<init>(SpringManagerConfiguration.java:114)
>>          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
>> Method)
>>          at
>>
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>>          at
>>
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>>          at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>>          at java.lang.Class.newInstance0(Class.java:355)
>>          at java.lang.Class.newInstance(Class.java:308)
>>          at
>>
org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:206)
>>          at org.apache.commons.digester.Rule.begin(Rule.java:175)
>>          at
>> org.apache.commons.digester.Digester.startElement(Digester.java:1453)
>>          at
>> org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
>> Source)
>>          at
>> org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown
>> Source)
>>          at
>> org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown
>> Source)
>>          at
>>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
>> Source)
>>          at
>>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>          at
>>
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
>> Source)
>>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>          at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
>> Source)
>>          at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>          at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
>> Source)
>>          at
>> org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
>> Source)
>>          at
>> org.apache.commons.digester.Digester.parse(Digester.java:1765)
>>          at
>>
org.opencms.configuration.CmsConfigurationManager.loadXmlConfiguration(CmsConfigurationManager.java:506)
>>          at
>>
org.opencms.configuration.CmsConfigurationManager.loadXmlConfiguration(CmsConfigurationManager.java:342)
>>
>> The application cannot be accessed due to this error.
>>
>> FYI : In the existing application, we have added the com.bearingpoint
>> module
>> to introduce the workflow management. Please advise if we should remove
>> the
>> bearingpoint module before we proceed with the update process?
>>
>>
>>
>>
>>
>>
>>
>>
>> Michael Emmerich-2 wrote:
>>>
>>> Dawn,
>>>
>>> this sounds as if the url you enter tries to start OpenCms and not the
>>> update wizard. Therefore it says (correctly) that the wizard is still
>>> enabled.
>>>
>>> In a normal installation, the path to OpenCms is
>>>
>>> [servername]/[webapplicationname]/opencms/some_path_in_opencms
>>>
>>> The Update folder is just a folder in your webapplication, therefore the
>>> path to it is
>>>
>>> [servername]/[webapplicationname]/update
>>>
>>> Without the "opencms", because this would try to access the OpenCms
>>> servlet and this is not what we want for the update.
>>>
>>>   From the URL you send, it does seems as if you try to access the
>>> tomcat
>>> directly, therefore, no apache rewrite rules should try to insert the
>>> "opencms" in the path.
>>>
>>> Kind Regards,
>>> Michael.
>>>
>>>
>>>
>>> Am 30.05.2011 15:21, schrieb Dawn Louis:
>>>>
>>>> Hi Michael,
>>>>
>>>> Thanks for the reply.
>>>>
>>>> I did the change as was mentioned in the post.
>>>>
>>>> - Restored a backup (Web application and the CMS db) and started the
>>>> CMS
>>>> servlet container.
>>>> - Deselected the "Use Upload Applet" option in the OpenCMS User
>>>> Preferences
>>>> (as mentioned in
>>>> http://mail.opencms.org/pipermail/opencms-dev/2007q1/027888.html)
>>>> - Verified the User Management>>   User properties to ensure that the
>>>> entry
>>>> "USERPREFERENCES_workplace-generaloptionsuploadapplet at
>>>> java.lang.Boolean=false"
>>>>     is not present. (as mentioned in
>>>> http://lists.opencms.org/pipermail/opencms-dev/2011q2/035708.html)
>>>> - The index generation has been disabled, the files opencms.properties
>>>> and
>>>> cmsupdate.ori were modified as mentioned in the readme file.
>>>>
>>>> The servlet container was started and the same error(Critical error
>>>> during
>>>> OpenCms initialization: The OpenCms setup wizard is still enabled) is
>>>> found
>>>> in the cms log.
>>>>
>>>> The following error message is shown in the browser,
>>>> "HTTP Status 500. OpenCms is not properly initialized!
>>>> Please make sure that the OpenCms setup wizard has been run once and is
>>>> disabled now"
>>>>
>>>> Could you please advise as to what was done wrong?
>>>>
>>>> Regards,
>>>> Dawn
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Michael Emmerich-2 wrote:
>>>>>
>>>>> Hello Dawn,
>>>>>
>>>>> try
>>>>>
>>>>> http://localhost:8080/applicaitonname/update/
>>>>>
>>>>> this should start the updater.
>>>>>
>>>>> And before updating, please check if the Admin user has non default
>>>>> settings for the upload-applet as I wrote in some other postes.
>>>>>
>>>>> Kind regards,
>>>>> Michael
>>>>>
>>>>> Am 30.05.2011 08:11, schrieb Dawn Louis:
>>>>>>
>>>>>> Hi
>>>>>>
>>>>>>        I have an application deployed in Jboss 5.1.0, MYSql database
>>>>>> with
>>>>>> Open
>>>>>> CMS 7.5.2.  In order to upgrade the application to CMS 8, I had
>>>>>> copied
>>>>>> the
>>>>>> UPDATE folder and WEB-INF folder to the applications root folder.
>>>>>>
>>>>>>        I had then, modified the existing opencms.properties file to
>>>>>> have
>>>>>> the
>>>>>> value of wizard.enabled=true.   I had then disabled the index
>>>>>> generation
>>>>>> by
>>>>>> removing the entries in cmsupdate.ori file, as was specified in the
>>>>>> readme.txt file.
>>>>>>
>>>>>>        I then restarted the jboss server, and tried to access the URL
>>>>>> http://localhost:8080/applicaitonname/opencms/update/
>>>>>>
>>>>>>        But I got the following message in the browser
>>>>>> "HTTP Status 500
>>>>>> OpenCms is not properly initialized!
>>>>>> Please make sure that the OpenCms setup wizard has been run once and
>>>>>> is
>>>>>> disabled now."
>>>>>>
>>>>>>            The cms log files have this entry
>>>>>> "[2011-05-27 18:16:07,745 414229] [INFO ] [STDOUT] - [2011-05-27
>>>>>> 18:16:07,745]- Critical error during OpenCms initialization: The
>>>>>> OpenCms
>>>>>> setup wizard is still enabled.
>>>>>> org.opencms.main.CmsException: Critical error during OpenCms
>>>>>> initialization:
>>>>>> The OpenCms setup wizard is still enabled.
>>>>>>  at
>>>>>> org.opencms.main.OpenCmsCore.setErrorCondition(OpenCmsCore.java:341)
>>>>>>  at
>>>>>>
org.opencms.main.CmsInitException.setErrorCondition(CmsInitException.java:121)
>>>>>>  at
>>>>>> org.opencms.main.CmsInitException.<init>(CmsInitException.java:78)
>>>>>>  at
>>>>>> org.opencms.main.CmsInitException.<init>(CmsInitException.java:64)
>>>>>>  at org.opencms.main.OpenCmsCore.initContext(OpenCmsCore.java:1305)
>>>>>>  at
>>>>>> org.opencms.main.OpenCmsCore.upgradeRunlevel(OpenCmsCore.java:1876)
>>>>>>  at org.opencms.main.OpenCmsServlet.init(OpenCmsServlet.java:248)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1048)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:777)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>>>>>>  at
>>>>>>
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
>>>>>>  at
>>>>>>
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
>>>>>>  at
>>>>>>
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
>>>>>>  at
>>>>>>
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
>>>>>>  at
>>>>>>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>>>>>>  at
>>>>>>
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
>>>>>>  at
>>>>>>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>>>>>>  at
>>>>>>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
>>>>>>  at
>>>>>>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
>>>>>>  at
>>>>>>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
>>>>>>  at
>>>>>>
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>>>>>> "
>>>>>>
>>>>>>         I had removed the work and temp folders, but still the same
>>>>>> error
>>>>>> occurs.
>>>>>>
>>>>>>        Could you please advise as to what was done wrong.
>>>>>>
>>>>>> Thanks
>>>>>> Dawn
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Kind Regards,
>>>>> Michael.
>>>>>
>>>>> -------------------
>>>>> Michael Emmerich
>>>>>
>>>>> Alkacon Software GmbH  - The OpenCms Experts
>>>>> http://www.alkacon.com - http://www.opencms.org
>>>>>
>>>>> _______________________________________________
>>>>> This mail is sent to you from the opencms-dev mailing list
>>>>> To change your list options, or to unsubscribe from the list, please
>>>>> visit
>>>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>>>
>>>>>
>>>>
>>>
>>> --
>>> Kind Regards,
>>> Michael.
>>>
>>> -------------------
>>> Michael Emmerich
>>>
>>> Alkacon Software GmbH  - The OpenCms Experts
>>> http://www.alkacon.com - http://www.opencms.org
>>>
>>> _______________________________________________
>>> This mail is sent to you from the opencms-dev mailing list
>>> To change your list options, or to unsubscribe from the list, please
>>> visit
>>> http://lists.opencms.org/mailman/listinfo/opencms-dev
>>>
>>>
>>
>
> --
> Kind Regards,
> Michael.
>
> -------------------
> Michael Emmerich
>
> Alkacon Software GmbH  - The OpenCms Experts
> http://www.alkacon.com - http://www.opencms.org
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/mailman/listinfo/opencms-dev
>
>

--
View this message in context:
http://old.nabble.com/Open-CMS-8-Upgrade-Problem-tp31715346p31806970.html
Sent from the OpenCMS - Dev mailing list archive at Nabble.com.



------------------------------

Message: 3
Date: Thu, 09 Jun 2011 10:48:37 +0200
From: Christian Funken <c.funken at vucx.de>
Subject: [opencms-dev] Login User not found in Database
To: The OpenCms mailing list <opencms-dev at opencms.org>
Message-ID: <4DF088E5.2020106 at vucx.de>
Content-Type: text/plain; charset="iso-8859-15"

Hello there.

I'm currently trying my hands on a very basic frontend login script. All
that is required is a login + redirect and I have found plenty of online
resources to help me realize this.
However, the login simply will not work. It always throws an exception,
claiming that the user was not found.

It looks like this:
javax.servlet.jsp.JspException: javax.servlet.ServletException:
org.opencms.db.CmsDbEntryNotFoundException: User "C.Funken" was not found.
 Reason: org.opencms.db.CmsDbEntryNotFoundException: User "C.Funken"
was not found.
 Reason: User "C.Funken" was not found.

I tried this with multiple users on both the Online and Offline versions
The standart login ( the one for the backend ) works fine with all those
users.

The login script boils down to reading some request parameters and these
2 lines:

cmsObject.loginUser(user, password);
response.sendRedirect(url);

Is there something I need to do or configure before this can work?

- Christian Funken
________________

*VISION UNLTD. CREATIVE WORX*
Bruesselerstr. 85
D-50672 Koeln c.funken at vucx.de <mailto:c.funken at vucx.de>
check out our web page: www.vucx.de <http://www.vucx.de/>
die medienprofis: www.profigilde.de <http://www.profigilde.de/>
official agent for visual media directory: www.productionparadise.com
<http://www.productionparadise.com/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.opencms.org/pipermail/opencms-dev/attachments/20110609/6864bf74/attachment.html

------------------------------

_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

End of opencms-dev Digest, Vol 348, Issue 4
*******************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20110609/231cb2a5/attachment.htm>


More information about the opencms-dev mailing list