简体   繁体   中英

Jboss 4.2 Class loading exception

I have a jar in server/lib/sample.jar .

sample.jar file consists .class files related to application

so how should access server/lib instated of application.war/web-inf/classes .

jboss-web.xml

 <class-loading java2ClassLoadingCompliance="false">
        <loader-repository>
          com.example:loader=sample.jar
            <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
        </loader-repository>
</class-loading >

keeping sample.jar in application.war/web-inf/lib got exception is

2013-05-16 10:28:58,388 INFO  [STDOUT] [Mobee]- INFO 2013-05-16 10:28:58,388 [] LoadSystemDataCommand - ....................LoadSystemDataCommand.......................
2013-05-16 10:35:25,747 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Added url: file:/D:/Mobee Admin-ManamDB/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_4.2_Runtime_1_Server1368615125350/deploy/
2013-05-16 10:36:02,472 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
2013-05-16 10:38:40,215 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.BasicAction_58] - Abort of action id 7f000001:e258:51948a81:33 invoked while multiple threads active within it.
2013-05-16 10:38:40,215 WARN  [com.arjuna.ats.arjuna.logging.arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.CheckedAction_2] - CheckedAction::check - atomic action 7f000001:e258:51948a81:33 aborting with 1 threads active!
2013-05-16 10:38:40,242 INFO  [STDOUT] [Mobee]-ERROR 2013-05-16 10:38:40,242 [] SystemStartupObserver - Error While Loading System Propertiesorg.hibernate.PersistentObjectException: detached entity passed to persist: com.manam.mobee.persist.entity.MobeeVariable

Please refer below answer by skaffman

jboss-4-2-class-loading

Have a look at JBossClassLoadingUseCases. Your situation seems to be Use Case 4 (ie the class will be loaded from server/lib in preference to WEB-INF/classes.

What you seem to want is Use Case 3 (ie WEB-INF/classes preferred to server/lib), in which case you should omit the java2ParentDelegation=true config option from jboss-web.xml (or set it to false, which is the default).

ClassLoading Configuration

Other reference worth evaluating :

JBoss classloading problem

How do I tell JBoss 4.2.3.GA to load jars in my war file lib directory first?

JBoss classloading problem

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM