Hello,
i'm accessing and EJB 3.0 deployed in a EAR from an application client deployed in another one.
Here's what i get after "appclient -client hello-remote-ear.ear"
May 31, 2010 7:45:38 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>
WARNING: ACC003: Application threw an exception.
java.lang.RuntimeException: org.omg.CORBA.DATA_CONVERSION: vmcid: SUN minor code: 214 completed: No
at com.sun.enterprise.util.ORBManager.initORB(ORBManager.java:560)
at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:278)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialInitContextFactory.java:178)
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)
at com.sun.enterprise.appclient.AppContainer.initializeNaming(AppContainer.java:190)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:364)
at com.sun.enterprise.appclient.MainWithModuleSupport.<init>(MainWithModuleSupport.java:259)
at com.sun.enterprise.appclient.Main.main(Main.java:200)
Caused by: org.omg.CORBA.DATA_CONVERSION: vmcid: SUN minor code: 214 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.badCustomSocketFactory(ORBUtilSystemException.java:4054)
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.badCustomSocketFactory(ORBUtilSystemException.java:4073)
at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:704)
at com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:58)
at com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:81)
at com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:81)
at com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:481)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:587)
at com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:701)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.sun.enterprise.util.ORBManager.initORB(ORBManager.java:546)
... 10 more
Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: IOP5079: Alias name s1as does not identify a key entry.
at com.sun.enterprise.iiop.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.java:195)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.corba.ee.impl.orb.ParserTable$4.operate(ParserTable.java:696)
... 18 more
The certificate "s1as" is all right in the keystore.jks. I can see that if i do "keytool -list -v -alias ${cert.alias} -keystore ${keystore.file}
-storepass ${keystore.pass}", like the GF Administration guide indicates at page 109.
Also I added this to appclient.bat:
set VMARGS = -Djavax.net.ssl.keyStore=%AS_DEF_DOMAINS_PATH%\domain1\config\keystore.jks -Djavax.net.ssl.trustStore=%AS_DEF_DOMAINS_PATH%\domain1\config\cacerts.jks -Djavax.net.ssl.keyStorePassword=changeit -Djavax.net.ssl.trustStorePassword=changeit
as suggested in Developper's guide page 223.
I also added this to /domain1/config/sun-acc.xml :
<security>
<ssl cert-nickname="s1as" tls-enabled="true" />
</security>
This was my guess reading the Deployment Guide page 158. But it is not mentioned in any doc to add this. This was a step forward, as before i had "Cannot use any of the target's supported mechanisms" in the client window and "org.omg.CORBA.INTERNAL: vmcid: SUN minor code: 311 completed: No" in the server window.
Any ideas why thid does not work.
Here's some more info:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "
http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>Second</ejb-name>
<ior-security-config>
<transport-config>
<integrity>required</integrity>
<confidentiality>required</confidentiality>
<establish-trust-in-target>supported</establish-trust-in-target>
<establish-trust-in-client>required</establish-trust-in-client>
</transport-config>
<as-context>
<auth-method>username_password</auth-method>
<realm>file</realm>
<required>none</required>
</as-context>
<sas-context>
<caller-propagation>none</caller-propagation>
</sas-context>
</ior-security-config>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
-->
<!--
Please remember to customize this file for your environment. The defaults for
following fields may not be appropriate.
- target-server name, address and port
- Property security.config in message-security-config
--><!DOCTYPE client-container PUBLIC "-//Sun Microsystems Inc.//DTD Application Server 8.0 Application Client Container//EN" "
http://www.sun.com/software/appserver/dtds/sun-application-client-container_1_2.dtd">
<client-container send-password="true">
<target-server address="vlad" name="vlad" port="3700">
</target-server>
<log-service file="d:/x.log" level="WARNING"/>
<message-security-config auth-layer="SOAP">
<!-- turned off by default -->
<provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="XWS_ClientProvider" provider-type="client">
<request-policy auth-source="content"/>
<response-policy auth-source="content"/>
<property name="encryption.key.alias" value="s1as"/>
<property name="signature.key.alias" value="s1as"/>
<property name="dynamic.username.password" value="false"/>
<property name="debug" value="false"/>
</provider-config>
<provider-config class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule" provider-id="ClientProvider" provider-type="client">
<request-policy auth-source="content"/>
<response-policy auth-source="content"/>
<property name="encryption.key.alias" value="s1as"/>
<property name="signature.key.alias" value="s1as"/>
<property name="dynamic.username.password" value="false"/>
<property name="debug" value="false"/>
<property name="security.config" value="C:/Sun/AppServer/lib/appclient/wss-client-config-1.0.xml"/>
</provider-config>
<provider-config class-name="com.sun.identity.agents.jsr196.as9soap.AMClientAuthModule" provider-id="AMClientProvider" provider-type="client">
<request-policy auth-source="content"/>
<response-policy auth-source="content"/>
<property name="providername" value="wsc"/>
</provider-config>
</message-security-config>
</client-container>
[Message sent by forum member 'vladbalan']
http://forums.java.net/jive/thread.jspa?messageID=472147