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
Date Wed, 22 Jul 2009 04:46:48 GMT
sir

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

<b>
[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.
</b>

and then when i execute with this command

<b>
[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.
</b>

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/<b>jcr-1.0.jar</b>:/
home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-api-1.5.0.jar</b>:/home/
sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-core-1.5.6.jar</b>:/home/sda_
tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-jcr-commons-1.5.5.jar</b>:/home/s
da_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-spi-1.5.0.jar</b>:/home/sda_tr
1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-spi-commons-1.5.5.jar</b>:/home/sda
_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>jackrabbit-text-extractors-1.5.0.jar</b>:/h
ome/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>slf4j-api-1.5.3.jar</b>:/home/sda_tr
1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>slf4j-simple-1.3.0.jar</b>:/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/<b>commo
ns-collections-3.1.jar</b>:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>lucene-
core-2.3.2.jar</b>:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>derby-10.2.1.6.
jar</b>:/home/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>concurrent-1.3.4.jar</b>:/home
/sda_tr1/Desktop/simer/apache-tomcat-6.0.20/webapps/jackrabbit-webapp-1.5.6/WEB-INF/lib/<b>log4j-1.2.14.jar</b>

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