• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Web Start and ActiveMQ

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for sharing the solution, Chris -- and welcome to the Ranch!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic