Issues running neo4j enterprise in HA mode - neo4j

I am trying to setup 3slaves and 1master. Please look at this error below and why it gets timedout ?
$ neo4j start
WARNING! You are using an unsupported Java runtime. Please use JDK 6.
Starting Neo4j Server...12:39:19,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
12:39:19,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
12:39:19,754 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/home/training/neo4j-enterprise-1.8.1/system/lib/neo4j-server-1.8.1.jar!/logback.xml]
12:39:19,809 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList#46165b7e - URL [jar:file:/home/training/neo4j-enterprise-1.8.1/system/lib/neo4j-server-1.8.1.jar!/logback.xml] is not of type file
12:39:20,126 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
12:39:20,128 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
12:39:20,134 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
12:39:20,196 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
12:39:20,341 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
12:39:20,341 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
12:39:20,343 |-ERROR in ch.qos.logback.core.joran.action.IncludeAction - Could not find resource corresponding to [custom-logback.xml]
12:39:20,347 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator#65d0d124 - Registering current configuration as safe fallback point
WARNING: not changing user
process [4490]... waiting for server to be ready................................................................................................................................................................................................................. Failed to start within 120 seconds.
Neo4j Server failed to start, please check the logs for details.
If startup is blocked on a long recovery, use '/home/training/neo4j-enterprise-1.8.1/bin/neo4j start-no-wait' to give the startup more time.
training#node01:~$

in the first error row: You are using an unsupported Java runtime. Please use JDK 6.
i also had the same issue, and had to install the newest java development kit. than it worked. but it was only a single server instance, maybe in your multiserver case it wont help.

Related

enable local cache on emqx

I see the documentation on https://docs.emqx.io/broker/v3/en/guide.html#emq-x-bridge-cache-configuration and it says that you can enable the cache on file if the network fails because emqx now is not doing this stuff.
When i set, for example the parameter on emqx 3.0.0.0 it fails on start and says in the lof file that is not declared:
You've tried to set bridge.xxx.queue.replayq_seg_bytes, but there is no setting with that name.
2020-03-03T19:43:22.777171+03:00 [error] Did you mean one of these?
2020-03-03T19:43:22.962094+03:00 [error] bridge.$name.mqueue_type
2020-03-03T19:43:22.962572+03:00 [error] bridge.$name.clean_start
2020-03-03T19:43:22.962760+03:00 [error] bridge.$name.start_type
2020-03-03T19:43:23.102793+03:00 [error] Error generating configuration in phase transform_datatypes
2020-03-03T19:43:23.103040+03:00 [error] Conf file attempted to set unknown variable: bridge.aps.queue.replayq_seg_bytes
You know if its problem of my version of emqx or is possible a problem with the sintax.
Thanks in advance
Greetings
It's sintax error.
bridge.xxx.queue.replayq_seg_bytes
It's means set the xxx bridge use queue.replayq_seg_bytes config.
bridge.mqtt.xxx.address = 127.0.0.1:1883
Is exists? By the way the EMQ X v4.0.6 is recommended.

Using Neo4j 2.1.2 database with Neo4j 2.1.3 fails to start

