-
1. Re: External JNDI namespaces
adrian.brock Aug 27, 2003 1:15 PM (in response to naskoak)Post the full stacktrace.
Regards,
Adrian -
2. Re: External JNDI namespaces
naskoak Aug 28, 2003 4:43 AM (in response to naskoak)Adrian, here is the full stack trace:
=============
12:33:29,330 INFO [NamingService] Starting
12:33:29,340 INFO [NamingService] Starting jnp server
12:33:29,410 INFO [NamingService] Started jnpPort=1099, rmiPort=0, backlog=50, bindAddress=null, Client SocketFactory=null, Serve
r SocketFactory=null
12:33:29,410 WARN [NamingService] Context.PROVIDER_URL in server jndi.properties, url=localhost
12:33:29,420 INFO [NamingService] Listening on port 1099
12:33:29,430 INFO [NamingService] Started
12:33:29,430 INFO [JNDIView] Starting
12:33:29,430 INFO [JNDIView] Started
12:33:29,430 INFO [ExternalContext] Starting
12:33:29,440 ERROR [ExternalContext] Starting failed
java.lang.NoSuchMethodException: weblogic.jndi.internal.WLInternalContext.(java.util.Hashtable, [Ljavax.naming.ldap.Control;
)
at java.lang.Class.getConstructor0(Class.java:1769)
at java.lang.Class.getConstructor(Class.java:1002)
at org.jboss.naming.ExternalContext$SerializableInitialContext.newLdapContext(ExternalContext.java:468)
at org.jboss.naming.ExternalContext$SerializableInitialContext.newContext(ExternalContext.java:447)
at org.jboss.naming.ExternalContext$SerializableInitialContext.newContext(ExternalContext.java:433)
at org.jboss.naming.ExternalContext.rebind(ExternalContext.java:253)
at org.jboss.naming.ExternalContext.startService(ExternalContext.java:216)
at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:976)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:394)
at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:824)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:632)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy6.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
at org.jboss.Main.boot(Main.java:150)
at org.jboss.Main$1.run(Main.java:388)
at java.lang.Thread.run(Thread.java:536)
================ -
3. Re: External JNDI namespaces
adrian.brock Aug 28, 2003 5:42 AM (in response to naskoak)Does the weblogic class implement
javax.naming.InitialContext or
javax.naming.ldap.InitialLdapContext?
Regards,
Adrian -
4. Re: External JNDI namespaces
naskoak Aug 28, 2003 8:25 AM (in response to naskoak)Adrian,
Thanks for your replies !
Unfortunately, the weblogic class does NOT implement the upper interfaces, but directly javax.naming.Context.
I was also surprised by this. But the book i mentioned, describes a procedure to connect exactly to WLS. Apparently, the script provided is not complete and contains typos.
Any ideas how to proceed ?
Is there a way to contact you by phone or e-mail ?
Thanks for the support! -
5. Re: External JNDI namespaces
adrian.brock Aug 28, 2003 9:37 AM (in response to naskoak)Context is an interface so it can't define the contructor.
There must be an initial naming context factory for weblogic?
Alternatively subclass ExternalContext mbean
to provide weblogic specific behaviour.
Regards,
Adrian -
6. Re: External JNDI namespaces
naskoak Aug 29, 2003 4:17 AM (in response to naskoak)Adrian,
Thanks again for your reply !
1.Weblogic has a naming connetion factory:
weblogic.jndi.WLInitialContextFactory
The problem is that it return directly Context, not InitialContext. And then everything goes wrong if i do :
==========
WLSContext
javax.naming.InitialContext
true
weblogic.properties
==========
and (as offered in the book):
==========
java.util.Hashtable ht = new java.util.Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
ht.put(Context.PROVIDER_URL,"jnp://localhost:1099");
ht.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
initialContext = new InitialContext(ht);
InitialContext wlsContext = (InitialContext)initialContext.lookup("WLSContext");
==========
The last line of the code produces : ClassCastException.
2. Your suggestion to subclass ExternalContext. How easy is it to find it in the libraries of Jboss and how to plug it afterwards in the JBoss environment ?
Any ideas?
Regards,
~Nasko -
7. Re: External JNDI namespaces
adrian.brock Aug 29, 2003 7:02 AM (in response to naskoak)<mbean code="org.jboss.naming.ExternalContext"
It is in the server module
Regards,
Adrian