Class cast exception with Tycho on jQA 1.8.0

65 views
Skip to first unread message

Gerd Aschemann

unread,
Oct 13, 2020, 3:14:26 AM10/13/20
to jQAssistant
I do get the following class cast exception when running mvnw jqassistant:server:

[INFO]
[ERROR] Internal error: java.lang.ClassCastException: class org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to class org.eclipse.tycho.ReactorProject (org.eclipse.tycho.core.osgitools.DefaultReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @283a8ad6; org.eclipse.tycho.ReactorProject is i
n unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5812935) -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.ClassCastException: class org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to class org.eclipse.tycho.ReactorProject (org.eclipse.tycho.core.osgitools.DefaultReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @283a8ad6; org.
eclipse.tycho.ReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5812935)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:120)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:60)
Caused by: java.lang.ClassCastException: class org.eclipse.tycho.core.osgitools.DefaultReactorProject cannot be cast to class org.eclipse.tycho.ReactorProject (org.eclipse.tycho.core.osgitools.DefaultReactorProject is in unnamed module of loader org.codehaus.plexus.classworlds.realm.ClassRealm @283a8ad6; org.eclipse.tycho.ReactorProject is in unnamed mod
ule of loader org.codehaus.plexus.classworlds.realm.ClassRealm @5812935)
    at org.eclipse.tycho.core.osgitools.DefaultReactorProject.adapt (DefaultReactorProject.java:44)
    at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead (TychoMavenLifecycleParticipant.java:90)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:264)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:566)
    at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
    at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
    at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:60)

I'm using Maven (Wrapper) 3.6.3 and OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10).

Is there any way to exclude jQA OSGi plugin?

Any help appreciated, thanks!

Dirk Mahler

unread,
Oct 14, 2020, 2:38:28 AM10/14/20
to jqass...@googlegroups.com
Hi Gerd,

sadly I'm not aware of a way to exclude dependencies from a Maven plugin.

Question: Do you have set <extensions>true</extensions> for the jQA plugin in your pom.xml?

Cheers

Dirk

------ Originalnachricht ------
Von: "'Gerd Aschemann' via jQAssistant" <jqass...@googlegroups.com>
An: "jQAssistant" <jqass...@googlegroups.com>
Gesendet: 13.10.2020 09:14:26
Betreff: [jQAssistant] Class cast exception with Tycho on jQA 1.8.0

--
You received this message because you are subscribed to the Google Groups "jQAssistant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jqassistant...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jqassistant/ac997f48-0f2f-4f06-b58d-731889851745n%40googlegroups.com.

Gerd Aschemann

unread,
Oct 14, 2020, 8:36:54 AM10/14/20
to jqass...@googlegroups.com

Hi Dirk,

thanks for the reply. Yes, I do have extensions switched on but cannot remember why I did so. I just set everything as it is now some time ago (probably took it over from some other project). What is the purpose of extensions? Can't find much about it in the documentation.

Thx

---
Gerd Aschemann --- Veröffentlichen heißt Verändern (Carmen Thomas)
+49/173/3264070 -- ge...@aschemann.net -- http://www.aschemann.net

Dirk Mahler

unread,
Oct 15, 2020, 2:43:30 AM10/15/20
to ge...@aschemann.net, jqass...@googlegroups.com
Hi Gerd,

sometimes there are classloading problems in multi-module projects with
the embedded Neo4j database. In such cases a possible solution is to
declare the jQA plugin using <extensions>true</extensions>.

So if you don't have that problem you should not activate it.

Cheers

