yrift / jwebsocket

Automatically exported from code.google.com/p/jwebsocket
0 stars 0 forks source link

JWebSocketLoader.getConfigurationPath and jsvc: would like java define to specify the path #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run tomcat via jsvc so that no environment variables are defined.
2. JWebSocketLoader.getConfigurationPath returns null.
3. JWebSocketFactory.start throws a null pointer exception.

What is the expected output? What do you see instead?

Expected a way to use a Java define to specify the path for the jWebSocket 
configuration file location.  Since that isn't possible a null pointer 
exception occurs.

What version of the product are you using? On what operating system?

0.9.5 on Ubuntu

Please provide any additional information below.

In this situation when running tomcat from jsvc there are no environment 
variables defined.  So it would be useful to be able to specify a java define 
with the location of the configuration file (jsvc supports this via the "-D" 
option).

Original issue reported on code.google.com by deniswb...@gmail.com on 8 Jul 2010 at 2:02

GoogleCodeExporter commented 8 years ago

Original comment by mailtopu...@gmail.com on 9 Jul 2010 at 2:33

GoogleCodeExporter commented 8 years ago
This should have been fixed in latest trunk..Verifying again 

Original comment by mailtopu...@gmail.com on 11 Jul 2010 at 4:31

GoogleCodeExporter commented 8 years ago
This is fixed now..if JWEBSOCKET_HOME is missing it should STOP at that point 
only. throwing an exception 

Original comment by mailtopu...@gmail.com on 11 Jul 2010 at 5:07

GoogleCodeExporter commented 8 years ago
Now the jWebSocket.xml can be loaded from %CLASSPATH%/conf, i.e. a 
default/individual config file can be embedded into the .jar or .war at 
resources/conf/jWebSocket.xml.
If it is not provided even there the following exception is raised:

WebSocketException during jWebSocket Server startup: Either JWEBSOCKET_HOME 
variable is not set or jWebSocket.xml file does neither exist at 
%JWEBSOCKET_HOME%/conf nor at %CLASSPATH%/conf

Original comment by fivefeetfurther@gmail.com on 5 Aug 2010 at 10:05

GoogleCodeExporter commented 8 years ago
Hi I am getting the same error. I have placed the jWebSocket.xml in the 
Tomcat6.0/conf/ directory, as mentioned on the Getting Started guide on the 
jWebSocket.org website. Doesn't it pick from there?

Original comment by hitesh.r...@gmail.com on 17 Nov 2010 at 7:24