7 Replies Latest reply on Jan 2, 2013 1:05 AM by holger.lierse

    Class loader issues

    erg144

      We are trying to migrate from WebLogic to JBoss but having some issues (mostly class loader issues).

       

      we have an ear file with 7 web appliations, no EJB and everything else controlled by spring (msg, JPA, etc)

       

      I can not get the ear to deploy, so I thought I would first try some WebApps individually.

       

      I installed snowdrop as per the instructions.

       

      Now, when I try and depoy the WebApp I get numerous errors.

       

      1 - JBOSS is scanning the files for EJB's and I get numerous errors like

       

      12:45:48,158 WARN  [org.jboss.as.ee.component.deployers.ResourceInjectionAnnotationParsingProcessor] (MSC service thread 1-3) Can't handle @Resource for ENC name: externalAccountManager on class com.crowncastle.service.IsiteUserServiceImpl since it's missing a "lookup" (or "mappedName") value and isn't of any known type12:45:48,158 WARN  [org.jboss.as.ee.component.deployers.ResourceInjectionAnnotationParsingProcessor] (MSC service thread 1-3) Can't handle @Resource for ENC name: externalAccountManager on class com.xxxxxxx.service.IsiteUserServiceImpl since it's missing a "lookup" (or "mappedName") value and isn't of any known type

       

      These should be handled by spring, not JBOSS 

       

      2nd.

       

      I get class not found on classes  that are in the (inside of jars)

       

       

      War

           WEB-INF

                lib directory. 

       

       

      Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.CacheManager from [Module "org.springframework.spring:snowdrop" from local module loader @4cee32 (roots: C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\modules)]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191) [jboss-modules.jar:1.0.2.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361) [jboss-modules.jar:1.0.2.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333) [jboss-modules.jar:1.0.2.GA]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310) [jboss-modules.jar:1.0.2.GA]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103) [jboss-modules.jar:1.0.2.GA]

          ... 18 more

       

       

      I am unclear where the jar files should be placed if not in the WEB-INF/lib directory.

       

      thx

        • 1. Re: Class loader issues
          bluesockets

          You have the option of sticking common war jars in the ear/lib directory - all subdeployments would then have access to those jars. Jars specific to each war should go in the war/WEB-INF/lib. Those lookups seem to complaining about not having a jndi name to bind against. I'd say first figure out the classloading first and the lookup errors last - if it isnt properly loading your spring jars it might try to load your classes as ejb based classes.

          1 of 1 people found this helpful
          • 2. Re: Class loader issues
            erg144

            Thanks for the quick reply. 

             

            In this case, I took the war out of the ear, and copied the lib directory into the WEB-INF/lib.  So here, I'm just trying to load a war file not an ear file. 

             

            The normal place for these would be in the WEB-INF/lib directory.  I have the libs there, but still getting class not found.

            • 3. Re: Class loader issues
              bluesockets

              Still a little confused - are you saying you now have a war file with every possible jar file it needs in the war/WEB-INF/lib dir? That being the case, wanna throw up your whole console dump from startup?

              • 4. Re: Class loader issues
                erg144

                First part

                 

                 

                14:22:28,700 INFO  [org.jboss.as.connector.subsystems.datasources] (Controller Boot Thread) Deploying JDBC-compliant driver class org.h2.Driver (version 1.2)

                14:22:28,726 INFO  [org.jboss.as.clustering.infinispan.subsystem] (Controller Boot Thread) Activating Infinispan subsystem.

                14:22:28,774 INFO  [org.jboss.as.jacorb] (Controller Boot Thread) Activating JacORB Subsystem

                14:22:28,835 INFO  [org.jboss.as.naming] (Controller Boot Thread) JBAS011800: Activating Naming Subsystem

                14:22:28,848 INFO  [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Starting Naming Service

                14:22:28,857 INFO  [org.jboss.as.osgi] (Controller Boot Thread) JBAS011910: Activating OSGi Subsystem

                14:22:28,878 INFO  [org.jboss.as.security] (Controller Boot Thread) Activating Security Subsystem

                14:22:28,885 INFO  [org.jboss.remoting] (MSC service thread 1-6) JBoss Remoting version 3.2.0.Beta2

                14:22:28,903 INFO  [org.xnio] (MSC service thread 1-6) XNIO Version 3.0.0.Beta3

                14:22:28,917 INFO  [org.xnio.nio] (MSC service thread 1-6) XNIO NIO Implementation Version 3.0.0.Beta3

                14:22:29,146 INFO  [org.jboss.as.webservices] (Controller Boot Thread) Activating WebServices Extension

                14:22:29,205 INFO  [org.jboss.as.ee] (Controller Boot Thread) Activating EE subsystem

                14:22:29,231 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-2) JBoss Web Services - Stack CXF Server 4.0.0.Beta3

                14:22:29,303 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http-127.0.0.1-127.0.0.1-8080

                14:22:29,305 INFO  [com.arjuna.ats.jbossatx] (MSC service thread 1-2) ARJUNA32010: JBossTS Recovery Service (tag: JBOSSTS_4_15_3_Final) - JBoss Inc.

                14:22:29,310 INFO  [org.jboss.as.jmx.JMXConnectorService] (MSC service thread 1-1) Starting remote JMX connector

                14:22:29,324 INFO  [com.arjuna.ats.arjuna] (MSC service thread 1-2) ARJUNA12324: Start RecoveryActivators

                14:22:29,354 INFO  [com.arjuna.ats.arjuna] (Transaction Expired Entry Monitor) ARJUNA12296: ExpiredEntryMonitor running at Thu, 20 Oct 2011 14:22:29

                14:22:29,356 INFO  [org.jboss.as.remoting] (MSC service thread 1-5) Listening on /127.0.0.1:9999

                14:22:29,374 INFO  [com.arjuna.ats.arjuna] (MSC service thread 1-2) ARJUNA12343: RecoveryManagerImple is ready. Socket listener is turned off.

                14:22:29,375 INFO  [com.arjuna.ats.jbossatx] (MSC service thread 1-2) ARJUNA32013: Starting transaction recovery manager

                14:22:29,385 INFO  [com.arjuna.ats.jbossatx] (MSC service thread 1-2) ARJUNA32017: JBossTS Transaction Service (JTA version - tag: JBOSSTS_4_15_3_Final) - JBoss Inc.

                14:22:29,398 WARN  [jacorb.config] (MSC service thread 1-8) jacorb.home unset! Will use '.'

                14:22:29,400 WARN  [jacorb.config] (MSC service thread 1-8) File .\jacorb.properties for configuration jacorb not found

                14:22:29,440 INFO  [jacorb.orb] (MSC service thread 1-8) Property "jacorb.hashtable_class" is set to: java.util.HashMap

                14:22:29,447 INFO  [org.jboss.as.connector] (MSC service thread 1-2) Starting JCA Subsystem (JBoss IronJacamar 1.0.3.Final)

                14:22:29,451 WARN  [jacorb.config] (MSC service thread 1-8) jacorb.home unset! Will use '.'

                14:22:29,452 WARN  [jacorb.config] (MSC service thread 1-8) File .\jacorb.properties for configuration jacorb not found

                14:22:29,454 WARN  [jacorb.config] (MSC service thread 1-8) no properties found for configuration jacorb

                14:22:29,455 INFO  [jacorb.orb.singleton] (MSC service thread 1-8) created ORBSingleton

                14:22:29,577 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\standalone\data\messagingjournal,bindingsDirectory=C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\standalone\data\messagingbindings,largeMessagesDirectory=C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\standalone\data\messaginglargemessages,pagingDirectory=C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\standalone\data\messagingpaging)

                14:22:29,602 WARNING [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.

                14:22:29,604 WARN  [jacorb.codeset] (MSC service thread 1-8) Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1

                14:22:29,666 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:jboss/datasources/ExampleDS]

                14:22:29,775 INFO  [jacorb.orb.interceptors] (MSC service thread 1-8) InterceptorManager started with 1 Server Interceptors, 1 Client Interceptors and 3 IOR Interceptors

                14:22:29,779 INFO  [jacorb.orb] (ORB Run Thread) ORB run

                14:22:29,784 INFO  [org.jboss.as.jacorb] (MSC service thread 1-8) CORBA ORB Service Started

                14:22:29,796 INFO  [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-5) Registered connection factory java:/JmsXA

                14:22:29,832 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-3) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} 127.0.0.1:5455 for CORE protocol

                14:22:29,835 INFO  [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-3) Started Netty Acceptor version 3.2.3.Final-r${buildNumber} 127.0.0.1:5445 for CORE protocol

                14:22:29,838 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) Server is now live

                14:22:29,839 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-3) HornetQ Server version 2.2.7.Final (HQ_2_2_7_FINAL_AS7, 121) [8ddb5d44-f023-11e0-83ed-0026b9e2e087] started

                14:22:29,878 INFO  [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-5) HornetQ resource adaptor started

                14:22:29,887 INFO  [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-5) IJ020002: Deployed: file://RaActivatorhornetq-ra

                14:22:29,917 INFO  [jacorb.poa] (MSC service thread 1-4) oid:

                72 6F 6F 74                                                 root

                object is activated

                14:22:30,003 INFO  [org.jboss.as.jacorb] (MSC service thread 1-4) CORBA Naming Service Started

                14:22:30,035 INFO  [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-3) Bound messaging object to jndi name java:/RemoteConnectionFactory

                14:22:30,037 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-5) trying to deploy queue jms.topic.testTopic

                14:22:30,101 INFO  [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-5) Bound messaging object to jndi name java:/topic/test

                14:22:30,103 INFO  [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-1) Bound messaging object to jndi name java:/ConnectionFactory

                14:22:30,104 INFO  [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-8) trying to deploy queue jms.queue.applicationStartupJMSQueue

                14:22:30,123 INFO  [org.jboss.as.messaging.jms.AS7BindingRegistry] (MSC service thread 1-8) Bound messaging object to jndi name java:/jms.applicationStartupJMSQueue

                14:22:30,133 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) Starting deployment of "jt400.jar"

                14:22:30,133 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "ojdbc6.jar"

                14:22:30,138 INFO  [org.jboss.as.deployment] (MSC service thread 1-3) Started FileSystemDeploymentService for directory C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\standalone\deployments

                14:22:30,502 INFO  [org.jboss.as.jpa] (MSC service thread 1-6) added javax.persistence.api dependency to ojdbc6.jar

                14:22:30,571 INFO  [org.jboss.as.jpa] (MSC service thread 1-6) added javax.persistence.api dependency to jt400.jar

                14:22:30,588 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-3) Deploying JDBC-compliant driver class oracle.jdbc.OracleDriver (version 11.2)

                14:22:30,597 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) Bound data source [java:/jdbc.jts.iSitePool]

                14:22:30,597 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) Bound data source [java:/jdbc.ODSPool]

                14:22:30,598 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-3) Bound data source [java:/jdbc.SPNTPool]

                14:22:30,599 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-6) Deploying JDBC-compliant driver class com.ibm.as400.access.AS400JDBCDriver (version 6.0)

                14:22:30,599 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) Bound data source [java:/jdbc.ODSXaPool]

                14:22:30,600 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) Bound data source [java:/jdbc.SPNTXaPool]

                14:22:30,600 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) Bound data source [java:/jdbc.iSiteXaPool]

                14:22:30,605 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-6) Bound data source [java:/jdbc.DB2Pool]

                14:22:30,616 INFO  [org.jboss.as.server.controller] (Controller Boot Thread) Deployed "ojdbc6.jar"

                14:22:30,618 INFO  [org.jboss.as.server.controller] (Controller Boot Thread) Deployed "jt400.jar"

                14:22:30,699 INFO  [org.jboss.as] (Controller Boot Thread) JBoss AS 7.0.2.Final "Arc" started in 3537ms - Started 186 of 249 services (63 services are passive or on-demand)

                14:22:51,758 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) Starting deployment of "isiteUser.war"

                14:22:59,756 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xerces.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/castor-xml-0.9.5.3.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,757 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jdbc-se2.0.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/castor-xml-0.9.5.3.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,759 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jndi.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/castor-xml-0.9.5.3.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,760 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jta1.0.1.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/castor-xml-0.9.5.3.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,761 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xercesImpl-2.2.1.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,763 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xml-apis.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,764 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xalan-2.4.1.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,766 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry batik.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,767 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jimi-1.0.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,769 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry avalon-framework-cvs-20020806.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/fop-0.20.5.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,771 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry toolbox.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/itext-2.0.7.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,772 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry bcmail-jdk14-138.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/itext-2.0.7.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,774 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry bcprov-jdk14-138.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/itext-2.0.7.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,776 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry commons-beanutils.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,777 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry commons-collections.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,778 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry commons-digester.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,779 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry commons-logging.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,780 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry commons-validator.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,782 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry jakarta-oro.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,784 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry struts-legacy.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/struts-1.1.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,785 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xercesImpl.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/xalan-2.7.0.jar"  does not point to a valid jar for a Class-Path reference.

                14:22:59,786 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-4) Class Path entry xml-apis.jar in "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/lib/xalan-2.7.0.jar"  does not point to a valid jar for a Class-Path reference.

                 

                 

                many of the above lines

                 

                 

                 

                14:23:01,474 INFO  [org.jboss.as.jpa] (MSC service thread 1-2) Deployment has its own Persistence Provider class org.hibernate.ejb.HibernatePersistence

                14:23:02,063 INFO  [org.jboss.spring.factory.NamedXmlApplicationContext] (MSC service thread 1-2) Refreshing org.jboss.spring.factory.NamedXmlApplicationContext@1abcdd: startup date [Thu Oct 20 14:23:02 EDT 2011]; root of context hierarchy

                14:23:02,113 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from "/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/META-INF/jboss-spring.xml"

                14:23:02,327 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext.xml]

                14:23:02,439 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext-jms.xml]

                14:23:02,487 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext-persistence.xml]

                14:23:02,535 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext-shared.xml]

                14:23:02,895 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext-services.xml]

                14:23:03,005 INFO  [org.jboss.spring.factory.NamedXmlBeanDefinitionReader] (MSC service thread 1-2) Loading XML bean definitions from URL [vfs:/C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/isiteUser.war/WEB-INF/classes/applicationContext-startup.xml]

                14:23:03,708 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."isiteUser.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."isiteUser.war".INSTALL: Failed to process phase INSTALL of deployment "isiteUser.war"

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)

                    at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)

                    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]

                    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]

                    at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]

                Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/CacheManager

                    at java.lang.Class.getDeclaredMethods0(Native Method) [:1.6.0_24]

                    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) [:1.6.0_24]

                    at java.lang.Class.getDeclaredMethods(Class.java:1791) [:1.6.0_24]

                    at org.springframework.core.type.StandardAnnotationMetadata.hasAnnotatedMethods(StandardAnnotationMetadata.java:136)

                    at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.checkConfigurationClassCandidate(ConfigurationClassBeanDefinitionReader.java:318)

                    at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:172)

                    at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:142)

                    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:599)

                    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:407)

                    at org.jboss.spring.factory.NamedXmlApplicationContext.<init>(factory:NamedXmlApplicationContext.java):66)

                    at org.jboss.spring.factory.NamedXmlApplicationContext.<init>(factory:NamedXmlApplicationContext.java):56)

                    at org.jboss.spring.deployers.as7.SpringBootstrapProcessor.deploy(SpringBootstrapProcessor.java:69)

                    at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

                    ... 5 more

                Caused by: java.lang.ClassNotFoundException: net.sf.ehcache.CacheManager from [Module "org.springframework.spring:snowdrop" from local module loader @f1bb78 (roots: C:\development\jboss-as-7.0.2\jboss-as-7.0.2.Final\modules)]

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

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

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

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

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

                    ... 18 more

                 

                14:23:03,951 INFO  [org.jboss.as.server.controller] (HttpManagementService-threads - 1) Deployment of "isiteUser.war" was rolled back with failure message {"Failed services" => {"jboss.deployment.unit.\"isiteUser.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"isiteUser.war\".INSTALL: Failed to process phase INSTALL of deployment \"isiteUser.war\""},"Services with missing/unavailable dependencies" => ["jboss.naming.context.java.module.isiteUser.isiteUser.ValidatorFactory missing [ jboss.naming.context.java.module.isiteUser.isiteUser ]","jboss.naming.context.java.module.isiteUser.isiteUser.Validator missing [ jboss.naming.context.java.module.isiteUser.isiteUser ]"]}

                14:23:04,445 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) Stopped deployment isiteUser.war in 495ms

                 

                 

                 

                sorry for the size - took out hundreds of lines of warning like the ones above

                • 5. Re: Class loader issues
                  bluesockets

                  This particular deployment looks like its missing net.sf.ehcache.CacheManager, possibly ehcache-1.2.jar from the snowdrop install. Are you familiar with the jboss as 7 module stucture to handle classpaths? In a nutshell the modules folder works like a maven repository, you can stick jars in there for jboss to pick them up and load them on the fly. The exception at the bottom seems to complain that its trying to load that jar and it expects it in the modules hierarchy but it doesnt seem to find it. If you're sure its there, then the modules.xml file might either be referencing the package location incorrectly or it might have a different labelled name or something might not be jiving with expected mappings. If the jar is missing from the modules, then you'll definitely want to add it and try again.

                   

                   

                  Also, one quick thing you might wanna change (won't solve your dependency problem) - you're deploying into /C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/bin/content/ when you probably want to be deploying into /C:/development/jboss-as-7.0.2/jboss-as-7.0.2.Final/standalone/deployments/ since the latter is the more standard location.

                  • 6. Re: Class loader issues
                    marius.bogoevici

                    Ed,

                     

                    You could get around this by modifying the snowdrop module definition - e.g. by creating an ehcache module and adding a dependency on it.

                     

                    On the other hand, If you have a simple WAR and do not need the functionality of the Spring deployer, then you can simply deploy the war as a regular application, leaving the ContextClassloaderListener to do the bootstrap. Just make sure that your war has all the classes that you need.

                     

                    Hope this helps,

                    Marius

                    • 7. Re: Class loader issues

                      Hello,

                       

                      Does the snowdrop module also look at the EAR lib directory of an application and includes its classpath? I've got an EAR app which uses the old fashion Hibernate3 (org.springframework.orm.hibernate3.LocalSessionFactoryBean). The deployment fails on a ClassNotFoundException:

                       

                      Caused by: java.lang.NoClassDefFoundError

                                at org.springframework.orm.hibernate3.LocalSessionFactoryBean.class$(LocalSessionFactoryBean.java:174)

                                at org.springframework.orm.hibernate3.LocalSessionFactoryBean.<init>(LocalSessionFactoryBean.java:174)

                                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) [rt.jar:1.6.0_31]

                                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) [rt.jar:1.6.0_31]

                                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) [rt.jar:1.6.0_31]

                                at java.lang.reflect.Constructor.newInstance(Constructor.java:513) [rt.jar:1.6.0_31]

                                at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:100)

                                ... 24 more

                      Caused by: java.lang.ClassNotFoundException: org.hibernate.cfg.Configuration from [Module "org.springframework.spring:snowdrop" from local module loader @7f56b6b9]

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

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

                       

                      The EAR/lib dire contains the hibernate-core (which contains org.hibernate.cfg.Configuration) and I've added the org.hibernate exclusion to the deployment structure.

                       

                      Any help would be appreciated.

                       

                      Thanks