jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Boston <...@tfd.co.uk>
Subject Re: Exception in thread "main" java.lang.NoClassDefFoundError: javax/jcr/Repository
Date Wed, 22 Jul 2009 07:35:20 GMT
Shouting will not help, it tends to distort your voice and no one can  
hear what you are saying :). fortunately I turned the volume down  
before opening your email (just this once).

The you are having is a classpath problem.

IIRC
"java -cp ."

will remove $CLASSPATH from the classpath

try adding . to the start of the CLASSPATH.

If that fails read [1] or [2]

[1] http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html
[2] http://java.sun.com/docs/books/tutorial/essential/environment/cmdLineArgs.html


On 22 Jul 2009, at 08:24, simer anand wrote:

> IS THERE NO ONE WHO CAN HELP ME IN THIS CASE
>
>
> On 7/22/09, simer anand <simer.anand88@gmail.com> wrote:
>>
>> 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
View raw message