Here you go:
Kenneth Saks wrote:
>
> On Feb 18, 2009, at 5:14 PM, Michael Munn wrote:
>
>> Hi All,
>>
>> I have a customer who is trying to call an ejb on v2.1 from a
>> webapp on Sun webserver 7ur5.
>> I have tried this myself using rmi-simple.ear and following the
>> instructions at
>> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#nonJavaEEwebcontainerRemoteEJB
>>
>> and I cannot get it to work
>> Has anyone ever been able to get this to work? If so please advise.
>
> Hi Michael,
>
> Can you send me the error you're seeing along with the client lookup
> code?
>
> --ken
>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>
public void jspInit() {
try {
Properties props = new Properties();
props.setProperty("java.naming.factory.initial",
"com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs",
"com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state",
"com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
InitialContext ic = new InitialContext(props);
Object objRef = ic.lookup("rmiconverter");
ConverterHome home = (ConverterHome)PortableRemoteObject.narrow(objRef, ConverterHome.class);
converter = home.create();
} catch (RemoteException ex) {
System.out.println("Couldn't create converter bean."+ ex.getMessage());
} catch (CreateException ex) {
System.out.println("Couldn't create converter bean."+ ex.getMessage());
} catch (NamingException ex) {
System.out.println("Unable to lookup home: "+ "TheConverter "+ ex.getMessage());
}
}
[18/Feb/2009:15:48:00] failure (23381): for host 10.5.78.191 trying to GET /rmi-simple/index.jsp, service-j2ee reports: StandardWrapperValve[index]: PWC1406: Servlet.service() for servlet index threw exception
java.lang.ExceptionInInitializerError
at com.sun.enterprise.naming.SerialInitContextFactory.<clinit>(SerialInitContextFactory.java:65)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.<init>(InitialContext.java:197)
at org.apache.jsp.index_jsp.jspInit(Unknown Source)
at org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:61)
at org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:171)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:356)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:457)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:351)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
Caused by: java.lang.IllegalArgumentException: com.sun.webserver.logging.enterprise.system.util.LogStrings != com.sun.logging.enterprise.system.util.LogStrings
at java.util.logging.Logger.getLogger(Logger.java:308)
at com.sun.logging.LogDomains.getLogger(LogDomains.java:240)
at com.sun.enterprise.util.ORBManager.<clinit>(ORBManager.java:93)
... 25 more