Thanks Dain,
> I added the @Local annotation to the AnnotatedEJBLocal interface and
> added a @Remote AnnotatedEJBRemote interface to the example; both
> work fine for me.
>
> Can you try the servlet-examples war?
You don't have the remote interface in your examples, but adding one still
gives me
the following when getting the datasource:
java.io.NotSerializableException:
org.apache.openejb.resource.jdbc.BasicManagedDataSource
java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1081)
java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:302)
org.apache.openejb.core.ivm.BaseEjbProxyHandler.copyObj(BaseEjbProxyHandler.java:503)
org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:259)
org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
$Proxy42.getDs(Unknown
Source)
org.apache.openejb.examples.servlet.AnnotatedServlet.doGet(AnnotatedServlet.java:44)
> As for the test client jar, I rewrote the packing configuration for
> it the other day, and tested it on linux and windows. So, if it was
> broken before, I'm confident it is fixed now :)
It's fixed in your war file but still broken in the current snapshot.
I also noticed that I can't "undeploy" the beans by reloading the web
application
(or both the web app and openejb for that matter). Is it possible to avoid
restarting Tomcat every time one just wants to reload the web app?
This is what I get when I try to reload (from Tomcat manager):
javax.servlet.ServletException: Error instantiating servlet class
org.apache.openejb.examples.servlet.AnnotatedServlet
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:613)
root cause:
java.lang.IllegalArgumentException
sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
java.lang.reflect.Field.set(Field.java:656)
org.apache.catalina.util.DefaultAnnotationProcessor.lookupFieldResource(DefaultAnnotationProcessor.java:208)
org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:139)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
-Dario
> -dain
>
> On Sep 20, 2007, at 11:16 AM, Dario Laverde wrote:
>
>> Dain,
>>
>> Correct, I can't get remote interfaces working (you left out the
>> @Local annotation
>> in your example). I also noticed that the optional tests client jar
>> is packaged
>> incorrectly (had to unpack it to be able to find and run the Main
>> class).
>>
>> -Dario
>>
>>> Forgot to click the send button on this email yesterday :(
>>>
>>> On Sep 18, 2007, at 2:17 PM, Dario Laverde wrote:
>>>
>>>> Dain,
>>>>
>>>> Thanks for the work! I've updated the "New Instructions" adding the
>>>> manual steps for
>>>> Windows users, you can try including this in your installer.
>>>
>>> I updated the installer and tested it.
>>>
>>>> Just a minor comment, I
>>>> also copied the agent jar in addition to the loader jar into
>>>> Tomcat's lib folder
>>>> because hardcoding to webapps/openejb/lib may be a problem should
>>>> webapps be changed
>>>> or openejb be deployed w/o unpacking the war/zip.
>>>
>>> Interesting idea. I'll give that a try also.
>>>
>>>> Now for the example, I'm getting the following error:
>>>> javax.naming.NameNotFoundException: Name "org.acme.TestServlet/ejb"
>>>> not found.
>>>>
>>>> I tried out your example by adding it to the previous example Karan
>>>> posted but even
>>>> that one no longer works for me:
>>>> javax.naming.NameNotFoundException: Name
>>>> "GreetingBeanBusinessRemote" not found.
>>>>
>>>> Maybe I'm still missing something?
>>>
>>> Can you try my example directly? There may be something wrong with
>>> Karan's example or maybe remote business interfaces are broken.
>>>
>>> -dain
>>>
>>
>>
>
>