Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Aspectj export fails because IMessageHandler cannot be found
Aspectj export fails because IMessageHandler cannot be found [message #600519] Fri, 28 August 2009 12:02
Ivica Loncar is currently offline Ivica LoncarFriend
Messages: 41
Registered: July 2009

I'm trying to export an aspectj feature/plugin and I get following exception:

org.eclipse.core.runtime.CoreException: C:\iloncar\workspaces\uredsko\.metadata\.plugins\org.eclipse .pde.core\temp\org.eclipse.pde.container.feature\build.xml:3 3:
The following error occurred while executing this line:
C:\iloncar\workspaces\uredsko\.metadata\.plugins\org.eclipse .pde.core\temp\org.eclipse.pde.container.feature\build.xml:1 4:
The following error occurred while executing this line:
C:\iloncar\workspaces\uredsko\net.croz.aspect\build.xml:188: The following
error occurred while executing this line:
C:\iloncar\workspaces\uredsko\net.croz.aspect\build.xml:140: taskdef A class
needed by class cannot be found: org/aspectj/bridge/IMessageHandler

Generated build.xml does not have aspectjweaver.jar in ajde.classpath:

136: <!-- compile the source code -->
137: <path id="ajde.classpath">
138: <pathelement path="../../ajdt/org.aspectj.ajde/ajde.jar"/>
139: </path>
140: <taskdef resource="org/aspectj/tools/ant/taskdefs/ ">
141: <classpath refid="ajde.classpath" />
142: </taskdef>
143: <property name="ajcArgFile" value=""/>
144: <iajc destDir="${temp.folder}/@dot.bin" failonerror="true" argfiles="${ajcArgFile}"
verbose="true" fork="true" maxmem="512m" debug="${javacDebugInfo}" bootclasspath="${bundleBootClasspath}"
source="${bundleJavacSource}" target="${bundleJavacTarget}">
145: <forkclasspath refid="@dot.classpath" />
146: <forkclasspath refid="ajde.classpath" />
147: <src path="src/" />
148: </iajc>

This is a recent AJDT from 1.7 branch.
If it's relevant: I use custom target that contains aspectjruntime and aspectjweaver.jar

AJDE depends on aspectjweaver, but it's not added to the classpath.

It seems that AJModelBuildScriptGenerator#bundleToCP doesn't export required
BundleDescription[] prereqs = bundle.getResolvedRequires();
returns nothing, but

[Require-Bundle: org.apache.ant; bundle-version="0.0.0", Require-Bundle:
org.eclipse.core.resources; bundle-version="0.0.0", Require-Bundle: org.eclipse.core.runtime;
bundle-version="0.0.0", Require-Bundle: org.eclipse.core.runtime.compatibility;
bundle-version="0.0.0", Require-Bundle: org.eclipse.text; bundle-version="0.0.0",
Require-Bundle: org.aspectj.weaver; bundle-version="92.2.29"]

Shouldn't those bundles be included when calculating ajde.classpath?

Ivica Loncar
Previous Topic:Convert to AspectJ project breaks Junit
Next Topic:Aspectj export fails because IMessageHandler cannot be found
Goto Forum:

Current Time: Mon Jun 25 16:07:43 GMT 2018

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

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

Back to the top