Hi,
When I use restlet 2.0.6 to start three http server, sometimes I got one
warning.Here is the information in osgi console:
2011-10-11 11:13:55 org.restlet.engine.http.connector.HttpServerHelper start
信息: Starting the internal HTTP server on port 8281
2011-10-11 11:13:56 org.restlet.engine.Engine createHelper
警告: No available server connector supports the required protocols: 'HTTP' .
Please add the JAR of a matching connector to your classpath.
2011-10-11 11:13:56 org.restlet.engine.http.connector.HttpServerHelper start
信息: Starting the internal HTTP server on port 8182
My environment information is as follows:
OS: Windows XP professional Service pack2
Felix 3.2.0
org.restlet-2.0.6.jar
org.restlet.ext.jackson-2.0.6.jar
org.restlet.ext.xml-2.0.6.jar
and the code in every bundle to start restlet component is as follows:
Component server = new Component();
server.getServers().add(Protocol.HTTP, port);
server.getDefaultHost().attach(uriPattern, target);
try
{
server.start();
}
catch (Exception e)
{
LOGGER.error("exception occors when start server with " +
uriPattern + "and port " + port, e);
return null;
}
It seems that I need to add a protocol jar, but I found that one has already
existed in org.restlet-2.0.6.jar.
It confused me a lot that it happens sometimes, not every time. And
furthermore, the other two servers start fine and the middle one start with a
warning.
Another problem is that I can't stop the server in bundle when I updates the
bundle by invoking server.stop(). The application just hangs there. Does
someone meet this problem in osgi environment?
Can someone help me?Thanks.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2853049