directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keheliya Gallaba <keheliya.gall...@gmail.com>
Subject Re: Failed to load Main-Class manifest attribute from ldap-proxy-0.2-SNAPSHOT.jar
Date Wed, 03 Mar 2010 05:04:03 GMT
Dear All,

I'm so happy I got the proxy GUI working. I would like to share how I
made it to work for the benefit of all who will face the same problem.

As you said problem was with, badly referencing to the dependency jars
when main method is called since they were in the maven repository. So
with the help of maven-dependency-plugin I copied all the dependencies
to the target folder and set it as the class path. Then the command
was " java -jar -cp . ldap-proxy-0.2-SNAPSHOT.jar " for executing the
jar.

Thanks  Jörg, Emmanuel and all who helped and was patient. Now back to
Apache Directory development. Good Luck for everybody including me.
;-)

- Keheliya




On 2 March 2010 17:02, Jörg Schaible <joerg.schaible@gmx.de> wrote:
> Keheliya Gallaba wrote at Dienstag, 2. März 2010 08:59:
>
>> Sorry for troubling you again. But I found I have mistaken when
>> entering the command for running the jar. I later entered the command
>> " java ldap-proxy-0.2-SNAPSHOT1.org.apache.ldap.proxy.gui.MainFrame "
>>
>> and got the result
>>
>> Exception in thread "main" java.lang.NoClassDefFoundError:
>> ldap-proxy-0.2-SNAPSHOT1.org.apache.ldap.proxy.gui.MainFrame
>>    at gnu.java.lang.MainThread.run(libgcj.so.90)
>> Caused by: java.lang.ClassNotFoundException:
>> ldap-proxy-0.2-SNAPSHOT1.org.apache.ldap.proxy.gui.MainFrame not found
>> in gnu.gcj.runtime.SystemClassLoader{urls=[file:./],
>> parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
>>    at java.net.URLClassLoader.findClass(libgcj.so.90)
>>    at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.90)
>>    at java.lang.ClassLoader.loadClass(libgcj.so.90)
>>    at java.lang.ClassLoader.loadClass(libgcj.so.90)
>>    at gnu.java.lang.MainThread.run(libgcj.so.90)
>>
>> Please clarify me on the correct path I should have taken
>
> Please have a look at the documentation for the command line options. You
> either provide the jar and let java find itself the Main class from the
> manifest or you provide the Main class yourself (like you did here) and java
> must find the class in the provided classpath.
>
> None of this have to do with Apache Directory though.
>
> - Jörg
>
>



-- 
Keheliya Gallaba
http://galpotha.wordpress.com
http://twitter.com/keheliya

Mime
View raw message