When running the activator ui on a my mac it crashes and reports the following error.
java.lang.NoSuchMethodError: org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
at org.slf4j.bridge.SLF4JBridgeHandler.callLocationAwareLogger(SLF4JBridgeHandler.java:224)
at org.slf4j.bridge.SLF4JBridgeHandler.publish(SLF4JBridgeHandler.java:301)
at java.util.logging.Logger.log(Logger.java:616)
at java.util.logging.Logger.doLog(Logger.java:641)
at java.util.logging.Logger.logp(Logger.java:757)
at org.jboss.netty.logging.JdkLogger.debug(JdkLogger.java:36)
at org.jboss.netty.logging.InternalLoggerFactory$1.debug(InternalLoggerFactory.java:80)
at org.jboss.netty.channel.socket.nio.SelectorUtil.<clinit>(SelectorUtil.java:57)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.getMaxThreads(NioServerSocketChannelFactory.java:248)
at org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.<init>(NioServerSocketChannelFactory.java:115)
at play.core.server.NettyServer.play$core$server$NettyServer$$newBootstrap(NettyServer.scala:47)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:127)
at play.core.server.NettyServer$$anonfun$8.apply(NettyServer.scala:126)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer.<init>(NettyServer.scala:126)
at play.core.server.NettyServer$.createServer(NettyServer.scala:243)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:280)
at play.core.server.NettyServer$$anonfun$main$3.apply(NettyServer.scala:275)
at scala.Option.map(Option.scala:145)
at play.core.server.NettyServer$.main(NettyServer.scala:275)
at activator.UIMain$$anonfun$run$1.apply$mcV$sp(UIMain.scala:110)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:110)
at activator.UIMain$$anonfun$run$1.apply(UIMain.scala:110)
at activator.UIMain.withContextClassloader(UIMain.scala:221)
at activator.UIMain.run(UIMain.scala:110)
at activator.UIMain.run(UIMain.scala:87)
at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:109)
at xsbt.boot.Launch$.withContextLoader(Launch.scala:129)
at xsbt.boot.Launch$.run(Launch.scala:109)
at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:36)
at xsbt.boot.Launch$.launch(Launch.scala:117)
at xsbt.boot.Launch$.apply(Launch.scala:19)
at xsbt.boot.Boot$.runImpl(Boot.scala:44)
at xsbt.boot.Boot$.main(Boot.scala:20)
at xsbt.boot.Boot.main(Boot.scala)
Error during sbt execution: java.lang.NoSuchMethodError org.slf4j.spi.LocationAwareLogger.log(Lorg/slf4j/Marker;Ljava/lang/String;ILjava/lang/String;[Ljava/lang/Object;Ljava/lang/Throwable;)V
I did a complete fresh install of the type safe activator. I deleted the .activator, .sbt., .ivy, and .ivy2. I tried a brew install with no luck. The projects run correctly with the normal activator run command but I cannot get the ui to work. I did some more research and some have reported that proxies could be the issue but I have no proxies setup. Thanks for the help.
It looks like you somehow have slf4j configured as the implementation of java.util.logging and then a different slf4j is on the classpath, or something like that.
Here are some docs on how java.util.logging gets configured:
http://docs.oracle.com/javase/7/docs/api/java/util/logging/LogManager.html
I might check environment variables (JAVA_OPTS ? SBT_OPTS ?) and maybe poke around for mentions of slf4j in some file in JAVA_HOME.
Just a guess really...
Related
Trying to run my embedded mysql based Unit tests I get an exception with this part:
Failed to instantiate [com.wix.mysql.EmbeddedMysql]: Factory method 'getEmbeddedMysql' threw exception; nested exception is com.wix.mysql.exceptions.CommandFailedException: Command 'CREATE USER 'sa'#'%' IDENTIFIED BY '';' on schema 'information_schema' failed with message 'Stream closed'
The same unit test and environment setup work on my MacBook
This machine with the error is an Ubuntu 20.04
Wix version is 4.6.2; Java 8, mysql.connector 8.0.24
I tried changing the dependencies versions and also tried with Java 11.
Run from within IntelliJ and on the command line. Same result.
Let me put the full comment I found in Github which helped me to fix this and I'm pretty sure most of the people seeing this in Ubuntu will find this as the solution:
I had this same issue with MySQL 5.7, while working on another open source project. I cloned the wix-embedded-mysql repository and ran the tests using the master branch, which also failed in the exact same way, except that I received a longer, more thorough message in the catch.
The issue was that I was on Ubuntu and did not have the ncurses 5 shared library installed. On ubuntu, I installed libncurses5 (apt install libncurses5) and everything started working (all tests on wix, and on my project).
I hope this helps resolve the issue.
Thanks to https://github.com/codesplode
I am in the process of upgrading a ton of dependencies to get rid of any known vulnerabilities. One of which was an old zookeeper version as a transient dependency.
So using gradle I substituted the version with the latest zookeeper
substitute module('org.apache.zookeeper:zookeeper') with module('org.apache.zookeeper:zookeeper:3.6.1')
However of course it wasn't that easy and I got this error upon startup
2020-05-08 12:03:53,509 [ERROR] (main) org.apache.curator.x.discovery.details.ServiceDiscoveryImpl - Could not register instances - will try again later
org.apache.zookeeper.KeeperException$UnimplementedException: KeeperErrorCode = Unimplemented for /applications/...
From what I can tell this is because curator(also a transient dependency) is not compatible with that zookeeper version.
After looking here http://curator.apache.org/zk-compatibility.html I take it that curator is not compatible with zk 3.6.x
and so I settled on this which I assumed would work
substitute module('org.apache.zookeeper:zookeeper') with module('org.apache.zookeeper:zookeeper:3.5.7')
substitute module('org.apache.curator:curator-recipes') with module('org.apache.curator:curator-recipes:4.3.0')
substitute module('org.apache.curator:curator-x-discovery') with module('org.apache.curator:curator-x-discovery:4.3.0')
But it doesn't. I get the same UnimplementedException as before even though they should be compatible?
So am I missing something obvious as to why it won't work?
For the sake of it I've run this for both zookeeper and cura
./gradlew -q dependencyInsight -p ./ --dependency zookeeper
and all the versions are correct (4.3.0 for everything cura related and 3.5.7 for zk)
UPDATE:
So I am not sure if this is just chasing smoke or not, but I found some errors in regards to dropwizard
I was running with this dependency
io.dropwizard:dropwizard-core:2.0.9
that will give the UnimplementedException previously mentioned.
however I saw that curator was also implementing dropwizard but on a different version:
https://github.com/apache/curator/blob/apache-curator-4.3.0/pom.xml#L88
So I downgraded my dropwizard to 1.3.7 which gave me some other errors:
2020-05-11 12:46:39,776 [WARN ] (main) org.eclipse.jetty.server.handler.ContextHandler.ROOT - unavailable
java.lang.ArrayStoreException: org.glassfish.jersey.internal.ServiceFinderBinder
and after investigating it looks like dropwizard is using an older version of jersey, so I upgraded that
substitute module('org.glassfish.jersey.ext:jersey-metainf-services') with module('org.glassfish.jersey.ext:jersey-metainf-services:2.30')
substitute module('org.glassfish.jersey.ext:jersey-bean-validation') with module('org.glassfish.jersey.ext:jersey-bean-validation:2.30')
and now I am back to the original UnimplementedException problem.
So not sure if any of that was relevant or not
I don't really feel like the exception aligns with it, but could the issue be my jersey version?
https://github.com/apache/curator/blob/apache-curator-4.3.0/pom.xml#L72
I am using jersey 2.30
I try to connect Java Mission Control (JMC) with Wildfly 16. Application server lays on Docker.
I successfully connected to wildfly via jconsole, to manage it I followed steps described here.
Unfortunately, I have no luck to connect via JMC. The URL which I use looks like this:
service:jmx:remoting-jmx://192.168.99.100:9990
I tried to set Xbootclasspath to jboss-cli-client.jar as it was described here, but I just get Unable to connect error.
I set the same jars, which are used for jconsole, but still I got Unable to connect.
I gave a try to adding flags on container site, as it was shown here, but with these flags, even wildfly haven't started.
Then, I found here the idea to hardcode some jboss classes to enable connection via remoting-jmx. I changed version of jars, according to these provided by wildfly16 and put it to jmc.ini like this.
-Xbootclasspath/a:"C:/Program Files/Java/jdk-10.0.2/lib/missioncontrol/dropins/jboss-cli-client.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting-jmx/main/remoting-jmx-3.0.1.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/remoting/main/jboss-remoting-5.0.8.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logging/main/jboss-logging-3.3.2.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/main/xnio-api-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/xnio/nio/main/xnio-nio-3.6.5.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/main/jboss-marshalling-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/marshalling/river/main/jboss-marshalling-river-2.0.6.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/cli/main/wildfly-cli-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/staxmapper/main/staxmapper-1.3.0.Final;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/protocol/main/wildfly-protocol-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/dmr/main/jboss-dmr-1.5.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/as/controller-client/main/wildfly-controller-client-8.0.0.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/threads/main/jboss-threads-2.3.3.Final.jar;C:/wildfly-16.0.0.Final/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-2.1.7.Final.jar"
After that, finally, I have another error, which is
Could not initialize class org.jboss.remotingjmx.RemotingConnector
I added dependencies of remoting-jmx-3.0.1.Final to Xbootclasspath, but I got still the same error.
My question is, have you got any idea, how to make this connection works ? Maybe someone have done it in different way ?
Any advices how can i debug this problem, will be priceless? Because I'm lack of ideas how to solve it.
In %WILDFLY_HOME%\bin\standalone.conf.bat
put:
set "JAVA_OPTS=%JAVA_OPTS% -XX:+FlightRecorder"
In jmc.ini below -vmargs put
-Xbootclasspath/a:C:\%wildfly_home%\bin\client\jboss-cli-client.jar
(%wildfly_home% is different of course, or just copy jboss-cli-client.jar to another directory and correct the path)
3. Run JMC, then Create New Connection - in Connection Properties pane push the button "Custom JMX service URL", put:
service:jmx:http-remoting-jmx://localhost:9990
In the credentials fields just put user and password, they should be created for Realm Management (e.g. using %wildfly_home%\bin\add-user.bat)
Hope this helps someone.
Solution doesn't work on java 11 for me. Mission control fails on connect to wildfly with error:
Caused by: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.getConstructor(Class.java:2151)
at java.base/java.security.Provider.newInstanceUtil(Provider.java:152)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1824)
at org.wildfly.security.WildFlyElytronBaseProvider$ProviderService.newInstance(WildFlyElytronBaseProvider.java:218)
at org.wildfly.security.sasl.util.SecurityProviderSaslClientFactory.createSaslClient(SecurityProviderSaslClientFactory.java:94)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ProtocolSaslClientFactory.createSaslClient(ProtocolSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.FilterMechanismSaslClientFactory.createSaslClient(FilterMechanismSaslClientFactory.java:102)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.LocalPrincipalSaslClientFactory.createSaslClient(LocalPrincipalSaslClientFactory.java:76)
at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.lambda$createSaslClient$0(PrivilegedSaslClientFactory.java:64)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.createSaslClient(PrivilegedSaslClientFactory.java:64)
at org.wildfly.security.auth.client.AuthenticationConfiguration.createSaslClient(AuthenticationConfiguration.java:1545)
at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.createSaslClient(AuthenticationContextConfigurationClient.java:430)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:419)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:244)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
Besides, jmc that was embedded to jdk 8 isn't able to start flight recording for java 11 process.
So after investigation i found out that this class is loaded with bootstrap classloader. According to https://openjdk.java.net/jeps/261
jdk.security.jgss module isn't defined to bootstrap classloader. But classes in jboss-cli-client.jar(it originates from wildfly-elytron project) need jgss classes in runtime.
So i found out dirty workaround for this problem: bootstrap needed classes from jre 8 in jmc.ini. Full option for linux is:
-vmargs -Xbootclasspath/a:<path_to_wildfly>/jboss-cli-client.jar:<path_to_jdk8>/jre/lib/rt.jar
And for windows:
-vmargs -Xbootclasspath/a:<path_to_wildfly>\jboss-cli-client.jar;<path_to_jdk8>\jre\lib\rt.jar
after this jmc(run on 11 jdk) succesfully connects to wildfly(run on 11 jdk) and can start and analyze flight recordings.
Ok I'll just reformulate my question with new clues I found as I didn't get an answer with the previous one.
So!
Jenkins is using the wrong commons-io.
I'm running version 1.598 of Jenkins. In the "about" section, I can see that it's using commons-io version 2.4.
When I run my maven project on Jenkins, project build is a success, but when Jenkins start running PMD or checkstyle analysis, I have the following error:
java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.lineIterator(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Lorg/apache/commons/io/LineIterator;
at hudson.plugins.analysis.util.JavaPackageDetector.detectPackageName(JavaPackageDetector.java:34)
at hudson.plugins.analysis.util.AbstractPackageDetector.detectPackageName(AbstractPackageDetector.java:25)
at hudson.plugins.analysis.util.PackageDetectors.detectPackageName(PackageDetectors.java:30)
at hudson.plugins.checkstyle.parser.CheckStyleParser.convert(CheckStyleParser.java:96)
at hudson.plugins.checkstyle.parser.CheckStyleParser.parse(CheckStyleParser.java:72)
at hudson.plugins.analysis.core.AbstractAnnotationParser.parse(AbstractAnnotationParser.java:54)
at hudson.plugins.analysis.core.FilesParser.parseFile(FilesParser.java:323)
at hudson.plugins.analysis.core.FilesParser.parseFiles(FilesParser.java:281)
at hudson.plugins.analysis.core.FilesParser.parseSingleFile(FilesParser.java:239)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:198)
at hudson.plugins.analysis.core.FilesParser.invoke(FilesParser.java:31)
at hudson.FilePath.act(FilePath.java:989)
...
This method (lineIterator(Ljava/io/InputStream;Ljava/nio/charset/Charset;)) exists in commons-io 2.4 so my guess is that Jenkins is using another jar.
I ran a locate on the server for commons-io and here is the result:
/etc/nexus/2.10/nexus/WEB-INF/lib/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/1.4/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.2/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/.nexus/attributes/commons-io/commons-io/2.4/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/1.4/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.2/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central/commons-io/commons-io/2.4/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/jars/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/.nexus/attributes/commons-io/poms/commons-io-2.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-1.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-2.2.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/jars/commons-io-2.4.jar
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-1.4.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-2.2.pom
/etc/nexus/sonatype-work/nexus/storage/central-m1/commons-io/poms/commons-io-2.4.pom
/home/jenkins/.m2/repository/commons-io
/home/jenkins/.m2/repository/commons-io/commons-io
/home/jenkins/.m2/repository/commons-io/commons-io/1.4
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/_maven.repositories
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar.md5
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom.md5
/home/sonarqube-4.5.2/lib/common/commons-io-2.4.jar
/root/nexus-2.10.0-02/nexus/WEB-INF/lib/commons-io-2.4.jar
/usr/share/doc/libcommons-io-java
/usr/share/doc/libcommons-io-java/NOTICE.txt
/usr/share/doc/libcommons-io-java/RELEASE-NOTES.txt.gz
/usr/share/doc/libcommons-io-java/changelog.Debian.gz
/usr/share/doc/libcommons-io-java/copyright
/usr/share/java/commons-io-1.4.jar
/usr/share/java/commons-io.jar
/usr/share/maven-repo/commons-io
/usr/share/maven-repo/commons-io/commons-io
/usr/share/maven-repo/commons-io/commons-io/1.4
/usr/share/maven-repo/commons-io/commons-io/debian
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.jar
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.pom
/usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.jar
/usr/share/maven-repo/commons-io/commons-io/debian/commons-io-debian.pom
/var/cache/jenkins/war/WEB-INF/lib/commons-io-2.4.jar
/var/lib/dpkg/info/libcommons-io-java.list
/var/lib/dpkg/info/libcommons-io-java.md5sums
/var/lib/jenkins/.m2/repository/commons-io
/var/lib/jenkins/.m2/repository/commons-io/commons-io
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.pom.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.2/commons-io-2.2.pom.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar.sha1
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.pom
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.pom.sha1
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/commons-io-2.2.jar
As you can see there is some occurences of the commons-io 1.4, which does not contains the missing method! So it must be the one Jenkins uses.
In the log of the project I can see:
java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.6.jar:/usr/share/maven2/boot/classworlds.jar hudson.maven.agent.Main /usr/share/maven2/ /var/cache/jenkins/war/WEB-INF/lib/remoting-2.49.jar /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.6.jar 56025
And in the locate:
/home/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/usr/share/java/commons-io-1.4.jar
/usr/share/maven-repo/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/cache/jenkins/war/WEB-INF/lib/commons-io-2.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
/var/lib/jenkins/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar
So I guess the problem lies somewhere around here, but I have no idea how to fix it!
I can't just remove occurences of commons-io 1.4 from the server as some other programs might use them.
Thank you for your help,
Guillaume
We found the solution!
It seems that this was cause by the maven version used on the server (2.2).
I upgraded it in Jenkins to 3.2.2 and it now works perfectly!
I have a problem when I try to instantiate Hibernate and connect with a MySQL database (see error message below).
Curiously enough the connection works fine using the exact same hibernate.cfg.xml file when running Junit tests but it refuses to work when run from Tomcat...
I am starting to run out of ideas.
Any clues or tip where to look?
Caused by: org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.entity.DynamicMapEntityTuplizer]
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:110)
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructDefaultTuplizer(EntityTuplizerFactory.java:135)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.(EntityEntityModeToTuplizerMapping.java:69)
at org.hibernate.tuple.entity.EntityMetamodel.(EntityMetamodel.java:323)
at org.hibernate.persister.entity.AbstractEntityPersister.(AbstractEntityPersister.java:456)
at org.hibernate.persister.entity.SingleTableEntityPersister.(SingleTableEntityPersister.java:131)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:84)
at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:267)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1341)
at se.fmt.atlantism.util.HibernateUtil.buildSessionFactory(HibernateUtil.java:16)
... 38 more
Caused by: java.lang.NullPointerException
at org.hibernate.tuple.entity.EntityTuplizerFactory.constructTuplizer(EntityTuplizerFactory.java:107)
... 47 more
I'm writing this for future Googlers and reference.
I've done some more research and the root source of the problem is still not known. However the following article throw me on the right track.
http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/
It seems like the Tomcat (version 6 at least) packages available in Ubuntu (and Debian) are not working correctly. Instead I installed Tomcat using the following guide:
http://www.ctrip.ufl.edu/tomcat6-debian-lenny-howto
While this might not be the premium choice of installation it seems necessary to get Tomcat version 6 running without problems on Ubuntu and/or Debian Lenny.
In my case, this error was resolved by switching the <dependency/> order in my pom.xml. When hibernate (3.2.7.ga) comes before hibernate-annotations (3.4.0.GA) this error occurs. The other way around, it works fine. This is the case even with scope=compile.
I would guess that you need to tweak your classpath, except that (assuming you've dropped both jars in WEB-INF/lib) it should alpha-sort in the correct order. But maybe this will give someone a hint on how to move forward.
In my case it was a simple mistake - the config file *.hbm.xml had a property that the mapped object didnt have! I also heard of cases of that error apearing when you misspell a get/set function - very similar to my case.
I was facing the same problem. It went away after I downloaded "javassist.jar" and put it in the classpath: http://www.java2s.com/Code/Jar/JKL/Downloadjavassistjar.htm
This is how the Tomcat daemon process looks:
root 2605 0.0 0.0 16584 376 ? Ss 15:39 0:00
/usr/bin/jsvc -user tomcat6
-cp /usr/share/java/commons-daemon.jar:/usr/share/tomcat6/bin/bootstrap.jar
-outfile SYSLOG -errfile SYSLOG -pidfile /var/run/tomcat6.pid
-Djava.awt.headless=true -Xmx128M
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Dcatalina.home=/usr/share/tomcat6
-Djava.io.tmpdir=/tmp/tomcat6-temp -Djava.security.manager
-Djava.security.policy=/var/lib/tomcat6/work/catalina.policy
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
-Djava.util.logging.config.file=/var/lib/tomcat6/conf/logging.properties
org.apache.catalina.startup.Bootstrap
This is how the Tomcat process looks when run from within Eclipse using the Sysdeo Tomcat launcher plugin:
(this one actually works)
jzaruba 2655 19.7 4.5 358304 46152 ? Sl 15:43 0:01
/usr/lib/jvm/java-6-sun-1.6.0.15/bin/java
-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:37377
-Dcatalina.home=/usr/share/tomcat6
-Djava.endorsed.dirs=/usr/share/tomcat6/endorsed
-Dcatalina.base=/var/lib/tomcat6 -Djava.io.tmpdir=/var/lib/tomcat6/temp
-Dfile.encoding=UTF-8 -classpath
/usr/share/tomcat6/bin/bootstrap.jar:/usr/lib/jvm/java-6-sun-1.6.0.15/lib/tools.jar
org.apache.catalina.startup.Bootstrap start
The working one (Eclipse launched) is run using java-6-sun-1.6.0.15, I'm Windows user so I don't know how to tell which JRE is used for /usr/lib/jsvc (looking at it though), but my guess would be it is some OpenJDK... Could this be the difference?
update: jsvc probably uses the same JRE Sysdeo Tomcat launcher does