lemonzone2010 / javamelody

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

echec monitoring connection apres redéploiement dans JBoss #274

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Je déploie mon application et l'utilise
2. Je la supprime
3. Je la redéploie et tente de l'utiliser

What is the expected output? What do you see instead?
Lorsque je réutilise le datasource j'ai une exception:
java.lang.IllegalStateException: 
BaseClassLoader@f454e4{vfszip:/B:/jboss-5.1.0.GA/server/dev/deploy/Dummy/dummy.w
ar/} classLoader is not connected to a domain
(probably undeployed?) for class 
net.bull.javamelody.JdbcWrapper$StatementInvocationHandler

A priori lorsque l'on stop l'application, on appel bien:
JDBCWrapperHelper.rebindInitialDataSources
Le problème est que les connexion n'ont pas été "bindé" mais wrappé

Dans JDBWrapper.rebindDatasources:
j'appel le code:
if (rewrapDataSources || isServerNeedsRewrap(jndiName)) {
       rewrapDataSource(jndiName, dataSource);

De ce fait ma connexion est maintenant wrappé avec des classes qui n'existent 
plus car j'ai fait un undeploy et le classloader a changé.

Je pense qu'il manque une méthode JDBCWrapperHelper.rewrapInitialDataSources 
qui va supprimer les proxy créé par 
JDBCWrapper.createJavaxConnectionManagerProxy

What version of the product are you using? On what application server, JDK,
operating system?

Javamelody 1.42
JBoss 5.1.0
JDK 1.6

Thenk you for your help

Original issue reported on code.google.com by lastm...@yahoo.fr on 3 Jan 2013 at 2:19

GoogleCodeExporter commented 9 years ago
Pour information, il y a le même problème sous weblogic:
Caused By: com.google.gwt.user.server.rpc.UnexpectedException: Service method 
'public abstract com.zzz.zzz.zzz.zzz.zzz.aaa.ABCD 
com.zzz.zzz.zzz.zzz.zzz.aaa.getLoggedOrganizationUser() throws 
com.zzz.zzz.zzz.zzz.zzz.aaa.MyException' threw an unexpected exception: 
java.lang.NoClassDefFoundError: 
net/bull/javamelody/JdbcWrapper$StatementInvocationHandler

Ce qui est logique vu la méthode:
    private boolean isServerNeedsRewrap(String jndiName) {
        return glassfish || jboss || weblogic || jndiName.contains("openejb");
    }

Original comment by lastm...@yahoo.fr on 3 Jan 2013 at 4:26

GoogleCodeExporter commented 9 years ago
Je n'ai pas le même comportement et je n'ai pas d'erreur, mais cela dépend de 
la configuration.
Et cela est a priori corrigé et committé (revision 3249). Cela fonctionne 
pour moi.
Un nouveau build est disponible:
http://javamelody.googlecode.com/files/javamelody-20130116.jar
Vous est-il possible de tester dans JBoss et dans WebLogic comme fait avant ?
Merci lastmike

I do not have the same behavior, but it depends on the configuration.
And it is supposed to be fixed and committed (revision 3249) and it works for 
me.
I have made a new build and it is available at:
http://javamelody.googlecode.com/files/javamelody-20130116.jar
Is it possible to test in JBoss and WebLogic like done before?
Thanks

Original comment by evernat@free.fr on 16 Jan 2013 at 12:34

GoogleCodeExporter commented 9 years ago
Revision 3249 of JDBCWrapper.java fixed the problem in JBoss et Weblogic.
Thank you very much

Original comment by lastm...@yahoo.fr on 16 Jan 2013 at 10:28