This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Cannot instantiate class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Cannot instantiate class" Watch "Cannot instantiate class" New topic
Author

Cannot instantiate class

Ram Kumar Rengarajan
Greenhorn

Joined: Apr 28, 2005
Posts: 22
Hi,

I am using Weblogic 7.0 server. I have deployed the file successfully. But I got this error, When I tried to run the client program. Anyone can help me for solve this problem? Should I set any classpath? Pls help me..

javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
WLIntialContextFactory [Root exception is java.lang.ClassNotFoundException: webl
ogic.jndi.WLIntialContextFactory]

Thanks in Advance.

Ram Kumar.
Mudi Appu
Ranch Hand

Joined: Apr 06, 2005
Posts: 44
Add weblogic.jar into your clients class path ........


SCJP 2
Ram Kumar Rengarajan
Greenhorn

Joined: Apr 28, 2005
Posts: 22
hi
Kanishtha Kramalekhaka thanks for ur help. I set the classpath. But again i am getting the same error.
I set C:\bea\weblogic700\server\lib\weblogic.jar. Pls help me.

I got the same error like

javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.
WLIntialContextFactory [Root exception is java.lang.ClassNotFoundException: webl
ogic.jndi.WLIntialContextFactory]


Tks..

Ram..
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Ram,


javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLIntialContextFactory [Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLIntialContextFactory]

Strange, but you are the second guy that has the same problem.
However I believe that you misspelled WLIntialContextFactory; try WLInitialContextFactory.


I think, therefore I exist -- Rene Descartes
Ram Kumar Rengarajan
Greenhorn

Joined: Apr 28, 2005
Posts: 22
Hi Valentin Tanase,

Thank you very much. Yes. I typed misspelled. Now the problem solved. But now I got another error. that is

javax.naming.ConfigurationException [Root exception is java.net.MalformedURLExce
ption: no protocol: ramkumar:7001]


ramkumar is my system name. http://ramkumar:7001/console - this URL works fine. Pls help me for my problem..

Thank you...

Ram..
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
You probably need to post your code.
At a glance I will suspect that you don't provide a valid url when looking up the bean. Try this:

Regards.
Ram Kumar Rengarajan
Greenhorn

Joined: Apr 28, 2005
Posts: 22
hi Valentin ,

Thank you very much for ur help. I could not able to run my program for the last 20 days. I could not able to found my problem. But now works fine with ur help. Thank you very much Valentin. Now I am very happy. Because my program works fine. Thanks a lot.

Ram..
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
You're very welcome Ramkumar and I'm very happy I could help.
rahul bivalkar
Greenhorn

Joined: Nov 19, 2003
Posts: 16
Hi everybody
I believe I have a problem similar to the one faced by Ram. I am running JBoss 2.4.2, with Apache 4.1, and I am trying to deploy an application that contains Servlets and EJBs. The application belongs to Budi Kurniawan's book on J2EE. ( the application's details are also available on: http://benmira.free.fr/en/j2ee/sessionEJB.htm#ch29lev1sec4

I have been unable to get this application to read anything from the database TassieDB. (because it is not doing anything, except opening up the first most page, Search) I am not sure what is wrong. I downloaded the database from the CD. Then since this was an older version of Access, I had to let my Access convert it to the newer form.

I then configured the Database the way I thought I should in order for it to work. I created a Data Source Name called TassieDB, by following the procedure to create a System DSN on Windows. I selected the Microsoft Access Driver and associated my Database which I named TassieDB1, which I deposited under C:\budibookstore which also contains the package com.brainysoftware.tassie.servlet.ejb

When I access the SearchServlet page and type in some search term ( like 'computer') in the search box, nothing turns up. I am supposed to getting a bunch of details regarding books matching the term 'computers'. I wonder what is going on!

The following errors are spewed out by Apache in this process:

May 18, 2005 8:27:24 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Starting service Tomcat-Standalone
Apache Tomcat/4.1.31
May 18, 2005 8:27:28 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
e
May 18, 2005 8:27:28 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
l=true
May 18, 2005 8:27:29 PM org.apache.struts.util.PropertyMessageResources
INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
nNull=true
May 18, 2005 8:27:33 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
May 18, 2005 8:27:33 PM org.apache.jk.common.ChannelSocket init
INFO: JK2: ajp13 listening on /0.0.0.0:8009
May 18, 2005 8:27:33 PM org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=10/150 config=C:\tomcatj\conf\jk2.properties
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interf
aces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: o
rg.jnp.interfaces.NamingContextFactory]


All help is gratefully acknowledged and accepted. Thanks in advance
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot instantiate class
 
Similar Threads
The selected wizard could not be started
Eclipse Error: The import org.apache.commons.httpclient cannot be resolved
Error while ruuning App
methods that causes nullpointer exception
final keyword Method local inner class