Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NoClassDefFoundError

18 views
Skip to first unread message

Chi-Ming Yang

unread,
Jul 25, 2001, 11:03:48 AM7/25/01
to
I am trying to write a client program to connect to a data source.
Can someone help me to take a look at this? I an using WAS 4.0 with Oracle
8i. The client program is running under jBuilder 4.0. I have included all
jar files in lib folder.

Thank you
>-------------------------------------------------------->
C:\bea\jdk130\bin\javaw -classpath
"S:\Java\classes;C:\jaxp-1.1\crimson.jar;C:\jaxp-1.1\jaxp.jar;C:\jaxp-1.1\xa
lan.jar;C:\jdk1.3\jre\lib\rt.jar;S:\Java\lib\activation.jar;S:\Java\lib\clas
ses12.zip;S:\Java\lib\cos.jar;S:\Java\lib\dx3.0.jar;S:\Java\lib\dx3.0-res.ja
r;S:\Java\lib\fscontext.jar;S:\Java\lib\j2ee.jar;S:\Java\lib\java40.jar;S:\J
ava\lib\jgl3.1.0.jar;S:\Java\lib\jsdk21.jar;S:\Java\lib\junit.jar;S:\Java\li
b\mail.jar;S:\Java\lib\msclasses.zip;S:\Java\lib\rootriver.report.jar;S:\Jav
a\lib\servlet.jar;S:\Java\lib\ServletExecDebugger.jar;S:\Java\lib\struts.jar
;C:\bea\wlserver6.0sp1\lib\weblogic.jar;C:\bea\wlserver6.0sp1\lib\xmlx.jar;C
:\bea\wlserver6.0sp1\bin;C:\junit3.5\junit.jar;C:\jakarta-struts-1.0-b1\lib\
struts.jar;S:\Java\lib\flux.jar;C:\WebSphere\AppServer\lib\aat.jar;C:\WebSph
ere\AppServer\lib\ace.jar;C:\WebSphere\AppServer\lib\als.jar;C:\WebSphere\Ap
pServer\lib\appclient.jar;C:\WebSphere\AppServer\lib\bootstrap.jar;C:\WebSph
ere\AppServer\lib\bsf.jar;C:\WebSphere\AppServer\lib\certpath.jar;C:\WebSphe
re\AppServer\lib\chart.jar;C:\WebSphere\AppServer\lib\classes12.zip;C:\WebSp
here\AppServer\lib\cm.jar;C:\WebSphere\AppServer\lib\commands.jar;C:\WebSphe
re\AppServer\lib\common.jar;C:\WebSphere\AppServer\lib\csicpi.jar;C:\WebSphe
re\AppServer\lib\databeans.jar;C:\WebSphere\AppServer\lib\deployTool.jar;C:\
WebSphere\AppServer\lib\derdbpw.jar;C:\WebSphere\AppServer\lib\dertrjrt.jar;
C:\WebSphere\AppServer\lib\drs.jar;C:\WebSphere\AppServer\lib\dynacache.jar;
C:\WebSphere\AppServer\lib\eex.jar;C:\WebSphere\AppServer\lib\EJBCommandTarg
et.jar;C:\WebSphere\AppServer\lib\ejbcontainer.jar;C:\WebSphere\AppServer\li
b\ext;C:\WebSphere\AppServer\lib\firststeps.jar;C:\WebSphere\AppServer\lib\h
plwps.jar;C:\WebSphere\AppServer\lib\http.jar;C:\WebSphere\AppServer\lib\htt
psession.jar;C:\WebSphere\AppServer\lib\idb.jar;C:\WebSphere\AppServer\lib\i
dbexmpl.jar;C:\WebSphere\AppServer\lib\ivblogbr.jar;C:\WebSphere\AppServer\l
ib\ivjbase.jar;C:\WebSphere\AppServer\lib\ivjejb35.jar;C:\WebSphere\AppServe
r\lib\iwsorb.jar;C:\WebSphere\AppServer\lib\iwstools.jar;C:\WebSphere\AppSer
ver\lib\j2ee.jar;C:\WebSphere\AppServer\lib\j2ee-validation.jar;C:\WebSphere
\AppServer\lib\j2eexml-xerces.jar;C:\WebSphere\AppServer\lib\js.jar;C:\WebSp
here\AppServer\lib\jsp.jar;C:\WebSphere\AppServer\lib\jts.jar;C:\WebSphere\A
ppServer\lib\logbrjface.jar;C:\WebSphere\AppServer\lib\logbrxml.jar;C:\WebSp
here\AppServer\lib\lotusxsl.jar;C:\WebSphere\AppServer\lib\ltext.jar;C:\WebS
phere\AppServer\lib\mof.jar;C:\WebSphere\AppServer\lib\mofj2ee.jar;C:\WebSph
ere\AppServer\lib\mofjava.jar;C:\WebSphere\AppServer\lib\nls.jar;C:\WebSpher
e\AppServer\lib\ns.jar;C:\WebSphere\AppServer\lib\nssrcm.jar;C:\WebSphere\Ap
pServer\lib\ose.jar;C:\WebSphere\AppServer\lib\perf.jar;C:\WebSphere\AppServ
er\lib\ptfextuninst.jar;C:\WebSphere\AppServer\lib\ras.jar;C:\WebSphere\AppS
erver\lib\resources.jar;C:\WebSphere\AppServer\lib\runtime.jar;C:\WebSphere\
AppServer\lib\seappinstall.jar;C:\WebSphere\AppServer\lib\security.jar;C:\We
bSphere\AppServer\lib\soap.jar;C:\WebSphere\AppServer\lib\SoapEnabler.jar;C:
\WebSphere\AppServer\lib\soap-sec.jar;C:\WebSphere\AppServer\lib\uddi4j.jar;
C:\WebSphere\AppServer\lib\ujc.jar;C:\WebSphere\AppServer\lib\userprofile.ja
r;C:\WebSphere\AppServer\lib\utils.jar;C:\WebSphere\AppServer\lib\vaprt.jar;
C:\WebSphere\AppServer\lib\was_commands.jar;C:\WebSphere\AppServer\lib\WASPo
stUpgrade.jar;C:\WebSphere\AppServer\lib\WASPreUpgrade.jar;C:\WebSphere\AppS
erver\lib\webcontainer.jar;C:\WebSphere\AppServer\lib\websphere.jar;C:\WebSp
here\AppServer\lib\websphere-validation.jar;C:\WebSphere\AppServer\lib\webtl
srn.jar;C:\WebSphere\AppServer\lib\wlm.jar;C:\WebSphere\AppServer\lib\worklo
adcontroller.jar;C:\WebSphere\AppServer\lib\ws-base-bindings.jar;C:\WebSpher
e\AppServer\lib\ws-base-config.jar;C:\WebSphere\AppServer\lib\ws-base-extens
ions.jar;C:\WebSphere\AppServer\lib\ws-base-resources.jar;C:\WebSphere\AppSe
rver\lib\ws-soap-ext.jar;C:\WebSphere\AppServer\lib\xalan.jar;C:\WebSphere\A
ppServer\lib\xalanj1compat.jar;C:\WebSphere\AppServer\lib\xerces.jar;C:\WebS
phere\AppServer\lib\xmi.jar;C:\WebSphere\AppServer\lib\xmiframework.jar;C:\W
ebSphere\AppServer\lib\xml4j.jar;C:\WebSphere\AppServer\lib\xss4j-dsig.jar;C
:\bea\jdk130\jre\lib\i18n.jar;C:\bea\jdk130\jre\lib\jaws.jar;C:\bea\jdk130\j
re\lib\rt.jar;C:\bea\jdk130\jre\lib\sunrsasign.jar;C:\bea\jdk130\lib\dt.jar;
C:\bea\jdk130\lib\tools.jar" jimtest.DBPoolTest -v -ws
S:\Java\src\jimtest\OrderResponse.xml
java.lang.NoClassDefFoundError: com/ibm/rmi/iiop/ORB
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
at
com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnIniti
alContextFactory.java:71)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:668)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at jimtest.DBPoolTest.getDomainIDs(DBPoolTest.java:53)
at jimtest.DBPoolTest.<init>(DBPoolTest.java:22)
at jimtest.DBPoolTest.main(DBPoolTest.java:30)
Exception in thread "main"
>------------------------------------------------------------------------>
public void getDomainIDs(String domainProfileID) throws SQLException
{
String sql = "select DMN_ID domainID from pa_grp_dmn where GDP_ID='" +
domainProfileID + "'";
Statement ps = null;
Connection conn = null;
ResultSet rs = null;

try {
// Retrieve a DataSource through the JNDI Naming Service
java.util.Properties parms = new java.util.Properties();
// com.ibm.websphere.naming.WsnInitialContextFactory
parms.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
parms.setProperty(Context.PROVIDER_URL, "iiop://localhost:900");

// Create the Initial Naming Context
javax.naming.Context ctx = new javax.naming.InitialContext(parms);

// Lookup through the naming service to retrieve a DataSource object
javax.sql.DataSource ds =
(javax.sql.DataSource)ctx.lookup("java:comp/env/PlateauPool");

// Obtain a Connection from the DataSource
conn = ds.getConnection();

ps = conn.createStatement();
rs = ps.executeQuery(sql);
while (rs.next()) {
String domainID = rs.getString("domainID");

}
} catch (NamingException e) {
System.out.println("Naming Exception:" + e);
} finally {
try {
if (rs != null) rs.close();
if (ps != null) ps.close();
if (conn != null) conn.close();
} catch (Exception ee) {}
}
}


