On 21.5.2010 10:51, Manickam, Vasanth [Tech] wrote:
When I do not include the class path I get the exception
The derbyclient.jar file is available in the same directory as opengrok.jar

I think we hardcoded this into ./lib/
where ./ is where opengrok.jar is

I will push https://defect.opensolaris.org/bz/show_bug.cgi?id=15660 sooner or later so we get rid of the lib directory, BUT till then all the jars are supposed to be in lib and opengrok.jar out of lib ...

sorry for confusion
L

WARNING: Failed to initialize the history cache
org.opensolaris.opengrok.history.HistoryException: 
java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
         at 
org.opensolaris.opengrok.history.JDBCHistoryCache.initialize(JDBCHistoryCache.java:317)
         at 
org.opensolaris.opengrok.history.HistoryGuru.<init>(HistoryGuru.java:78)
         at 
org.opensolaris.opengrok.history.HistoryGuru.<clinit>(HistoryGuru.java:55)
         at 
org.opensolaris.opengrok.index.Indexer.prepareIndexer(Indexer.java:450)
         at org.opensolaris.opengrok.index.Indexer.main(Indexer.java:400)
Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.ClientDriver
         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)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:169)
         at 
org.opensolaris.opengrok.jdbc.ConnectionManager.<init>(ConnectionManager.java:53)
         at 
org.opensolaris.opengrok.history.JDBCHistoryCache.initialize(JDBCHistoryCache.java:295)
         ... 4 more
21-May-2010 09:49:36 org.opensolaris.opengrok.history.HistoryGuru 
addRepositories


-----Original Message-----
From: opengrok-discuss-boun...@opensolaris.org 
[mailto:opengrok-discuss-boun...@opensolaris.org] On Behalf Of Knut Anders 
Hatlen
Sent: Tuesday, May 18, 2010 11:55 AM
To: opengrok-discuss@opensolaris.org
Subject: Re: [opengrok] 0.9 with Java DB derby

On 05/18/10 11:48 AM, Manickam, Vasanth [Tech] wrote:
I'm using

java -Xmx2048m -Dorg.opensolaris.opengrok.history.cvs=/usr/bin/cvs 
-Dorg.opensolaris.opengrok.history.Subversion=/usr/bin/svn 
-Djava.util.logging.config.file=/path/logging.properties -jar 
/path/opengrok.jar -classpath /path/lib/derbyclient.jar -P -D -S -r on -v -c 
/path/bin/ctags -W /path/etc/configuration.xml -U localhost:2424 -s /path/src 
-d/path/data -H

Thanks, I think I see what the problem is now. Since the -classpath
argument comes after -jar, it is taken as an argument to the indexer and
not as an argument to the java command, and I think that's what causing
the error.

Try to remove "-classpath /path/lib/derbyclient.jar" from the command
line and see if it works then. You don't need it, since opengrok.jar's
manifest will automatically add lib/derbyclient.jar to the classpath.

Note also that combining -classpath and -jar won't do what you expect it
to do, even if -classpath comes first. Here's what java(1) says about
the -jar option:

         -jar
[...]
         When you use this option, the JAR file is the source of
         all user classes, and other user class path settings are
         ignored.

So the java command will ignore the -classpath argument if -jar is also
specified.

Hope this helps,


_______________________________________________
opengrok-discuss mailing list
opengrok-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opengrok-discuss

Reply via email to