Hi Ben,
I have the following POJO class which needs to be apectized and has to send
over wire to client.
Code:
| import java.io.Serializable;
| import java.util.ArrayList;
|
| /**
| *
| * @@org.jboss.cache.aop.AopMarker
| */
|
| public class Answer implements Serializable{
| private String itemCode;
| private String description;
| private boolean defaultItem;
| private ArrayList parentItemCodeList;
| private ArrayList amenitiesList;
| private boolean hasSuite;
| private boolean hasConcierge;
| private int maxGuest;
|
| public Answer() {
| amenitiesList = new ArrayList ();
| parentItemCodeList = new ArrayList();
| }
|
| public ArrayList getAmenitiesList() {
| return amenitiesList;
| }
|
| public void setAmenitiesList(ArrayList amenitiesList) {
| this.amenitiesList = amenitiesList;
| }
|
| public void addAmenity (String amenity){
| amenitiesList.add(amenity);
| }
|
| public boolean getDefaultItem() {
| return defaultItem;
| }
|
| public void setDefaultItem(boolean defaultItem) {
| this.defaultItem = defaultItem;
| }
|
| public String getDescription() {
| return description;
| }
|
| public void setDescription(String description) {
| this.description = description;
| }
|
| public boolean isHasConcierge() {
| return hasConcierge;
| }
|
| public void setHasConcierge(boolean hasConcierge) {
| this.hasConcierge = hasConcierge;
| }
|
| public boolean isHasSuite() {
| return hasSuite;
| }
|
| public void setHasSuite(boolean hasSuite) {
| this.hasSuite = hasSuite;
| }
|
| public String getItemCode() {
| return itemCode;
| }
|
| public void setItemCode(String itemCode) {
| this.itemCode = itemCode;
| }
|
| public int getMaxGuest() {
| return maxGuest;
| }
|
| public void setMaxGuest(int maxGuest) {
| this.maxGuest = maxGuest;
| }
|
| public ArrayList getParentItemCodeList() {
| return parentItemCodeList;
| }
|
| public void setParentItemCodeList(ArrayList parentItemCodeList) {
| this.parentItemCodeList = parentItemCodeList;
| }
|
| public void addParentItemCode(String parentItemCode){
| parentItemCodeList.add(parentItemCode);
| }
| }
it's doing AOPC properly and even caching and retrieving it from JBoss
TreeCacheAOP. it's displaying Cached contents at server properly but at client
side it's giving
Code:
java.lang.reflect.UndeclaredThrowableException
| at $Proxy1.getAnswer(Unknown Source)
| at
com.wdpro.commerce.wdw.be.client.delegate.WDWIBCAppDelegate.getAnswer(WDWIBCAppDelegate.java:211
| )
| at TestCache.main(TestCache.java:20)
| Caused by: java.io.NotSerializableException:
org.jboss.cache.aop.collection.CachedListInterceptor
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
| at java.util.ArrayList.writeObject(ArrayList.java:529)
| 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:324)
| at
java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:809)
| at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1296)
| at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
| at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
| at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
| at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
| at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
| at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
| at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
| at
java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
| at
java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
| at
java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
| at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
| at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
| at java.rmi.MarshalledObject.<init>(MarshalledObject.java:92)
| at
org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:410)
| 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:324)
| at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
| at sun.rmi.transport.Transport$1.run(Transport.java:148)
| at java.security.AccessController.doPrivileged(Native Method)
| at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
| at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
| at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
| at java.lang.Thread.run(Thread.java:534)
| at
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
| at
sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
| at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
| at org.jboss.invocation.jrmp.server.JRMPInvoker_Stub.invoke(Unknown
Source)
| at
org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:119)
| at
org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
| at
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:167)
| at
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
| at
org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
| at
org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:97)
| at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
| ... 3 more
when I did
Answer ans = delegate.getAnswer()
I don't know what I am missing here, can't cached classes accessed at client.
Please let me know ASAP.
What are requirements for Cached classes to be accessed at client side.
Thanks alot Guys,
Anu
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922617#3922617
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3922617
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user