tiger154 / jwebsocket

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

Exception sending context initialized event to listener instance of class org.jwebsocket.appserver.ContextListener #159

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Install the two jars in the tomcat/lib folder
2.install the jWebSocket.xml in the tomcat/conf folder
3. setup all the environment variables CATALINA_HOME,JWEBSOCKET_HOME, JAVA_HOME 
and JRE_HOME

What version of the product are you using? On what operating system?
Version 1
Tomcat 6 (tried with 7)
Windows 7 

Please provide any additional information below.

SEVERE: Exception sending context initialized event to listener instance of 
class org.jwebsocket.appserver.ContextListener
org.springframework.beans.factory.BeanDefinitionStoreException: IOException 
parsing XML document from file [C:\Program Files\Apache Software 
Foundation\apache-tomcat-7.0.23\bin]; nested exception is 
java.io.FileNotFoundException: 
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:341)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
    at org.jwebsocket.spring.JWebSocketBeanFactory.load(JWebSocketBeanFactory.java:80)
    at org.jwebsocket.spring.JWebSocketBeanFactory.load(JWebSocketBeanFactory.java:61)
    at org.jwebsocket.factory.JWebSocketFactory.start(JWebSocketFactory.java:134)
    at org.jwebsocket.appserver.ContextListener.contextInitialized(ContextListener.java:39)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:958)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1599)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.io.FileNotFoundException: 
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at org.springframework.core.io.FileSystemResource.getInputStream(FileSystemResource.java:110)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:328)
    ... 19 more
3-Feb-2012 3:05:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
3-Feb-2012 3:05:19 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
3-Feb-2012 3:05:19 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: 
attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 
'org.apache.jasper.compiler.TldLocationsCache@3ed19cdf')

Original issue reported on code.google.com by carlosLc...@gmail.com on 3 Feb 2012 at 8:13

GoogleCodeExporter commented 9 years ago
Hi,
Getting the same error, with the same setup environment. Any solutions?

Original comment by darrylsc...@gmail.com on 16 Feb 2012 at 4:19

GoogleCodeExporter commented 9 years ago
Well... I ended up loading the source code of the whole project and rebuilding 
it; now it works. It seems that the bin distribution has the error in the 
ContextListener class of jWebSocketAppSrvDemo. Anyway, the idea of the project 
is good but is badly buggy; I won't be using it.   

Original comment by carlosLc...@gmail.com on 21 Feb 2012 at 7:30

GoogleCodeExporter commented 9 years ago
The problem is in contextInitialized(ServletContexEvent sc) method, the line

JWebSocketFactory.start(""), or JWebSocketFactory.start("", ""); 

need to be changed to:

JWebSocketFactory.start();

recompile the class, the app will load successfully.

Original comment by jy199...@gmail.com on 23 Feb 2012 at 3:29

GoogleCodeExporter commented 9 years ago
Hey i also have the same error ... If u can help i 'll welcome .
//...........................................
SEVERE: Exception sending context initialized event to listener instance of 
class com.juancavallotti.websocketserver.WebappListener
java.lang.NullPointerException
    at com.juancavallotti.websocketserver.WebappListener.contextInitialized(WebappListener.java:36)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Jan 23, 2013 10:48:16 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart

Original comment by niwoogab...@gmail.com on 24 Jan 2013 at 6:53