aquasw
asked on
java.lang.ExceptionInInitializerError exception
hi experts
I am using the package httpunit (jakarta).
when I run them from the eclipse it works fine.
but I need to run them from external program (that loads automaticaly java classes and run them) it gives me this exception
java.lang.ExceptionInIniti alizerErro r
at com.aqua.adaptor.audiocode s.AudioCod esImpl.ini t(AudioCod esImpl.jav a:32)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:90)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:44)
at jsystem.framework.system.S ystemObjec tImpl.init Fields(Sys temObjectI mpl.java:1 40)
at jsystem.framework.system.S ystemObjec tImpl.init (SystemObj ectImpl.ja va:261)
at com.aqua.phone.PhoneDefaul tImpl.init (PhoneDefa ultImpl.ja va:31)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:90)
at jsystem.framework.system.S ystemObjec tImpl.init Fields(Sys temObjectI mpl.java:1 58)
at jsystem.framework.system.S ystemObjec tImpl.init (SystemObj ectImpl.ja va:261)
at com.aqua.phone.PhoneManage r.init(Pho neManager. java:29)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:90)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:44)
at jsystem.framework.system.S ystemManag erImpl.get SystemObje ct(SystemM anagerImpl .java:37)
at com.juniper.automation.Jun iperBasicF ixture.set Up(Juniper BasicFixtu re.java:51 )
at jsystem.framework.fixture. Fixture.ru n(Fixture. java:70)
at jsystem.framework.fixture. FixtureMan ager.goTo( FixtureMan ager.java: 200)
at junit.framework.SystemTest Case.runBa re(SystemT estCase.ja va:110)
at junit.framework.TestResult $1.protect (TestResul t.java:106 )
at junit.framework.TestResult .runProtec ted(TestRe sult.java: 124)
at junit.framework.TestResult .run(TestR esult.java :109)
at junit.framework.SystemTest Case.run(S ystemTestC ase.java:1 00)
at junit.framework.TestSuite. runTest(Te stSuite.ja va:208)
at junit.framework.TestSuite. run(TestSu ite.java:2 03)
at jsystem.treeui.TestRunner$ 1.run(Test Runner.jav a:195)
Caused by: org.apache.commons.logging .LogConfig urationExc eption: org.apache.commons.logging .LogConfig urationExc eption: org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed. (Caused by org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging .LogConfig urationExc eption: org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed. (Caused by org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed.))
at org.apache.commons.logging .impl.LogF actoryImpl .newInstan ce(LogFact oryImpl.ja va:543)
at org.apache.commons.logging .impl.LogF actoryImpl .getInstan ce(LogFact oryImpl.ja va:235)
at org.apache.commons.logging .impl.LogF actoryImpl .getInstan ce(LogFact oryImpl.ja va:209)
at org.apache.commons.logging .LogFactor y.getLog(L ogFactory. java:351)
at org.apache.commons.httpcli ent.HttpCl ient.<clin it>(HttpCl ient.java: 65)
... 24 more
Caused by: org.apache.commons.logging .LogConfig urationExc eption: org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed. (Caused by org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed.)
at org.apache.commons.logging .impl.LogF actoryImpl .getLogCon structor(L ogFactoryI mpl.java:3 97)
at org.apache.commons.logging .impl.LogF actoryImpl .newInstan ce(LogFact oryImpl.ja va:529)
... 28 more
Caused by: org.apache.commons.logging .LogConfig urationExc eption: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.loggin g.Log' visible, which is not allowed.
at org.apache.commons.logging .impl.LogF actoryImpl .getLogCon structor(L ogFactoryI mpl.java:3 85)
... 29 more
how can I solve it ?
thanks
I am using the package httpunit (jakarta).
when I run them from the eclipse it works fine.
but I need to run them from external program (that loads automaticaly java classes and run them) it gives me this exception
java.lang.ExceptionInIniti
at com.aqua.adaptor.audiocode
at jsystem.framework.system.S
at jsystem.framework.system.S
at jsystem.framework.system.S
at jsystem.framework.system.S
at com.aqua.phone.PhoneDefaul
at jsystem.framework.system.S
at jsystem.framework.system.S
at jsystem.framework.system.S
at com.aqua.phone.PhoneManage
at jsystem.framework.system.S
at jsystem.framework.system.S
at jsystem.framework.system.S
at com.juniper.automation.Jun
at jsystem.framework.fixture.
at jsystem.framework.fixture.
at junit.framework.SystemTest
at junit.framework.TestResult
at junit.framework.TestResult
at junit.framework.TestResult
at junit.framework.SystemTest
at junit.framework.TestSuite.
at junit.framework.TestSuite.
at jsystem.treeui.TestRunner$
Caused by: org.apache.commons.logging
at org.apache.commons.logging
at org.apache.commons.logging
at org.apache.commons.logging
at org.apache.commons.logging
at org.apache.commons.httpcli
... 24 more
Caused by: org.apache.commons.logging
at org.apache.commons.logging
at org.apache.commons.logging
... 28 more
Caused by: org.apache.commons.logging
at org.apache.commons.logging
... 29 more
how can I solve it ?
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi , thanks for your help
I have solve this problem, the problem was in the program that loads the classes and runs them and not in this specific application.
thanks
I have solve this problem, the problem was in the program that loads the classes and runs them and not in this specific application.
thanks
ASKER
I looked on my class path.
there is about 100 jars.
I looked in every jar.
there is only 2 jars that has the "org.apache.commons.loggin
commons-logging.jar and commons-logging.api.jar.
I tryed to remove the first one, and then to remove both of them, But I have still get the same exception.
when I remove both of the jars, it cann't load the relevant class, and I get the exception :
java.lang.NoClassDefFoundE
do you have any suggestions ?
thanks