Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.2 not working on Windows XP #752

Closed
petemadsen opened this issue May 22, 2013 · 19 comments
Closed

2.1.2 not working on Windows XP #752

petemadsen opened this issue May 22, 2013 · 19 comments

Comments

@petemadsen
Copy link

Restlet 2.1.2 (e.g. HelloServer and HelloClient) is not running Windows XP. My real app is working with no problems on 7 and Vista, but not on XP.

The server starts, the ports are listening. The clients seems to connect but nothing happens, it simply hangs.

If I close the server, the clients shows errors.

2.1.1 is running like a charm.

@jlouvel
Copy link
Member

jlouvel commented Jun 3, 2013

Are you using the default HTTP server in org.restlet.jar? If so you can work around the issue but adding the Simple or Jetty extension in the classpath.

@petemadsen
Copy link
Author

Yes, the default. I ll stick to 2.1.1 for now but will try simple/jetty extension.

@petemadsen
Copy link
Author

Finally found some time to give it a try. Yes, using the Simple extention in the classpath works on XP.

@ghost ghost assigned thboileau Nov 15, 2013
@thboileau
Copy link
Contributor

The current internal connector is not fully stabilized yet, we prefer tell you to use either the Simple of Jetty extensions which are fully approved for production.
We will close this issue.

@lxy4java
Copy link

now i use the restlet 2.1.4, i meet the same question ,how can i get the Simple or Jetty extensions
i can't find it in the lib

@jlouvel
Copy link
Member

jlouvel commented Nov 22, 2013

You need to download the Java SE edition of Restlet.

@lxy4java
Copy link

i download the java EE

google find the Simple extensions (org.restlet.ext.simple 2.1.4)

and i got this
java.lang.NoClassDefFoundError: org/simpleframework/http/core/Container

@lxy4java
Copy link

thanks
i got it

@Zzirconium
Copy link

Thanks for this thread, it solves the problem I had (using Simple HTTP Server). Jérôme, Thierry, don't you think this piece of information should appear in http://restlet.org as a prerequisite, or a side note to the "First Server" entry in the user guide ? Amazing job all anyway !

@jlouvel
Copy link
Member

jlouvel commented Feb 21, 2014

@Zzirconium Thanks for your feed-back.

Have you tried RF 2.1.7? The default HTTP server shouldn't have this issue anymore, thus not requiring usage of the extension connectors (Jetty or Simple)?

It would be great if you could let us know.

@Zzirconium
Copy link

Since I was running under 2.1.6, my first reaction yesterday was to try with the newer version. And I still had the same trouble : server starts, and when attempting to connect using a browser, nothing happens although some connection exists since the browser keeps waiting for an answer. I will give a new try next week for I might have made a mistake swatching jar file, and i'll confirm

@Zzirconium
Copy link

Hmmm I checked again and 2.1.7 still have the problem on XP (it's a 64 bits juste to be exact).
What buzzes me, is that I checked the jar I use : org.restlet.jar and its size is exactly the same for both 2.1.6 and 2.1.7 : 732 347 octets.
So I understand size does not mean a lot, but that would be a strange coincidence... Maybe I have to provide another jar to my app ? It's just that on Seven, the server works fine having only this jar so I assumed the HTTP server is inside... And if you did stabilize it, the jar size should have changed no ?

Here is my classpath in case you think there might be a side effect from other libs :

set LIBS=%LIB_PATH%\jacob.jar;%LIB_PATH%\selenium-java-2.32.0.jar;%LIB_PATH%\htmlunit-2.12.jar;%LIB_PATH%\htmlunit-core-js-2.12.jar;%LIB_PATH%\xml-apis-1.4.01.jar;%LIB_PATH%\httpcore-4.2.1.jar;%LIB_PATH%\commons-codec-1.6.jar;%LIB_PATH%\httpclient-4.2.1.jar;%LIB_PATH%\sac-1.3.jar;%LIB_PATH%\commons-logging-1.1.1.jar;%LIB_PATH%\commons-lang3-3.1.jar;%LIB_PATH%\httpmime-4.2.1.jar;%LIB_PATH%\commons-collections-3.2.1.jar;%LIB_PATH%\commons-io-2.2.jar;%LIB_PATH%\xercesImpl-2.10.0.jar;%LIB_PATH%\cssparser-0.9.9.jar;%LIB_PATH%\nekohtml-1.9.17.jar;%LIB_PATH%\xalan-2.7.1.jar;%LIB_PATH%\guava-14.0.jar;%LIB_PATH%\json-20080701.jar;%LIB_PATH%\commons-exec-1.1.jar;%LIB_PATH%\org.restlet.jar;%LIB_PATH%\slf4j-api-1.7.5.jar;%LIB_PATH%\logback-core-1.1.0.jar;%LIB_PATH%\logback-classic-1.1.0.jar;%LIB_PATH%\json-simple-1.1.1.jar;%LIB_PATH%\antlr-4.2-complete.jar

Here is the import section :

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.BufferedWriter;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.logging.Level;

import org.apache.commons.io.FileUtils;
import org.restlet.Component;
import org.restlet.data.Protocol;
import org.restlet.engine.Engine;

And finally the server start code:

// Create a new Component.
Component component = new Component();

// Add a new HTTP server listening on port 8182.
component.getServers().add(Protocol.HTTP, Integer.parseInt(args[1]));
component.getClients().add(Protocol.FILE);  

// Attach the sample application.
component.getDefaultHost().attach(new HWBServicesApplication());
Engine.setRestletLogLevel(Level.WARNING);

// Start the component.
component.start();

@jlouvel
Copy link
Member

jlouvel commented Feb 28, 2014

Let's clarify this before next release (2.2 RC3 and potentially 2.1.8).

Between 2.1.6 and 2.1.7 it is likely that there was no change made to org.restlet.jar source code, enhance the same binary size, but this is worth double checking.

Assigned to @thboileau

@jlouvel jlouvel added this to the 2.2 RC3 milestone Feb 28, 2014
@Zzirconium
Copy link

OK maybe a bit late. I tried the last RC2 of 2.2 and it works fine on XP now with the embedded HTTP server. So that's good and so will most probably be the case of stable 2.2. Sorry for the mess !

@jlouvel
Copy link
Member

jlouvel commented Mar 1, 2014

Thanks for the clarification, indeed the internal HTTP server was only changed in the 2.2 branch, not in the 2.1 branch. One of my previous comment might have misled you.

To summarize before closing this issue: please update to 2.2 RC2 or above to fix stability issues with internal HTTP connectors observed in 2.1 or previous 2.2 releases.

@jlouvel jlouvel closed this as completed Mar 1, 2014
@Tembrel
Copy link
Collaborator

Tembrel commented Mar 1, 2014

On Fri, Feb 28, 2014 at 7:23 PM, Jerome Louvel notifications@github.comwrote:

To summarize before closing this issue: please update to 2.2 RC3 or above
to fix stability issues with internal HTTP connectors observed in 2.1 or
previous 2.2 releases.

2.2-RC3 isn't released yet, is it?

@jlouvel
Copy link
Member

jlouvel commented Mar 1, 2014

Oops, you're correct Tim, I meant 2.2 RC2. 2.2 RC3 should be realized very soon however, hence the confusion

@jlouvel
Copy link
Member

jlouvel commented Mar 1, 2014

Updated my previous comment

@jlouvel
Copy link
Member

jlouvel commented Mar 5, 2014

@Tembrel 2.2 RC3 is now available.

From our point of view, the issues related to the internal HTTP server are now fully solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants