1 Reply Latest reply on May 6, 2014 9:57 AM by Randall Hauch

    The tomcat-jsf-example(master) on github goes wrong

    Michael Calvin Newbie

      Server startup successfully, but error occur when opening pages.

       

      INFO: Server startup in 5654 ms

      15:57:31,273  INFO Getting sample repository...

      may 06, 2014 3:57:31 afternoon com.sun.faces.application.view.FaceletViewHandlingStrategy handleRenderException

      SEVERE: Error Rendering View[/main.xhtml]

      javax.el.ELException: /main.xhtml @46,68 value="#{cdiController.repositoryName}": Error reading 'repositoryName' on type org.modeshape.example.jsf.CDIController$Proxy$_$$_WeldClientProxy

        at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:107)

        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:190)

        at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:178)

        at javax.faces.component.UIOutput.getValue(UIOutput.java:168)

      ………………

      Caused by: org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.modeshape.example.jsf.SessionProducer.initializeRepository() on org.modeshape.example.jsf.SessionProducer@1db96f0e

        at org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:400)

      ………………

      Caused by: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      ………………

      Caused by: java.lang.RuntimeException: javax.jcr.RepositoryException: org.modeshape.jcr.ConfigurationException: The configuration for the 'sample' repository has problems: ERROR: Error at query : The 'query' field on '' is not defined in the schema and the schema does not allow additional properties.

        at org.modeshape.example.jsf.RepositoryProvider.getRepository(RepositoryProvider.java:52)

        at org.modeshape.example.jsf.SessionProducer.initializeRepository(SessionProducer.java:28)

        ... 76 more

      Caused by: javax.jcr.RepositoryException: org.modeshape.jcr.ConfigurationException: The configuration for the 'sample' repository has problems: ERROR: Error at query : The 'query' field on '' is not defined in the schema and the schema does not allow additional properties.

        at org.modeshape.jcr.JcrRepositoriesContainer$FileRepositoryLookup.repository(JcrRepositoriesContainer.java:220)

      ………………

      Caused by: org.modeshape.jcr.ConfigurationException: The configuration for the 'sample' repository has problems: ERROR: Error at query : The 'query' field on '' is not defined in the schema and the schema does not allow additional properties.

        at org.modeshape.jcr.ModeShapeEngine.deploy(ModeShapeEngine.java:480)

        ... 80 more

      ……………………

       

      And the page shows:

       

      HTTP Status 500 - WELD-000049 Unable to invoke [method] @PostConstruct public org.modeshape.example.jsf.SessionProducer.initializeRepository() on org.modeshape.example.jsf.SessionProducer@1db96f0e


      type Exception report

      message WELD-000049 Unable to invoke [method] @PostConstruct public org.modeshape.example.jsf.SessionProducer.initializeRepository() on org.modeshape.example.jsf.SessionProducer@1db96f0e

      description The server encountered an internal error that prevented it from fulfilling this request.

      exception

      javax.servlet.ServletException: WELD-000049 Unable to invoke [method] @PostConstruct public org.modeshape.example.jsf.SessionProducer.initializeRepository() on org.modeshape.example.jsf.SessionProducer@1db96f0e javax.faces.webapp.FacesServlet.service(FacesServlet.java:325) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) 

       

      root cause

      org.jboss.weld.exceptions.WeldException: WELD-000049 Unable to invoke [method] @PostConstruct public org.modeshape.example.jsf.SessionProducer.initializeRepository() on org.modeshape.example.jsf.SessionProducer@1db96f0e

           org.jboss.weld.bean.AbstractClassBean.defaultPostConstruct(AbstractClassBean.java:400)

           org.jboss.weld.bean.ManagedBean$ManagedBeanInjectionTarget.postConstruct(ManagedBean.java:174)

           org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:294)

      root cause

      java.lang.reflect.InvocationTargetException

           sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        • 1. Re: The tomcat-jsf-example(master) on github goes wrong
          Randall Hauch Master

          Thanks. We'll fix it, but in the meantime you can simply remove the "query" nested document from the ModeShape JSON configuration. This is explained in the error message, which unfortunately is one of many:

           

               Caused by: javax.jcr.RepositoryException: org.modeshape.jcr.ConfigurationException: The configuration for the 'sample' repository has problems: ERROR: Error at query : The 'query' field on '' is not defined in the schema and the schema does not allow additional properties.

           

          The examples have been changed to work with the ModeShape 4.0 pre-releases. If you want to use the most recent stable release, please switch to the "3.x" branch in the "modeshape-examples" Git repository. If you want to simply download the 3.x example code (and not use Git), then on GitHub switch to the "3.x" branch and then hit the "Download ZIP" button.