Community
Participate
Working Groups
Please note, I think this bug is related to bug 361110. Nonetheless I opened a separate bug as a) the comments on bug 361110 are already quite confusing and b) as opposed to embedding Jetty, this issue arises when using Jetty as is. Now to the point: I get a ClassNotFoundException after a (simulated) session failover. The set up is as follows: There are two OSGi instances running in distinct VMs. Each instance runs Jetty 8.x and a RAP-based web application. A third VM runs an h2 database (on port 9999). The Jetty bundles are configured to use a JDBCSessionIdManager that connects to the h2 database. Apart from the worker name (node1 and node2) and the port (8080 and 9090), both instances are identical. To reproduce, please import the attached three projects into your workspace. Setup your target platform as described in the attachment. Additionally you will need a software that can proxy or redirect request. I used a small tool called rinetd [1], which can be used to redirect ports. Follow these steps: 1. launch h2, node1 and node2 with the respective launch configurations 2. setup rinetd to redirect from port 7070 to 8080 3. open a browser at http://localhost:7070/demo/rap 4. you should see a UI with a button called "push". Click the button several times. It shows a counter and the port number 5. stop rinetd and restart it to redirect from port 7070 to 9090 6. in the browser, click the "push" button again -> in the console output of node2 you will see the exception From comments on bug 361110 and bug 358557 I got the impression that this would work. Am I missing something? Or is there a mistake in the setup? [1] http://www.boutell.com/rinetd
Created attachment 205639 [details] Projects to reproduce the bug For the projectsto compile and run, the following target components are necessary: * Equinox OSGi 3.7.1 (only bundle org.eclipse.osgi and org.eclipse.osgi.services) * H2 1.1 (available from Orbit) * Jetty 8.x * Servlet API 3.0 (either comes with Jetty or available from Orbit) * RAP 1.5 > 2011-10-19 (only bundle org.eclipse.rap.rwt) available from http://eclipse.org/rap/downloads (RAP Runtime -> nightly build) Please don't hesitate to email me and I will send you a zip of the above.
Can you include the stack trace as well.
Created attachment 205643 [details] Stacktrace It looks like the subsequent JdbcSQLException is an aftereffect of the ClassNotFoundException
Created attachment 205649 [details] Projects to reproduce the bug One of the launch configs of the first attachment had a wrong auto-start setting for o.e.jetty.osgi.boot. Everything else remains the same. Please see the first attachment (attachment 205639 [details]) for the list of necessary target components.
Rüdiger, If you create a session with node1, then stop and then restart it, and then hit it again from the browser, do you get the same ClassNotFoundException? In theory, this should be exactly the same situation as the node migration ... Also please note that the latest jetty release is 8.1.3, so it may be worthwhile retesting with that.
(In reply to comment #5) Also, I don't see an Import-Package statement for org.eclipse.rwt.internal.service in the manifest... Jan > Rüdiger, > > If you create a session with node1, then stop and then restart it, and then hit > it again from the browser, do you get the same ClassNotFoundException? In > theory, this should be exactly the same situation as the node migration ... > > Also please note that the latest jetty release is 8.1.3, so it may be > worthwhile retesting with that.
Rüdiger, I've tried using the HashSessionManager and persisting sessions across restarts. That is working fine (tested in virgo). This uses very similar mechanisms to the JDBC session persistence in terms of serializing and deserializing objects. In this case, the object was a simple one, and part of the webapp. I can't seem to use the projects you attached to the issue. Also there was no explanatory file as you indicated in your post. I think to get any further with this, you are going to need to turn up the debugging level for jetty, particularly for the org.eclipse.jetty.server.session.* package. Also, please try a much simpler case of using just the HashSessionManager with persistence (with a simple servlet that merely creates a session - you might like to use the test webapp that comes with jetty), and stopping and restarting - this will trigger the class reload. thanks Jan
Rüdiger, Is there a status update on this bug? Do you have any comments in response to my last post (#7)? Have you made progress on using session reloading with/without osgi? Jan
Rüdiger, Its been a long time since I've heard from you with info about this bug. As I said a while ago, I wasn't able to reproduce the problem. So, I'm going to close this issue. If this is still a problem for you, please reopen with updated stack traces, test harness (and instructions on how to use the test harness), and instructions on how to reproduce the bug. Please do any testing against a recent jetty release, preferably jetty-9.1.x. regards Jan