Cannot connect to Neo4j

45 views
Skip to first unread message

Harald Wellmann

unread,
Nov 10, 2018, 4:28:02 PM11/10/18
to jqass...@googlegroups.com
I'm using jQAssistant 1.5.0 via Maven.

mvn jqassistant:server starts a Jetty server, opening http://127.0.0.1:7474/ in my browser shows a login form. 

When trying to login (do I need a password?), I'm getting the websocket connection error described here:


How to deal with that in the context of jQAssistant?

Regards,
Harald

Dirk Mahler

unread,
Nov 12, 2018, 3:13:25 PM11/12/18
to jqass...@googlegroups.com
Hi Harald,

authentication is disabled for the Neo4j server that comes embedded with jQAssistant and which is started using "mvn jqassistant:server". Nevertheless sometimes the login screen is visible if the browser client lost the connection as the server has been shutdown, in that case a reload (F5 or CTRL-F5) in the browser brings things to work again. Does this help in your case?

Cheers

Dirk

------ Originalnachricht ------
Von: "Harald Wellmann" <hwellm...@gmail.com>
Gesendet: 10.11.2018 22:27:49
Betreff: [jQAssistant] Cannot connect to Neo4j

--
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 post to this group, send email to jqass...@googlegroups.com.
Visit this group at https://groups.google.com/group/jqassistant.
To view this discussion on the web visit https://groups.google.com/d/msgid/jqassistant/CAC-wabtUO7U9kPisjffqVygritjTfgXR5HDDsZqeHcDjBPhQyQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Harald Wellmann

unread,
Nov 15, 2018, 8:30:52 AM11/15/18
to jqass...@googlegroups.com
Hi Dirk,

I'm afraid reloading the browser does not help.

I was assuming that my problem was somehow related to the Neo4j upgrade, but the real issue seems to be Java 11 compatibility.

Some more details on what I'm trying to do:

1) My project uses Java 11 (maven-compile-plugin configured with <release>11</release>).
2) The jqa java plugin choked on some ASM errors related to Java 11. I noticed that the latest snapshot has upgraded to ASM 7, so I upgraded the Java plugin from 1.5.0 to 1.6.0-SNAPSHOT.
3) When running mvn jqassistant:server, I'm getting this error:

[ERROR] 1 error
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0-SNAPSHOT:server: ClassCastException: attempting to cast jar:file:/Users/hwellmann/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class to jar:file:/Users/hwellmann/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.

4) As a workaround, I tried to include <goal>server</goal> in my POM instead of running this goal from the command line. When doing so, the error is gone, but then I get the login page when opening http://localhost:7474 in my browser.

To isolate the problem, I tried to upgrade also the jqassistant-maven-plugin to 1.6.0-SNAPSHOT -> same behaviour.

Also, I took a Java 8 project in which I'd used jqa 1.3.0, upgraded to 1.6.0-SNAPSHOT and ran it under Java 11. This works fine. But when I include <goal>server</goal> in the POM, I get the same login screen.

So the real question is, how to use jQAssistant with Java 11, and how to analyze and get rid of this strange JAXB classloader error. Any ideas welcome...

Regards,
Harald  

Harald Wellmann

unread,
Nov 15, 2018, 3:26:08 PM11/15/18
to jqass...@googlegroups.com
I happened to come across a message on the Maven mailing list which I believe points to the root cause:


So the problem is Maven related.

Using the latest CLI distribution snapshot from https://oss.sonatype.org/content/repositories/snapshots/com/buschmais/jqassistant/cli/jqassistant-commandline-neo4jv3/1.6.0-SNAPSHOT/ I can serve the Neo4j store of my project without problems.

Regards,
Harald

Dirk Mahler

unread,
Nov 24, 2018, 9:23:19 AM11/24/18
to jqass...@googlegroups.com
Hi Harald,

thanks for your investigation. We've released jQAssistant 1.6.0-RC1, it comes with JAXB 2.4.0 - hopefully the problem is solved. Can you give it a try?

Cheers

Dirk

------ Originalnachricht ------
Von: "Harald Wellmann" <hwellm...@gmail.com>
Gesendet: 15.11.2018 21:25:55
Betreff: Re: [jQAssistant] Cannot connect to Neo4j

Harald Wellmann

unread,
Dec 12, 2018, 9:12:14 AM12/12/18
to jqass...@googlegroups.com
Hi Dirk,

I've retried with release 1.6.0, and I still get the same kind of error.

[ERROR] Failed to execute goal com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0:server (default-cli) on project cqrs: Execution default-cli of goal com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0:server failed: Unable to load the mojo 'server' (or one of its required components) from the plugin 'com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0': com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error injecting constructor, java.lang.IllegalStateException: Cannot create JAXB context for com.buschmais.jqassistant.core.plugin.schema.v1.JqassistantPlugin
[ERROR]   at com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider.<init>(Unknown Source)
[ERROR]   at ClassRealm[plugin>com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating com.buschmais.jqassistant.scm.maven.provider.PluginRepositoryProvider
[ERROR]     for field at com.buschmais.jqassistant.scm.maven.AbstractMojo.pluginRepositoryProvider(Unknown Source)
[ERROR]   while locating com.buschmais.jqassistant.scm.maven.ServerMojo
[ERROR]   at ClassRealm[plugin>com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@799f7e29] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR]   while locating org.apache.maven.plugin.Mojo annotated with @com.google.inject.name.Named(value="com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0:server")
[ERROR]
[ERROR] 1 error
[ERROR]       role: org.apache.maven.plugin.Mojo
[ERROR]   roleHint: com.buschmais.jqassistant:jqassistant-maven-plugin:1.6.0:server: ClassCastException: attempting to cast jar:file:/Users/hwellmann/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class to jar:file:/Users/hwellmann/.m2/repository/javax/xml/bind/jaxb-api/2.4.0-b180830.0359/jaxb-api-2.4.0-b180830.0359.jar!/javax/xml/bind/JAXBContext.class.  Please make sure that you are specifying the proper ClassLoader.

Regards,
Harald

Harald Wellmann

unread,
Dec 12, 2018, 1:35:43 PM12/12/18
to jqass...@googlegroups.com
SOLVED!

This is what I had in my POM:

                    <plugin>

                        <groupId>com.buschmais.jqassistant</groupId>

                        <artifactId>jqassistant-maven-plugin</artifactId>

                        <version>1.6.0</version>

                        <extensions>true</extensions>

                    </plugin>


Everything works as expected after removing <extensions>true</extensionswhich seems to be a copy and paste leftover from an older project...

Regards,
Harald
Reply all
Reply to author
Forward
0 new messages