me0wster / javamelody

Automatically exported from code.google.com/p/javamelody
0 stars 0 forks source link

JavaMelody Plugin Incompatible With Bamboo #231

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi,

We have had quite a few customers wanting to use your Bamboo plugin.  However 
it is currently not compatable. 

On downloading your jar, I notice that you include the classes from 
com.thoughtworks.xstream. Bamboo also needs this library and I'm assuming you 
have a different version (we have 1.4.1) to us because we start getting class 
not found exceptions after the install of your plugin.

For "Plugins 1" plugins we generally suggest shading the jars to prevent them 
from interfering.
http://maven.apache.org/plugins/maven-shade-plugin/

I know this effects version 1.38.0 of the JavaMelody plugin.

Let me know if you need any more information.

Cheers,
Brydie

Original issue reported on code.google.com by brydie.m...@gmail.com on 20 Jun 2012 at 7:28

GoogleCodeExporter commented 9 years ago
I think that it is a good time to remember that there is a "Donate" page:
https://code.google.com/p/javamelody/wiki/Donate
Amount is up to everyone, for example based on usage.

Original comment by evernat@free.fr on 20 Jun 2012 at 9:29

GoogleCodeExporter commented 9 years ago
Yes and some stack-trace was also sent to me:

java -Dbamboo.home=`pwd` -Djava.library.path=`pwd`/lib -jar 
bamboo-agent-3.4.4.jar http://bamboo/agentServer/
...
5684 [main] INFO com.atlassian.bamboo.agent.bootstrap.ClasspathBuilder  - 
Classpath: file:/home/x/tmp/classpath/jira-javamelody-1.35.0.jar
...
Exiting due to fatal exception.
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:41)
        at java.lang.Thread.run(Thread.java:636)
Caused by: org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'jmsMessageConverterTarget' defined in class path 
resource [applicationContextCommon.xml]: Instantiation of bean failed; nested 
exception is org.springframework.beans.BeanInstantiationException: Could not 
instantiate bean class 
[com.atlassian.bamboo.v2.build.queue.XStreamMessageConverter]: Constructor 
threw exception; nested exception is java.lang.NoSuchMethodError: 
com.thoughtworks.xstream.io.xml.AbstractXmlDriver.<init>(Lcom/thoughtworks/xstre
am/io/naming/NameCoder;)V

Original comment by evernat@free.fr on 22 Jun 2012 at 5:10

GoogleCodeExporter commented 9 years ago
I have upgraded xstream to 1.4.2 in the plugin for JIRA/Confluence/Bamboo (and 
in the optional collect server and in the CI builds).
It is in trunk (revision 2912) and ready for the next release (1.40, which is 
planned to be release some day in August).

I have made a new snapshot build from trunk and it is available at:
http://javamelody.googlecode.com/files/jira-javamelody.jar

But I am not very familiar with Bamboo, and in particular with Bamboo remote 
agents. Can you, or some customer, confirm that this new build of the plugin 
can be deployed and used in Bamboo? Thanks

Original comment by evernat@free.fr on 22 Jun 2012 at 5:13

GoogleCodeExporter commented 9 years ago
For some reason (simplicity in this case), the plugin is not packaged with 
Maven but with Ant. And so, the xstream jar is not shaded.

xstream 1.4.2 is included now in the plugin, because xstream 1.4.1 was causing 
a bug when I tested it with the plugin (in json, when there is an empty 
ArrayList).

Original comment by evernat@free.fr on 22 Jun 2012 at 5:18