|
From: Markus K. <ma...@pr...> - 2013-07-08 07:18:09
|
Hi Jesús, It is better to use the jar /home/jboss/signserver-trunk/signserver/lib/SignServer-Client-SigningAndValidationAPI.jar as it includes a reference to all the JARs it depends on in its META-INF/manifest.mf file. That being said, I am not myself using Eclipse so I am not sure if just including that JAR instead will solved the problem. If not, you will have to also add all the jars listed in the manifest file. Best regards, Markus PrimeKey Solutions offers a commercial EJBCA & SignServer support subscription and training. Please see www.primekey.se or contact in...@pr... for more information. http://www.primekey.se/Services/Support/ http://www.primekey.se/Services/Training/ On 2013-07-07 01:47, Jesús Arnáiz wrote: > Hi. > > I'm trying to use the SigningAndValidation API. I create a Java Project > on eclipse and then in the "Libraries" tab of "Java Build Path" (Project > Properties) I add with "Add External JARs": > > /home/jboss/signserver-trunk/signserver/modules/SignServer-Client-SigningAndValidationAPI/dist/SignServer-Client-SigningAndValidationAPI.jar > > I try to create a simple program, but when I create a new object I get > and exception. Here is my code: > > --- > import org.signserver.client.api.ISigningAndValidation; > import org.signserver.client.api.SigningAndValidationWS; > > public class test { > > public static void main(String[] args) { > // TODO Auto-generated method stub > try { > ISigningAndValidation signserver = new > SigningAndValidationWS("localhost", 8442, true); > > > } catch (Exception ex) { > ex.printStackTrace(); > } > } > > } > ----- > > And the exception I get: > --------- > Caused by: java.lang.ClassNotFoundException: > org.signserver.common.ProcessRequest > at java.net.URLClassLoader$1.run(Unknown Source) > at java.net.URLClassLoader$1.run(Unknown Source) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) > at java.lang.ClassLoader.loadClass(Unknown Source) > ... 1 more > ---------- > > I try different methods to add the JAR but I get the same, any help? > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Windows: > > Build for Windows Store. > > http://p.sf.net/sfu/windows-dev2dev > _______________________________________________ > SignServer-develop mailing list > Sig...@li... > https://lists.sourceforge.net/lists/listinfo/signserver-develop > -- Kind regards, Markus Kilås PKI Specialist PrimeKey Solutions AB Anderstorpsv. 16 171 54 Solna Sweden Phone: +46 70 424 94 85 Skype: markusatskype Email: mar...@pr... www.primekey.se |