[opencms-dev] xmlcontent - not working - need some help/guidance

Ricky Tapper rstapper at yahoo.com
Thu Sep 1 23:15:28 CEST 2005


I still get the error below. The steps I followed were
new -> structured content -> specialevent -> typed in
the name "hello" (also tried it with hello_0002.html)
and I get this error when I try to continue.

(BTW, I clicked on details to see the actual error)

org.opencms.xml.CmsXmlException: Unmarshalling xml
document failed.
	at
org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:529)
	at
org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:437)
	at
org.opencms.xml.CmsXmlContentDefinition.unmarshal(CmsXmlContentDefinition.java:270)
	at
org.opencms.file.types.CmsResourceTypeXmlContent.createResource(CmsResourceTypeXmlContent.java:92)
	at
org.opencms.file.CmsObject.createResource(CmsObject.java:620)
	at
org.opencms.workplace.explorer.CmsNewResourceXmlContent.actionCreateResource(CmsNewResourceXmlContent.java:101)
	at
org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.commons.newresource_005fxmlcontent_jsp._jspService(org.apache.jsp.WEB_002dINF.jsp.offline.system.workplace.commons.newresource_005fxmlcontent_jsp:66)
	at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
	at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
	at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
	at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:574)
	at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:499)
	at
org.opencms.flex.CmsFlexRequestDispatcher.includeExternal(CmsFlexRequestDispatcher.java:193)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:171)
	at
org.opencms.loader.CmsJspLoader.service(CmsJspLoader.java:402)
	at
org.opencms.flex.CmsFlexRequestDispatcher.includeInternalWithCache(CmsFlexRequestDispatcher.java:417)
	at
org.opencms.flex.CmsFlexRequestDispatcher.include(CmsFlexRequestDispatcher.java:175)
	at
org.opencms.loader.CmsJspLoader.dispatchJsp(CmsJspLoader.java:434)
	at
org.opencms.loader.CmsJspLoader.load(CmsJspLoader.java:381)
	at
org.opencms.loader.CmsResourceManager.loadResource(CmsResourceManager.java:711)
	at
org.opencms.main.OpenCmsCore.showResource(OpenCmsCore.java:1302)
	at
org.opencms.main.OpenCmsServlet.doGet(OpenCmsServlet.java:136)
	at
org.opencms.main.OpenCmsServlet.doPost(OpenCmsServlet.java:148)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at
org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:153)
	at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
	at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.dom4j.DocumentException: null Nested
exception: null
	at org.dom4j.io.SAXReader.read(SAXReader.java:353)
	at
org.opencms.xml.CmsXmlUtils.unmarshalHelper(CmsXmlUtils.java:527)
	... 49 more

I am thoroughly confused...

Ricky


--- Ricky Tapper <rstapper at yahoo.com> wrote:

