File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Can't find SerialContextProvider - SOS!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Can Watch "Can New topic
Author

Can't find SerialContextProvider - SOS!!!

Saeed Amer
Ranch Hand

Joined: Jan 20, 2004
Posts: 140
hello there,

I am trying to solve this problem for the past few hours and nothing has helped so far

I am writing a client program to use an Entity Bean. I am using
JBoss-3.0.6_tomcat-4.1.18 on Windows 2000.

Here is how I seup the JNDI properties:
----------- JNDI Props ----------
props.setProperty("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty ("java.naming.factory.url.pkgs", "org.jboss.naming rg.jnp.interfaces");
props.setProperty ("java.naming.provider.url", "localhost");
------------------------


and when I do a "lookup" for the entity bean, I get following error:
----------- ERROR -----
javax.naming.CommunicationException: Can't find SerialContextProvider
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.java:63)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:120)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Client_1.main(Client_1.java:32)
--------------------------

If I use "org.jnp.interfaces.NamingContextFactory" instead of "com.sun.enterprise.naming.SerialInitContextFactory" for "java.naming.factory.initial", I get following error (error occurs during InitialContext() creation)
------ERROR-----------
javax.naming.NoInitialContextException: Cannot instantiate class: java.naming.factory.initial [Root exception is java.lang.ClassNotFoundException: java.naming.factory.initial]
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:652)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.<init>(InitialContext.java:195)
at Client_1.getInitialContext(Client_1.java:81)
at Client_1.main(Client_1.java:30)
Caused by: java.lang.ClassNotFoundException: java.naming.factory.initial
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:649)
... 5 more
-------------------

Any clues where I am making the mistake?

SOS...

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can't find SerialContextProvider - SOS!!!