[jboss-user] [Remoting] - Problem running with Maven

eric.rotick do-not-reply at jboss.com
Tue Aug 4 08:23:28 EDT 2009

I've been playing around with remoting and developed some tests. These all run fine in the same environment as delivered by the 2.5.1 download.

I now need to integrate this work into the main project which uses Maven but I cannot get this to run. I've also ported the simple tests over to Maven and this also does not run. 

It seems to me that the Maven dependencies are at fault but I cannot find anything that documents this. By the way, the search facility in this forum results in an exception.

 I'm using the repository at http://repository.jboss.org/maven2 and jdk 1.6.

The symptoms are that the client server connection is made, as determined via netstat but nothing get invoked. The client is bocked forever. If I kill the server the client also fails. 

When I started the Mavenizing process I read in Ch4 of the Remoting Guide that jboss-remoting.jar was the only jar required so that is all I added. Everything compiles but when I run it I get an error that org.jboss.logging.Logger is missing.

I realize with so many logging implementations I have to make a choice at runtime so I added jboss-logging-log4j as I'm also using log4j. 

This solves the logging problem but now at runtime I get an error that org.jboss.util.threadpool.ThreadPool is missing.  I fgrep'ed in the download and found it in jboss-common.jar. Now I tried to find this in the jboss maven repository and this is where, I think, it started to go wrong!

I could not find jboss-common in the groupId of org.jboss but I did find it in the groupId of jboss. I added this and now I get an error that EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap is missing. I found

  | <artifactId>concurrent</artifactId>
  | <version>1.3.4-jboss-update1</version> 

on the jboss repository.

I added this dependency and everything runs without an error but it doesn't work. When I killed the server I noticed that the client reported that org.jboss.mx.util.ObjectNameFactory was missing.

I thought I must be doing something wrong so I re-read the section in the Remoting Guide on dependencies and decided that Ch4.1 regarding the third party libraries really does mean to supplement jboss-remoting.jar despite the statement to the contrary in Ch4.  This also documented the additional dependencies I had added so now we're getting somewhere. 

The guide says jboss-jmx is not needed since I'm using JDK 1.6 but I still get the exception and the test fails. I added 

  |                 <artifactId>jboss-jmx</artifactId>
  |                 <version>4.2.3.GA</version> 

from the jboss repository.

Now if I run the test it just blocks as before but when I kill the server the client fails with 

org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection for InvokerLocator [socke
  | t://localhost:2468/]
  |         at org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:776)
  |         at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:165)
  |         at org.jboss.remoting.Client.invoke(Client.java:1724)
  |         at org.jboss.remoting.Client.invoke(Client.java:629)
  |         at org.jboss.remoting.Client.invoke(Client.java:617)
  |         at org.jboss.remoting.transporter.TransporterClient.invoke(TransporterClient.java:321)
  |         at $Proxy0.getOne(Unknown Source)
  |        <snip>

which is called from my call to the TransporterClient proxy.

Now I do not have any more ideas what to do. Can anyone shed some light on this as I must be down to the Maven dependencies. 



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

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

More information about the jboss-user mailing list