> Jason,
> 
> Thanks for the input. I do have the
> workspace.properties in a separate module and the
> export points have been set. This is the first time
> that I have seen the "resourcebundle" tag. Does the
> name attribute have to provide an absolute reference
> to the location of workplace.properties?
> 
> The module is called com.example.site. So the
> workplace.properties file is in:
> classes/com/example/site. So would the value be:
> com.example.site? or com.example.site.workplace? or
> com.example.site.workplace.properties?
> 
> Without it, I can still (manually) create the
> content.
> I will try and add it and see if I can successfully
> create content using the "wand" functionality.
> 
> Thanks,
> 
> Ricky
> 
> 
> --- Jason Trump <jason.trump at brulant.com> wrote:
> 
> > I'm not certain, but I think you might need to
> > specify the location of
> > your workplace.properties file in your
> > specialevent.xsd file.
> > 
> > For example, say your workspace.properties file is
> > in package com/foo/.
> > then
> > 
> > 	<xsd:annotation>
> > 		<xsd:appinfo>
> > 			<resourcebundle name="com.foo.workplace"/>
> >  			<mappings>
> >  				<mapping element="Title"
> > mapto="property:Title" />
> >  			</mappings>
> >  		</xsd:appinfo>
> >  	</xsd:annotation>
> > 
> > And then either copy workplace.properties into the
> > directory
> > opencms.war/WEB-INF/classes/com/foo/ and restart
> > your server, or
> > (probably better but more work) create a module
> that
> > contains
> > workplace.properties and setup an export point for
> > it (this is how I
> > have done it previously).
> > 
> > Good luck
> > jason
> > 
> > > -----Original Message-----
> > > From: opencms-dev-bounces at opencms.org
> > [mailto:opencms-dev-
> > > bounces at opencms.org] On Behalf Of Ricky Tapper
> > > Sent: Thursday, September 01, 2005 4:31 PM
> > > To: The OpenCms mailing list
> > > Subject: RE: [opencms-dev] xmlcontent - not
> > working - need some
> > > help/guidance
> > > 
> > > Sure, here is my schema and the control code
> from
> > my
> > > content:
> > > 
> > > Schema:
> > > 
> > > <xsd:schema
> > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> > > elementFormDefault="qualified">
> > > 
> > > 	<xsd:include
> > >
> >
> schemaLocation="opencms://opencms-xmlcontent.xsd"/>
> > > 	<xsd:element name="SpecialEvents"
> > > type="OpenCmsSpecialEvents"/>
> > > 
> > > 	<xsd:complexType name="OpenCmsSpecialEvents">
> > > 		<xsd:sequence>
> > > 			<xsd:element name="SpecialEvent"
> > > type="OpenCmsSpecialEvent" minOccurs="0"
> > > maxOccurs="unbounded"/>
> > > 		</xsd:sequence>
> > > 	</xsd:complexType>
> > > 
> > > 	<xsd:complexType name="OpenCmsSpecialEvent">
> > > 		<xsd:sequence>
> > > 			<xsd:element name="Title"
> type="OpenCmsString"
> > />
> > > 		</xsd:sequence>
> > > 		<xsd:attribute name="language"
> > type="OpenCmsLocale"
> > > use="required"/>
> > > 	</xsd:complexType>
> > > 
> > > 	<xsd:annotation>
> > > 		<xsd:appinfo>
> > > 			<mappings>
> > > 				<mapping element="Title"
> > mapto="property:Title" />
> > > 			</mappings>
> > > 		</xsd:appinfo>
> > > 	</xsd:annotation>
> > > 
> > > </xsd:schema>
> > > 
> > > Control code for the content:
> > > 
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > 
> > > <SpecialEvents
> > >
> >
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> > >
> >
>
xsi:noNamespaceSchemaLocation="opencms://sites/default/playground/Specia
> > lE
> > > vent.xsd">
> > >   <SpecialEvent language="en">
> > >     <Title><![CDATA[New Title]]></Title>
> > >   </SpecialEvent>
> > > </SpecialEvents>
> > > 
> > > Regards,
> > > 
> > > Ricky
> > > 
> > > 
> > > --- Jason Trump <jason.trump at brulant.com> wrote:
> > > 
> > > > Can you send your XSD schema as well?
> > > >
> > > > > -----Original Message-----
> > > > > From: opencms-dev-bounces at opencms.org
> > > > [mailto:opencms-dev-
> > > > > bounces at opencms.org] On Behalf Of Ricky
> Tapper
> > > > > Sent: Thursday, September 01, 2005 3:58 PM
> > > > > To: opencms-dev at opencms.org
> > > > > Subject: [opencms-dev] xmlcontent - not
> > working -
> > > > need some
> > > > help/guidance
> > > > >
> > > > > Hi,
> > > > >
> > > > > I am trying to get xmlcontent to work. I
> have
> > read
> > > > > EVERY post I could find on this subject and
> > have
> > > > > performed the steps to create the xsd and
> the
> > > > > xmlcontent. The issue occurs with either the
> > > > > workplace.properties or the
> > opencms-modules.xml
> > > > files
> > > > > (I believe).
> > > > >
> > > > > I am using OpenCms 6.0, Jboss 4.x, MySQL 4.x
> > on
> > > > > Windows XP Pro. Everything else appears to
> be
> > > > working
> > > > > fine. If I can get this piece finished then
> we
> > can
> > > > > finalize our web-site for QA.
> > > > >
> > > > > Here is the section of the
> opencms-modules.xml
> > > > file:
> > > > >
> > > > > <resourcetypes>
> > > > >      <type
> > > > >
> > > >
> > >
> >
>
class="org.opencms.file.types.CmsResourceTypeXmlContent"
> > > > > name="specialevent" id="5000">
> > > > >           <param
> > > > >
> > > >
> > >
> >
>
name="schema">/sites/default/playground/specialevent.xsd</param>
> > > > >      </type>
> > > > > </resourcetypes>
> > > > > <explorertypes>
> > > > >      <explorertype name="specialevent"
> > > > > key="fileicon.specialevent"
> > > > icon="specialevent.gif"
> > > > > reference="xmlcontent">
> > > > >           <newresource
> page="structurecontent"
> > > > >
> > > >
> > >
> >
>
uri="newresource_xmlcontent.jsp?newresourcetype=specialevent"
> > > > > order="5050"/>
> > > > >           <accesscontrol>
> > > > >                <accessentry
> > > > > principal="GROUP.Administrators"
> > > > > permissions="+r+v+w+c"/>
> > > > >                <accessentry
> > > > > principal="GROUP.Projectmanagers"
> > > > > permissions="+r+v+w+c"/>
> > > > >                <accessentry
> > > > principal="GROUP.Users"
> > > > > permissions="+r+v+w+c"/>
> > > > >           </accesscontrol>
> > > > >      </explorertype>
> > > > > </explorertypes>
> > > > >
> > > > > Here is the contents of
> workplace.properties:
> > > > >
> > > > > #
> > > > > # Localized Strings and help texts to
> display
> > on
> > > > the
> > > > > article editor
> > > > > #
> > > > >
> > > > > fileicon.specialevent = SpecialEvent
> > > > > title.newspecialevent = Create a new special
> > event
> > > > >
> > > > > label.SpecialEvent.Title = Title
> > > > > label.SpecialEvent.Title.help = The title of
> > the
> > > > > special event.<br>This value will be mapped
> to
> > the
> > > > > "Title" property of the resource.
> > > > >
> > > > >
> > > > > editor.defaults.SpecialEvent.Title  = Enter
> > the
> > > > title
> > > > > of the special event here...
> > > > >
> > > > >
> > > > >
> > > >
> > >
> >
>
editor.errormessage.SpecialEvent.mustnotcontainerror=Text
> > > > > in {0} must not contain "error" or "Error".
> > > > >
> > > >
> >
> editor.warning.SpecialEvent.mustnotcontainwarn=Text
> > > > in
> > > > > {0} must not contain "warn" or "Warn".
> > > > >
> > > > > After making these changes (and copying the
> > GIF
> > > > icon
> > > > > to the appropriate directory), I restarted
> the
> > > > server.
> > > > > When I tried to create a new piece of
> content
> > of
> > > > this
> > > > > specific type, I pressed "finish" and I
> > received
> > > > an
> > > > > error that said it could not find the
> > SpecialEvent
> > > > > resource and it did not create the content.
> > > > >
> > > > > Can anyone help with this? If more
> information
> > is
> > > > > needed, then I can provide it. I just don't
> > know
> > > > what
> > > > > else to provide. I have been working on this
> > for a
> > > > > coupe of days now with no success. Please
> > help.
> > > > >
> > > > > Regards,
> > > > >
> > > > > Ricky Tapper
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > _______________________________________________
> > > > > 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
> > > >
> > > >
> > > >
> _______________________________________________
> > > > 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
> > > >
> > > 
> > > 
> > > 
> > > _______________________________________________
> > > 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
> > 
> > 
> > _______________________________________________
> > 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
> > 
> 
> 
> 
> _______________________________________________
> 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
> 




More information about the opencms-dev mailing list