[jboss-user] [JBoss Remoting] - Re: JBOSS 5.1.0GA + EJB/JNDI over HTTPS

Primitivo Dimahugot do-not-reply at jboss.com
Fri Feb 4 23:29:47 EST 2011


Primitivo Dimahugot [http://community.jboss.org/people/buttmanizer] created the discussion

"Re: JBOSS 5.1.0GA + EJB/JNDI over HTTPS"

To view the discussion, visit: http://community.jboss.org/message/585660#585660

--------------------------------------------------------------
After following this tutorial, I'm getting this error:

javax.naming.NamingException: Failed to retrieve Naming interface for provider  https://192.168.0.121:8443/invoker/JNDIFactory https://192.168.0.121:8443/invoker/JNDIFactory [Root exception is javax.net.ssl.SSLException: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty]
can't connect...
        at org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
        at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
        at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
        at javax.naming.InitialContext.init(InitialContext.java:223)
        at javax.naming.InitialContext.<init>(InitialContext.java:197)


Here're the properties when I'm running the java client program:

-Djavax.net.ssl.trustStore=alias.truststore
-Djavax.net.ssl.trustStorePassword=password
-Djava.protocol.handler.pkgs=javax.net.ssl

I used this in my jboss.xml:
...
<session>
    <ejb-name>LoginRDAOAction</ejb-name>
    <remote-binding>
        <jndi-name>LoginRDAOAction/https</jndi-name>
        <client-bind-url>sslservlet://${jboss.bind.address}:8443/servlet-invoker/SSLServerInvokerServlet</client-bind-url>
    </remote-binding>
</session>
...

Here is my java client code snippet:

...
String name = "LoginRDAOAction/https";
Properties props = new Properties();

props.put("java.naming.factory.initial", "org.jboss.naming.HttpNamingContextFactory");
props.put("java.naming.provider.url", " https://192.168.0.121:8443/invoker/JNDIFactory https://192.168.0.121:8443/invoker/JNDIFactory");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming");
initialContext = new InitialContext(props);
...


When i use -Djavax.net.debug=all, i see these:
...
keyStore is : 
keyStore type is : jks
keyStore provider is : 
init keystore
init keymanager of type SunX509
trustStore is: No File Available, using empty keystore.
trustStore type is : jks
trustStore provider is : 
init truststore
trigger seeding of SecureRandom
done seeding SecureRandom
...
main, handling exception: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty
main, SEND TLSv1 ALERT:  fatal, description = internal_error
main, WRITE: TLSv1 Alert, length = 2
[Raw write]: length = 7
0000: 15 03 01 00 02 02 50                               ......P
main, called closeSocket()
...


I'm stacked at this error. It would be a great help if anyone can show me the solution. Im porting from JBoss 4.2.2.GA to 5.1.0.GA.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/585660#585660]

Start a new discussion in JBoss Remoting at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2050]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110204/a53363b5/attachment-0001.html 


More information about the jboss-user mailing list