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

        I have copied the ojdbc6.jar file in /software/jboss-as-7.1.1.Final/standalone/deployments/ directory..removed the ojdbc14.jar file...but still getting same error...but EAR's are deployed successfully...

        13:53:54,599 INFO  [org.hibernate.cfg.Configuration] (MSC service thread 1-2) HHH000041: Configured SessionFactory: null

        13:53:54,673 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (MSC service thread 1-2) HHH000402: Using Hibernate built-in connection pool (not for production use!)

        13:53:54,681 ERROR [stderr] (MSC service thread 1-2) org.hibernate.service.classloading.spi.ClassLoadingException: Specified JDBC Driver oracle.jdbc.OracleDriver class not found

        13:53:54,681 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:107)

        13:53:54,682 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

        13:53:54,683 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

        13:53:54,683 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

        13:53:54,684 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)

        13:53:54,689 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)

        13:53:54,690 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

        13:53:54,690 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

        13:53:54,691 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

        13:53:54,695 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)

        13:53:54,696 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2279)

        13:53:54,696 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2275)

        13:53:54,697 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1744)

        13:53:54,698 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)

        13:53:54,698 ERROR [stderr] (MSC service thread 1-2)     at com.chamberapp.Startsession.openSession(Startsession.java:19)

        13:53:54,700 ERROR [stderr] (MSC service thread 1-2)     at com.chamberapp.MapAppWebServices.<init>(MapAppWebServices.java:96)

        13:53:54,700 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        13:53:54,702 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

        13:53:54,703 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        13:53:54,706 ERROR [stderr] (MSC service thread 1-2)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

        13:53:54,707 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.newInstance(Class.java:374)

        13:53:54,708 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170)

        13:53:54,710 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96)

        13:53:54,711 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)

        13:53:54,713 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)

        13:53:54,713 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

        13:53:54,720 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)

        13:53:54,721 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

        13:53:54,721 ERROR [stderr] (MSC service thread 1-2)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

        13:53:54,722 ERROR [stderr] (MSC service thread 1-2)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

        13:53:54,723 ERROR [stderr] (MSC service thread 1-2)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

        13:53:54,724 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Thread.run(Thread.java:744)

        13:53:54,724 ERROR [stderr] (MSC service thread 1-2) Caused by: org.hibernate.service.classloading.spi.ClassLoadingException: Unable to load class [oracle.jdbc.OracleDriver]

        13:53:54,725 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:141)

        13:53:54,726 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:104)

        13:53:54,726 ERROR [stderr] (MSC service thread 1-2)     ... 31 more

        13:53:54,731 ERROR [stderr] (MSC service thread 1-2) Caused by: java.lang.ClassNotFoundException: Could not load requested class : oracle.jdbc.OracleDriver

        13:53:54,732 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$1.findClass(ClassLoaderServiceImpl.java:99)

        13:53:54,732 ERROR [stderr] (MSC service thread 1-2)     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

        13:53:54,733 ERROR [stderr] (MSC service thread 1-2)     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

        13:53:54,733 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.forName0(Native Method)

        13:53:54,737 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.forName(Class.java:270)

        13:53:54,738 ERROR [stderr] (MSC service thread 1-2)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:138)

        13:53:54,739 ERROR [stderr] (MSC service thread 1-2)     ... 32 more

         

        help me....pls.....

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

          Frank, can you please help me...it seems ojdbc jar files are not accessing...

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

            Which OS are you using and how are you starting your AS?

            The deployment scanner is only used in standalone mode and if it is configured.

            Do you see the jdbc driver in the web console (http://localhost:9990/console?)

            I'd recommend to install the jdbc driver as a module instead as suggested in JDBC Driver / DataSource Setup | HAL Management Console

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

              Hi, Wolfgang

              Thanks for reply...

               

              I am using O.S ubuntu 13.10.

               

               

              I have followed below url to enable the module...

               

              https://wiki.snowflakesoftware.com/display/GP30DOC/Install+JDBC+drivers+for+JBossAs7.1.1.Final

               

               

              But still not resolved the issue...

              Let me know what i am missing....Please help me...

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

                Somehow I am not able to access the URL above.

                If you install a JDBC driver into WildFly 8 as a regular JAR deployment you should be able to find the driver web console -> deployments

                 

                But as mentioned before I'd recommend to install the JDBC drive as a module.

                This is mainly

                1. create the appropriate directoriy under $JBOSS_HOME/modules/system/layers/base/com (eg oracle/main)
                2. Copy the jar file into the $JBOSS_HOME/modules/system/layers/base/com/oracle/main
                3. Create the file module.xml in the same folder with the following content:

                    

                ?xml version="1.0" encoding="UTF-8"?>

                <module xmlns="urn:jboss:module:1.3" name="com.oracle">

                    <resources>

                        <resource-root path="ojdbc6.jar"/>

                    </resources>

                    <dependencies>

                        <module name="javax.api"/>

                        <module name="javax.transaction.api"/>

                     </dependencies>

                </module>

                 

                Then you should add the driver via jboss-cli

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

                 

                You check via jboss-cli if the JDBC driver is installed via

                /subsystem=datasources:installed-drivers-list

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

                  i am not working with WildFly 8 version.....i am using jboss-as-7.1.1.final...

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

                    There is no big difference to jboss 7.1.1.

                     

                    1. create the appropriate directoriy under $JBOSS_HOME/modules/com/oracle/main/
                    2. Copy the jar file into the $JBOSS_HOME/modules/com/oracle/main/
                    3. Create the file module.xml in the same folder with the following content:

                     

                    <?xml version="1.0" encoding="UTF-8"?>

                    <module xmlns="urn:jboss:module:1.1" name="com.oracle">

                        <resources>

                            <resource-root path="ojdbc6.jar"/>

                        </resources>

                        <dependencies>

                            <module name="javax.api"/>

                            <module name="javax.transaction.api"/>

                         </dependencies>

                    </module>

                     

                    /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)

                     

                    /subsystem=datasources:installed-drivers-list

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

                      I have followed same steps..

                      Oracle

                      Create a folder directory structure as follows under your {Jbossdirectory}:

                       

                      {Jbossdirectory}\oracle\ojdbc6\main\

                       

                       

                      Save your Oracle JDBC driver(s) (e.g. ojdbc6-11.2.0.2.0.jar) to the 'main' folder:

                      Copy the relevant <module> element from the example below and paste it into your module.xml file:

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

                        Do you still get the Specified "JDBC Driver oracle.jdbc.OracleDriver class not found" message?

                        • 24. 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 "JDBC Driver oracle.jdbc.OracleDriver class not found" exception....

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

                            Did you also successfully execute these two cli commands as suggested above?

                            /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)

                             

                            /subsystem=datasources:installed-drivers-list

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

                              where we need to execute these 2 commands. if you don't mine can you please tell me where we need to execute.

                              In standalone.xml file i added below highlighted lines in bold and underlined

                               

                               

                                  <subsystem xmlns="urn:jboss:domain:datasources:1.0">
                                      <datasources>
                                          <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                                              <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
                                              <driver>h2</driver>
                                              <security>
                                                  <user-name>sa</user-name>
                                                  <password>sa</password>
                                              </security>
                                          </datasource>
                                          <drivers>
                                              <driver name="h2" module="com.h2database.h2">
                                                  <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
                                              </driver>
                                              <driver name="oracle" module="com.oracle.ojdbc6">
                                                  <xa-datasource-class>com.oracle.ojdbc6.ojdbc6</xa-datasource-class>
                                              </driver>
                                          </drivers>
                                      </datasources>
                                  </subsystem>

                              please help me friends...

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

                                The name of your xa-datasource-class is incorrect, it must be oracle.jdbc.xa.client.OracleXADataSource. It has nothing to do with your module name!

                                But you anyways are not using XA-Datasource but the standard data source.

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

                                  Use jboss-cli to connect to the running server instance: $JBOSS_HOME/bin/jboss-cli.sh --controller=localhost:9990 --connect --user=... --password=...

                                  Before it is necessary to create an admin user as far as I know: $JBOSS_HOME/bin/add-user.sh --user "..." --password "..."

                                  Choose values for user and password as you like.

                                  Once connected to the running JBoss instance, execute the command: /subsystem=datasources:installed-drivers-list

                                   

                                  This should print something like

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

                                  {

                                      "outcome" => "success",

                                      "result" => [

                                          {

                                              "driver-name" => "sqljdbc41.jar",

                                              "deployment-name" => "sqljdbc41.jar",

                                              "driver-module-name" => undefined,

                                              "module-slot" => undefined,

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

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

                                              "driver-class-name" => "com.microsoft.sqlserver.jdbc.SQLServerDriver",

                                              "driver-major-version" => 4,

                                              "driver-minor-version" => 1,

                                              "jdbc-compliant" => true

                                          },

                                          {

                                              "driver-name" => "ojdbc7.jar",

                                              "deployment-name" => "ojdbc7.jar",

                                              "driver-module-name" => undefined,

                                              "module-slot" => undefined,

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

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

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

                                              "driver-major-version" => 12,

                                              "driver-minor-version" => 1,

                                              "jdbc-compliant" => true

                                          },

                                          {

                                              "driver-name" => "ifxjdbc_all.jar",

                                              "deployment-name" => "ifxjdbc_all.jar",

                                              "driver-module-name" => undefined,

                                              "module-slot" => undefined,

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

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

                                              "driver-class-name" => "com.informix.jdbc.IfxDriver",

                                              "driver-major-version" => 3,

                                              "driver-minor-version" => 0,

                                              "jdbc-compliant" => true

                                          }

                                      ]

                                  }

                                  then.

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

                                    Thanks for info..

                                    1) I have changed the driver class name as "oracle.jdbc.OracleDriver " inn standalone.xml :

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

                                                            <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>

                                                        </driver>

                                     

                                     

                                    2) and added the high lated one line in jboss-deployment-structure.xml

                                    <?xml version="1.0" encoding="UTF-8"?>

                                     

                                    <jboss-deployment-structure>

                                     

                                        <sub-deployment name="ChamberApp.war">

                                     

                                            <dependencies>

                                     

                                                <module name="org.hibernate" />

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

                                     

                                            </dependencies>

                                     

                                        </sub-deployment>

                                     

                                    </jboss-deployment-structure>

                                     

                                     

                                    3) Removed the ojdbc jar from /software/jboss-as-7.1.1.Final/standalone/deployments/ directory...

                                     

                                     

                                    Now the errors are not coming, EAR is deployed successfully with out error...but when i try to access the "wsdl" url it's not open and shows below errors in console:

                                     

                                    15:59:17,002 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ChamberApp]] (http-localhost-127.0.0.1-8085-1) Marking servlet MapAppWebServices as unavailable

                                    15:59:17,004 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ChamberApp].[MapAppWebServices]] (http-localhost-127.0.0.1-8085-1) Allocate exception for servlet MapAppWebServices: java.lang.ClassNotFoundException: com.chamberapp.MapAppWebServices from [Module "deployment.ChamberAppEAR.ear.ChamberApp.war:main" from Service Module Loader]

                                        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)

                                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)

                                        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)

                                        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)

                                        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)

                                        at org.jboss.as.web.deployment.WebInjectionContainer.newInstance(WebInjectionContainer.java:72) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                                        at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1156) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:952) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:188) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

                                        at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

                                        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

                                        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

                                        at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_55]

                                     

                                    15:59:20,285 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ChamberApp].[MapAppWebServices]] (http-localhost-127.0.0.1-8085-1) Servlet MapAppWebServices is currently unavailable

                                    15:59:22,473 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/ChamberApp].[MapAppWebServices]] (http-localhost-127.0.0.1-8085-1) Servlet MapAppWebServices is currently unavailable

                                     

                                    thanks once again..please help me..