Closed quinput closed 12 years ago
Hi Andreas:
I don't believe Spymemcached is dependent on jboss nor log4java nor spring! I downloaded it from here http://code.google.com/p/spymemcached/
Thank you for sharing your website. Very interesting stuff. We should collaborate.
Hi Ido
Look at the end of this page http://code.google.com/p/spymemcached/wiki/Maven Here you see the dependency req.
Have you build a "war" file and uploaded it to actual tomcat? In a j2ee container it is maybe already present.
The interest on this type of stuff is normal quit low. I build my stuff since I could useful in work. The timeconversion is quit useful if you work in business. (we build the first Galileo SC in Rome)
I wanted to integrate the propagator in a svg,jquery web env. But I never finished this a year ago I wanted to see how you solve this in your code.
Regards Andreas Rieger
On 24.01.2012 18:00, Haisam Ido wrote:
Hi Andreas:
I don't believe Spymemcached is dependent on jboss nor log4java nor spring! I downloaded it from here http://code.google.com/p/spymemcached/
Thank you for sharing your website. Very interesting stuff. We should collaborate.
Reply to this email directly or view it on GitHub: https://github.com/haisam/SFDaaS/issues/1#issuecomment-3635911
I have now put log4java spring framework jboss-netty commons-codec and jettison in the required lib section of the project. With this you can start it.
Then I can access the usage page. But the demo fail since the data path to orekit data is hard coded.
I solve this in my code in this way: I have renamed the orkit-data.zip to orekit-data.jar and put it like other jar files in the lib patch
Then I init orekit with:
public static int Setup_orekit_data() { int ret = -1; URL orekit_data_url = DataProvidersManager.getInstance().getClass().getClassLoader().getResource("orekit-data"); if (orekit_data_url != null) {
String orekit_data_path = orekit_data_url.getPath();
String[] fields = orekit_data_path.split("!");
String result = null;
if (fields.length == 2) {
result = fields[0].replace("file:", "");
} else {
result = orekit_data_path;
}
System.setProperty(DataProvidersManager.OREKIT_DATA_PATH, result);
ret = 0;
}
return ret;
}
This seems for me to work
One step more. I have added this change to your code.
The usage side had linkes with localhost this I have changed to usageText = usageText + " 1) a href=\"http:/SFDaaS/orekit/propagate/usage\" target=\"orekit_eg_1\" The server takes care about this rewrite.
I build a war and uploaded it to a server.
http://quinput.eu:8080/SFDaaS/orekit/propagate/usage
the normal propagator is working but the memcached fails with
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
net.spy.memcached.OperationTimeoutException: Timeout waiting for value net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1185) net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1200) org.spaceflightdynamics.servlets.OreKitPropagate.doGet(OreKitPropagate.java:222) javax.servlet.http.HttpServlet.service(HttpServlet.java:575) javax.servlet.http.HttpServlet.service(HttpServlet.java:668) root cause
net.spy.memcached.internal.CheckedOperationTimeoutException: Timed out waiting for operation - failing node: /127.0.0.1:11211 net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:73) net.spy.memcached.internal.GetFuture.get(GetFuture.java:38) net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1178) net.spy.memcached.MemcachedClient.get(MemcachedClient.java:1200) org.spaceflightdynamics.servlets.OreKitPropagate.doGet(OreKitPropagate.java:222) javax.servlet.http.HttpServlet.service(HttpServlet.java:575) javax.servlet.http.HttpServlet.service(HttpServlet.java:668) note The full stack trace of the root cause is available in the Apache Tomcat/7.0.19.2 logs.
The exception is due to memcached not running. You need to run memcached on the ports that are designated in the URL:
memcached -d {host} -p 11212
Of course you need to install memcached and I would recommend that you install memcached-tools. I've done this on Ubuntu.
Sorry didn't mean to close issue. I re-opened it.
We should have the code check and see if a memcached service is running, and if not running, it should default to not attempting to use memcached.,
Ok I have now installed memcached on the server (Debian Squeeze) and it works.
But this means you can not build a selfcontained "war" file which you can upload on a server (in many cases you have no root access to install stuff). This type of application need a caching this is clear. But would it be not better to build for this a internal caching system? But I looked not deep enough in the code understand the effort.
good point with respect to root access to install stuff; however, memcached can be running on any machine and anywhere so it doesn't even have to be local. There are already services that focus on this. I personally would not want to do internal caching system. memcached is a very robust and mature product run be very large service providers and thus it is well proven. Perhaps both methods should be available?
Ok I think we can close this issue since I know now what to do to get it running. If you need a external tomcat to test it, I could offer a access to one of my test system. Some thinks you only see if it runs in the wild.
It seems Spymemcached is dependent to jboss libs. And it was dependent to log4java and spring. This I can solve with a netbeans tomcat system but not the jboss issue
Andreas Rieger
I tried something similar with http://quinput.org/qjw3/ so I was interested