db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Fischer <fisc...@seitenbau.net>
Subject Re: Torque Runtime errors:-NoClassDefFoundError Exception
Date Mon, 17 Dec 2007 08:31:04 GMT
As far as I know, jars must appear explicitly in the classpath, it does not
suffice to add the directory of the jars.

>From http://db.apache.org/torque/releases/torque-3.3/tutorial/step6.html,
the following should work:

java -cp
classes:lib/avalon-framework-4.1.4.jar:lib/commons-beanutils-core-1.7.0.jar:lib/commons-collections-3.1.jar:lib/commons-configuration-1.2.jar:lib/commons-dbcp-1.2.1.jar:lib/commons-lang-2.1.jar:lib/commons-logging-1.0.4.jar:lib/commons-pool-1.2.jar:lib/jcs-20030822.182132.jar:lib/mysql-connector-java-5.0.4.jar:lib/torque-3.3-RC2.jar:lib/village-2.0.jar
 com.kazmier.Bookstore

   Thomas

pyaar <umadas2005@rediffmail.com> schrieb am 17.12.2007 06:44:47:

>
> HI all,
> i am using mssql server 2000,torque 3.2 to execute the sample bookstore
> application given in
> http://db.apache.org/torque/releases/torque-3.1/tutorial/step4.html
>
> i have set the classpath property in the environment variable as
> CLASSPATH:-C:\Torque\torque-gen-3.2\bookstore\lib;C:\Torque\torque-gen-3.
> 2\bookstore\bin\classes;
>
> where bookstore is the application
> is there anything more to add?
>
> LIB directory contains all the jars including the runtime
> jar(torque-3.2.jar) and the dependent jars like
> commons-lang,commons-collections etc
>
> compilation is working fine for me with build successful message through
the
> command ant -f build-torque.xml compile
>
> but when i run the command java com.kazmier.Bookstore then the following
> error comes
>
> C:\Torque\torque-gen-3.2\bookstore>java com.kazmier.Bookstore
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/torque/om/
> Persistent
>         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)
>
>
> as far as i know the torque runtime jar contains the class "
> org.apache.torque.om.Persistent" ,then why is this error.please somebody
> help
> --
> View this message in context:
http://www.nabble.com/Torque-Runtime-errors%3A-
> NoClassDefFoundError-Exception-tp14315608p14370087.html
> Sent from the Apache DB - Torque Users mailing list archive at
Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message