我在server/lib/sample.jar
中有一个罐子。
sample.jar
文件包含与应用程序
.class
个文件
所以应该如何访问server/lib
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 >
在application.war / web-inf / lib中保持sample.jar异常是
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
答案 0 :(得分:0)
请参阅以下答案skaffman
看看JBossClassLoadingUseCases。你的情况似乎是用例4(即该类将从server / lib加载而不是WEB-INF / classes。
您似乎想要的是用例3(即WEB-INF /类首选于server / lib),在这种情况下,您应该省略jboss-web.xml中的java2ParentDelegation=true
配置选项(或设置它)为false,这是默认值。
其他值得评估的参考:
How do I tell JBoss 4.2.3.GA to load jars in my war file lib directory first?