[webbeans-issues] [JBoss JIRA] Created: (WBRI-140) Proxied beans cannot be deserialized
by David Allen (JIRA)
Proxied beans cannot be deserialized
------------------------------------
Key: WBRI-140
URL: https://jira.jboss.org/jira/browse/WBRI-140
Project: Web Beans RI
Issue Type: Bug
Affects Versions: 1.0.0.ALPHA2
Reporter: David Allen
The test ClientProxyTest.testSimpleWebBeanClientProxyIsSerializable fails when run in a container due to classloader issues. Javassist is trying to use its own classloader, which in JBoss AS is a server classloader, to load the class loaded by the WAR classloader. The correct classloaders need to be setup with Javassist in order for persistence to work.
Current error in the server is:
java.io.InvalidClassException: org.jboss.jsr299.tck.unit.lookup.clientProxy.TunedTuna
at javassist.util.proxy.SerializedProxy.readResolve(SerializedProxy.java:63)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1061)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1762)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at org.jboss.jsr299.tck.AbstractTest.deserialize(AbstractTest.java:268)
at org.jboss.jsr299.tck.unit.lookup.clientProxy.ClientProxyTest.testSimpleWebBeanClientProxyIsSerializable(ClientProxyTest.java:55)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months
[webbeans-issues] [JBoss JIRA] Created: (WBRI-253) provide informative exception when attempt is made to invoke EJB from test in standalone mode
by Dan Allen (JIRA)
provide informative exception when attempt is made to invoke EJB from test in standalone mode
---------------------------------------------------------------------------------------------
Key: WBRI-253
URL: https://jira.jboss.org/jira/browse/WBRI-253
Project: Web Beans
Issue Type: Feature Request
Components: Enterprise Beans
Affects Versions: 1.0.0.PREVIEW1
Environment: test-harness in standalone mode
Reporter: Dan Allen
Priority: Minor
Fix For: 1.0.0.CR1
My understanding is that I cannot invoke a method on an EJB session bean unless I am using incontainer mode (@IntegrationTest). Otherwise I get the following exception, assuming a method signature of HotelSearch#isPreviousPageAvailable().
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.webbeans.bean.proxy.ClientProxyMethodHandler.invoke(ClientProxyMethodHandler.java:97)
at org.jboss.seam.examples.booking.action.HotelSearch_$$_javassist_1.isPreviousPageAvailable(HotelSearch_$$_javassist_1.java)
at org.jboss.seam.examples.booking.action.FooTest.testCallMethodOnSessionBean(FooTest.java:20)
Caused by: java.lang.NullPointerException
at org.jboss.webbeans.util.Reflections.lookupMethod(Reflections.java:514)
at org.jboss.webbeans.util.Reflections.lookupMethod(Reflections.java:496)
at org.jboss.webbeans.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:136)
at org.jboss.seam.examples.booking.action.HotelSearch_$$_javassist_0.isPreviousPageAvailable(HotelSearch_$$_javassist_0.java)
... 43 more
It might helpful to turn this NullPointerException into an IllegalStateException to make it clear that it's not possible to do such a call in standalone mode.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months
[webbeans-issues] [JBoss JIRA] Created: (WBRI-204) @PreDestroy inherited by session bean not invoked
by Shane Bryzak (JIRA)
@PreDestroy inherited by session bean not invoked
-------------------------------------------------
Key: WBRI-204
URL: https://jira.jboss.org/jira/browse/WBRI-204
Project: Web Beans
Issue Type: Bug
Affects Versions: 1.0.0.BETA1
Reporter: Shane Bryzak
Section 4.2 of the spec states:
"Suppose a class X is extended directly or indirectly by the bean class of a simple or session bean Y.
* If X declares an initializer method, @PostConstruct method or @PreDestroy method x() then Y inherits x() if and
only if neither Y nor any intermediate class that is a subclass of X and a superclass of Y overrides the method x()."
In the test class org.jboss.jsr299.tck.tests.implementation.enterprise.lifecycle.EnterpriseBeanLifecycleTest, both:
* testSubClassInheritsPreDestroyOnSuperclass() and
* testIndirectSubClassInheritsPreDestroyOnSuperclass() are failing - it seems that the @PreDestroy method is not being invoked for session beans.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 7 months