[
https://issues.apache.org/jira/browse/WICKET-2416?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12741932#action_12741932
]
Igor Vaynberg commented on WICKET-2416:
---------------------------------------
ejb3 and jsf are the same kind of standard. ejb3 is for the middle tier and jsf
is for the ui tier.
there are plenty of alternatives to ejb3, eg spring and guice.
anyways, this is really getting off the subject.
read this page to understand how @EJB works.
http://cwiki.apache.org/WICKET/spring.html
we do not serialize the underlying implementation, we create a proxy that can
serialize itself without serializing the resource, and then deserialize itself
and lookup the resource.
it is the deserialization of this proxy that goes bad. when the proxy is
serialized it looks like this
[name_of_class_being_proxied locator_that_can_lookup_the_class]
when the proxy deserializes it looks up the object using the locator, and
creates a proxy for the named class.
in your case the serialized proxy looks like this
["test.session.TestSessionLocal" [jndi_locator "jndi_name_of_test_bea"]]
so the first part goes ok, the jndi_locator looks up an instance of
TestSessionLocal from jndi.
the second part, where we create the proxy for the session bean goes wrong:
the first thing we need to do is look up the actual Class object from its name
so that we can create the proxy, unfrotunately
Class.forName("test.session.TestSessionLocal") returns null.
this means that the classloader used to load wicket classes cannot see your
TestSessionLocal class.
i am not familiar with the ejb3 spec to a low-enough level to be able to tell
if this is a "bug" or a "feature". i do know that people have been using this
functionality without problems in other containers.
you might have to do some legwork to help us figure this out, eg asking on the
glassfish mailing list about this.
> Exception with EJB Session Bean
> -------------------------------
>
> Key: WICKET-2416
> URL: https://issues.apache.org/jira/browse/WICKET-2416
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4.0
> Environment: Java 1.6.
> Wicket Java EE 1.1
> Reporter: bernard
> Priority: Minor
> Attachments: testcase.zip
>
>
> The attached testcase gets an exception
> java.io.InvalidClassException: test.session.TestSessionLocal; could not
> resolve class [test.session.TestSessionLocal] when deserializing proxy
> at
> org.apache.wicket.proxy.LazyInitProxyFactory$ProxyReplacement.readResolve(LazyInitProxyFactory.java:236)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> when the user clicks through it, starting from index.html.
> I can't really make any progress without a fix, or without knowing what I am
> doing wrong to get this.
> The testcase will work out of the box with NetBeans 6.7.1 and Server:
> GlassFish V2 which is bundled with it.
> I don't know what really causes this. It is interesting that the tescase runs
> ok when
> two lines are removed from Page2.java.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.