6 Replies Latest reply: Apr 12, 2012 10:17 PM by Robert Thomas RSS

    Startup Problem GateIn 3.2.0-Final-Tomcat6

    Robert Thomas Newbie

      Vista Hom Premium

      JDK 1.6.0_25

       

      Got following startup exception:

       

      SEVERE: Cannot create the portal container 'portal' . ServletContext: org.apache.catalina.core.ApplicationContextFacade@502819

      java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.services.organization.idm.PicketLinkIDMService type=org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl found at jndi:/localhost/portal/WEB-INF/conf/organization/idm-configuration.xml

          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:134)

          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:468)

          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:366)

          at org.exoplatform.container.CachingContainer.getComponentInstancesOfType(CachingContainer.java:111)

          at org.exoplatform.container.LifecycleVisitor.visitContainer(LifecycleVisitor.java:151)

          at org.exoplatform.container.ConcurrentPicoContainer.accept(ConcurrentPicoContainer.java:615)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.picocontainer.defaults.AbstractPicoVisitor.traverse(AbstractPicoVisitor.java:32)

          at org.exoplatform.container.LifecycleVisitor.traverse(LifecycleVisitor.java:90)

          at org.exoplatform.container.LifecycleVisitor.start(LifecycleVisitor.java:170)

          at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:554)

          at org.exoplatform.container.ExoContainer.start(ExoContainer.java:266)

          at org.exoplatform.container.PortalContainer.start(PortalContainer.java:667)

          at org.exoplatform.container.ExoContainer.start(ExoContainer.java:254)

          at org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:399)

          at org.exoplatform.container.RootContainer.registerPortalContainer(RootContainer.java:266)

          at org.exoplatform.portal.application.PortalController.afterInit(PortalController.java:114)

          at org.exoplatform.container.web.AbstractHttpServlet.init(AbstractHttpServlet.java:79)

          at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1173)

          at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:993)

          at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4420)

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:4733)

          at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:799)

          at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:779)

          at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:601)

          at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:675)

          at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:601)

          at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)

          at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1315)

          at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:324)

          at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)

          at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)

          at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

          at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

          at org.apache.catalina.core.StandardService.start(StandardService.java:525)

          at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)

          at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

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

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

          at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

      Caused by: java.lang.RuntimeException: Cannot instantiate component key=org.exoplatform.services.database.HibernateService type=org.exoplatform.services.database.impl.HibernateServiceImpl found at jndi:/localhost/portal/WEB-INF/conf/organization/idm-configuration.xml

          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:134)

          at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

          at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:468)

          at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:422)

          at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)

          at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:407)

          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:96)

          ... 47 more

      Caused by: java.lang.reflect.InvocationTargetException

          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 org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:417)

          at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:96)

          ... 53 more

      Caused by: java.lang.ClassCastException: org.apache.naming.NamingContext cannot be cast to javax.sql.DataSource

          at org.exoplatform.services.database.impl.HibernateServiceImpl.<init>(HibernateServiceImpl.java:149)

          ... 59 more

       

      Thanks for any help

        • 1. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
          Minh Hoang TO Novice

          It seems to me that your configuration.properties was not processed. Let's check the log of ConfigurationManagerImpl whether the file   .../gatein/conf/configuration.xml was added to configuration of RootContainer. Following that log message, you should see something like.

           

          org.exoplatform.container.definition.PortalContainerConfig loadExternalSettings

          • 2. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
            Robert Thomas Newbie

            The console log includes the following:

             

            12-Apr-2012 1:20:33 PM org.exoplatform.container.RootContainer getInstance

            INFO: Building root container

            12-Apr-2012 1:20:34 PM org.exoplatform.container.RootContainer <init>

            INFO: Active profiles [tomcat]

            12-Apr-2012 1:20:34 PM org.exoplatform.container.util.ContainerUtil loadProperties

            SEVERE: Cannot load property file file:/C:/GateIn-3.2.0.Final-tomcat6/lib/exo.core.component.document-2.4.6-GA.jar!/conf/configuration.properties

            java.io.FileNotFoundException: JAR entry conf/configuration.properties not found in C:\GateIn-3.2.0.Final-tomcat6\lib\exo.core.component.document-2.4.6-GA.jar

             

            Examining exo.core.component.document-2.4.6-GA.jar I see that there is a conf/configuration.xml, but no properties file. So it looks like something's been configured to load a .properties file rather than the xml file.

            • 3. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
              wtl Newbie

              Windows? Tries to move the server folder to C:\

              • 4. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
                Robert Thomas Newbie

                wtl - I always unzip to C:\

                I''ve encontered the same exception s with the Tomcat7 version.

                • 5. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
                  Minh Hoang TO Novice

                  Robert Thomas wrote:

                   

                  The console log includes the following:

                   

                  12-Apr-2012 1:20:33 PM org.exoplatform.container.RootContainer getInstance

                  INFO: Building root container

                  12-Apr-2012 1:20:34 PM org.exoplatform.container.RootContainer <init>

                  INFO: Active profiles [tomcat]

                  12-Apr-2012 1:20:34 PM org.exoplatform.container.util.ContainerUtil loadProperties

                  SEVERE: Cannot load property file file:/C:/GateIn-3.2.0.Final-tomcat6/lib/exo.core.component.document-2.4.6-GA.jar!/conf/configuration.properties

                  java.io.FileNotFoundException: JAR entry conf/configuration.properties not found in C:\GateIn-3.2.0.Final-tomcat6\lib\exo.core.component.document-2.4.6-GA.jar

                   

                  Examining exo.core.component.document-2.4.6-GA.jar I see that there is a conf/configuration.xml, but no properties file. So it looks like something's been configured to

                   

                  With this exception, i could say that GateIn was not able to process the  configuration.xml under  Gatein-3.2.0.Final-tomcat6/gatein/conf/configuration.xml. You could see that the path to  configuration.properties is configured in this configuration.xml

                   

                  {code:xml}

                  <field name="externalSettingsPath">

                            <string>configuration.properties</string>

                  </field>

                  {code}

                   

                  Let's check if the JVM property -Dexo.conf.dir.name points to the directory Gatein-3.2.0.Final-tomcat6/gatein/conf

                  • 6. Re: Startup Problem GateIn 3.2.0-Final-Tomcat6
                    Robert Thomas Newbie

                    OOPS..

                     

                    I was starting Tomcat with startup.bat, not gatein.bat. The latter has -Dexo.conf.dir.name set as required. Starts up fine now. Thanks for taking the time to help a newbie.