I'm trying to copy over a database that I've been using with Neo4j 2.1.2 to a new machine that I upgraded from Neo4j 2.0.3 to Neo4j 2.1.3. Seems like it is coming down to Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.3'. but I don't know how to fix that.
Here's what I did:
On my old server:
Shut down my 2.1.2 server using bin/neo4j stop
Copied the graph.db directory to my new server
On my new server:
Delete the existing graph.db directory
Ran apt-get install neo4j to upgrade the new server from 2.0.3 to 2.1.3
Server started successfully without warnings
Deleted the newly created graph.db directory
Copied my existing graph.db directory into the data directory for 2.1.3
Ran chown to change the owner of the files to neo4j
Attempted to start the server using sudo service neo4j-service start
Also tried setting allow_store_upgrade=true but that had no effect
Here is the console output that I get:
Using additional JVM arguments: -server -XX:+DisableExplicitGC -Dorg.neo4j.server.properties=conf/neo4j-server.properties -Djava.util.logging.config.file=conf/logging.properties -Dlog4j.configuration=file:conf/log4j.properties -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
Starting Neo4j Server...WARNING: not changing user
process [9107]... waiting for server to be ready... Failed to start within 120 seconds.
Here is the error logged in messages.log:
2014-08-06 19:13:13.103+0000 ERROR [o.n.k.EmbeddedGraphDatabase]:
Startup failed: Component 'org.neo4j.kernel.impl.transaction.XaDataSourceManager#3bf17f92' was successfully initialized, but failed to start.
Please see attached cause exception.: Component 'org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaDataSource#c3e122' was successfully initialized, but failed to start.
Please see attached cause exception.: 'neostore' has a store version number that we cannot upgrade from. Expected 'NeoStore v0.A.0' but file is version 'NeoStore v0.A.3'.
2014-08-06 19:13:13.104+0000 INFO [o.n.k.EmbeddedGraphDatabase]: Shutdown started
And here is the console.log output:
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/share/neo4j/system/lib/logback-classic-1.0.9.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/share/neo4j/system/lib/logback-classic-1.1.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
11:21:18,697 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy]
11:21:18,697 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml]
11:21:18,698 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-2.0.3.jar!/logback.xml]
11:21:18,699 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs multiple times on the classpath.
11:21:18,699 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-2.0.3.jar!/logback.xml]
11:21:18,699 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml] occurs at [jar:file:/usr/share/neo4j/system/lib/neo4j-server-2.1.3.jar!/logback.xml]
11:21:18,725 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList#2d3d0953 - URL [jar:file:/usr/share/neo4j/system/lib/neo4j-server-2.0.3.jar!/logback.xml] is not of type file
11:21:18,782 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
11:21:18,786 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
11:21:18,795 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT]
11:21:18,822 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property
11:21:18,890 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to INFO
11:21:18,890 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT]
11:21:18,891 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
11:21:18,893 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator#22f3f59 - Registering current configuration as safe fallback point
11:21:19.099 [main] INFO o.n.s.enterprise.EnterpriseNeoServer - Setting startup timeout to: 120000ms based on -1
Any tips to get this running? I've actually never successfully copied a database to a new server running a new Neo4j version and had it actually work so I'm clearly using the wrong process. The 2.1.3 server starts fine if I let it create a new empty database.
Try clearing out all references to 2.0.3.jar in /usr/share/neo4j/system/lib/ -- make sure that there is only 2.1.3.
It looks like from your logs that your /neo4j/system/lib directories were merged together and contain incongruous jar files. Those jar files contain some meta data from compilation that could cause some conflicting issues.
And as always, backup your data store files before migrating.

Need help resolving error message

