1 2 3 4 Previous Next 52 Replies Latest reply on Sep 12, 2015 5:23 AM by latha Go to original post
      • 30. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
        latha

        thanks..for the steps to check...i got below out when i run like

        [standalone@localhost:9999 /] /subsystem=datasources:installed-drivers-list

        {

            "outcome" => "success",

            "result" => [

                {

                    "driver-name" => "oracle",

                    "deployment-name" => undefined,

                    "driver-module-name" => "com.oracle.ojdbc6",

                    "module-slot" => "main",

                    "driver-datasource-class-name" => "",

                    "driver-xa-datasource-class-name" => "oracle.jdbc.OracleDriver",

                    "driver-class-name" => "oracle.jdbc.OracleDriver",

                    "driver-major-version" => 11,

                    "driver-minor-version" => 1,

                    "jdbc-compliant" => true

                },

                {

                    "driver-name" => "h2",

                    "deployment-name" => undefined,

                    "driver-module-name" => "com.h2database.h2",

                    "module-slot" => "main",

                    "driver-datasource-class-name" => "",

                    "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",

                    "driver-class-name" => "org.h2.Driver",

                    "driver-major-version" => 1,

                    "driver-minor-version" => 3,

                    "jdbc-compliant" => true

                }

            ]

        }

         

        Please help me...

        • 31. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
          lafr

          NOOOOOOOOOOOOO!!!!!!!

          If you want to provide the xa-datasource-class although you obviously don't need it, it must be <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>. Period.

          Not <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>, not <xa-datasource-class>com.oracle.ojdbc6.ojdbc6</xa-datasource-class> or whatever else!!!

           

          Okay, the access to the oracle module seems to be available now.

          I think it's time to start a new thread with output of $JAVA_HOME/bin/jar -tvf ChamberAppEAR.ear.

          ChamberApp.war does not access to class com.chamberapp.MapAppWebServices. Where is this class?

          • 32. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
            latha

            It's created the new class by us... for Webservices...it's developed using with hibernate...it's located in src folder

            Screenshot from 2015-09-08 16:43:55.png

             

            MapAppWebServices.java.. page we can get under src/com.chamberapp/

             

            I am going to change the path <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

             

            Thanks for your support.....................thank you so much

            • 33. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
              latha

              Still, i am getting same error..

              00:37:57,796 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (MSC service thread 1-3) HHH000402: Using Hibernate built-in connection pool (not for production use!)

              00:37:57,798 ERROR [stderr] (MSC service thread 1-3) org.hibernate.service.classloading.spi.ClassLoadingException: Specified JDBC Driver oracle.jdbc.OracleDriver class not found

              00:37:57,799 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:107)

              00:37:57,799 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

              00:37:57,800 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

              00:37:57,801 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

              00:37:57,801 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)

              00:37:57,802 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)

              00:37:57,803 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

              00:37:57,803 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

              00:37:57,804 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

              00:37:57,804 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)

              00:37:57,805 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2279)

              00:37:57,806 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2275)

              00:37:57,806 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1744)

              00:37:57,807 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)

              00:37:57,807 ERROR [stderr] (MSC service thread 1-3)     at com.chamberapp.Startsession.openSession(Startsession.java:19)

              00:37:57,808 ERROR [stderr] (MSC service thread 1-3)     at com.chamberapp.MapAppWebServices.<init>(MapAppWebServices.java:96)

              00:37:57,808 ERROR [stderr] (MSC service thread 1-3)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

              00:37:57,809 ERROR [stderr] (MSC service thread 1-3)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

              00:37:57,809 ERROR [stderr] (MSC service thread 1-3)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

              00:37:57,810 ERROR [stderr] (MSC service thread 1-3)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

              00:37:57,810 ERROR [stderr] (MSC service thread 1-3)     at java.lang.Class.newInstance(Class.java:374)

              00:37:57,811 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170)

              00:37:57,811 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96)

              00:37:57,812 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)

              00:37:57,813 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)

              00:37:57,813 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

              00:37:57,814 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)

              00:37:57,814 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

              00:37:57,815 ERROR [stderr] (MSC service thread 1-3)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

              00:37:57,816 ERROR [stderr] (MSC service thread 1-3)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

              00:37:57,816 ERROR [stderr] (MSC service thread 1-3)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

              00:37:57,817 ERROR [stderr] (MSC service thread 1-3)     at java.lang.Thread.run(Thread.java:744)

              00:37:57,817 ERROR [stderr] (MSC service thread 1-3) Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [oracle.jdbc.OracleDriver]

              00:37:57,818 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:141)

              00:37:57,819 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:104)

              00:37:57,819 ERROR [stderr] (MSC service thread 1-3)     ... 31 more

              00:37:57,820 ERROR [stderr] (MSC service thread 1-3) Caused by: java.lang.ClassNotFoundException: Could not load requested class : oracle.jdbc.OracleDriver

              00:37:57,821 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$1.findClass(ClassLoaderServiceImpl.java:99)

              00:37:57,821 ERROR [stderr] (MSC service thread 1-3)     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

              00:37:57,822 ERROR [stderr] (MSC service thread 1-3)     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

              00:37:57,822 ERROR [stderr] (MSC service thread 1-3)     at java.lang.Class.forName0(Native Method)

              00:37:57,823 ERROR [stderr] (MSC service thread 1-3)     at java.lang.Class.forName(Class.java:270)

              00:37:57,823 ERROR [stderr] (MSC service thread 1-3)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:138)

              00:37:57,824 ERROR [stderr] (MSC service thread 1-3)     ... 32 more

              00:37:57,825 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-3) Creating Service {http://chamberapp.com/}MapAppWebServicesService from class com.chamberapp.MapAppWebServices

              00:37:58,355 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-3) Setting the server's publish address to be http://localhost:8085/ChamberApp/MapAppWebServices

               

              In standalone.xml file :

              <driver name="oracle" module="com.oracle.ojdbc6">

                                      <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                                  </driver>

               

              Results:

              [standalone@localhost:9999 /] /subsystem=datasources:installed-drivers-list

              {

                  "outcome" => "success",

                  "result" => [

                      {

                          "driver-name" => "h2",

                          "deployment-name" => undefined,

                          "driver-module-name" => "com.h2database.h2",

                          "module-slot" => "main",

                          "driver-datasource-class-name" => "",

                          "driver-xa-datasource-class-name" => "org.h2.jdbcx.JdbcDataSource",

                          "driver-class-name" => "org.h2.Driver",

                          "driver-major-version" => 1,

                          "driver-minor-version" => 3,

                          "jdbc-compliant" => true

                      },

                      {

                          "driver-name" => "oracle",

                          "deployment-name" => undefined,

                          "driver-module-name" => "com.oracle.ojdbc6",

                          "module-slot" => "main",

                          "driver-datasource-class-name" => "",

                          "driver-xa-datasource-class-name" => "oracle.jdbc.xa.client.OracleXADataSource",

                          "driver-class-name" => "oracle.jdbc.OracleDriver",

                          "driver-major-version" => 11,

                          "driver-minor-version" => 1,

                          "jdbc-compliant" => true

                      }

                  ]

              }

               

              Please help me........

              • 34. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                mayerw01

                What is the contents of your module.xml?

                 

                As suggested before I would rather install the driver via cli and not change the stanalone.xml manually. This would allow the AS to perform some consistency checks.

                So maybe you can remove all the oracle driver entries you made before and then execute a command like this instead:

                /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)

                 

                To verify that this driver can be accessed you should then add a datasource which uses this driver. This could be done via web console (Profile -> Datasources -> add)

                Then you should test this connection by selecting the connection tab and pushing the 'Test Connection' button.

                 

                But you could also execute following cli commands instead:

                /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                /subsystem=datasources/data-source=TestOracle:enable  

                /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                • 35. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                  latha

                  Thanks for your reply.....

                   

                  1) I have removed the entires which are i placed in standalone.xml

                      Removed content:

                  <driver name="oracle" module="com.oracle.ojdbc6">

                        <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>

                  </driver>

                   

                  2) Executed this command : /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)

                  Result:

                  [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)

                  {

                      "outcome" => "failed",

                      "failure-description" => "JBAS014803: Duplicate resource [

                      (\"subsystem\" => \"datasources\"),

                      (\"jdbc-driver\" => \"oracle\")

                  ]",

                      "rolled-back" => true

                  }

                   

                  3) executed other commands and those results are please check below:

                  a) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                  'test-connection-ta-source=TestOracle:add' is not a valid operation name.

                  b) [standalone@localhost:9999 /]  /subsystem=datasources/data-source=TestOracle:enable

                  {

                      "outcome" => "failed",

                      "failure-description" => "JBAS014807: Management resource '[

                      (\"subsystem\" => \"datasources\"),

                      (\"data-source\" => \"TestOracle\")

                  ]' not found",

                      "rolled-back" => true

                  }

                  c) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                  {

                      "outcome" => "failed",

                      "failure-description" => "JBAS014807: Management resource '[

                      (\"subsystem\" => \"datasources\"),

                      (\"data-source\" => \"TestOracle\")

                  ]' not found",

                      "rolled-back" => true

                  }

                   

                  Let me know, where i am doing wrong...what i need to do...

                   

                  Thanks in advance..

                  • 36. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                    mayerw01

                    "JBAS014803: Duplicate resource" means that you did not remove all the entries for the driver "oracle".

                    try the cli command:

                    /subsystem=datasources/jdbc-driver=oracle:remove

                    before adding the oracle driver via step 2

                    Step 3 depends on successful completion of step 2

                    • 37. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                      latha

                      please find the out put:

                      1) [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)

                      {"outcome" => "success"}

                       

                       

                      2) a) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                      'test-connection-ta-source=TestOracle:add' is not a valid operation name.

                       

                       

                      b) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:enable

                      {

                          "outcome" => "failed",

                          "failure-description" => "JBAS014807: Management resource '[

                          (\"subsystem\" => \"datasources\"),

                          (\"data-source\" => \"TestOracle\")

                      ]' not found",

                          "rolled-back" => true

                      }

                       

                       

                      c) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                      {

                          "outcome" => "failed",

                          "failure-description" => "JBAS014807: Management resource '[

                          (\"subsystem\" => \"datasources\"),

                          (\"data-source\" => \"TestOracle\")

                      ]' not found",

                          "rolled-back" => true

                      }

                      • 38. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                        mayerw01

                        You try to test a data source connection which does not exist.

                        Apparently you did not add the data-source first (either via web console or cli).

                        I'd suggest that you execute these commands in this sequence.

                         

                        /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                        /subsystem=datasources/data-source=TestOracle:enable  

                        /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                        • 39. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                          latha

                          I have followed what you suggested me...
                          My DB source is available on server...

                           

                          First i execute the  remove command to remove duplicate.

                           

                          Later i executed this command

                          [standalone@localhost:9999 /] /subsystem=datasources/jdbc-driver=oracle:add(driver-name=oracle,driver-module-name=com.oracle,driver-class-name=oracle.jdbc.OracleDriver,driver-xa-datasource-class-name=oracle.jdbc.xa.client.OracleXADataSource)

                          {"outcome" => "success"}


                          Later i run below three commands one by one


                          /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                           

                          /subsystem=datasources/data-source=TestOracle:enable  

                           

                          /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                           

                          Please let me know what i missed...i can't get still solution...

                          • 40. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                            mayerw01

                            What is the output of the last 3 commands (after adding the driver)?

                            • 41. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                              latha

                              These are out puts for 3 commands after adding the driver

                               

                              1) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-ta-source=TestOracle:add(driver-name=oracle,user-name=testuser,password=testpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                               

                              'test-connection-ta-source=TestOracle:add' is not a valid operation name.

                               

                              2) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:enable

                              {

                                  "outcome" => "failed",

                                  "failure-description" => "JBAS014807: Management resource '[

                                  (\"subsystem\" => \"datasources\"),

                                  (\"data-source\" => \"TestOracle\")

                              ]' not found",

                                  "rolled-back" => true

                              }

                               

                              3)[standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                              {

                                  "outcome" => "failed",

                                  "failure-description" => "JBAS014807: Management resource '[

                                  (\"subsystem\" => \"datasources\"),

                                  (\"data-source\" => \"TestOracle\")

                              ]' not found",

                                  "rolled-back" => true

                              }

                              • 42. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                                mayerw01

                                Sorry, there was a typo in the data source configuration. It should be:

                                /subsystem=datasources/data-source=TestOracle:add(driver-name=oracle,user-name=username,password=userpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                                • 43. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                                  latha

                                  Thanks for keep giving inputs for me....thank you so much.............

                                   

                                  Please find the out put for 3 commands :

                                   

                                  1) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:add(driver-name=oracle,user-name=username,password=userpassword,connection-url=jdbc:oracle:thin:@localhost:1521:database,jndi-name=java:jboss/datasources/TestOracle)

                                  {"outcome" => "success"}

                                   

                                  2) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:enable

                                  {"outcome" => "success"}

                                   

                                  3) [standalone@localhost:9999 /] /subsystem=datasources/data-source=TestOracle:test-connection-in-pool

                                  {

                                      "outcome" => "failed",

                                      "failure-description" => "JBAS010440: failed to invoke operation: JBAS010447: Connection is not valid",

                                      "rolled-back" => true

                                  }

                                   

                                  It seems 3rd command is fails..

                                  • 44. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                                    mayerw01

                                    It looks like the datasource is not pointing to a valid username, password and database combination.

                                    Did replace the username with your username, the userpassword with your password and the database with your database sid?