7 Replies Latest reply on Oct 26, 2012 11:50 AM by Nicolas Filotto

    JCR & IDM issue due to multiple Users in Oracle

    Dhanya Sreejith Newbie

      hiii....

       

            I configured GateIn with JSR and IDM to "user1". After that I created another user - "user2", on same oracle machine & configured JCR & IDM to it,  without deleting the first user.  When I start,  GateIn after this, I got following exception :

       

      2012-10-10 11:13:55,750 INFO  [exo.jcr.component.core.JDBCWorkspaceDataContainer] Using a dialect 'Oracle'

      2012-10-10 11:13:55,843 ERROR [exo.jcr.component.core.RepositoryServiceImpl] Error start repository service

      java.lang.RuntimeException: Cannot instantiate component class org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer

          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.services.jcr.impl.RepositoryContainer$3.run(RepositoryContainer.java:297)

          at org.exoplatform.services.jcr.impl.RepositoryContainer$3.run(RepositoryContainer.java:275)

          at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedExceptionAction(SecurityHelper.java:311)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerWorkspace(RepositoryContainer.java:274)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerWorkspacesComponents(RepositoryContainer.java:698)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.registerComponents(RepositoryContainer.java:611)

          at org.exoplatform.services.jcr.impl.RepositoryContainer.<init>(RepositoryContainer.java:157)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:144)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.init(RepositoryServiceImpl.java:321)

          at org.exoplatform.services.jcr.impl.RepositoryServiceImpl.start(RepositoryServiceImpl.java:276)

          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.exoplatform.container.LifecycleVisitor.traverse(LifecycleVisitor.java:100)

          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.createPortalContainers(RootContainer.java:287)

          at org.exoplatform.container.web.PortalContainerCreator$2.run(PortalContainerCreator.java:74)

          at org.exoplatform.container.web.PortalContainerCreator$2.run(PortalContainerCreator.java:71)

          at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedAction(SecurityHelper.java:291)

          at org.exoplatform.container.web.PortalContainerCreator.contextInitialized(PortalContainerCreator.java:70)

          at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3910)

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

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:310)

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:142)

          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:461)

          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)

          at org.jboss.web.deployers.WebModule.start(WebModule.java:97)

          at sun.reflect.GeneratedMethodAccessor306.invoke(Unknown Source)

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

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

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)

          at $Proxy38.start(Unknown Source)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.ServiceController.doChange(ServiceController.java:688)

          at org.jboss.system.ServiceController.start(ServiceController.java:460)

          at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:163)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:99)

          at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)

          at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)

          at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)

          at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)

          at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)

          at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)

          at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)

          at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)

          at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)

          at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)

          at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)

          at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)

          at org.jboss.Main.boot(Main.java:221)

          at org.jboss.Main$1.run(Main.java:556)

          at java.lang.Thread.run(Thread.java:619)

      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)

          ... 99 more

      Caused by: javax.jcr.RepositoryException: Error of JDBC connection open. SQLException: Listener refused the connection with the following error:

      ORA-12519, TNS:no appropriate service handler found

      , SQLState: 66000, VendorError: 12519: Listener refused the connection with the following error:

      ORA-12519, TNS:no appropriate service handler found

      : Listener refused the connection with the following error:

       

       

       

      Thnx in advance ......

        • 2. Re: JCR & IDM issue due to multiple Users in Oracle
          Dhanya Sreejith Newbie

          hii..

               I've downloaded GateIn-3.2.0.Final-jbossas5.zip...

          • 3. Re: JCR & IDM issue due to multiple Users in Oracle
            Nicolas Filotto Novice

            Please share your file server/default/conf/gatein/configuration.properties

            • 4. Re: JCR & IDM issue due to multiple Users in Oracle
              Dhanya Sreejith Newbie

              hiii...

                  here is my configuration.properties

               

              #

              # Copyright (C) 2009 eXo Platform SAS.

              #

              # This is free software; you can redistribute it and/or modify it

              # under the terms of the GNU Lesser General Public License as

              # published by the Free Software Foundation; either version 2.1 of

              # the License, or (at your option) any later version.

              #

              # This software is distributed in the hope that it will be useful,

              # but WITHOUT ANY WARRANTY; without even the implied warranty of

              # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

              # Lesser General Public License for more details.

              #

              # You should have received a copy of the GNU Lesser General Public

              # License along with this software; if not, write to the Free

              # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA

              # 02110-1301 USA, or see the FSF site: http://www.fsf.org.

              #

               

              #

              gatein.conf.dir=${jboss.server.home.dir}/conf/gatein

              gatein.data.dir=${jboss.server.data.dir}/gatein

               

              # DB

              gatein.db.data.dir=${gatein.data.dir}/db

               

              # JCR

              gatein.jcr.config.type=local

              gatein.jcr.datasource.name=java:jdbcjcr

              gatein.jcr.datasource.dialect=auto

              gatein.jcr.datasource.driver=oracle.jdbc.driver.OracleDriver

              gatein.jcr.datasource.url=jdbc:oracle:thin:@192.168.1.116:1521:XE

              gatein.jcr.datasource.username=abc

              gatein.jcr.datasource.password=abc

               

              gatein.jcr.data.dir=${gatein.data.dir}/jcr

              gatein.jcr.storage.data.dir=${gatein.jcr.data.dir}/values

              gatein.jcr.cache.config=war:/conf/jcr/jbosscache/${gatein.jcr.config.type}/config.xml

              gatein.jcr.lock.cache.config=war:/conf/jcr/jbosscache/${gatein.jcr.config.type}/lock-config.xml

              gatein.jcr.index.data.dir=${gatein.jcr.data.dir}/lucene

              gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.DefaultChangesFilter

              gatein.jcr.index.cache.config=war:/conf/jcr/jbosscache/cluster/indexer-config.xml

              gatein.jcr.jgroups.config=classpath:/jgroups/gatein-${gatein.default.jgroups.stack:udp}.xml

              gatein.jcr.workspace.default=portal-system

              gatein.jcr.workspace.system=system

               

              # IDM

              gatein.idm.datasource.name=java:jdbcidm

              gatein.idm.datasource.driver=oracle.jdbc.driver.OracleDriver

              gatein.idm.datasource.url=jdbc:oracle:thin:@192.168.1.116:1521:XE

              gatein.idm.datasource.username=abc

              gatein.idm.datasource.password=abc

               

              # EMail

              gatein.email.smtp.username=

              gatein.email.smtp.password=

              gatein.email.smtp.host=smtp.gmail.com

              gatein.email.smtp.port=465

              gatein.email.smtp.starttls.enable=true

              gatein.email.smtp.auth=true

              gatein.email.smtp.socketFactory.port=465

              gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory

               

              # Portlet container configuration

              gatein.portlet.validation=true

              gatein.portlet.config=${gatein.conf.dir}/portlet.xml

               

              # Portal configuration

              gatein.portal.idm.createuserportal=false

              gatein.portal.idm.destroyuserportal=true

              gatein.portal.controller.config=${gatein.conf.dir}/controller.xml

               

              # key files for gadget

              gatein.gadgets.securitytokenkeyfile=${gatein.conf.dir}/gadgets/key.txt

              gatein.gadgets.signingkeyfile=${gatein.conf.dir}/gadgets/oauthkey.pem

               

               

               

              our application is also connected to the same service.

              • 5. Re: JCR & IDM issue due to multiple Users in Oracle
                Nicolas Filotto Novice

                Did you remove the second portal container called sample-portal by removing the ear file gatein-sample-portal.ear? Indeed by default you have 2 portal containers "portal" and "sample-portal", they both have their own JCR instance that is why you cannot use the same db schema for both of them. If you check well, before you changed this config file, there was a variable ${name} in the datasources url in order to have a specific HSQLDB directory per portal container.

                • 6. Re: JCR & IDM issue due to multiple Users in Oracle
                  Dhanya Sreejith Newbie

                  hiii...

                     thnx for your reply..... I had already removed gatein-sample-portal.ear........

                  • 7. Re: JCR & IDM issue due to multiple Users in Oracle
                    Nicolas Filotto Novice

                    I could not reproduce your issue.

                     

                    Here are the steps I did:

                    • I downloaded GateIn-3.2.0.Final-jbossas5.zip
                    • I removed gatein-sample-portal.ear from server/default/deploy
                    • I configured my datasources in server/default/conf/gatein/configuration.properties as next:

                    ...

                    gatein.jcr.datasource.driver=oracle.jdbc.OracleDriver

                    gatein.jcr.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl

                    gatein.jcr.datasource.username=gtn32

                    gatein.jcr.datasource.password=admin

                    ...

                     

                    gatein.idm.datasource.driver=oracle.jdbc.OracleDriver

                    gatein.idm.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl

                    gatein.idm.datasource.username=gtn32

                    gatein.idm.datasource.password=admin

                     

                    BTW use oracle.jdbc.OracleDriver instead of oracle.jdbc.driver.OracleDriver since it is deprecated more details here https://forums.oracle.com/forums/ann.jspa?annID=201

                    • I put ojdbc6.jar into server/default/lib
                    • I started my Oracle 11.2.0.1.0
                    • I created my user as next :

                     

                    CREATE USER "GTN32" IDENTIFIED BY "admin" ACCOUNT UNLOCK;

                    GRANT CREATE SEQUENCE TO "GTN32";

                    GRANT CREATE TABLE TO "GTN32";

                    GRANT CREATE TRIGGER TO "GTN32";

                    GRANT UNLIMITED TABLESPACE TO "GTN32";

                    GRANT "CONNECT" TO "GTN32";

                    GRANT "RESOURCE" TO "GTN32";

                     

                    • I started the server => The server could start normally
                    • I stopped it
                    • I created a new user as next:

                     

                    CREATE USER "GTN32C" IDENTIFIED BY "admin" ACCOUNT UNLOCK;

                    GRANT CREATE SEQUENCE TO "GTN32C";

                    GRANT CREATE TABLE TO "GTN32C";

                    GRANT CREATE TRIGGER TO "GTN32C";

                    GRANT UNLIMITED TABLESPACE TO "GTN32C";

                    GRANT "CONNECT" TO "GTN32C";

                    GRANT "RESOURCE" TO "GTN32C";

                     

                    • I reconfigured my datasources as next:

                    ...

                    gatein.jcr.datasource.driver=oracle.jdbc.OracleDriver

                    gatein.jcr.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl

                    gatein.jcr.datasource.username=gtn32c

                    gatein.jcr.datasource.password=admin

                    ...

                    gatein.idm.datasource.driver=oracle.jdbc.OracleDriver

                    gatein.idm.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl

                    gatein.idm.datasource.username=gtn32c

                    gatein.idm.datasource.password=admin

                     

                    • I relaunched the server  => The server could start normally