You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "Moritz Bechler (JIRA)" <ji...@apache.org> on 2014/02/14 14:14:19 UTC

[jira] [Updated] (XBEAN-252) BundleClassFinder.scanDirectory fails to resolve proper classname in -dev-mode equinox

     [ https://issues.apache.org/jira/browse/XBEAN-252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Moritz Bechler updated XBEAN-252:
---------------------------------

    Attachment: XBEAN-252.patch

Patch that allows to specify a path prefix to be stripped from classfile names via system property org.apache.xbean.osgi.bundle.util.BundleClassFinder.devPrefix

This is merely a workaround, but it works.

> BundleClassFinder.scanDirectory fails to resolve proper classname in -dev-mode equinox
> --------------------------------------------------------------------------------------
>
>                 Key: XBEAN-252
>                 URL: https://issues.apache.org/jira/browse/XBEAN-252
>             Project: XBean
>          Issue Type: Bug
>          Components: bundleutils
>    Affects Versions: 3.14
>            Reporter: Moritz Bechler
>         Attachments: XBEAN-252.patch
>
>
> When run in in -dev mode equinox potentially adds implicit classpath roots (see e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=300153). This is the case for the bundle project's output folder when launching from Eclipse IDE. In bundleutils' BundleClassFinder this results in *.class bundle entries whose paths do not match the expected package structure but are prefixed by the output directory (e.g. bin/com/example/ExampleClass.class) resulting in wrong class names. Imho, this primarily needs to be fixed on the equinox side but having a workaround would be nice.
> There is evidence that users already have been working around this issue  (http://code.google.com/a/apache-extras.org/p/openwebbeans-eclipse-rcp/source/browse/src/main/java/org/apacheextras/openwebbeans/eclipse/EclipseOsgiScannerService.java) but unfortunately output directories may be arbitrarily defined. 
> I'm not sure whether this situation can be detected programmatically or whether extracting the actual classname from the class file is required (this is what I did as a workaround).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)