Exception in thread "main" java.lang.NoSuchMethodError
yoarf
Messages postés215Date d'inscriptionjeudi 19 décembre 2002StatutMembreDernière intervention19 février 2009
-
7 mai 2007 à 20:39
scaryman
Messages postés492Date d'inscriptionvendredi 30 janvier 2004StatutMembreDernière intervention16 mai 2007
-
8 mai 2007 à 10:30
Bonjour,
J'ai l'erreur suivante : Exception in thread "main" java.lang.NoSuchMethodError: hw.compteurHome.create(I)Lhw/compteur;
at hw.compteurClient.main(compteurClient.java:36)
Sur le code suivant :
// compteurClient.java
// mini Client for accessing bean compteur
/**
* Using a Properties object will work on JDK 1.1.x and Java2
* clients
*/
static private Context getInitialContext() throws NamingException {
String url = "rmi://localhost:1099";
try {
// Get an InitialContext
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"org.objectweb.carol.jndi.spi.MultiOrbInitialContextFactory");
h.put(Context.PROVIDER_URL, url);
return new InitialContext(h);
} catch (NamingException ne) {
ne.printStackTrace();
throw ne;
}
}
}
Merci beaucoup d'avance.
Y.C
A voir également:
Exception in thread "main" java.lang.error: unresolved compilation problem:
scaryman
Messages postés492Date d'inscriptionvendredi 30 janvier 2004StatutMembreDernière intervention16 mai 200712 8 mai 2007 à 10:30
Salut.
Il y a une méthode dans ta classe compteurHome qui n'existe pas et que tu essaies pourtant d'accéder.
Je pencherais pour la méthode create(int i) vu qu'il accepte la méthode create().