0

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
nag
  • 647
  • 6
  • 25
  • 43

1 Answers1

0

Please refer below answer by skaffman

jboss-4-2-class-loading

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

What you seem to want is Use Case 3 (i.e. 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

Community
  • 1
  • 1
Alpesh Gediya
  • 3,706
  • 1
  • 25
  • 38
  • yes,keeping a sample.jar in web-inf/lib i got exception .plz check above exception – nag May 16 '13 at 07:46
  • same application is working when i kept in WEB-INF/classes .but keeping in lib/sample.jar it throws exception . stacktrace is http://textuploader.com/?p=6&id=PGfpt .As loading menu and menuitems takes a time to load normally around 2min in WEB-INF/classes,At same place when i placed lib/sample.jar throwing exception after 20 min conection is time out . – nag May 17 '13 at 08:45