Norman McCoy

unread,
Jul 25, 2001, 11:20:52 AM7/25/01
to
Whenever I get an error with a SecureClassLoader of some description mentioned
with jdk1.3 and I know I have the code on the classpath. I look at using the
Xbootclasspath.

Good luck

Norman Maccoy

Chi-Ming Yang

unread,
Jul 25, 2001, 11:20:30 AM7/25/01
to
Norman,
Thanks for your quick reply. Can you explain more? I am not familar
with the Xbootclasspath.

Thank you
>-------------------------------------------------------------->
"Norman McCoy" <n...@prismtechnologies.com> wrote in message
news:3B5EE3D4...@prismtechnologies.com...

Jim

unread,
Jul 25, 2001, 9:19:51 PM7/25/01
to
OK!
Looks like I have to find the answer myself again.
Here is the answer.
IBM has it's own JVM. I was using jBuilder which uses regular JVM from SUN.
I got it to work by change the JVM to the one comes with Websphere 4.0.
It works really fine once you got the right JVM.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

"Chi-Ming Yang" <cy...@writeme.com> wrote in message
news:9jmnkr$1au2$1...@news.boulder.ibm.com...

Norman McCoy

unread,
Jul 26, 2001, 5:10:53 AM7/26/01
to
Yes you can use the IBM JDK and this is the easiest solution. However it should
be possible to use the Sun JDK. I haven't done this at WebSphere 4.0 but have at
3.5. When you use a JDK it picks up jars in the jdk/jre/lib/ext folder. If you
use a different JDK a number of these jars must be placed on the classpath, in
the case of the IBM JDK the ibmorb.jar contains the your missing class.

Norman

0 new messages