Discussion:
Tycho > 1.1.0 fails with "Fatal error compiling: Illegal char <:> at index 74:"
(too old to reply)
Guru
2018-07-16 14:58:48 UTC
Permalink
Hi,

I was using Tyco 1.0.0 and bundling javafx (OSGi Adaptor) with MANIFEST.MF as
----
Bundle-ClassPath: .,
external:$java.home$/lib/ext/jfxrt.jar,
external:$java.home$/lib/jfxswt.jar,
external:$java.home$/lib/javafx-swt.jar
——
Compilation fails (Only on Windows works fine on Linux and OS X) if I upgrade to Tyco 1.1.0 or with 1.2.0 as
----
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar -> [Help 1]
—

Compilation succeeds with replacing : with ; but during run time
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:423)

Searched bugs.eclipse.org <http://bugs.eclipse.org/> didn’t find any clue.

Thanks,
Guru
Sievers, Jan
2018-07-17 07:17:38 UTC
Permalink
Bundle-ClassPath: external entries are not supported

https://bugs.eclipse.org/bugs/show_bug.cgi?id=370958#c20

you should have got a corresponding warning.

for a workaround check http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/releng/org.eclipse.fx.ide.releng/pom.xml#n219



Jan



On 16.07.18, 17:05, "tycho-user-***@eclipse.org on behalf of Guru" <tycho-user-***@eclipse.org on behalf of ***@oracle.com> wrote:




Hi,


I was using Tyco 1.0.0 and bundling javafx (OSGi Adaptor) with MANIFEST.MF as
----
Bundle-ClassPath: .,
external:$java.home$/lib/ext/jfxrt.jar,
external:$java.home$/lib/jfxswt.jar,
external:$java.home$/lib/javafx-swt.jar
——
Compilation fails (Only on Windows works fine on Linux and OS X) if I upgrade to Tyco 1.1.0 or with 1.2.0 as
----
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile
(default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar
-> [Help 1]



Compilation succeeds with replacing : with ; but during run time
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:423)



Searched bugs.eclipse.org <http://bugs.eclipse.org> didn’t find any clue.


Thanks,
Guru
Guru
2018-07-17 14:32:27 UTC
Permalink
Thank you Jan,

I would succeed with compilation phase (packaging) and ended up with

org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:423)



Because “javafx-swt.jar” (which is preset in $java.hom/lib/javafx-swt.jar) is not present in OSGi bundle class path. Defining external jar in <extraClassPathElements> would be only in Compilation scope.

What’s the correct way of providing external jars to the OSGi Bundle at run time ? (I should have created a separate chain). “OSGi Adopterhook” is one solution which was mentioned in stack overflow but its not described well.

Thanks,
Guru
Post by Sievers, Jan
Bundle-ClassPath: external entries are not supported
https://bugs.eclipse.org/bugs/show_bug.cgi?id=370958#c20 <https://bugs.eclipse.org/bugs/show_bug.cgi?id=370958#c20>
you should have got a corresponding warning.
for a workaround check http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/releng/org.eclipse.fx.ide.releng/pom.xml#n219 <http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/releng/org.eclipse.fx.ide.releng/pom.xml#n219>
Jan
Hi,
I was using Tyco 1.0.0 and bundling javafx (OSGi Adaptor) with MANIFEST.MF as
----
Bundle-ClassPath: .,
external:$java.home$/lib/ext/jfxrt.jar,
external:$java.home$/lib/jfxswt.jar,
external:$java.home$/lib/javafx-swt.jar
——
Compilation fails (Only on Windows works fine on Linux and OS X) if I upgrade to Tyco 1.1.0 or with 1.2.0 as
----
[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile
(default-compile) on project org.openjdk.jmc.javafx.osgi: Fatal error compiling: Illegal char <:> at index 74: D:\ade\jmc-releng-dev\jmc\application\org.openjdk.jmc.javafx.osgi\external:$java.home$\lib\ext\jfxrt.jar
-> [Help 1]
—
Compilation succeeds with replacing : with ; but during run time
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javafx/embed/swt/FXCanvas
at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:423)
Searched bugs.eclipse.org <http://bugs.eclipse.org/> <http://bugs.eclipse.org <http://bugs.eclipse.org/>> didn’t find any clue.
Thanks,
Guru
_______________________________________________
tycho-user mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tycho-user <https://dev.eclipse.org/mailman/listinfo/tycho-user>
Continue reading on narkive:
Loading...