jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simer anand <simer.anan...@gmail.com>
Subject Re: Exception in thread "main" java.lang.NoClassDefFoundError: javax/jcr/Repository when executing hop program
Date Wed, 22 Jul 2009 05:08:43 GMT
sir

I'm working on linux(mandriva)
and following is the command


[sda_tr1@cad44 hop files]$ javac FirstHop.java

[sda_tr1@cad44 hop files]$ java FirstHop

Exception in thread "main" java.lang.NoClassDefFoundError: FirstHop
Caused by: java.lang.ClassNotFoundException: FirstHop
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: FirstHop.  Program will exit.


and then when i execute with this command


[sda_tr1@cad44 hop files]$ java -classpath . FirstHop

Exception in thread "main" java.lang.NoClassDefFoundError:javax/jcr/Repository
Caused by: java.lang.ClassNotFoundException: javax.jcr.Repository
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
Could not find the main class: FirstHop.  Program will exit.


and further my .cshrc file's classpath is :

setenv CLASSPATH
/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jcr-1.0.jar
:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-api-1.5.0.jar:/home/
sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-core-1.5.6.jar:/home/sda_
tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-jcr-commons-1.5.5.jar:/home/s
da_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-spi-1.5.0.jar:/home/sda_tr
1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-spi-commons-1.5.5.jar:/home/sda
_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
jackrabbit-text-extractors-1.5.0.jar:/h
ome/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
slf4j-api-1.5.3.jar:/home/sda_tr
1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
slf4j-simple-1.3.0.jar:/home/sda_tr1/Deskt
op/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/commo

ns-collections-3.1.jar
:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/lucene-

core-2.3.2.jar
:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/derby-10.2.1.6.

jar
:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
concurrent-1.3.4.jar:/home
/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/
log4j-1.2.14.jar

and what i have found is when i execute both the programs then bug is coming

from javax package
javax/jcr/repository  and javax/jcr/credential
and both class files are within javax package and that package is within
jcr-1.0.jar file

please please tell i'm waiting for your reply
and please tell me in detail


Thank you
simer

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message