Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » AJDT, AspectJ and VerifyError
AJDT, AspectJ and VerifyError [message #31546] Thu, 26 February 2004 18:12
Eclipse UserFriend
Originally posted by: sw1107.uni-essen.de

Hi,

I am current attempting to write a junit plugin test using the unit-testing
tool
for plug-in development (org.eclipse.pde.junit).
Amongst other things this test-plugin compares compilation units on the
basis of abstract syntax trees. For that purpose I need to create an object
<< org.aspectj.ajdt.internal.compiler.parser.AjParser >>

The following method causes no problems if it is located in an usual java
application but if it runs as part of a JUnit plug-in test an VerifyError
takes place.
The same error occurs when the code resides in an usual Eclipse plug-in.
I did not change the byte code of the AspectJ plug-ins and can't see any
security violations.

protected AjParser createAjParser() {
AjParser ajp = null;
AjProblemReporter pr = new AjProblemReporter(
DefaultErrorHandlingPolicies.proceedWithAllProblems(),
new CompilerOptions(),
new DefaultProblemFactory(Locale.getDefault())
);
boolean optimizeStringLiterals = true;
boolean assertMode = true;
ajp = new AjParser(pr, optimizeStringLiterals, assertMode);
return ajp;
}

The next method works fine though it creates objects of classes located in
the same package and archive.
That isn't surprising since the ajdt plugin works with those classes located
in the AspectJ jars as well.
What I am doing wrong ??
Has anybody suggestions how to solve that problem?
I am using Eclipse 2.1.2, org.aspectj.ajde_1.1.4 and
org.eclipse.ajdt.ui_0.6.4.

private void compile(String[] path) {
MessageHandler ourHandler = new MessageHandler(true);
IMessageHolder holder = ourHandler;
AjBuildManager buildManager = new AjBuildManager(ourHandler);
List list = getFile(path);
String[] args = new String[0];
CountingMessageHandler counter = new
CountingMessageHandler(ourHandler);
BuildArgParser parser = new BuildArgParser();
AjBuildConfig buildConfig = parser.genBuildConfig(args, ourHandler);
buildConfig.setFiles(list);
boolean b = false;

try {
b = buildManager.batchBuild(buildConfig, ourHandler);
} catch (AbortException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
if (buildManager.getWorld() != null) System.out.println("World
exists");
world = buildManager.getWorld();
}



java.lang.VerifyError: (class: aspectjrb/pde/test/CompilationUnitParser,
method:
createAjParser signature:
()Lorg/aspectj/ajdt/internal/compiler/parser/AjParser;)
Incompatible argument to function
at aspectjrb.pde.test.InitialTest.testScanning(InitialTest.java :70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl
..java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRu
nner.java:392)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.
java:276)
at
org.eclipse.pde.internal.junit.ui.RemotePluginTestRunner.mai n(RemotePluginTe
stRunner.java:30)
at
org.eclipse.pde.internal.junit.ui.UITestApplication.runEvent Loop(UITestAppli
cation.java:35)
at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385)
at
org.eclipse.core.internal.boot.InternalBootLoader.run(Intern alBootLoader.jav
a:858)
at org.eclipse.core.boot.BootLoader.run(BootLoader.java:431)
at EclipseRuntimeLauncher.main(EclipseRuntimeLauncher.java:24)


Thanks in advance
Christian
Previous Topic:Non standard compiler options
Next Topic:AJDT, AspectJ and VerifyError
Goto Forum:
  


Current Time: Tue Mar 19 02:26:19 GMT 2024

Powered by FUDForum. Page generated in 0.02300 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top