junit] arguments are not type compatible (class: org/apache/log4j/LogManager method: <clinit>()V) at pc: 18
junit] java.lang.VerifyError: arguments are not type compatible (class: org/apache/log4j/LogManager method: <clinit
at pc: 18
class C extends B
{
}
class B
{
//Here in the following line the above error java.lang.verify error is showing up
private static Logger m_cat = Logger.getLogger(MLBatchProcessSetup.class);
}
}
Thrown when the "verifier" detects that a class file, though well formed, contains some sort of internal inconsistency or security problem.
It sounds like you are using differents version of the Log4J library when you compile your software and in the runtime environment. Make sure you use exactly the same Log4J JAR files.
What version of Log4J are you using? Are you sure you're using a version that is compatible with Java 1.3?
Are you compiling and running the software on the same environment (same operating system, etc.)?
Also, make sure that you are compiling your source code with the JDK version that matches exactly with the runtime version that you're using. So, make sure that you're using JDK 1.3 to compile your source code, if you're running it on Java 1.3.
Originally posted by ramya narayanan:
How to check this one?
Regards.
package p2;
import com.trilogy.util.override.BundleStack;
import com.trilogy.util.override.BundleStackFactory;
import com.trilogy.ffc.html.FFCTracer;
import com.trilogy.sc.ISCCMProduct;
import p1.A;
import junit.framework.JUnit4TestAdapter;
import junit.framework.Assert;
import java.util.Vector;
import org.junit.Test;
import java.lang.reflect.*;
import com.trilogy.fs.dms.core.validator.test.ValidatorTestCase;
public class ATest extends ValidatorTestCase {
public static junit.framework.Test suite() {
System.out.println("In Test suite");
return new JUnit4TestAdapter(ATest.class);
}
@Test (timeout = 50000)
public void processCompEventsTest() throws Throwable{
System.out.println("Inside API Test case method to test the compevent processing ..... SAI...");
Class c=Class.forName("A");
//These processCompEvents is a protected method in A class
Method m = c.getDeclaredMethod("processCompEvents", null);
m.setAccessible(true);
m.invoke(c, null);
}
}
<target name="Custom.test" depends="-SetCustomClasspathForTest, Custom.test-init, Custom.TestBuild">
<junit printsummary="false" errorProperty="test.failed" failureProperty="test.failed" fork="yes">
<classpath refid="ATF.classpath"/>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="${test.reports.dir}/jtf/data">
<fileset dir="${test.classes.dir}" includes="**/*Test.class" excludes="**/*Task.class,com/ml/inst/icp/loader/validator/*Validator.class"/>
</batchtest>
</junit>
<junitreport todir="${test.reports.dir}/jtf/data">
<fileset dir="${test.reports.dir}/jtf/data">
<include name="TEST-*.xml"/>
</fileset>
<report format="frames" todir="${test.reports.dir}/jtf"/>
</junitreport>
<fail message="Tests failed. Check log and/or reports." if="test.failed"/>
</target>
ant -buildfile test\test.xml Custom.test -Denvironment=LOCAL
[junit] arguments are not type compatible (class: org/apache/log4j/LogManager method: <clinit>()V) at pc: 18
[junit] java.lang.VerifyError: arguments are not type compatible (class: org/apache/log4j/LogManager method: <clinit
>()V) at pc: 18
[junit] at java.lang.J9VMInternals.verifyImpl(Native Method)
[junit] at java.lang.J9VMInternals.verify(J9VMInternals.java:55)
[junit] at java.lang.J9VMInternals.initialize(J9VMInternals.java:124)
[junit] at org.apache.log4j.Logger.getLogger(Logger.java:94)
[junit] at com.metlife.inst.icp.engine.Bsuper.<clinit>(Bsuper.java:32)
[junit] at java.lang.J9VMInternals.initializeImpl(Native Method)
[junit] at java.lang.J9VMInternals.initialize(J9VMInternals.java:161)
[junit] at java.lang.J9VMInternals.initialize(J9VMInternals.java:140)
[junit] at java.lang.Class.forNameImpl(Native Method)
[junit] at java.lang.Class.forName(Class.java:131)
private static Logger m_cat = Logger.getLogger(Bsuper.class);
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
them good ole boys were drinking whiskey and rye singin' this'll be the day that I die. Drink tiny ad.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|