Hello, I'm a n00b learning EJB3 and have a simple question. I have a stateless 
session bean that I'm using to learn. It's an FTP bean -> you send it hostname, 
user, pass, etc and it will FTP stuff to the site. The bean explodes to JBoss 5 
just fine, and runs perfect, if I hard code some FTP instructions within the 
bean itself.

Now that I got that working, my next step is I want to be able to pass an 
object to the bean from a caller POJO app that is essentially a list of FTP 
actions to be performed. The bean would receive this object, cast it into the 
my object type, and then loop over the list of files, sending each one to the 
FTP site. Easy enough and a good app for training wheels.

The problem is, originally I tried sending the specific object type to the bean 
directly ie ftpBean.doWork(String host, String username, String password, 
ListOfFTPItems ftpFilePackage). That threw a bunch of interceptor errors.

Next I tried making a more generic argument list -> ftpBean.doWork(String host, 
String username, String password, Object ftpFilePackage), and then casting the 
Object into a ListOfFTPItems inside the bean. I thought since it was a generic 
object, I should be able to go back and forth just fine without having to touch 
anything else. What am I missing?

A couple of the guys were great at answering a question I had earlier this week 
about JNDI lookup. I promised I would write a great tutorial that is completely 
step by step and I am. Helping me will help out all the other newcomers!

PS -> My plan is to make this bean into an MDB so that I can run it 
asynchronously, but I want to get the object passing figured out first before 
attempting to turn it into an MDB.

Thanks in advance.

Error message:
Exception in thread "main" java.lang.RuntimeException: 
java.lang.ClassNotFoundException: 
com.acmeco.serverapp.test.fileStuff.FilePackage (no security manager: RMI class 
loader disabled)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:318)
  |     at 
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:481)
  |     at 
org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
  |     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
  |     at 
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  |     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
  | Caused by: java.lang.ClassNotFoundException: 
com.acmeco.serverapp.test.fileStuff.FilePackage (no security manager: RMI class 
loader disabled)
  |     at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:375)
  |     at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
  |     at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
  |     at 
org.jboss.system.JBossRMIClassLoader.loadClass(JBossRMIClassLoader.java:91)
  |     at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
  |     at 
sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:197)
  |     at 
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
  |     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
  |     at 
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
  |     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  |     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
  |     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  |     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
  |     at java.rmi.MarshalledObject.get(MarshalledObject.java:142)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.getArguments(MethodInvocation.java:309)
  |     at 
org.jboss.ejb3.stateless.StatelessContainer.dynamicInvoke(StatelessContainer.java:481)
  |     at 
org.jboss.ejb3.session.InvokableContextClassProxyHack._dynamicInvoke(InvokableContextClassProxyHack.java:53)
  |     at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:91)
  |     at 
org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82)
  |     at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:908)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:742)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:695)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:522)
  |     at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:230)
  |     at 
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:206)
  |     at org.jboss.remoting.Client.invoke(Client.java:1708)
  |     at org.jboss.remoting.Client.invoke(Client.java:612)
  |     at 
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:60)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
  |     at $Proxy3.invoke(Unknown Source)
  |     at 
org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
  |     at 
org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
  |     at $Proxy2.doWork(Unknown Source)
  |     at 
com.acmeco.serverapp.ftpDoer.client.HelloClientPOJO.doWork(HelloClientPOJO.java:41)
  |     at 
com.acmeco.serverapp.ftpDoer.client.HelloClientPOJO.main(HelloClientPOJO.java:47)
  |     at 
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:72)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.ejb3.security.client.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:65)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at 
org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
  |     at 
org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
  |     at org.jboss.aspects.remoting.PojiProxy.invoke(PojiProxy.java:62)
  |     at $Proxy3.invoke(Unknown Source)
  |     at 
org.jboss.ejb3.proxy.handler.ProxyInvocationHandlerBase.invoke(ProxyInvocationHandlerBase.java:261)
  |     at 
org.jboss.ejb3.proxy.handler.session.SessionSpecProxyInvocationHandlerBase.invoke(SessionSpecProxyInvocationHandlerBase.java:101)
  |     at $Proxy2.doWork(Unknown Source)
  |     at 
com.acmeco.serverapp.ftpDoer.client.HelloClientPOJO.doWork(HelloClientPOJO.java:41)
  |     at 
com.acmeco.serverapp.ftpDoer.client.HelloClientPOJO.main(HelloClientPOJO.java:47)
  | 



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225003#4225003

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225003
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to