Just tried to deploy a .war file and received this error message. This came quite the surprise to me because I just deployed a .war file the day before and worked fine with minimal changes between the two (changed a value of a variable that tracks days until a cron job executes). I do leave out the auto generated .iml files that IntelliJ creates, could that do it?
'2014-01-24 08:47:45,480 [Thread-10] WARN config.ConfigurationFactory - No configuration found. Configuring ehcac he from ehcache-failsafe.xml found in the classpath: jar:file:/var/opt/tomcat/webapps/PerformanceEvaluations-moved /WEB-INF/lib/ehcache-core-2.4.6.jar!/ehcache-failsafe.xml
''2014-01-24 08:47:46,117 [Thread-10] WARN hibernate.AbstractEhcacheRegionFactory - Couldn't find a specific ehca che configuration for cache named [edu.wisc.radiology.performanceevaluations.Role]; using defaults.
' ==> PerformanceEvaluations_main.log <== '2014-01-24 08:47:45,480 [Thread-10] WARN config.ConfigurationFactory - No configuration found. Configuring ehcac he from ehcache-failsafe.xml found in the classpath: jar:file:/var/opt/tomcat/webapps/PerformanceEvaluations-moved /WEB-INF/lib/ehcache-core-2.4.6.jar!/ehcache-failsafe.xml
''2014-01-24 08:47:46,117 [Thread-10] WARN hibernate.AbstractEhcacheRegionFactory - Couldn't find a specific ehca che configuration for cache named [edu.wisc.radiology.performanceevaluations.Role]; using defaults.
' ==> catalina.out <==
'2014-01-24 08:47:49,046 [Thread-10] WARN servlet.DefaultGrailsApplicationAttributes - ApplicationContext not fou nd in org.codehaus.groovy.grails.APPLICATION_CONTEXT attribute of servlet context.
' ==> PerformanceEvaluations_main.log <==
'2014-01-24 08:47:49,046 [Thread-10] WARN servlet.DefaultGrailsApplicationAttributes - ApplicationContext not fou nd in org.codehaus.groovy.grails.APPLICATION_CONTEXT attribute of servlet context.
' ==> catalina.out <==
'2014-01-24 08:47:50,112 [Thread-10] WARN module.ModuleDeclarationsFactory - 'grails.resources.modules' in config does not define any modules
'==> PerformanceEvaluations_main.log <==
'2014-01-24 08:47:50,112 [Thread-10] WARN module.ModuleDeclarationsFactory - 'grails.resources.modules' in config does not define any modules
' ==> catalina.out <==
Parsing DB Changelog
I don't see any error messages, only warnings. And all are harmless. For example the one about Ehcache is standard. If you don't provide a custom ehcache.xml, it defaults to one in the jar file and prints some messages to that effect. You can create your own - typically a modified version of the default file - and put it in the root of the classpath (non-Groovy files in grails-app/conf and src/java get copied to the classpath, so it's a good location) and it will be used instead. This is a good idea to do early on, even if you just keep the default values in your file, to make it easier to configure later. And the defaults are rather conservative, e.g. the TTL defaults to only 2 minutes.

Play 2.1 and Neo4J WrappingNeoServer errors with Logback.xml

I had an embedded neo4j server with admin console working within a Play 2.0.1 application. I recently upgraded to the release candidate for compatibilities with DeadBolt and found that the application no longer runs.
To start the server I was doing the following:
graphDb = (GraphDatabaseAPI) new GraphDatabaseFactory()
.newEmbeddedDatabaseBuilder(CONF_DBMETA_LOCATION)
.setConfig(ShellSettings.remote_shell_enabled, "true")
.newGraphDatabase();
ServerConfigurator config;
config = new ServerConfigurator(graphDb);
// let the server endpoint be on a custom port
srv = new WrappingNeoServerBootstrapper(graphDb, config);
srv.start();
Unfortunately I then get:
> java.lang.RuntimeException:
> org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.logging.LogbackService#4c043845' failed to
> initialize. Please see attached cause exception.
I have tried removing slf4j and logback dependencies from my Build.scala where neo4j-server is added but to no avail. It seems that the wrong logback.xml is being loaded by neo4j. Also, if I add notTransitive() to the neo4j-server dependency the logback.xml warnings at startup go away. I imagine that the neo4j specific logback.xml is embedded within the jar(s) and is causing the issue. One potential solution I see is to write a custom configuration via code, but I'm unsure how to do this. Any thoughts? For reference, I get these errors at startup:
> 22:11:05,124 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find
> resource [logback.groovy]
> 22:11:05,125 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find
> resource [logback-test.xml]
> 22:11:05,125 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource
> [logback.xml] at
> [jar:file:/Users/steve/Code/play-2.1-RC1/repository/local/play/play_2.10/2.1-RC1/jars/play_2.10.jar!/logback.xml]
> 22:11:05,126 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml]
> occurs multiple times on the classpath.
> 22:11:05,126 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml]
> occurs at
> [jar:file:/Users/steve/Code/play-2.1-RC1/framework/../repository/cache/org.neo4j.app/neo4j-server/jars/neo4j-server-1.9-SNAPSHOT.jar!/logback.xml]
> 22:11:05,126 |-WARN in ch.qos.logback.classic.LoggerContext[default] - Resource [logback.xml]
> occurs at
> [jar:file:/Users/steve/Code/play-2.1-RC1/repository/local/play/play_2.10/2.1-RC1/jars/play_2.10.jar!/logback.xml]
> 22:11:05,139 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList#733b8bc1 - URL
> [jar:file:/Users/steve/Code/play-2.1-RC1/repository/local/play/play_2.10/2.1-RC1/jars/play_2.10.jar!/logback.xml]
> is not of type file
> 22:11:05,265 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug
> attribute not set
> 22:11:05,614 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate
> appender of type [ch.qos.logback.core.ConsoleAppender]
> 22:11:05,625 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as
> [STDOUT]
> 22:11:05,657 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming
> default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for
> [encoder] property
> 22:11:05,707 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level
> of ROOT logger to ERROR
> 22:11:05,707 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching
> appender named [STDOUT] to Logger[ROOT]
> 22:11:05,707 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of
> configuration.
> 22:11:05,709 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator#4a546701 - Registering
> current configuration as safe fallback point
See below for the full exception:
> play.api.UnexpectedException: Unexpected exception[RuntimeException:
> org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.logging.LogbackService#4c043845' failed to
> initialize. Please see attached cause exception.] at
> play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:134)
> ~[play_2.10.jar:2.1-RC1] at
> play.core.ReloadableApplication$$anonfun$get$1$$anonfun$1.apply(ApplicationProvider.scala:101)
> ~[play_2.10.jar:2.1-RC1] at scala.Option.map(Option.scala:145)
> ~[scala-library.jar:na] at
> play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:101)
> ~[play_2.10.jar:2.1-RC1] at
> play.core.ReloadableApplication$$anonfun$get$1.apply(ApplicationProvider.scala:99)
> ~[play_2.10.jar:2.1-RC1] at
> scala.util.Either$RightProjection.flatMap(Either.scala:523)
> [scala-library.jar:na] Caused by: java.lang.RuntimeException:
> org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.logging.LogbackService#4c043845' failed to
> initialize. Please see attached cause exception. at
> org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:258)
> ~[neo4j-kernel-1.9.M03.jar:na] at
> org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:88)
> ~[neo4j-kernel-1.9.M03.jar:na] at
> org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:83)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.graphdb.factory.GraphDatabaseBuilder.newGraphDatabase(GraphDatabaseBuilder.java:206)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> EmbeddedGraphDB.initializeDatabase(EmbeddedGraphDB.java:70)
> ~[na:na] at
> EmbeddedGraphDB.<init>(EmbeddedGraphDB.java:51)
> ~[na:na] Caused by: org.neo4j.kernel.lifecycle.LifecycleException:
> Component 'org.neo4j.kernel.logging.LogbackService#4c043845' failed to
> initialize. Please see attached cause exception. at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:471)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:96)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.InternalAbstractGraphDatabase.run(InternalAbstractGraphDatabase.java:245)
> ~[neo4j-kernel-1.9.M03.jar:na] at
> org.neo4j.kernel.EmbeddedGraphDatabase.<init>(EmbeddedGraphDatabase.java:88)
> ~[neo4j-kernel-1.9.M03.jar:na] at
> org.neo4j.graphdb.factory.GraphDatabaseFactory$1.newDatabase(GraphDatabaseFactory.java:83)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] Caused by:
> org.neo4j.kernel.lifecycle.LifecycleException: Component
> 'org.neo4j.kernel.logging.LogbackService$1#1955bd61' was successfully
> initialized, but failed to start. Please see attached cause exception.
> at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.start(LifeSupport.java:495)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:105)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.logging.LogbackService.init(LogbackService.java:106)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport$LifecycleInstance.init(LifeSupport.java:465)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport.init(LifeSupport.java:62)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] at
> org.neo4j.kernel.lifecycle.LifeSupport.start(LifeSupport.java:96)
> ~[neo4j-kernel-1.9.M03.jar:1.9.M03] Caused by:
> java.lang.NoSuchMethodError:
> org.codehaus.janino.ClassBodyEvaluator.setImplementedInterfaces([Ljava/lang/Class;)V
> at
> ch.qos.logback.core.joran.conditional.PropertyEvalScriptBuilder.build(PropertyEvalScriptBuilder.java:48)
> ~[logback-core.jar:na] at
> ch.qos.logback.core.joran.conditional.IfAction.begin(IfAction.java:67)
> ~[logback-core.jar:na] at
> ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:276)
> ~[logback-core.jar:na] at
> ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:148)
> ~[logback-core.jar:na] at
> ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:130)
> ~[logback-core.jar:na] at
> ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:50)
> ~[logback-core.jar:na]
EDIT1 More Details
I removed the logback.xml file from play_2.10.jar and no longer get the duplicate warning from logback at startup of the play application.
I then tried locating putting the contents of both the neo4j logback.xml and play2.1 logback.xml as custom-logback.xml within the root of my play project. The same path as Play.application().path() Perhaps this is the wrong location for neo4j to pick it up?
When reviewing dependencies I have one janino required by neo4j-server. Also, I'm not seeing any conflicts in jars for logging but perhaps I'm missing something. Here's my dependency hierarchy from 'play dependencies':
https://gist.github.com/4559389
I also tried copying the default configuration listed on the Play2.1 wiki as below into custom-logback.xml with no success:
<configuration>
<conversionRule conversionWord="coloredLevel" converterClass="play.api.Logger$ColoredLevel" />
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${application.home}/logs/application.log</file>
<encoder>
<pattern>%date - [%level] - from %logger in %thread %n%message%n%xException%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%coloredLevel %logger{15} - %message%n%xException{5}</pattern>
</encoder>
</appender>
<logger name="play" level="INFO" />
<logger name="application" level="INFO" />
<root level="ERROR">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
EDIT 2
Definitely seems to be an issue with the logback dependency. Neo4j depends on 0.9.30 and play depends on 1.0.7 it seems. I'm guessing there's an api change between those versions that when the library gets loaded by ?janino? it can't find the appropriate method. Still unsure as to how to specify in the logback.xml properly to select the proper dependency at runtime.
Graphs were generated by yed + sbt-dependency-graph.
With regard to the Neo4j lifecycle exception that gets thrown because Play 2.1's newer version of logback is not compatible with Neo4j's. I ran into this issue and ended up just overriding Play's logback to an older, compatible version by putting this in my Build.scala's project dependencies:
"ch.qos.logback" % "logback-core" % "1.0.3" force(), // this should override the Play version
"ch.qos.logback" % "logback-classic" % "1.0.3" force(),
For good measure I also tried excluding any log4j transitive dependencies being pulled in by setting SBT's ivyXML parameter:
ivyXML :=
<dependencies>
<exclude module="log4j"/>
</dependencies>
This is obviously a fragile fix but, at least for Play 2.1-RC2, it seems to work. I still have issues actually configuring the logging for Neo4j so I'll try and update this answer later.
Update: Since I am new to Logback I had a bit of difficulty configuring it with Play/Neo4j. To prevent Logback from erroring and drowning me in status messages I needed to put a file called custom-logback.xml in my Play app's conf directory. I think the Neo4j logging config requires this. Mine contains the following:
<included>
<logger name="eu.mypackage" level="info">
</logger>
<logger name="org.neo4j" level="warn">
</logger>
<root level="warn">
</root>
</included>
Also in my conf directory, I seemed to need a file called logback.properties which (in my case) contains just this line:
CONSOLE_LEVEL=ERROR
(Logback experts, feel free to correct any of this.)
You seem to be running into two separate problems. One is that Play provides a logback.xml file that conflicts with Neo's. Second, you seem to have two versions of logback on classpath, which I'm guessing is causing the NoSuchMethodError exception. If you can remove the Play logback.xml file and put that content into a file called "/custom-logback.xml" (which Neo will include via our logback config), and then make sure you only have one version of Logback (or specifically, Janino), that should help.
Ultimately I have not been able to resolve the dependency issue between Play 2.1, Neo4J, and logback. I'm sure its an easy and quick fix but I'm unsure how to go about it without modifying either package dependency explicitly. Instead I've opted to use the Neo4J Java REST binding to replace the embedded server for the time being. Works well and have only had a few minor hiccups with differences between the native API and the REST wrapper. I left the dependencies for the embedded server in Build.scala and also split the embedded and REST services from a common interface such that they can be specified at runtime. I guess ideally these both should be plugins for Play...
This may sound completely unrelated to the issue description above, but:
The issue for us - I'm on a Mac, my colleague on Ubuntu - turned out to be library dependencies being pulled into Play's /lib directory that shouldn't have been there (for whatever reason), which in our case was two versions of Janino - 2.5.10 and 2.6.1, and removing the older version resolved the problem.
My colleague mentioned something about the differences in naming conventions used to identify these two releases, which may have caused the problem.
So in summary; in certain cases, check your /lib directory for non-essential or unexpected libraries.