Dirk
>>> [1].
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "jQAssistant" group.
>> To unsubscribe from this group and stop receiving emails from it,
>> send an email to jqassistant...@googlegroups.com.
>> To view this discussion on the web visit
>>
> https://groups.google.com/d/msgid/jqassistant/em9622b14c-01c0-42d1-9729-de50e7e1f8c1%40mythenmetz-jr
>> [2].
>
> --
> You received this message because you are subscribed to the Google
> Groups "jQAssistant" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to jqassistant...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jqassistant/76f50372d0fd6980c3993331b1395827%40aschemann.net
> [3].
>
>
> Links:
> ------
> [1]
> https://groups.google.com/d/msgid/jqassistant/ac997f48-0f2f-4f06-b58d-731889851745n%40googlegroups.com?utm_medium=email&amp;utm_source=footer
> [2]
> https://groups.google.com/d/msgid/jqassistant/em9622b14c-01c0-42d1-9729-de50e7e1f8c1%40mythenmetz-jr?utm_medium=email&amp;utm_source=footer
> [3]
> https://groups.google.com/d/msgid/jqassistant/76f50372d0fd6980c3993331b1395827%40aschemann.net?utm_medium=email&utm_source=footer

--
Dirk Mahler
Senior Consultant IT
-----------------------------------------------------------------
BUSCHMAIS GbR
Inhaber  Torsten Busch, Frank Schwarz, Dirk Mahler, Tobias Israel
Adresse  Leipziger Straße 93, 01127 Dresden
Telefon  +49 351 320923-0
Mobil    +49 177 3137411
Fax      +49 351 320923-29
E-Mail   dirk....@buschmais.com
Internet www.buschmais.de
-----------------------------------------------------------------

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
Informationen. Wenn Sie diese E-Mail irrtümlich erhalten haben, bitten
wir Sie diese E-Mail umgehend zu löschen. Das unerlaubte Kopieren sowie
die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential or privileged information. If you
are not the intended recipient we kindly request you to delete this
e-mail immediately. Any unauthorized copying, disclosure or distribution
of the material in this e-mail is strictly forbidden.

Gerd Aschemann

unread,
Oct 15, 2020, 9:37:26 AM10/15/20
to jqass...@googlegroups.com
Hi Dirk,

could you probably spent some words on the <extension> flag in the jQA
documentation?

I fell back to Java 8 and everything is fine now:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home:
C:\Users\GerdAschemann\.m2\wrapper\dists\apache-maven-3.6.3-bin\5f4q40pm8i94qrm7th7hui7q03\apache-maven-3.6.3
Java version: 1.8.0_191-1-redhat, vendor: Oracle Corporation, runtime:
R:\software\jdk1.8.0.191\jre
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"

Do you test jQA with (Open) JDK 11?

Thanks
---
Gerd Aschemann --- Veröffentlichen heißt Verändern (Carmen Thomas)
+49/173/3264070 -- ge...@aschemann.net -- http://www.aschemann.net

Gerd Aschemann

unread,
Oct 18, 2020, 11:31:49 AM10/18/20
to Aschemann Gerd, jqass...@googlegroups.com
Hi Dirk,

I have opened an issue since the problem is reproducible with my open source project (you know, DukeCon ;-): https://github.com/jQAssistant/jqa-maven3-plugin/issues/12

Would be great if you could have a look into it.

Regards
--
Gerd Aschemann --- Veröffentlichen heißt Verändern (Carmen Thomas)
+49/173/3264070 -- ge...@aschemann.net -- http://www.aschemann.net

Dirk Mahler

unread,
Oct 18, 2020, 11:36:56 AM10/18/20
to jqass...@googlegroups.com
Hi Gerd,

will have a look into it - thanks for raising the issue!

Cheers

Dirk

------ Originalnachricht ------
Von: "Gerd Aschemann" <ge...@aschemann.net>
An: "Aschemann Gerd" <ge...@aschemann.net>
Gesendet: 18.10.2020 17:31:45
Betreff: Re: [jQAssistant] Class cast exception with Tycho on jQA 1.8.0

Gerd Aschemann

unread,
Oct 18, 2020, 1:40:42 PM10/18/20
to jqass...@googlegroups.com
Thanks, it is not super urgent, since we have a workaround with JDK 8 now.


--
Gerd Aschemann --- Veröffentlichen heißt Verändern (Carmen Thomas)
+49/173/3264070 -- ge...@aschemann.net -- http://www.aschemann.net
Reply all
Reply to author
Forward
0 new messages