The default connectors for various editions have changed between 2.2 and
2.3 (actually between 2.3-RC1 and 2.3.0). JEE edition no longer registers
HTTP or HTTPS server helpers; JSE still does.

Assuming this was intentional and not an oversight, the change causes
problems for me. For several versions now I've been able to maintain one
build that works both as a standalone deployment and when embedded in a WAR
for deployment in a production server running Tomcat. I've used the JEE
edition because of the dependency on org.restlet.ext.servlet.ServerServlet.

(Why use Tomcat at all? There are better connectors for production
purposes. Short answer is that it plays well with AWS Elastic Beanstalk.)

With this latest change, however, the standalone deployment no longer
works. I get message: No available server connector supports the required
protocols: 'HTTP' Please add the jar of a matching connector to your
classpath.
<https://github.com/restlet/restlet-framework-java/blob/09c78b4737c1eda45a276dc284d4ffee61f8efca/modules/org.restlet/src/org/restlet/engine/Engine.java#L650-L663>

It's because no HttpServerHelper has been registered in these lines
<https://github.com/restlet/restlet-framework-java/blob/09c78b4737c1eda45a276dc284d4ffee61f8efca/modules/org.restlet/src/org/restlet/engine/Engine.java#L896-L901>
for JEE (the "jee" token was added to the #ifndef list only a few days
ago). I'd be happy to add the jar of a matching connector if there was one
that the JEE edition supported, but the obvious candidates, Jetty and
Simple, don't seem to be available for that edition.

I'd be happy to switch to the JSE edition, but then I wouldn't be able to
compile against org.restlet.ext.servlet.

There's an existing issue which is vaguely related:

https://github.com/restlet/restlet-framework-java/issues/876

I'm not filing my own issue yet, because I don't see it as a bug, but I'd
like advice on what to do here. I'd prefer not to have to make separate
builds -- it was a really nice property that I could run the same code and
libraries either standalone or deployed as a WAR.

--tim

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3093127

Reply via email to