3 Replies Latest reply on Sep 29, 2011 1:11 PM by Marko Strukelj

    GateIn + Ubuntu + MySQL problem

    Rihards Zbitkovskis Newbie

      Hi,

       

      I would be extremaly happy if anyone could help. I'm having the following problem: When I try to start gatein under Ubuntu, the error specified below happens. The thing is, this only happens when gatein is configured to use MySQL (configuration in attachment). Under Windows, exatcly the same configuration works fine.

       

      SEVERE: Cannot create the portal container 'portal' . ServletContext:

      org.apache.catalina.core.ApplicationContextFacade@28ae4646

      java.lang.RuntimeException: Cannot instantiate component

      key=org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator

      type=org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl

      found at jndi:/localhost/portal/WEB-INF/conf/jcr/jcr-configuration.xml

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:124)

          at

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

          at

      org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

          at

      org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:350)

          at

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

          at

      org.picocontainer.defaults.LifecycleVisitor.visitContainer(LifecycleVisitor.java:97)

          at

      org.exoplatform.container.ConcurrentPicoContainer.accept(ConcurrentPicoContainer.java:506)

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

          at

      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at

      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

          at

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

          at

      org.picocontainer.defaults.LifecycleVisitor.traverse(LifecycleVisitor.java:63)

          at

      org.picocontainer.defaults.LifecycleVisitor.start(LifecycleVisitor.java:113)

          at

      org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:453)

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

          at

      org.exoplatform.container.PortalContainer.start(PortalContainer.java:595)

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

          at

      org.exoplatform.container.RootContainer.createPortalContainer(RootContainer.java:338)

          at

      org.exoplatform.container.RootContainer.registerPortalContainer(RootContainer.java:212)

          at

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

          at

      org.exoplatform.container.web.AbstractHttpServlet.init(AbstractHttpServlet.java:72)

          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:4149)

          at

      org.apache.catalina.core.StandardContext.start(StandardContext.java:4458)

          at

      org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)

          at

      org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)

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

          at

      org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)

          at

      org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)

          at

      org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)

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

          at

      org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)

          at

      org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)

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

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

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

          at

      org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)

          at

      org.apache.catalina.core.StandardService.start(StandardService.java:516)

          at

      org.apache.catalina.core.StandardServer.start(StandardServer.java:710)

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

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

          at

      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

          at

      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

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

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

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

      Caused by: java.lang.RuntimeException: Cannot instantiate component

      key=org.exoplatform.services.jcr.RepositoryService

      type=org.exoplatform.services.jcr.impl.RepositoryServiceImpl found at

      jndi:/localhost/portal/WEB-INF/conf/jcr/jcr-configuration.xml

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:124)

          at

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

          at

      org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

          at

      org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)

          at

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

          at

      org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

          ... 47 more

      Caused by: java.lang.RuntimeException: Cannot instantiate component

      key=org.exoplatform.services.jcr.config.RepositoryServiceConfiguration

      type=org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl

      found at jndi:/localhost/portal/WEB-INF/conf/jcr/jcr-configuration.xml

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:124)

          at

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

          at

      org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:400)

          at

      org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:389)

          at

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

          at

      org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:311)

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

          ... 53 more

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at

      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

          at

      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

          at

      org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:321)

          at

      org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:94)

          ... 59 more

      Caused by:

      org.exoplatform.services.jcr.config.RepositoryConfigurationException:

      org.apache.commons.dbcp.SQLNestedException: Cannot create

      PoolableConnectionFactory (Communications link failure

       

      The last packet sent successfully to the server was 0 milliseconds ago. The

      driver has not received any packets from the server.)

          at

      org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:140)

          at

      org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl.<init>(RepositoryServiceConfigurationImpl.java:89)

          ... 65 more

      Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create

      PoolableConnectionFactory (Communications link failure

       

      The last packet sent successfully to the server was 0 milliseconds ago. The

      driver has not received any packets from the server.)

          at

      org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)

          at

      org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:540)

          at

      org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.openConnection(JDBCConfigurationPersister.java:200)

          at

      org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister.init(JDBCConfigurationPersister.java:131)

          ... 66 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:

      Communications link failure

       

      The last packet sent successfully to the server was 0 milliseconds ago. The

      driver has not received any packets from the server.

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at

      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

          at

      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

          at

      com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)

          at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2209)

          at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:776)

          at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at

      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

          at

      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

          at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:352)

          at

      com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:284)

          at

      org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:37)

          at

      org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:290)

          at

      org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:877)

          at

      org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:851)

          ... 69 more

      Caused by: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:

      Communications link failure

       

      The last packet sent successfully to the server was 0 milliseconds ago. The

      driver has not received any packets from the server.

          at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

          at

      sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

          at

      sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

          at java.lang.reflect.Constructor.newInstance(Constructor.java:532)

          at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

          at

      com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1074)

          at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:343)

          at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2132)

          ... 82 more

      Caused by: java.net.ConnectException: Connection refused

          at java.net.PlainSocketImpl.socketConnect(Native Method)

          at

      java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)

          at

      java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)

          at

      java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)

          at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)

          at java.net.Socket.connect(Socket.java:546)

          at java.net.Socket.connect(Socket.java:495)

          at java.net.Socket.<init>(Socket.java:392)

          at java.net.Socket.<init>(Socket.java:235)

          at

      com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)

          at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)

          ... 83 more

        • 1. Re: GateIn + Ubuntu + MySQL problem
          Marko Strukelj Master

          Looks like your local mysql server doesn't accept connections. Maybe it hasn't been started, or configured to accept tcp connections. Or maybe your firewall is misconfigured.

           

          Make sure 'telnet localhost 3306' establishes connection.

          • 2. Re: GateIn + Ubuntu + MySQL problem
            Rihards Zbitkovskis Newbie

            Port 3306 is open,  init.d/mysql status shows start/running. If I run gatein with default configuration.properties file, it starts normally and I can even deploy portlet which uses MySQL and it works like a charm!

             

            Still, when I try to configure GateIn to store it's idm and jcr databases into mysql, it fails to start properly..

            • 3. Re: GateIn + Ubuntu + MySQL problem
              Marko Strukelj Master

              The stack trace never lies, and yours says it can't connect . Actually it appears that connection is actively refused. One more possible reason could be a limit to a number of connections on the server side.

              ...

              Caused by: java.net.ConnectException: Connection refused

                  at java.net.PlainSocketImpl.socketConnect(Native Method)

                  at

              java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327)

                  at

              java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)

                  at

              java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180)

                  at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384)

                  at java.net.Socket.connect(Socket.java:546)

                  at java.net.Socket.connect(Socket.java:495)

                  at java.net.Socket.<init>(Socket.java:392)

                  at java.net.Socket.<init>(Socket.java:235)

                  at

              com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:253)

                  at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:292)

                  ... 83 more

               

              1 of 1 people found this helpful