Frage

I try to lookup an EJB wsing Weblogic JNDI context and failed with error;

java.lang.NoClassDefFoundError: com/bea/objectweb/asm/ClassVisitor

I am using Weblogic 10. I tried to add the asm-3.1.jar but it has the org/objectweb/asm/ClassVisitor. The code I try to lookup is as follows:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
env.put(Context.PROVIDER_URL, "t3://localhost:7001");
Context ctx = new InitialContext(env);

Anyone has any idea what I am doing here?

War es hilfreich?

Lösung

This looks like a standalone t3 client application (not running in a container). Thus, you'll need weblogic's full client (wlfullclient.jar) to be in your client application's classpath (read more: http://docs.oracle.com/cd/E11035_01/wls100/client/basics.html#wp1066820).

However, you'll have to generate this particular jar file using a tool called JarBuilder. And this is how: http://docs.oracle.com/cd/E11035_01/wls100/client/jarbuilder.html

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top