I want to embed JWebSocket to osgi environment(apache-servicemix 4.5.2 for example). I did following steps:
- I drop jWebSocketServer-Bundle-1.0.jar to deploy folder of servicemix.
- I create another bundle to call main function of JWebSocketServer class
But when the my bundle runs, it raises above exception. I try to debug to find the problem, I found that has an error on line 112 of JSocketFactory.java
109 if (lDebug) {
110 Logger lLogger = mLog.getRootLogger();
111 String lAppenderStr = "";
112 Enumeration lAppenders = lLogger.getAllAppenders()**;
Logger does not have getAllAppenders() method. I guest log4j of service mix overrode log4j in jWebSocketServer-Bundle-1.0.jar, but I am not sure about it.
Can you please help me ? thank you
here is my code in MyActivator class to call JWebSocketSer
public class MyActivator implements BundleActivator {
public void start(BundleContext bundleContext) throws Exception
{
JWebSocketServer.main(null);
}
public void stop(BundleContext bundleContext) throws Exception
{
}
}