File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

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.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(
at com.sun.enterprise.naming.SerialContext.lookup(
at javax.naming.InitialContext.lookup(
at Client_1.main(

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)
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(
at javax.naming.InitialContext.getDefaultInitCtx(
at javax.naming.InitialContext.init(
at javax.naming.InitialContext.<init>(
at Client_1.getInitialContext(
at Client_1.main(
Caused by: java.lang.ClassNotFoundException: java.naming.factory.initial
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at java.lang.ClassLoader.loadClassInternal(
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(
at com.sun.naming.internal.VersionHelper12.loadClass(
at javax.naming.spi.NamingManager.getInitialContext(
... 5 more

Any clues where I am making the mistake?


I agree. Here's the link:
subject: Can't find SerialContextProvider - SOS!!!
It's not a secret anymore!