1 2 3 4 Previous Next 52 Replies Latest reply on Sep 12, 2015 5:23 AM by swarna latha

    How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final

    swarna latha Newbie

      Hi,

      I am unable to generated the EAR using with "jboss-as-7.1.1.Final" for existing code. I am able to run and generated the ear against jboss-5.1.0.GA.

       

      Can you please help me...
      Getting below errors:

      ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jboss.network.public: org.jboss.msc.service.StartException in service jboss.network.public: JBAS015810: failed to resolve interface public

        at org.jboss.as.server.services.net.NetworkInterfaceService.start(NetworkInterfaceService.java:97) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]

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

       

       

      10:41:55,589 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers

      10:41:55,594 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem

      10:41:55,618 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.

      10:41:55,682 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem

      10:41:55,697 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem

      10:41:55,701 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem

      10:41:55,742 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension

      10:41:55,749 INFO  [org.jboss.as.security] (MSC service thread 1-2) JBAS013100: Current PicketBox version=4.0.7.Final

      10:41:55,760 INFO  [org.jboss.as.connector] (MSC service thread 1-3) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.9.Final)

      10:41:55,889 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

      10:41:55,894 INFO  [org.jboss.as.naming] (MSC service thread 1-6) JBAS011802: Starting Naming Service

      10:41:55,898 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Bound mail session [java:jboss/mail/Default]

      10:41:56,023 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-3) JBoss Web Services - Stack CXF Server 4.0.2.GA

      10:41:56,452 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory /softwares/jboss-as-7.1.1.Final/standalone/deployments

      10:41:56,454 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015014: Re-attempting failed deployment ChamberAppEAR-150901.ear

      10:41:59,692 INFO  [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

      JBAS014777:   Services which failed to start:      service jboss.network.public: org.jboss.msc.service.StartException in service jboss.network.public: JBAS015810: failed to resolve interface public

       

       

      10:41:59,710 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Starting deployment of "ChamberAppEAR-150901.ear"

      10:41:59,794 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "ChamberApp.war"

      10:42:00,022 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."ChamberAppEAR-150901.ear"."ChamberApp.war".POST_MODULE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ChamberAppEAR-150901.ear"."ChamberApp.war".POST_MODULE: Failed to process phase POST_MODULE of subdeployment "ChamberApp.war" of deployment "ChamberAppEAR-150901.ear"

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_55]

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_55]

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

      Caused by: java.lang.RuntimeException: Error getting reflective information for class com.chamberapp.MapAppWebServices with ClassLoader ModuleClassLoader for Module "deployment.ChamberAppEAR-150901.ear.ChamberApp.war:main" from Service Module Loader

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.ee.metadata.MethodAnnotationAggregator.runtimeAnnotationInformation(MethodAnnotationAggregator.java:58)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.handleAnnotations(InterceptorAnnotationProcessor.java:85)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.processComponentConfig(InterceptorAnnotationProcessor.java:70)

        at org.jboss.as.ee.component.deployers.InterceptorAnnotationProcessor.deploy(InterceptorAnnotationProcessor.java:55)

        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        ... 5 more

      Caused by: java.lang.NoClassDefFoundError: Lorg/hibernate/Transaction;

        at java.lang.Class.getDeclaredFields0(Native Method) [rt.jar:1.7.0_55]

        at java.lang.Class.privateGetDeclaredFields(Class.java:2397) [rt.jar:1.7.0_55]

        at java.lang.Class.getDeclaredFields(Class.java:1806) [rt.jar:1.7.0_55]

        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]

        ... 10 more

      Caused by: java.lang.ClassNotFoundException: org.hibernate.Transaction from [Module "deployment.ChamberAppEAR-150901.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)

        ... 15 more

       

       

       

       

      Thanks in advance...please help me.....frnds...

        • 1. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
          Frank Langelage Master

          Your deployment is missing the class org.hibernate.Transaction.

          Hibernate module dependency is added, if you're using JPA, see https://docs.jboss.org/author/display/AS7/Implicit+module+dependencies+for+deployments. Do you?

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

            Hi Frank,

            Thanks for your reply and support.

            Actually i am new for Jboss AS 7.

            Yes, I am following that url..
            Yes, you are right... I have checked with /jboss-as-7.1.1.Final/modules/org/hibernate. This directory doesn't contains the directory for Transaction.

             

            Can you please tell me where i can get the class.

             

            Once again thanks for your reply.

            • 3. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
              Frank Langelage Master

              You got me wrong to some extend. I think JBoss AS 7.1.1 has hibernate-core-4.1.6.Final.jar and this definitely contains the interface org.hibernate.Transaction.

               

              The question was, do you use JPA? "The presence of an @PersistenceUnit or @PersistenceContext annotation, or a <persistence-unit-ref> or <persistence-context-ref> in a deployment descriptor.".

              Only if this is the case, you get access to org.hibernate module libs automatically.

              Otherwise you have to add it yourself, by providing a jboss-deployment-structure.xml file in your EAR/META-INF folder.

              See https://docs.jboss.org/author/display/AS7/Class+Loading+in+AS7.

               

              What means you're new to JBoss AS 7.1.1? The migrations just stated? Then you should seriously take into account to go to a more recent version like WildFly 9.0.1 or even 10.0.0.CR1.

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

                Hi Frank,

                Thanks for your quick reply.

                I found hibernate-core-4.0.1.Final.jar file in modules: /software/jboss-as-7.1.1.Final/modules/org/hibernate/main

                I didn't use JPA... "The presence of an @PersistenceUnit or @PersistenceContext annotation, or a <persistence-unit-ref> or <persistence-context-ref>" didn't find these tags and annotations in the code.
                I didn't find the jboss-deployment-structure.xml file.

                 

                Can you please suggest me.

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

                  have /jboss-as-7.1.1.Final/standalone/configuration/standalone.xml. file..

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

                   

                  <server xmlns="urn:jboss:domain:1.2">

                   

                      <extensions>

                          <extension module="org.jboss.as.clustering.infinispan"/>

                          <extension module="org.jboss.as.configadmin"/>

                          <extension module="org.jboss.as.connector"/>

                          <extension module="org.jboss.as.deployment-scanner"/>

                          <extension module="org.jboss.as.ee"/>

                          <extension module="org.jboss.as.ejb3"/>

                          <extension module="org.jboss.as.jdr"/>

                          <extension module="org.jboss.as.jmx"/>

                          <extension module="org.jboss.as.jpa"/>

                          <extension module="org.jboss.as.logging"/>

                          <extension module="org.jboss.as.mail"/>

                          <extension module="org.jboss.as.naming"/>

                          <extension module="org.jboss.as.osgi"/>

                          <extension module="org.jboss.as.pojo"/>

                          <extension module="org.jboss.as.remoting"/>

                          <extension module="org.jboss.as.sar"/>

                          <extension module="org.jboss.as.security"/>

                          <extension module="org.jboss.as.threads"/>

                          <extension module="org.jboss.as.transactions"/>

                          <extension module="org.jboss.as.web"/>

                          <extension module="org.jboss.as.webservices"/>

                          <extension module="org.jboss.as.weld"/>

                      </extensions>

                   

                      <management>

                          <security-realms>

                              <security-realm name="ManagementRealm">

                                  <authentication>

                                      <properties path="mgmt-users.properties" relative-to="jboss.server.config.dir"/>

                                  </authentication>

                              </security-realm>

                              <security-realm name="ApplicationRealm">

                                  <authentication>

                                      <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>

                                  </authentication>

                              </security-realm>

                          </security-realms>

                          <management-interfaces>

                              <native-interface security-realm="ManagementRealm">

                                  <socket-binding native="management-native"/>

                              </native-interface>

                              <http-interface security-realm="ManagementRealm">

                                  <socket-binding http="management-http"/>

                              </http-interface>

                          </management-interfaces>

                      </management>

                   

                      <profile>

                          <subsystem xmlns="urn:jboss:domain:logging:1.1">

                              <console-handler name="CONSOLE">

                                  <level name="INFO"/>

                                  <filter>

                                      <not>

                                          <match pattern="JBAS011054|JBAS011006"/>

                                      </not>

                                  </filter>

                                  <formatter>

                                      <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                  </formatter>

                              </console-handler>

                              <periodic-rotating-file-handler name="FILE">

                                  <formatter>

                                      <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>

                                  </formatter>

                                  <file relative-to="jboss.server.log.dir" path="server.log"/>

                                  <suffix value=".yyyy-MM-dd"/>

                                  <append value="true"/>

                              </periodic-rotating-file-handler>

                              <logger category="com.arjuna">

                                  <level name="WARN"/>

                              </logger>

                              <logger category="org.apache.tomcat.util.modeler">

                                  <level name="WARN"/>

                              </logger>

                              <logger category="sun.rmi">

                                  <level name="WARN"/>

                              </logger>

                              <logger category="jacorb">

                                  <level name="WARN"/>

                              </logger>

                              <logger category="jacorb.config">

                                  <level name="ERROR"/>

                              </logger>

                              <root-logger>

                                  <level name="INFO"/>

                                  <handlers>

                                      <handler name="CONSOLE"/>

                                      <handler name="FILE"/>

                                  </handlers>

                              </root-logger>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>

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

                                  </drivers>

                              </datasources>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

                              <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="500"/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:ee:1.0"/>

                          <subsystem xmlns="urn:jboss:domain:ejb3:1.2">

                              <session-bean>

                                  <stateless>

                                      <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>

                                  </stateless>

                                  <stateful default-access-timeout="5000" cache-ref="simple"/>

                                  <singleton default-access-timeout="5000"/>

                              </session-bean>

                              <pools>

                                  <bean-instance-pools>

                                      <strict-max-pool name="slsb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                      <strict-max-pool name="mdb-strict-max-pool" max-pool-size="20" instance-acquisition-timeout="5" instance-acquisition-timeout-unit="MINUTES"/>

                                  </bean-instance-pools>

                              </pools>

                              <caches>

                                  <cache name="simple" aliases="NoPassivationCache"/>

                                  <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>

                              </caches>

                              <passivation-stores>

                                  <file-passivation-store name="file"/>

                              </passivation-stores>

                              <async thread-pool-name="default"/>

                              <timer-service thread-pool-name="default">

                                  <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>

                              </timer-service>

                              <remote connector-ref="remoting-connector" thread-pool-name="default"/>

                              <thread-pools>

                                  <thread-pool name="default">

                                      <max-threads count="10"/>

                                      <keepalive-time time="100" unit="milliseconds"/>

                                  </thread-pool>

                              </thread-pools>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">

                              <cache-container name="hibernate" default-cache="local-query">

                                  <local-cache name="entity">

                                      <transaction mode="NON_XA"/>

                                      <eviction strategy="LRU" max-entries="10000"/>

                                      <expiration max-idle="100000"/>

                                  </local-cache>

                                  <local-cache name="local-query">

                                      <transaction mode="NONE"/>

                                      <eviction strategy="LRU" max-entries="10000"/>

                                      <expiration max-idle="100000"/>

                                  </local-cache>

                                  <local-cache name="timestamps">

                                      <transaction mode="NONE"/>

                                      <eviction strategy="NONE"/>

                                  </local-cache>

                              </cache-container>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:jca:1.1">

                              <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>

                              <bean-validation enabled="true"/>

                              <default-workmanager>

                                  <short-running-threads>

                                      <core-threads count="50"/>

                                      <queue-length count="50"/>

                                      <max-threads count="50"/>

                                      <keepalive-time time="10" unit="seconds"/>

                                  </short-running-threads>

                                  <long-running-threads>

                                      <core-threads count="50"/>

                                      <queue-length count="50"/>

                                      <max-threads count="50"/>

                                      <keepalive-time time="10" unit="seconds"/>

                                  </long-running-threads>

                              </default-workmanager>

                              <cached-connection-manager/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>

                          <subsystem xmlns="urn:jboss:domain:jmx:1.1">

                              <show-model value="true"/>

                              <remoting-connector/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:jpa:1.0">

                              <jpa default-datasource=""/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:mail:1.0">

                              <mail-session jndi-name="java:jboss/mail/Default">

                                  <smtp-server outbound-socket-binding-ref="mail-smtp"/>

                              </mail-session>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:naming:1.1"/>

                          <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">

                              <properties>

                                  <property name="org.osgi.framework.startlevel.beginning">

                                      1

                                  </property>

                              </properties>

                              <capabilities>

                                  <capability name="javax.servlet.api:v25"/>

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

                                  <capability name="org.apache.felix.log" startlevel="1"/>

                                  <capability name="org.jboss.osgi.logging" startlevel="1"/>

                                  <capability name="org.apache.felix.configadmin" startlevel="1"/>

                                  <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>

                              </capabilities>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>

                          <subsystem xmlns="urn:jboss:domain:remoting:1.1">

                              <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>

                          <subsystem xmlns="urn:jboss:domain:sar:1.0"/>

                          <subsystem xmlns="urn:jboss:domain:security:1.1">

                              <security-domains>

                                  <security-domain name="other" cache-type="default">

                                      <authentication>

                                          <login-module code="Remoting" flag="optional">

                                              <module-option name="password-stacking" value="useFirstPass"/>

                                          </login-module>

                                          <login-module code="RealmUsersRoles" flag="required">

                                              <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>

                                              <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>

                                              <module-option name="realm" value="ApplicationRealm"/>

                                              <module-option name="password-stacking" value="useFirstPass"/>

                                          </login-module>

                                      </authentication>

                                  </security-domain>

                                  <security-domain name="jboss-web-policy" cache-type="default">

                                      <authorization>

                                          <policy-module code="Delegating" flag="required"/>

                                      </authorization>

                                  </security-domain>

                                  <security-domain name="jboss-ejb-policy" cache-type="default">

                                      <authorization>

                                          <policy-module code="Delegating" flag="required"/>

                                      </authorization>

                                  </security-domain>

                              </security-domains>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:threads:1.1"/>

                          <subsystem xmlns="urn:jboss:domain:transactions:1.1">

                              <core-environment>

                                  <process-id>

                                      <uuid/>

                                  </process-id>

                              </core-environment>

                              <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>

                              <coordinator-environment default-timeout="3000"/>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">

                              <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                              <virtual-server name="default-host" enable-welcome-root="true">

                                  <alias name="localhost"/>

                                  <alias name="example.com"/>

                              </virtual-server>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:webservices:1.1">

                              <modify-wsdl-address>true</modify-wsdl-address>

                              <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>

                              <endpoint-config name="Standard-Endpoint-Config"/>

                              <endpoint-config name="Recording-Endpoint-Config">

                                  <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">

                                      <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>

                                  </pre-handler-chain>

                              </endpoint-config>

                          </subsystem>

                          <subsystem xmlns="urn:jboss:domain:weld:1.0"/>

                      </profile>

                   

                      <interfaces>

                          <interface name="management">

                              <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>

                          </interface>

                          <interface name="public">

                   



                              <inet-address value="${jboss.bind.address:127.0.0.1}"/>

                          </interface>

                          <interface name="unsecure">

                              <inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>

                          </interface>

                      </interfaces>

                   

                      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

                          <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>

                          <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

                          <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>

                          <socket-binding name="ajp" port="8009"/>

                          <socket-binding name="http" port="8085"/>

                          <socket-binding name="https" port="8443"/>

                          <socket-binding name="osgi-http" interface="management" port="8090"/>

                          <socket-binding name="remoting" port="4447"/>

                          <socket-binding name="txn-recovery-environment" port="4712"/>

                          <socket-binding name="txn-status-manager" port="4713"/>

                          <outbound-socket-binding name="mail-smtp">

                              <remote-destination host="localhost" port="25"/>

                          </outbound-socket-binding>

                      </socket-binding-group>

                  </server>

                  • 6. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                    Frank Langelage Master

                    Look at the link send in my last message, there are different options mentioned how to get access to the hibernate module from your application.

                     

                    Make a module a global module by changing your standalone.xml file:

                    <subsystemxmlns="urn:jboss:domain:ee:1.0">

                      <global-modules>

                        <modulename="org.hibernate"slot="main"/>

                      </global-modules>

                    </subsystem>

                     

                    Create a jboss-deployment-structure.xml file and add it to your ear-file into the META-INF folder:

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

                    <jboss-deployment-structure>

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

                            <dependencies>

                                <module name="org.hibernate" />

                            </dependencies>

                        </sub-deployment>

                    </jboss-deployment-structure>

                    1 of 1 people found this helpful
                    • 7. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                      swarna latha Newbie

                      Frank, thanks for reply.

                       

                      Now that errors are gone..i am getting another errors. but EAR is generated successfully.

                       

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

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

                      00:29:35,648 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:107)

                      00:29:35,648 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

                      00:29:35,649 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

                      00:29:35,650 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

                      00:29:35,650 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:223)

                      00:29:35,651 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:89)

                      00:29:35,652 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:75)

                      00:29:35,652 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:159)

                      00:29:35,653 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:131)

                      00:29:35,654 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:73)

                      00:29:35,654 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2279)

                      00:29:35,655 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2275)

                      00:29:35,655 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1744)

                      00:29:35,656 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1784)

                      00:29:35,657 ERROR [stderr] (MSC service thread 1-1)     at com.chamberapp.Startsession.openSession(Startsession.java:19)

                      00:29:35,657 ERROR [stderr] (MSC service thread 1-1)     at com.chamberapp.MapAppWebServices.<init>(MapAppWebServices.java:96)

                      00:29:35,658 ERROR [stderr] (MSC service thread 1-1)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                      00:29:35,658 ERROR [stderr] (MSC service thread 1-1)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                      00:29:35,659 ERROR [stderr] (MSC service thread 1-1)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                      00:29:35,659 ERROR [stderr] (MSC service thread 1-1)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

                      00:29:35,660 ERROR [stderr] (MSC service thread 1-1)     at java.lang.Class.newInstance(Class.java:374)

                      00:29:35,660 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.newInstance(NonSpringBusHolder.java:170)

                      00:29:35,661 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:96)

                      00:29:35,662 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:113)

                      00:29:35,662 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:66)

                      00:29:35,663 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74)

                      00:29:35,664 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113)

                      00:29:35,664 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)

                      00:29:35,665 ERROR [stderr] (MSC service thread 1-1)     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)

                      00:29:35,666 ERROR [stderr] (MSC service thread 1-1)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

                      00:29:35,666 ERROR [stderr] (MSC service thread 1-1)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

                      00:29:35,667 ERROR [stderr] (MSC service thread 1-1)     at java.lang.Thread.run(Thread.java:744)

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

                      00:29:35,668 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:141)

                      00:29:35,669 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl.configure(DriverManagerConnectionProviderImpl.java:104)

                      00:29:35,670 ERROR [stderr] (MSC service thread 1-1)     ... 31 more

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

                      00:29:35,671 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl$1.findClass(ClassLoaderServiceImpl.java:99)

                      00:29:35,672 ERROR [stderr] (MSC service thread 1-1)     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

                      00:29:35,672 ERROR [stderr] (MSC service thread 1-1)     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

                      00:29:35,673 ERROR [stderr] (MSC service thread 1-1)     at java.lang.Class.forName0(Native Method)

                      00:29:35,674 ERROR [stderr] (MSC service thread 1-1)     at java.lang.Class.forName(Class.java:270)

                      00:29:35,674 ERROR [stderr] (MSC service thread 1-1)     at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.classForName(ClassLoaderServiceImpl.java:138)

                      00:29:35,675 ERROR [stderr] (MSC service thread 1-1)     ... 32 more

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

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

                      00:29:37,256 INFO  [org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl] (Finalizer) HHH000030: Cleaning up connection pool [null]

                      00:29:37,484 INFO  [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-1) WSDL published to: file:/software/jboss-as-7.1.1.Final/standalone/data/wsdl/ChamberAppEAR.ear/ChamberApp.war/MapAppWebServicesService.wsdl

                      00:29:37,499 INFO  [org.jboss.as.webservices] (MSC service thread 1-2) JBAS015539: Starting service jboss.ws.port-component-link

                      00:29:37,523 INFO  [org.jboss.as.webservices] (MSC service thread 1-4) JBAS015539: Starting service jboss.ws.endpoint."ChamberAppEAR.ear"."ChamberApp.war".MapAppWebServices

                      00:29:37,530 INFO  [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-4) register: jboss.ws:context=ChamberApp,endpoint=MapAppWebServices

                      00:29:37,627 INFO  [org.jboss.web] (MSC service thread 1-4) JBAS018210: Registering web context: /ChamberApp

                      00:29:37,630 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015951: Admin console listening on http://127.0.0.1:9990

                      00:29:37,630 INFO  [org.jboss.as] (MSC service thread 1-2) JBAS015874: JBoss AS 7.1.1.Final "Brontes" started in 9946ms - Started 191 of 270 services (78 services are passive or on-demand)

                      00:29:37,768 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "ChamberAppEAR.ear"

                       

                       

                       

                      Thank you so much......................

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

                        I am using jboss-as-7.1.1.Final. let me know where we can place the external jars...if any project need the external jars..

                         

                        In jboss 5.1.0 GA...we are loading external jars through project properties option.

                         

                        Please tell me how we can attach external jars in jboss-as-7.1.1.Final version.

                         

                        Thanks once again..

                        • 10. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                          Frank Langelage Master

                          Unclear what you exactly mean with "external jars".

                          You're referring to the missing oracle lib? A simple way is to place latest ojdbc6.jar into $JBOSS_HOME/standalone/deployments folder.

                          Other jars needed for your application? Put them into the lib folder of your ear.

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

                            When i placed ojdbc6.jar, ojdbc14.jar etc jars in $JBOSS_HOME/standalone/deployments folder....it shows belowscreenshot.png

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

                              Please help me still getting below errors...

                              13:42:20,222 INFO  [org.hibernate.cfg.Configuration] (MSC service thread 1-2) HHH000041: Configured SessionFactory: null

                              13:42:20,660 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:42:20,662 ERROR [stderr] (MSC service thread 1-2) org.hibernate.service.classloading.spi.ClassLoadingException: Specified JDBC Driver oracle.jdbc.OracleDriver class not found

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              13:42:20,673 ERROR [stderr] (MSC service thread 1-2)     at com.chamberapp.Startsession.openSession(Startsession.java:19)

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

                              13:42:20,674 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                              13:42:20,674 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                              13:42:20,675 ERROR [stderr] (MSC service thread 1-2)     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                              13:42:20,675 ERROR [stderr] (MSC service thread 1-2)     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)

                              13:42:20,676 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.newInstance(Class.java:374)

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

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

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

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

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

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

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

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

                              13:42:20,681 ERROR [stderr] (MSC service thread 1-2)     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

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

                              13:42:20,683 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Thread.run(Thread.java:744)

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

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

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

                              13:42:20,685 ERROR [stderr] (MSC service thread 1-2)     ... 31 more

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

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

                              13:42:20,687 ERROR [stderr] (MSC service thread 1-2)     at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

                              13:42:20,688 ERROR [stderr] (MSC service thread 1-2)     at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

                              13:42:20,688 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.forName0(Native Method)

                              13:42:20,689 ERROR [stderr] (MSC service thread 1-2)     at java.lang.Class.forName(Class.java:270)

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

                              13:42:20,690 ERROR [stderr] (MSC service thread 1-2)     ... 32 more

                              13:42:20,741 INFO  [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-2) Creating Service {http://chamberapp.com/}MapAppWebServicesService from class com.chamberapp.MapAppWebServices

                              13:42:21,928 INFO  [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-2) Setting the server's publish address to be http://localhost:8085/ChamberApp/MapAppWebServices

                               

                              Please help me...

                              • 14. Re: How to Upgrade the code form jboss-5.1.0.GA to jboss-as-7.1.1.Final
                                Frank Langelage Master

                                Everything seems to fine then. All deployed.

                                But you only need one of the oracle files, either ojdbc14.jar or ojdbc6.jar. The numbers stand for the required Java version.

                                As you are using Java 6 or 7 for running JBoss, ojdbc6.jar is your choice. Remove ojdbc14.jar.

                                1 2 3 4 Previous Next