File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JNLP and Web Start and the fly likes Web Start and ActiveMQ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Web Start and ActiveMQ" Watch "Web Start and ActiveMQ" New topic

Web Start and ActiveMQ

Chris Rhodes

Joined: Apr 02, 2013
Posts: 5
Hello, I have a challenging problem that I've been experiencing lately regarding Java Web Start connecting to ActiveMQ. This is an RCP app that runs fine when run through Eclipse, or run as a normal application. However, when I run it though Web Start, it does not connect and I get the following error:

The error seems like it points class path issue, but I am told that this class is supposed to be gotten from the server. If it is a classpath issue, then I don't know how to fix and any help would be greatly appreciated. I have verified that the class resides on the server.

What might make sense though is that it does not seem to be making the tcp connection to the server. So if it needs to get the log4j from there, it's not going to get it... In that case I'm not sure why I can't make this connection. Does Web Start still sandbox this even with all permissions granted? I have all jar's signed (with my own personal certificate). Firewalls should all be down too.

The code that the error refers back to to is this:

Notes about the project:
Eclipse RCP based
Exported using eclipse export tool
Jars signed
JNLP verified through Janela
Webfiles deployed on Apache local host
ActiveMQ on glassfish on local network
ActiveMQ and logging jar files located in separate library folder within the client plugin

Also, for full disclosure (not sure if this is related, but will include to be thorough),
I see errors that show "(20023)The given path was above the root path: Cannot map GET /C:/webstart/configuration/config.ini HTTP/1.1 to file"
Note: I see the same error both when including the feature in question and without it.

I think that I've just about exhausted all ideas that I have. Any help would be greatly appreciated!
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Well, yes, if you're running a Web Start application then the application does need to be able to get all of its dependent jars from the server. And the JNLP configuration should be written to make that happen.

As you correctly observe, it's a classpath problem. Nothing to do with Active MQ at all.
Chris Rhodes

Joined: Apr 02, 2013
Posts: 5
Thank you for the reply!
Based on your response there's a few things I would still like to get clarification on:

1) I want to make sure I know what you mean when you are referring to server... The server that I have the log4j is the one with ActiveMQ deployed on it with Glassfish. Does it also need to be on the classpath for the server that is deploying the application (my local Apache)?

2) I'm not quite sure how/where to modify the JNLP to make it happen. There are many features in this project and eclipse just automatically spits out a JNLP for each one. I have tried putting a log4j jar file in the folder of plugin jars that are deployed and added this to the resources in my main jnlp file, but it didn't seem to pick it up.

3) As a test, I've tried connecting to a bogus server address, and I basically get the same error message as I listed. So from this, I could see if the answer to question #1 is that the classpath needs to be fixed on my web server, then I could see that this is what is blocking the connection. However, if the answer to question #1 is that it needs to be fixed on the glassfish side, then I'm still confused because I'm using Wireshark and it doesn't even seem like it's trying to establish a connection.
Chris Rhodes

Joined: Apr 02, 2013
Posts: 5
Ok, got it now... I thought that it wasn't getting the log4j because it wasn't able to connect to the server, but it turns out that it was the other way around. It wasn't able to connect to the server because it wasn't getting the log4j. Somehow it was able to get it when run from Eclipse and as a normal application, but not as a Web Start app. Added log4j.jar into my libraries folder and added this explicitly to the classpath. Re-exported and this solved the problem.
Martin Vajsar

Joined: Aug 22, 2010
Posts: 3733

Thanks for sharing the solution, Chris -- and welcome to the Ranch!
I agree. Here's the link:
subject: Web Start and ActiveMQ
It's not a secret anymore!