[jboss-user] [Remoting] - Swing Client problem

viniciuscarvalho do-not-reply at jboss.com
Tue Mar 20 16:24:05 EDT 2007


Hello there! I'm trying to use a Swing project as a client to my EJB3 sample project. I have jdk1.6 (and I have the patch for jboss-remoting and jdk1.6).
My client project runs smoothly on Eclipse and a simple testcase class, but when I started a netbeans client I'm having problems with it. I'm pretty sure I forgot a jar somewhere (since my eclipse client runs inside the ejb3 project of my jboss ide).
I get the stub from the jboss, but when I invoke a method it throws a ClassNotFoundException:

Any ideas?

Regards

Here's the libs I've put on my netbeans project:

appClient.jar (it has my persistence classes and remote interfaces)
jboss-aop-jdk50-client
jboss-aspect-jdk50-clilent
jnp-client
ejb3-persistence
jboss-remoting

But I'm getting this error when I hit an action:

  |   InitialContext ctx;
  |         try {
  |             ctx = new InitialContext();
  |               CatalogService catalogService = (CatalogService)ctx.lookup("CatalogBean/remote");
  |               Product[] products = catalogService.getProductList();
  |         int index = 0;
  |         for(Product p : products){
  |             jTable1.getModel().setValueAt(p.getId(),index,0);
  |             jTable1.getModel().setValueAt(p.getName(),index,1);
  |             jTable1.getModel().setValueAt(p.getPrice(),index,2);
  |             index++;
  |         }
  |          index=0;
  |         } catch (NamingException ex) {
  |             ex.printStackTrace();
  |         }
  | 
I get this exception: 

  | Exception in thread "AWT-EventQueue-0" java.lang.reflect.UndeclaredThrowableException
  |         at $Proxy0.getProductList(Unknown Source)
  |         at com.acme.client.CatalogoFrame.jButton1ActionPerformed(CatalogoFrame.java:99)
  |         at com.acme.client.CatalogoFrame.access$000(CatalogoFrame.java:20)
  |         at com.acme.client.CatalogoFrame$1.actionPerformed(CatalogoFrame.java:58)
  |         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
  |         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
  |         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
  |         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
  |         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
  |         at java.awt.Component.processMouseEvent(Component.java:6038)
  |         at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
  |         at java.awt.Component.processEvent(Component.java:5803)
  |         at java.awt.Container.processEvent(Container.java:2058)
  |         at java.awt.Component.dispatchEventImpl(Component.java:4410)
  |         at java.awt.Container.dispatchEventImpl(Container.java:2116)
  |         at java.awt.Component.dispatchEvent(Component.java:4240)
  |         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
  |         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
  |         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
  |         at java.awt.Container.dispatchEventImpl(Container.java:2102)
  |         at java.awt.Window.dispatchEventImpl(Window.java:2429)
  |         at java.awt.Component.dispatchEvent(Component.java:4240)
  |         at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
  |         at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
  |         at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
  |         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
  |         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
  |         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
  |         at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
  | Caused by: java.lang.ClassNotFoundException: [Lcom.acme.model.persistence.Product;
  |         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
  |         at java.security.AccessController.doPrivileged(Native Method)
  |         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
  |         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
  |         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
  |         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
  |         at org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:50)
  |         at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:139)
  |         at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
  |         at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
  |         at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1624)
  |         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
  |         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
  |         at org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
  |         at java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
  |         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
  |         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  |         at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
  |         at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
  |         at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
  |         at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
  |         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
  |         at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:128)
  |         at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:66)
  |         at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:279)
  |         at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
  |         at org.jboss.remoting.Client.invoke(Client.java:525)
  |         at org.jboss.remoting.Client.invoke(Client.java:488)
  |         at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:77)
  |         at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  |         at org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:102)
  |         ... 29 more
  | 

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4029991



More information about the jboss-user mailing list