AnsweredAssumed Answered

:?: JCR Issue when we are query the content of Custom type

Question asked by cham on Sep 24, 2008
Latest reply on Sep 25, 2008 by cham
Dear Folks,

We are facing an issue when retrieve the content of Custom type, could you please throw me some light. Thanks a lot :D


XPath query:

16:33:33,344 User:admin INFO  [manager.impl.ObjectContentManagerImpl] Get Objects with expression : /jcr:root/app:company_home/app:user_homes/element(*,dml:newscontent)  and language xpath

Content type def:

<namespaces>
   <namespace uri="com.cognizant.dml.model" prefix="dml"/>
   <namespace uri="com.cognizant.dml.model.rss" prefix="rss"/>
   <namespace uri="com.cognizant.dml.model.media" prefix="dc"/>
   <namespace uri="com.cognizant.dml.model.channel" prefix="rssch"/>
</namespaces>
….
<type name="dml:content">
         <title>Content</title>
         <parent>cm:content</parent>       
         <mandatory-aspects>
          <aspect>cm:effectivity</aspect>
            <aspect>dml:categorizable</aspect>
            <!–<aspect>cm:referencing</aspect>–>           
         </mandatory-aspects>
</type>

<type name="dml:newscontent">
         <title>Newscontent</title>
         <parent>dml:content</parent>
         <properties>
      <property name="dml:Headline">
               <type>d:text</type>
      <mandatory>true</mandatory>
            </property>
            <property name="dml:DateLine">
               <type>d:date</type>
….

Log:

Sep 24, 2008 4:31:51 PM com.sun.faces.lifecycle.LifecycleImpl phase
WARNING: executePhase(INVOKE_APPLICATION 5,com.sun.faces.context.FacesContextImpl@1c511cb) threw exception
javax.faces.FacesException: #{EAPJCRBean.test}: org.alfresco.service.namespace.NamespaceException: Namespace prefix dml is not mapped to a namespace URI
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:105)
   at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
   at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
   at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
   at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
   at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
   at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
   at java.lang.Thread.run(Thread.java:595)
Caused by: javax.faces.FacesException: #{EAPJCRBean.test}: org.alfresco.service.namespace.NamespaceException: Namespace prefix dml is not mapped to a namespace URI
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:107)
   at javax.faces.component.UICommand.broadcast(UICommand.java:383)
   at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:447)
   at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:752)
   at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
   … 15 more
Caused by: javax.faces.el.EvaluationException: org.alfresco.service.namespace.NamespaceException: Namespace prefix dml is not mapped to a namespace URI
   at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:91)
   at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:91)
   … 19 more

Outcomes