DEBUG: No SecurityManager installed. Installing default.
WARN : No ApplicationServer was specified! The container system will only be accessible by same-vm clien
ts via the IntraVm Server.
WARN : Deprecated: The propery name "org/openejb/assembler_class" is deprecated and will be removed in a
future version of OpenEJB, please use the property name "openejb.assembler" instead.
DEBUG: Instantiating assembler class org.openejb.alt.assembler.classic.Assembler
FATAL: OpenEJB has encountered a fatal error and cannot be started: The Assembler encountered an unexpect
ed error while attempting to initialize.
java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1664)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:953)
Alan Cabrera wrote:
Rick,
I'm one step behind you. I also had to copy the ejb and hello jar files to
my WEB-INF/lib directory to get the JSP to compile. Did you do anything
else?
Now, here's the output that I get:
got ctx...did lookup...found: '$Proxy3' Ouch! java.lang.ClassCastException:
$Proxy3
nah
for this code:
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="java.util.Properties" %>
<%@ page import="javax.naming.Context" %>
<%@ page import="javax.rmi.PortableRemoteObject" %>
<%@ page import="org.acme.*" %>
<%
String message = "nah";
try{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.openejb.client.LocalInitialContextFactory" );
InitialContext ctx = new InitialContext( p );
out.print( "<P>got ctx..." );
Object obj = ctx.lookup( "/Hello" );
out.print("did lookup...");
out.println("found: '"+obj.getClass().getName()+"'");
HelloHome ejbHome = (HelloHome)obj;
out.print("have home");
HelloObject ejbObject = ejbHome.create();
//The part we've all been wainting for...
message = ejbObject.sayHello();
} catch (Exception e){
out.print( "Ouch! "+e.toString() );
e.printStackTrace();
}
%>
<P><%= message %>
Regards,
Alan
-----Original Message-----
From: Rick Mangi [mailto:rick.mangi@;zcmgroup.com]
Sent: Thursday, October 10, 2002 4:02 PM
To: David Blevins
Cc: openejb-user
Subject: [OpenEJB-user] Re: OpenEJB W/ Tomcat
<moving a private discussion to the list for the benefit of all>
David,
Here's my JSP and relevant code.
It makes sense to me that the ejb jar has to be in the common/lib directory for JSPs since the jsp compiler is going to need that stuff to compile the servlet, but that doesn't seem to have much to do with the exception I'm getting.
Here's my JSP code: I put the HelloWorld stuff in com.zcm.intranet.ejb.test. Those classes are exactly as per the examples on the website, and they DeploymentID is /ZCMHello. I've been using this JSP for testing in and out of process, hence the extra imports.
Thanks.
Rick
<%@ page import="javax.naming.InitialContext" %>
<%@ page import="com.zcm.intranet.ejb.test.*" %>
<%@ page import="java.util.Properties" %>
<%@ page import="javax.naming.Context" %>
<%@ page import="javax.rmi.PortableRemoteObject" %>
<%
String message = "nah";
try{
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY, "org.openejb.client.LocalInitialContextFactory");
InitialContext ctx = new InitialContext(p);
out.print("<P>got ctx...");
Object obj = ctx.lookup("/ZCMHello");
out.print("did lookup...");
HelloHome ejbHome = (HelloHome)obj;
out.print("have home");
HelloObject ejbObject = ejbHome.create();
//The part we've all been wainting for...
message = ejbObject.sayHello();
} catch (Exception e){
e.printStackTrace();
}
%>
<P><%= message %>
David Blevins wrote:
Hi Rick,the project
Thanks for the positive feedback, I'm pretty excited about
too.of us is for
I didn't test any JSPs, so I think the best thing for both
you send me a simplified version of your code that I can use to trackworking and
down the problem and test future releases with. I'll get it
send any instructions or patches to the list.thinking the
I do prefer the list, as there are usually several people
same thing, but too afraid to ask. Thank you for asking -- it's thegetting this
first time in three years anyone has.
-David
-----Original Message-----
From: Rick Mangi [mailto:rick.mangi@;zcmgroup.com] Sent: Thursday, October 10, 2002 2:36 PM
To: David Blevins
Subject: Re: OpenEJB W/ Tomcat
David,
I had to put the ejb jars in there as well to get it to compile my JSP (throwing another piece into the puzzle...JSP!). Now I'm
.java:243)error (btw: this is on Redhat Linux 7.4, tomcat latest version, installed today):
Servlet Controller: Start processing request with url /test Servlet Controller: target screen is: TEST
OpenEJB 0.8.3 build: 20021001-1721
http://openejb.sf.net
javax.naming.NamingException: Cannot instantiate an IntraVM InitialContext. Exception: org.openejb.core.ivm.naming.NamingException OpenEJB has encountered a fatal error and cannot be started: The Assembler encountered an unexpected error while attempting to initialize.: Cannot inherit from final class
at org.openejb.client.LocalInitialContextFactory.getIntraVmContex
t(LocalInitialContextFactory.java:116)
at org.openejb.client.LocalInitialContextFactory.getInitialContex
t(LocalInitialContextFactory.java:67)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager
.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext
javax.naming.InitialContext.<init>(InitialContext.java:195)at javax.naming.InitialContext.init(InitialContext.java:219)
at
at org.apache.jsp.test_jsp._jspService(test_jsp.java:65)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
Thanks for your help. I'm really excited about this project. Would you prefer I emailed this to the list, or to you directly?
Rick
David Blevins wrote:
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
http://OpenEJB.sf.net
OpenEJB-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/openejb-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ http://OpenEJB.sf.net OpenEJB-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/openejb-user
