File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes JBoss and certificates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "JBoss and certificates" Watch "JBoss and certificates" New topic
Author

JBoss and certificates

glenn spjuver
Greenhorn

Joined: Jun 29, 2004
Posts: 11
Hi, I'm having a problem connecting to another server from my JBoss (3.2.3) server. It works fine when I connect from a standalone class, but when I try to do it from JBoss it seems like the certificate can't be found. It's not really the connection that doesn't work, but that the certificate is not used when connecting from within JBoss. I get no error messages from JBoss regarding the certificate, even if I set the logging level to trace. The errormessage I get is from the remote web-service I'm using, and it says that I need a valid certificate...

This is the java code I use to set up the connection in JBoss, it's the same code I successfully run as a standalone client.

System.setProperty("sun.rmi.transport.connectionTimeout", "20000");
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.ssl.keyStore", "C:/jboss-3.2.3/server/default/conf/myKeystore.pfx");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStorePassword", "myPassword");

Why can't I get it to work, do I need to config some jboss xml-files or something?
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: JBoss and certificates