grails wsclient "file not found" consuming a .net web service

first of all, I want to apologize if my question is stupid, but I'm really new in consuming .net web service in grails.
There's a SOAP WS (wich I can't manipulate in any way) that I consume whis way:
def wsdlURL = "_HttpUrl_'/AspNetOracleProviderService.asmx?WSDL"
def proxy = webService.getClient(wsdlURL) <= This is the line where my project fails
Now, I've tested this service in a asp.Net Project with no troubles, but in Grails it generates me this error:
Error 500: Executing action [create] of controller [pruebaplugins.PruebaWsClientController] caused exception: Unable to create JAXBContext for generated packages: "com.something.anothersomething" doesnt contain ObjectFactory.class or jaxb.index
I have defined the JAVA_HOME and javac Is there, I can acces to it in any location in a command prompt.
At the end of this post I'll put de detailed info.
I've only tested this service and the well-known Celsius-Farenheit example, wich works with no problems, I think it's because it only returns a String, unlike mine or any other services.
I don't know if its a lack of something, surely could be something I ignore.
Like I said, I'm very new in this kind of stuff and I'd appreciate any kind of help.
Thanks anyway.
Detailed info:
When I put
debug 'org.apache.cxf'
in log4j in Config.groovy
the output throw me this:
2012-01-25 16:08:13,514 [http-8080-2] INFO spring.BusApplicationContext - Refreshing org.apache.cxf.bus.spring.BusApplicationContext#5c3e99: startup date [Wed Jan 25 16:08:13 CLST 2012]; root of context hierarchy
2012-01-25 16:08:13,639 [http-8080-2] INFO spring.BusApplicationContext
- No cxf.xml configuration file detected, relying on defaults.
2012-01-25 16:08:13,820 [http-8080-2] DEBUG spring.ControlledValidationXmlBeanDefinitionReader
- Loaded 0 bean definitions from location pattern [classpath:META-INF/cxf/cxf-extension-http.xml]
2012-01-25 16:08:13,848 [http-8080-2] DEBUG spring.BusApplicationContext
- Bean factory for org.apache.cxf.bus.spring.BusApplicationContext#5c3e99: org.springframework.beans.factory.support.DefaultListableBeanFactory#e3e8f3: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.binding.corba.CorbaBindingFactory,org.apache.cxf.binding.corba.wsdl.WSDLExtensionRegister#0,org.apache.cxf.jaxws.context.WebServiceContextResourceResolver,org.apache.cxf.jaxws.context.WebServiceContextImpl,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.binding.xml.XMLBindingFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.javascript.JavascriptQueryHandlerRegistry,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.transport.http.policy.NoOpPolicyInterceptorProvider,org.apache.cxf.transport.http.ClientOnlyHTTPTransportFactory,org.apache.cxf.management.InstrumentationManager,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.jaxrs.JAXRSBindingFactory,org.apache.cxf.ws.security.policy.WSSecurityPolicyLoader,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.policy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder]; root of factory hierarchy
2012-01-25 16:08:14,009 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource#cb229]
2012-01-25 16:08:14,009 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster#184b649]
2012-01-25 16:08:16,095 [http-8080-2] DEBUG spring.BusApplicationContext
- Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor#1e10f02]
2012-01-25 16:08:18,925 [http-8080-2] INFO dynamic.DynamicClientFactory
- Created classes: com.something.anothersmth.Aplicacion, com.something.anothersmth.ArrayOfControl, com.something.anothersmth.ArrayOfModulo, com.something.anothersmth.ArrayOfPagina, com.something.anothersmth.ArrayOfRol, etc (...all the classes)
javac: file not found: C:\Users\DYT01\AppData\Local\Temp\org.apache.cxf.endpoint.dynamic.DynamicClientFactory#8a3c71-1327518498999-src\com\something\anothersmth\CambiarContraseña.java
Usage: javac
use -help for a list of possible options
2012-01-25 16:08:20,637 [http-8080-2] ERROR dynamic.DynamicClientFactory - Could not compile java files for ...HttpUrl/AspNetOracleProviderService.asmx?WSDL.

Resources