Hi There,
We are evaluating J2EE 5 for the company and now we are hitting by remote
EJB access. We have followedd exact steps at the URL:
https://glassfish.dev.java.net/java5ee/ejb/EJB_FAQ.html#StandaloneRemoteEJB
However, at the line
InitialContext ic = new InitialContext();
We are getting error message like below:
Exception in thread "main" java.lang.NoClassDefFoundError:
javax/security/jacc/PolicyContextException
at com.sun.enterprise.security.SSLUtils.<clinit>(SSLUtils.java:89)
at
com.sun.enterprise.iiop.IIOPSSLSocketFactory.<init>(IIOPSSLSocketFactory.jav
a:169)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAcces
sorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstruc
torAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at
com.sun.corba.ee.impl.orb.ParserTable$5.operate(ParserTable.java:663)
at
com.sun.corba.ee.impl.orb.NormalParserAction.apply(NormalParserAction.java:2
2)
at
com.sun.corba.ee.spi.orb.PropertyParser.parse(PropertyParser.java:52)
at
com.sun.corba.ee.spi.orb.ParserImplBase.init(ParserImplBase.java:55)
at
com.sun.corba.ee.impl.orb.ORBDataParserImpl.<init>(ORBDataParserImpl.java:43
3)
at com.sun.corba.ee.impl.orb.ORBImpl.postInit(ORBImpl.java:543)
at
com.sun.corba.ee.impl.orb.ORBImpl.set_parameters(ORBImpl.java:650)
at org.omg.CORBA.ORB.init(ORB.java:337)
at com.sun.enterprise.util.ORBManager.initORB(ORBManager.java:506)
at com.sun.enterprise.util.ORBManager.getORB(ORBManager.java:264)
at
com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(SerialI
nitContextFactory.java:141)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:175)
at dorpclient.Main.main(Main.java:28)
Java Result: 1
Anything we have to change here? or in J2EE Server? or in jndi.properties in
appserv-rt.jar.
We are completely lost here; if this cannot work out, we cannot recommend
anything to the company as using java.
Of the same importance, we are trying to access EJB through a web module.
Here is the jdni mapping tags in
<ejb-ref>
<ejb-ref-name>dorp.Content</ejb-ref-name>
<jndi-name>dorp.Content</jndi-name>
</ejb-ref>
This works perfect, when we have both EJB and Web component running in the
same physical server in the same domain.
However, when we try to deploy the Web component onto another server, so we
try:
<ejb-ref>
<ejb-ref-name>dorp.Content</ejb-ref-name>
<jndi-name>corbaname:iiop:localhost:3700#dorp.Content</jndi-name>
</ejb-ref>
Then nothing works, we get following error message in the log file:
Java Result: 1
Timestamp: Jun 13, 2006 09:53:53.387
Log Level: SEVERE
Logger: javax.enterprise.system.container.web
Name-Value Pairs:
_ThreadID=17;_ThreadName=httpWorkerThread-8080-1;_RequestID=a3d8d0ea-db1d-48
67-9497-b8a2c9b445d5;
Record Number: 85
Message ID: WebModule[/DORP-war]StandardWrapper.Throwable
java.lang.RuntimeException
Complete Message
WEB5002: Exception in handleBeforeEvent. at
com.sun.web.server.J2EEInstanceListener.handleBeforeEvent(J2EEInstanceListen
er.java:260) at
com.sun.web.server.J2EEInstanceListener.instanceEvent(J2EEInstanceListener.j
ava:97) at
org.apache.catalina.util.InstanceSupport.fireInstanceEvent(InstanceSupport.j
ava:318) at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
18) at
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:787)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:183) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566
) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContext
Valve.java:240) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:179) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566
) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182
) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566
) at
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.ja
va:120) at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:137) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566
) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939) at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:231) at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(Process
orTask.java:667) at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(Pro
cessorTask.java:574) at
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask
.java:844) at
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadT
ask.java:287) at
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:
75)Caused by: com.sun.enterprise.InjectionException: Exception attempting to
inject Unresolved Ejb-Ref dorp.Content_at_jndi:
corbaname:iiop:localhost:3700#dorp.Content_at_null@dorp.Content_at_Session@nullint
o class dorpa.ServletContent at
com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.ja
va:356) at
com.sun.enterprise.util.InjectionManagerImpl.inject(InjectionManagerImpl.jav
a:193) at
com.sun.enterprise.util.InjectionManagerImpl.injectInstance(InjectionManager
Impl.java:104) at
com.sun.web.server.J2EEInstanceListener.handleBeforeEvent(J2EEInstanceListen
er.java:255) ... 27 moreCaused by: javax.naming.NameNotFoundException: No
object bound for java:comp/env/dorp.Content [Root exception is
org.omg.CORBA.BAD_PARAM: vmcid: OMG minor code: 9 completed: No] at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:196
) at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:307)
at javax.naming.InitialContext.lookup(InitialContext.java:351) at
com.sun.enterprise.util.InjectionManagerImpl._inject(InjectionManagerImpl.ja
va:274) ... 30 moreCaused by: org.omg.CORBA.BAD_PARAM: vmcid: OMG minor
code: 9 completed: No at
com.sun.corba.ee.impl.logging.OMGSystemException.soBadSchemaSpecific(OMGSyst
emException.java:1081) at
com.sun.corba.ee.impl.logging.OMGSystemException.soBadSchemaSpecific(OMGSyst
emException.java:1099) at
com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOp
erationImpl.java:188) at
com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveINSURL(INSURLOpera
tionImpl.java:127) at
com.sun.corba.ee.impl.resolver.INSURLOperationImpl.operate(INSURLOperationIm
pl.java:117) at
com.sun.corba.ee.impl.orb.ORBImpl.string_to_object(ORBImpl.java:929) at
com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:83
1) at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:156
) ... 33 moreCaused by: org.omg.CosNaming.NamingContextPackage.NotFound:
IDL:omg.org/CosNaming/NamingContext/NotFound:1.0 at
org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.ja
va:72) at
org.omg.CosNaming._NamingContextExtStub.resolve_str(_NamingContextExtStub.ja
va:165) at
com.sun.corba.ee.impl.resolver.INSURLOperationImpl.resolveCorbaname(INSURLOp
erationImpl.java:184) ... 38 more
We are kind of at the end of why. We really need you help.
Thanks,
Ning Zhu
VP Technology
Alexander Street Press, LLC
3212 Duke Street,
Alexandria, VA 22314