#254 NoClassDefFound Error

open
nobody
Parsing (77)
5
2006-03-10
2006-03-10
No

I opened a DOS box under Win XP and started beanshell
2.0b4. now I created a connection object con. the
object lp is from class com.geenic.db.LanPort.

everythink ok so far. now I pupulated data for the
LanPort object and wanted to insert it into the
database.

now the problem is, that I wrote lp.insert
(con.getPreparedStatement(lanPort.INSERT_SQL));

lanPort should be LanPort. it is a static variable in
the class.

and the real problem is, that beanshell left its
environment and kicked me back to the DOS prompt.

uwe geercken

below please find an excerpt from the code.

<<snip>>
bsh % lp.insert(con.getPreparedStatement
(lanPort.INSERT_SQL));
Exception in thread "main"
java.lang.NoClassDefFoundError: com/geenic/db/lanPort
(wrong name: com/geenic/db/LanPort)
at java.lang.ClassLoader.defineClass1(Native
Method)
at java.lang.ClassLoader.defineClass(Unknown
Source)
at java.security.SecureClassLoader.defineClass
(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown
Source)
at java.net.URLClassLoader.access$100(Unknown
Source)
at java.net.URLClassLoader$1.run(Unknown
Source)
at java.security.AccessController.doPrivileged
(Native Method)
at java.net.URLClassLoader.findClass(Unknown
Source)
at java.lang.ClassLoader.loadClass(Unknown
Source)
at sun.misc.Launcher$AppClassLoader.loadClass
(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown
Source)
at java.lang.ClassLoader.loadClassInternal
(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at bsh.classpath.ClassManagerImpl.classForName
(Unknown Source)
at bsh.NameSpace.classForName(Unknown Source)
at bsh.NameSpace.getImportedClassImpl(Unknown
Source)
at bsh.NameSpace.getClassImpl(Unknown Source)
at bsh.NameSpace.getClass(Unknown Source)
at bsh.Name.consumeNextObjectField(Unknown
Source)
at bsh.Name.toObject(Unknown Source)
at bsh.BSHAmbiguousName.toObject(Unknown
Source)
at bsh.BSHAmbiguousName.toObject(Unknown
Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.BSHArguments.getArguments(Unknown
Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.BSHArguments.getArguments(Unknown
Source)
at bsh.BSHMethodInvocation.eval(Unknown Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.BSHPrimaryExpression.eval(Unknown
Source)
at bsh.Interpreter.run(Unknown Source)
at bsh.Interpreter.main(Unknown Source)

C:\tools\beanshell>
<<snap>>

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks