Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Pb with eclipse application and AspectJ

Try:

Export -> Plugin Development -> Eclipse product with AspectJ support

If that option is not there, then you have not installed AJDT properly.

On Tue, Aug 4, 2009 at 1:15 AM, Romain<romain.reuillon@xxxxxxxxx> wrote:
> I think this is the problem.
>
> I have installed a fresh Eclipse Galileo RCP and AJDT (all except the sources) using that link : http://download.eclipse.org/tools/ajdt/35/update
> but I can't find anywhere "export product as an eclipse product with aspectJ support" or "create a new eclipse product with aspectJ support".
>
> Can you point me at some documentation that explains how to create a product with aspectJ support ? (I really cannot find this function anywhere).
>
> Cheers,
> Romain
>
> Andrew Eisenberg a écrit :
>> Another possibility is that you did a regular export, rather than
>> "Export with AspectJ support".  Make sure that you are using the right
>> kind of export wizard when you perform the export.
>>
>> If this does not solve the problem, please let me know.
>>
>> On Mon, Aug 3, 2009 at 12:09 PM, Martin Lippert<lippert@xxxxxxx> wrote:
>>> Hi Romain!
>>>
>>> Did you use the AspectJ compiler while exporting the product? The stack
>>> trace and the error message looks pretty much like the aspects you are using
>>> are not compiled with AJDT/AspectJ. Can you check this?
>>>
>>> HTH,
>>> -Martin
>>>
>>>
>>>
>>>
>>> Romain wrote:
>>>> Hello,
>>>>
>>>> I am trying to build an eclipse application using aspectJ. In my eclipse
>>>> workspace everything is working as a charm, but
>>>> when I export the eclipse product and launch it I get that kind of
>>>> warnings and the aspects are not working :
>>>>
>>>> reuillon@polux:~/tmp/runtime/simexplorer$ ./simexplorer
>>>> [org.aspectj.osgi.service.caching] Created and registered
>>>> SingletonCachingService.
>>>> Aug 3, 2009 2:41:10 PM org.aspectj.weaver.tools.Jdk14Trace error
>>>> SEVERE: register definition failed
>>>> java.lang.RuntimeException: Cannot register non aspect:
>>>> org$simexplorer$tools$CachingAspect , org.simexplorer.tools.CachingAspect
>>>>        at
>>>> org.aspectj.weaver.bcel.BcelWeaver.addLibraryAspect(BcelWeaver.java:219)
>>>>        at
>>>> org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerAspects(ClassLoaderWeavingAdaptor.java:432)
>>>>        at
>>>> org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.registerDefinitions(ClassLoaderWeavingAdaptor.java:267)
>>>>        at
>>>> org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor.initialize(ClassLoaderWeavingAdaptor.java:159)
>>>>        at
>>>> org.eclipse.equinox.weaving.aspectj.loadtime.OSGiWeavingAdaptor.initialize(Unknown
>>>> Source)
>>>>        at
>>>> org.eclipse.equinox.weaving.aspectj.AspectJWeavingService.ensureAdaptorInit(Unknown
>>>> Source)
>>>>        at
>>>> org.eclipse.equinox.weaving.aspectj.AspectJWeavingService.preProcess(Unknown
>>>> Source)
>>>>        at
>>>> org.eclipse.equinox.weaving.adaptors.WeavingAdaptor.weaveClass(Unknown
>>>> Source)
>>>>        at
>>>> org.eclipse.equinox.weaving.hooks.WeavingHook.processClass(Unknown Source)
>>>>        at
>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:571)
>>>>        at
>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:546)
>>>>        at
>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:477)
>>>>        at
>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:465)
>>>>        at
>>>> org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:445)
>>>>        at
>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
>>>>        at
>>>> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:376)
>>>>        at
>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:452)
>>>>        at
>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:405)
>>>>        at
>>>> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:393)
>>>>        at
>>>> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:105)
>>>>        at java.lang.ClassLoader.loadClass(Unknown Source)
>>>>        at
>>>> org.eclipse.osgi.internal.loader.BundleLoader.loadClass(BundleLoader.java:321)
>>>>        at
>>>> org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:231)
>>>>        at
>>>> org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1193)
>>>>        at
>>>> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:160)
>>>>        at
>>>> org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:874)
>>>>        at
>>>> org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
>>>>        at
>>>> org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:51)
>>>>        at
>>>> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:189)
>>>>        at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
>>>>        at
>>>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
>>>>        at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
>>>>        at
>>>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>>>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>>>>        at java.lang.reflect.Method.invoke(Unknown Source)
>>>>        at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
>>>>        at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
>>>>        at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
>>>> [org.simexplorer.runtime] warning register definition failed --
>>>> (RuntimeException) Cannot register non aspect:
>>>> org$simexplorer$tools$CachingAspect , org.simexplorer.tools.CachingAspect
>>>>
>>>> My config.ini :
>>>>
>>>> #Product Runtime Configuration File
>>>> eclipse.application=org.simexplorer.runtime.simexplorer
>>>> osgi.bundles.defaultStartLevel=4
>>>> eclipse.product=org.simexplorer.runtime.simexplorer
>>>> osgi.splashPath=platform:/base/plugins/org.simexplorer.runtime
>>>>
>>>> osgi.bundles=com.db4o,com.developpez.adiguba.shell,com.googlecode.objenesis,com.rits.cloning,fr.in2p3.jsaga,javax.xml,org.apache.ant,org.apache.commons.collections,org.apache.commons.collections15,org.apache.commons.compress,org.apache.commons.configuration,org.apache.commons.httpclient,org.apache.commons.lang,org.apache.commons.logging,org.apache.commons.pool,org.apache.tools.ant,org.aspectj.runtime,org.aspectj.weaver,org.codehaus.groovy,org.codehaus.xstream,org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime@start,org.eclipse.core.runtime.compatibility.registry,org.eclipse.emf.common,org.eclipse.emf.ecore,org.eclipse.equinox.app,org.eclipse.equinox.common@2:start,org.eclipse.equinox.preferences,org.eclipse.equinox.registry,org.eclipse.equinox.weaving.aspectj@4:start,org.eclipse.equinox.weaving.caching@4:start,org.eclipse.equinox.weaving.caching.j9@4:start,org.eclipse.equinox.weaving.hook,org.gnu.crypto,org.jasypt,org.rosuda.REngine,org.simexplore
> r
>>> .cl
>>>>
>>>> onning,org.simexplorer.environmentprovider.glite,org.simexplorer.exception,org.simexplorer.finalizer,org.simexplorer.implementation,org.simexplorer.jsaga,org.simexplorer.jsaga.session,org.simexplorer.methods,org.simexplorer.model,org.simexplorer.replicacatalog,org.simexplorer.runtime,org.simexplorer.runtimemessageserializer,org.simexplorer.tools,org.simexplorer.updater,org.simexplorer.urifile,org.simexplorer.workspace
>>>>
>>>> Furthermore the option -vmargs
>>>> -Dosgi.framework.extensions=org.eclipse.equinox.weaving.hook
>>>> is set in my simexplorer.ini.
>>>>
>>>> Any idea ?
>>>>
>>>> Cheers,
>>>> Romain
>>>> _______________________________________________
>>>> ajdt-dev mailing list
>>>> ajdt-dev@xxxxxxxxxxx
>>>> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>>>>
>>>>
>>> _______________________________________________
>>> ajdt-dev mailing list
>>> ajdt-dev@xxxxxxxxxxx
>>> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>>>
>> _______________________________________________
>> ajdt-dev mailing list
>> ajdt-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>


Back to the top