You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Alexey Romanov <al...@gmail.com> on 2012/04/06 16:44:49 UTC

[ipojo] Ant can't build the iPOJO Eclipse integration example on save, but works from "Run As" and command line

See also http://stackoverflow.com/questions/10043746/basic-ipojo-example-fails-to-work

After following instructions at
http://felix.apache.org/site/apache-felix-ipojo-eclipse-integration.html,
I have an Eclipse project which I can compile from command line or
from Eclipse "Run As" menu:

Buildfile: /home/aromanov/workspaces/odp-server/MyiPOJOBundle/build.xml
package:
    [ipojo] Input bundle file :
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/MyiPOJOBundle
    [ipojo] Metadata file :
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/metadata.xml
    [ipojo] Start manipulation
    [ipojo] Bundle manipulation - SUCCESS
    [ipojo] Output file :
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/MyiPOJOBundle
BUILD SUCCESSFUL
Total time: 278 milliseconds

(This is for 1.4.2 version, but output for 1.2 version is similar.)

However, if I change something in the project and save, Eclipse's
automatic build fails:

Buildfile: /home/aromanov/workspaces/odp-server/MyiPOJOBundle/build.xml

manipulate:
       [ipojo] Input directory :
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/bin
       [ipojo] Metadata file :
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/metadata.xml
       [ipojo] Start manipulation

BUILD FAILED
/home/aromanov/workspaces/odp-server/MyiPOJOBundle/build.xml:54:
java.lang.LinkageError: loader constraint violation: when resolving
overridden method
"org.apache.felix.ipojo.manipulation.annotations.MetadataCollector.visitField(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Object;)Lorg/objectweb/asm/FieldVisitor;"
the class loader (instance of
org/apache/tools/ant/loader/AntClassLoader5) of the current class,
org/apache/felix/ipojo/manipulation/annotations/MetadataCollector, and
its superclass loader (instance of
org/eclipse/osgi/internal/baseadaptor/DefaultClassLoader), have
different Class objects for the type org/objectweb/asm/FieldVisitor
used in the signature

How can I fix this?

Yours, Alexey Romanov

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org