almende / eve Goto Github PK
View Code? Open in Web Editor NEWEve is a multipurpose, web based agent platform
Home Page: http://almende.github.com/eve
Eve is a multipurpose, web based agent platform
Home Page: http://almende.github.com/eve
When using Eve on older Android versions, several classes are missing.
Specifically, the Jackson library wants to load java.util.concurrent.ConcurrentNavigableMap
but can't find it. This is supposed to be fixed in recent Jackson releases,
FasterXML/jackson-databind#216
... but unfortunately bumping the version in Eve's pom.xml to the latest (2.2.3) did not resolve the issue.
Furthermore, Eve directly relies on sun.net.www.protocol.file.FileURLConnection
which is apparently also not found on older Android devices. I suppose you could just package a copy of this class along with Eve (if that is allowed licensewise)?
I realize these versions are quite old by now, but unfortunately there are still a lot of people having such devices and we'd really like our app to work for them.
Any suggestions would be much appreciated!
I would like to override servlet_url, config, etc. as specified in the web.xml init and context parameters, but the methods and fields are private (not protected) so I can only override the whole servlet which would cause compatibility issues with future EVE distributions
How can an Eve agent add data to its State rather than replacing it? If I have two instances of the same agent how can I retrieve both inputs and store them to its State?
I have an Eve agent that add users input in an ArryaList. However, I was getting only the last input and not the entire ArrayList of the previous inputs. Now when I run the method through the Eve interface, I get the following message
"message": "Couldn't instantiate agent for id 'result_Eve1'
What can I do?
Thank you in advance,
Kind regards,
Christos
De volgende error zorgt ervoor dat de app een ANR (Application Not Respoding) error geeft als je deze hebt geopend, maar al een tijdje niet gebruikt (bijv telefoon in standby modus of andere apps eroverheen), als je dan terug komt in de app lijkt er iets mis te gaan met de verbinding terwijl de XMPP verbinding wel wordt gebruikt.
The following errors cause our Android app to throw an ANR error (Application Not Responding), which seem to happen if something 'above' app level goes wrong (not 100% sure though). The error is hard to reproduce, but most of the times it happens when the app has been inactive for a while (couple of hours or a full day) and is then resumed. It can also happen now and then when another app is opened over our app and that one is closed; when returning to our app (onresume) the error is sometimes shown. It seems to be an issue with the state of the XMPP connection at that very moment.
As far as I know it may be caused by the callback.get() in the XmppService.java class, which seems to be 'blocking' for a while (because of a [not yet] exisiting XMPP connection?)
EVE version: 2.1.0-SNAPSHOT
If anyone has seen such errors before or has a solution, please let us know.
Stacktrace:
[[email protected]/cloud was only, in the cloud, at the time the error occured in the mobile app]
02-05 16:45:32.817 13097-13097/com.askcs.standby W/System.err? java.lang.reflect.UndeclaredThrowableException
02-05 16:45:32.822 13097-13097/com.askcs.standby W/System.err? at $Proxy8.getId(Native Method)
02-05 16:45:32.822 13097-13097/com.askcs.standby W/System.err? at com.askcs.standby.common.MainService.onResumed(MainService.java:653)
02-05 16:45:32.827 13097-13097/com.askcs.standby W/System.err? at java.lang.reflect.Method.invokeNative(Native Method)
02-05 16:45:32.827 13097-13097/com.askcs.standby W/System.err? at java.lang.reflect.Method.invoke(Method.java:511)
02-05 16:45:32.832 13097-13097/com.askcs.standby W/System.err? at com.squareup.otto.EventHandler.handleEvent(EventHandler.java:89)
02-05 16:45:32.832 13097-13097/com.askcs.standby W/System.err? at com.squareup.otto.Bus.dispatch(Bus.java:372)
02-05 16:45:32.837 13097-13097/com.askcs.standby W/System.err? at com.squareup.otto.Bus.dispatchQueuedEvents(Bus.java:355)
02-05 16:45:32.842 13097-13097/com.askcs.standby W/System.err? at com.squareup.otto.Bus.post(Bus.java:324)
02-05 16:45:32.842 13097-13097/com.askcs.standby W/System.err? at com.askcs.standby.util.BusProvider$1.post(BusProvider.java:45)
02-05 16:45:32.847 13097-13097/com.askcs.standby W/System.err? at com.askcs.standby.common.StandByActivity.onResume(StandByActivity.java:77)
02-05 16:45:32.847 13097-13097/com.askcs.standby W/System.err? at com.askcs.standby.common.MainActivity.onResume(MainActivity.java:361)
02-05 16:45:32.852 13097-13097/com.askcs.standby W/System.err? at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1199)
02-05 16:45:32.852 13097-13097/com.askcs.standby W/System.err? at android.app.Activity.performResume(Activity.java:5280)
02-05 16:45:32.857 13097-13097/com.askcs.standby W/System.err? at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2629)
02-05 16:45:32.857 13097-13097/com.askcs.standby W/System.err? at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2667)
02-05 16:45:32.862 13097-13097/com.askcs.standby W/System.err? at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1279)
02-05 16:45:32.867 13097-13097/com.askcs.standby W/System.err? at android.os.Handler.dispatchMessage(Handler.java:99)
02-05 16:45:32.872 13097-13097/com.askcs.standby W/System.err? at android.os.Looper.loop(Looper.java:137)
02-05 16:45:32.872 13097-13097/com.askcs.standby W/System.err? at android.app.ActivityThread.main(ActivityThread.java:4921)
02-05 16:45:32.887 13097-13097/com.askcs.standby W/System.err? at java.lang.reflect.Method.invokeNative(Native Method)
02-05 16:45:32.887 13097-13097/com.askcs.standby W/System.err? at java.lang.reflect.Method.invoke(Method.java:511)
02-05 16:45:32.887 13097-13097/com.askcs.standby W/System.err? at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)
02-05 16:45:32.892 13097-13097/com.askcs.standby W/System.err? at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)
02-05 16:45:32.892 13097-13097/com.askcs.standby W/System.err? at dalvik.system.NativeStart.main(Native Method)
02-05 16:45:32.897 13097-13097/com.askcs.standby W/System.err? Caused by: com.almende.eve.rpc.jsonrpc.JSONRPCException: Couldn't handle XMPP return.
02-05 16:45:32.912 13097-13097/com.askcs.standby W/System.err? at com.almende.eve.transport.xmpp.XmppService.send(XmppService.java:389)
02-05 16:45:32.912 13097-13097/com.askcs.standby W/System.err? at com.almende.eve.agent.AgentHost.send(AgentHost.java:390)
02-05 16:45:32.917 13097-13097/com.askcs.standby W/System.err? at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:203)
02-05 16:45:32.922 13097-13097/com.askcs.standby W/System.err? ... 24 more
02-05 16:45:32.922 13097-13097/com.askcs.standby W/System.err? Caused by: java.util.concurrent.TimeoutException: Timeout occurred for request with id '7a156c00-8e7c-11e3-9f6b-00007f000001': [email protected]/cloud -> getId
02-05 16:45:32.927 13097-13097/com.askcs.standby W/System.err? at com.almende.eve.agent.callback.AsyncCallbackQueue$1.run(AsyncCallbackQueue.java:52)
02-05 16:45:32.927 13097-13097/com.askcs.standby W/System.err? at java.util.Timer$TimerImpl.run(Timer.java:284)
When running our agents in a Jetty Server with version: jetty-6.1.24.
I get an which indicates that the getServletRegistrations() doesn't exist. It is called in AgentListener: 34.
I did some research and it appears this function is only available in servlet-api 3.x and this is only added from jetty 8.x. So my question is this function call really needed, because it seems to me that it will only generate a warning? And without we can run it perfectly (tested).
When jetty/tomcat is configured to automatically restart on changes in the code, the XMPP connections fail to connect because the connections are still open. Also, after having had lots of automatic restarts, at some point Java runs out of memory.
Can we change the function of the Agent.getUrls to return a HashMap so I pick the 'right' medium?
Hi there,
First of all, I think this is a great project and I look forward to seeing examples of eve agents in action. I was wondering though: do you have any concrete plans for a Ruby implementation? I'm currently thinking about experimenting with the Java lib and JRuby, but a native Ruby implementation would be even better. Thanks.
It would be very convenient to have the @com.almende.eve.protocol.jsonrpc.annotation.Name
annotation available for identifying methods as well, for supporting refactoring-proof code consistency when referring to some JSON-RPC method from various locations
Perhaps an extension to logging would be nice where an agent can query not just JSON-RPC events but all log4j output by means of an (Hypersonic, in-memory?) JDBC appender for log4j for which the AgentServlet provides (SQL) querying access via JSON-RPC? This way it becomes much easier to debug distributed agent applications by simply collecting the logs from each datasource
Hallo,
I am trying to add some external JAR files in the Eve project. I am using Eclipse and I have added the path of the JAR files in the CLASSPATH and the Path environment variables and also added the reference library in the preferences of Eclipse. This error occurs: ClassNotFoundException . I have tried a lot of stuff but no solution. Finally, I saw also that I may have to configure a MANIFEST.TXT file. I 'm not sure which file this is in case of an eve application (maybe eve.yaml?)
Do you have any idea what I can do?
Thank you in advance,
Regards,
Christos
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:150)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:633)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1322)
at com.almende.util.HttpUtil.fetch(HttpUtil.java:432)
at com.almende.util.HttpUtil.post(HttpUtil.java:98)
at com.almende.util.HttpUtil.post(HttpUtil.java:109)
at com.almende.eve.transport.http.HttpService.send(HttpService.java:116)
at com.almende.eve.agent.AgentFactory.send(AgentFactory.java:518)
at com.almende.eve.agent.AgentFactory$1.invoke(AgentFactory.java:322)
... 4 more
Hallo,
Until now I can create or destroy an eve agent only though Postman or Restclient. Can somebody explain me how I can do that in a method of an agent? Is that possible?
Thank you in advance,
Kind regards,
Christos Pampidis
com.almende.eve.agent.AgentFactory.schedulerFactory already null upon log agent delete??
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.almende.eve.rpc.jsonrpc.JSONRPC.invoke(JSONRPC.java:114)
at com.almende.eve.agent.AgentFactory.invoke(AgentFactory.java:476)
at com.almende.eve.scheduler.RunnableSchedulerFactory$Task$1.run(RunnableSchedulerFactory.java:203)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at com.almende.eve.agent.AgentFactory.deleteAgent(AgentFactory.java:414)
at com.almende.eve.agent.log.LogAgent.killMe(LogAgent.java:85)
... 15 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.almende.eve.rpc.jsonrpc.JSONRPC.invoke(JSONRPC.java:114)
at com.almende.eve.agent.AgentFactory.invoke(AgentFactory.java:476)
at com.almende.eve.scheduler.RunnableSchedulerFactory$Task$1.run(RunnableSchedulerFactory.java:203)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.NullPointerException
at com.almende.eve.agent.AgentFactory.deleteAgent(AgentFactory.java:414)
at com.almende.eve.agent.log.LogAgent.killMe(LogAgent.java:85)
... 15 more
The function Scheduler.createTask has two optional parameters interval
and sequential
. The name interval sounds confusing, maybe repeat
is a better name?
/**
* Schedule a task, potentially running at an interval
*
* @param request A JSONRequest with method and params
* @param delay The delay in milliseconds
* @param interval Should the task be repeated at an interval?
* @param sequential Should (long running) tasks run sequential, or may they run in parallel?
* @return taskId
*/
String createTask(JSONRequest request, long delay, boolean interval, boolean sequential);
Everyone once in a while an http call fails to an external agent. The error I receive is this:
Error: {
"code": 0,
"message": "Failed to send RPC call through HTTP",
"data": "{"cause":null,"stackTrace":[{"methodName":"parseHead","fileName":"DefaultHttpResponseParser.java","lineNumber":95,"className":"org.apache.http.impl.conn.DefaultHttpResponseParser","nativeMethod":false},{"methodName":"parseHead","fileName":"DefaultHttpResponseParser.java","lineNumber":62,"className":"org.apache.http.impl.conn.DefaultHttpResponseParser","nativeMethod":false},{"methodName":"parse","fileName":"AbstractMessageParser.java","lineNumber":254,"className":"org.apache.http.impl.io.AbstractMessageParser","nativeMethod":false},{"methodName":"receiveResponseHeader","fileName":"AbstractHttpClientConnection.java","lineNumber":289,"className":"org.apache.http.impl.AbstractHttpClientConnection","nativeMethod":false},{"methodName":"receiveResponseHeader","fileName":"DefaultClientConnection.java","lineNumber":252,"className":"org.apache.http.impl.conn.DefaultClientConnection","nativeMethod":false},{"methodName":"receiveResponseHeader","fileName":"ManagedClientConnectionImpl.java","lineNumber":191,"className":"org.apache.http.impl.conn.ManagedClientConnectionImpl","nativeMethod":false},{"methodName":"doReceiveResponse","fileName":"HttpRequestExecutor.java","lineNumber":300,"className":"org.apache.http.protocol.HttpRequestExecutor","nativeMethod":false},{"methodName":"execute","fileName":"HttpRequestExecutor.java","lineNumber":127,"className":"org.apache.http.protocol.HttpRequestExecutor","nativeMethod":false},{"methodName":"tryExecute","fileName":"DefaultRequestDirector.java","lineNumber":717,"className":"org.apache.http.impl.client.DefaultRequestDirector","nativeMethod":false},{"methodName":"execute","fileName":"DefaultRequestDirector.java","lineNumber":522,"className":"org.apache.http.impl.client.DefaultRequestDirector","nativeMethod":false},{"methodName":"execute","fileName":"AbstractHttpClient.java","lineNumber":906,"className":"org.apache.http.impl.client.AbstractHttpClient","nativeMethod":false},{"methodName":"execute","fileName":"AbstractHttpClient.java","lineNumber":805,"className":"org.apache.http.impl.client.AbstractHttpClient","nativeMethod":false},{"methodName":"execute","fileName":"AbstractHttpClient.java","lineNumber":784,"className":"org.apache.http.impl.client.AbstractHttpClient","nativeMethod":false},{"methodName":"send","fileName":"HttpService.java","lineNumber":137,"className":"com.almende.eve.transport.http.HttpService","nativeMethod":false},{"methodName":"send","fileName":"AgentHost.java","lineNumber":380,"className":"com.almende.eve.agent.AgentHost","nativeMethod":false},{"methodName":"invoke","fileName":"AgentHost.java","lineNumber":200,"className":"com.almende.eve.agent.AgentHost$1","nativeMethod":false},{"methodName":"registerAgent","fileName":null,"lineNumber":-1,"className":"com.sun.proxy.$Proxy29","nativeMethod":false},{"methodName":"registerXmppAccount","fileName":"DomainAgent.java","lineNumber":379,"className":"com.askcs.agents.DomainAgent","nativeMethod":false},{"methodName":"addMonitorAgent","fileName":"DomainAgent.java","lineNumber":428,"className":"com.askcs.agents.DomainAgent","nativeMethod":false},{"methodName":"invoke0","fileName":"NativeMethodAccessorImpl.java","lineNumber":-2,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":true},{"methodName":"invoke","fileName":"NativeMethodAccessorImpl.java","lineNumber":57,"className":"sun.reflect.NativeMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"DelegatingMethodAccessorImpl.java","lineNumber":43,"className":"sun.reflect.DelegatingMethodAccessorImpl","nativeMethod":false},{"methodName":"invoke","fileName":"Method.java","lineNumber":606,"className":"java.lang.reflect.Method","nativeMethod":false},{"methodName":"invoke","fileName":"JSONRPC.java","lineNumber":141,"className":"com.almende.eve.rpc.jsonrpc.JSONRPC","nativeMethod":false},{"methodName":"receive","fileName":"AgentHost.java","lineNumber":339,"className":"com.almende.eve.agent.AgentHost","nativeMethod":false},{"methodName":"doPost","fileName":"AgentServlet.java","lineNumber":309,"className":"com.almende.eve.transport.http.AgentServlet","nativeMethod":false},{"methodName":"service","fileName":"HttpServlet.java","lineNumber":637,"className":"javax.servlet.http.HttpServlet","nativeMethod":false},{"methodName":"service","fileName":"HttpServlet.java","lineNumber":717,"className":"javax.servlet.http.HttpServlet","nativeMethod":false},{"methodName":"handle","fileName":"ServletHolder.java","lineNumber":511,"className":"org.mortbay.jetty.servlet.ServletHolder","nativeMethod":false},{"methodName":"handle","fileName":"ServletHandler.java","lineNumber":390,"className":"org.mortbay.jetty.servlet.ServletHandler","nativeMethod":false},{"methodName":"handle","fileName":"SecurityHandler.java","lineNumber":216,"className":"org.mortbay.jetty.security.SecurityHandler","nativeMethod":false},{"methodName":"handle","fileName":"SessionHandler.java","lineNumber":182,"className":"org.mortbay.jetty.servlet.SessionHandler","nativeMethod":false},{"methodName":"handle","fileName":"ContextHandler.java","lineNumber":766,"className":"org.mortbay.jetty.handler.ContextHandler","nativeMethod":false},{"methodName":"handle","fileName":"WebAppContext.java","lineNumber":418,"className":"org.mortbay.jetty.webapp.WebAppContext","nativeMethod":false},{"methodName":"handle","fileName":"ContextHandlerCollection.java","lineNumber":230,"className":"org.mortbay.jetty.handler.ContextHandlerCollection","nativeMethod":false},{"methodName":"handle","fileName":"HandlerCollection.java","lineNumber":114,"className":"org.mortbay.jetty.handler.HandlerCollection","nativeMethod":false},{"methodName":"handle","fileName":"HandlerWrapper.java","lineNumber":152,"className":"org.mortbay.jetty.handler.HandlerWrapper","nativeMethod":false},{"methodName":"handle","fileName":"Server.java","lineNumber":326,"className":"org.mortbay.jetty.Server","nativeMethod":false},{"methodName":"handleRequest","fileName":"HttpConnection.java","lineNumber":542,"className":"org.mortbay.jetty.HttpConnection","nativeMethod":false},{"methodName":"content","fileName":"HttpConnection.java","lineNumber":943,"className":"org.mortbay.jetty.HttpConnection$RequestHandler","nativeMethod":false},{"methodName":"parseNext","fileName":"HttpParser.java","lineNumber":756,"className":"org.mortbay.jetty.HttpParser","nativeMethod":false},{"methodName":"parseAvailable","fileName":"HttpParser.java","lineNumber":218,"className":"org.mortbay.jetty.HttpParser","nativeMethod":false},{"methodName":"handle","fileName":"HttpConnection.java","lineNumber":404,"className":"org.mortbay.jetty.HttpConnection","nativeMethod":false},{"methodName":"run","fileName":"SelectChannelEndPoint.java","lineNumber":410,"className":"org.mortbay.io.nio.SelectChannelEndPoint","nativeMethod":false},{"methodName":"run","fileName":"QueuedThreadPool.java","lineNumber":582,"className":"org.mortbay.thread.QueuedThreadPool$PoolThread","nativeMethod":false}],"message":"The target server failed to respond","localizedMessage":"The target server failed to respond","suppressed":[]}"
}
I've also narrowed the problem down to this:
http://stackoverflow.com/questions/10558791/apache-httpclient-interim-error-nohttpresponseexception
Can you please add a shutdown method for the platform.
So that after all agents have been destroyed, the platform can be destroyed as well.
TIA
Suki.
It would be nice to have the @Access(tag="...")
value in the agent's JSON-RPC meta data provided via getMethods()
Currently the file-context is not thread-safe, leading to dataloss if multiple threads access the context simultaneous.
Given that I would like to have agent states persist beyond the AgentServlet lifetime, a JDBCStateFactory, preferable based on Java Persistence API 2.0, would be much appreciated :-)
During the development of our Android app Standby we now and than see errors which we cannot trace to our own code/implementation ('NoClassDefFoundError'). We're wondering if any one has seen these errors as wel before and maybe even know how we can fix this.
At this point even we are unable to reproduce this when we want to. For now it seems to happen at random for us (we didn't figure out yet what actually triggers these errors).
Error seen during testing on:
EVE version: 2.1.0-SNAPSHOT
Stacktrace:
01-02 09:15:18.915: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy4.getParentGroups(Native Method)
at com.askcs.standby.modules.groups.GroupsMembersRefreshRunnable.runAgent(GroupsMembersRefreshRunnable.java:35)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
01-02 09:15:19.015: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy4.getParentMonitorsWithBalance(Native Method)
at com.askcs.standby.modules.groups.GroupsOverviewRefreshRunnable.runAgent(GroupsOverviewRefreshRunnable.java:29)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
01-02 09:15:19.100: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy7.getSlotsCombined(Native Method)
at com.askcs.standby.agent.StandByAgent.getSlotsCombined(StandByAgent.java:345)
at com.askcs.standby.modules.agenda.SlotRefreshRunnable.runAgent(SlotRefreshRunnable.java:42)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
01-02 09:15:19.180: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy8.getMonitorAgents2(Native Method)
at com.askcs.standby.agent.StandByAgent.refreshAssemblies(StandByAgent.java:306)
at com.askcs.standby.modules.current.AssemblyRefreshRunnable.runAgent(AssemblyRefreshRunnable.java:22)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
01-02 09:15:19.400: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy9.getAllQuestions(Native Method)
at com.askcs.standby.modules.messages.AlertRefreshRunnable.runAgent(AlertRefreshRunnable.java:41)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
01-02 09:15:19.600: ERROR/com.askcs.standby.agent.AgentRunnable(3727): Agent runnable caught
java.lang.NoClassDefFoundError: com/almende/util/uuid/UUIDGen
at com.almende.util.uuid.UUID.(UUID.java:81)
at com.almende.eve.rpc.jsonrpc.JSONRPC.createRequest(JSONRPC.java:508)
at com.almende.eve.agent.AgentHost$1.invoke(AgentHost.java:198)
at $Proxy10.getAllMessages(Native Method)
at com.askcs.standby.modules.messages.MessageRefreshRunnable.runAgent(MessageRefreshRunnable.java:62)
at com.askcs.standby.agent.AgentRunnable.run(AgentRunnable.java:95)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.os.HandlerThread.run(HandlerThread.java:60)
When opening the webinterface of an agent. I get the following error:
sep 27, 2013 1:50:21 PM com.almende.eve.rpc.jsonrpc.JSONRPC _describe
WARNING: Failed to describe class
java.lang.NullPointerException
at com.almende.eve.rpc.jsonrpc.JSONRPC._describe(JSONRPC.java:231)
at com.almende.eve.rpc.jsonrpc.JSONRPC._describe(JSONRPC.java:265)
at com.almende.eve.rpc.jsonrpc.JSONRPC.describe(JSONRPC.java:291)
at com.almende.eve.agent.AgentHost.getMethods(AgentHost.java:741)
at com.almende.eve.agent.Agent.getMethods(Agent.java:266)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
It doesn't matter if I use the JSONFileStateFactory.
Can we release 2.2.1?
The latest EVE version (2.2.0_release branch) contains a method/class which is available in Java since version 1.7. Most Android devices, except the newest ones, use Java 1.6 though.
A Fatal Exception/IllegalAccessError is thrown when starting up an app using this EVE version where the Android version is below 4.4. Currently it's only working for my Nexus 5, where Samsung SII devices will fail to start (instant error after startup).
The stacktrace:
04-01 11:02:01.904: E/AndroidRuntime(7743): FATAL EXCEPTION: com.askcs.alarmapp.bhv.EveService
04-01 11:02:01.904: E/AndroidRuntime(7743): java.lang.ExceptionInInitializerError
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.AgentHostDefImpl.getCallbackQueue(AgentHostDefImpl.java:874)
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.Agent.constr(Agent.java:139)
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.AgentHostDefImpl.getAgent(AgentHostDefImpl.java:171)
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.AgentHostDefImpl.signalAgents(AgentHostDefImpl.java:109)
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.AgentHostDefImpl.setStateFactory(AgentHostDefImpl.java:620)
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.askcs.alarmapp.bhv.EveService$1.run(EveService.java:129)
04-01 11:02:01.904: E/AndroidRuntime(7743): at android.os.Handler.handleCallback(Handler.java:615)
04-01 11:02:01.904: E/AndroidRuntime(7743): at android.os.Handler.dispatchMessage(Handler.java:92)
04-01 11:02:01.904: E/AndroidRuntime(7743): at android.os.Looper.loop(Looper.java:137)
04-01 11:02:01.904: E/AndroidRuntime(7743): at android.os.HandlerThread.run(HandlerThread.java:60)
04-01 11:02:01.904: E/AndroidRuntime(7743): Caused by: java.lang.IllegalAccessError: tried to access method java.util.concurrent.ScheduledThreadPoolExecutor.setRemoveOnCancelPolicy:()V from class com.almende.eve.agent.callback.AsyncCallbackQueue
04-01 11:02:01.904: E/AndroidRuntime(7743): at com.almende.eve.agent.callback.AsyncCallbackQueue.<clinit>(AsyncCallbackQueue.java:27)
04-01 11:02:01.904: E/AndroidRuntime(7743): ... 10 more
Line 129 in our EveService.java code:
_host.setStateFactory(new FileStateFactory(params));
It seems like the AsyncCallbackQueue is used somewhere internally here, which triggers the following code to be called in AsyncCallbackQueue.java on line 27
scheduler.setRemoveOnCancelPolicy(true);
... and this method exists only since Java 1.7.
Let me know if you need an APK/source for reproducing this.
We already tried to (partically) recreate the setRemoveOnCancelPolicy by extending this call. We couldn't get this done due to must restrictions on the code (private/protected methods/vars)
Also setting the JDK compiler to 1.7 did not fix the issue on onder Android devices.
Hi,
I think there is a problem with the constructor
JSONRPC(CODE, String, Throwable)
This calls the super-constructor with description and throwable (second and third) argument but then also passes the throwable into the init( CODE, String, Throwable )
method, which will attempt to call initCause( throwable )
but that results in a IllegalStateException
. From the java docs for initCause
:
IllegalStateException
- if this throwable was created with Throwable(Throwable)
or Throwable(String,Throwable)
, or this method has already been called on this throwable.
So it looks like if we call the super-class constructor with an exception or throwable then we can't call initCause. Which makes sense, I think, probably the solution is to never pass the throwable argument to the superclass constructor but always let the init
function initialize the cause.
I have an Eve agent with a method having two parameters, both of which have the @required(false) annotation. However if I fire a RPC call with empty parameter object (e.g., by not filling in either value in the web form) then I get an error saying that the second parameter (index 1) must not be null.
Browsing superficially through the code I think the problem may be that the JSON parameter object is mapped to an Object[] by the time JSONRPC.createRequest() is invoked. Apparently this is done based on order/index rather of the various params rather than their names.
I would think this @name annotation should make it possible to allow "gaps" in the parameter list?
Either way it might be dangerous to map based on the order/index of parameters, because afaik JSON doesn't make guarantees about this.
Thanks for taking a look!
Running three interdependent eve-core-1.0.2 agent servlets in Tomcat 7.0.30 (even with JRE args "-Xmx512m -XX:MaxPermSize=128m"), I get PermGen memory errors at various points during execution, almost right from the start:
Exception in thread "http-bio-8080-exec-5" java.lang.OutOfMemoryError: PermGen space
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:63)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:399)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:396)
at java.security.AccessController.doPrivileged(Native Method)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:395)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:113)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:331)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1356)
at java.io.ObjectStreamClass.access$1500(ObjectStreamClass.java:69)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:455)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.(ObjectStreamClass.java:455)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:352)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:589)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1601)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1964)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1888)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
at com.almende.eve.state.ConcurrentFileState.read(ConcurrentFileState.java:139)
at com.almende.eve.state.ConcurrentFileState.get(ConcurrentFileState.java:232)
at com.almende.eve.state.AbstractState.getAgentType(AbstractState.java:60)
at com.almende.eve.agent.AgentFactory.getAgent(AgentFactory.java:268)
at com.almende.eve.agent.AgentFactory.invoke(AgentFactory.java:474)
at com.almende.eve.transport.http.AgentServlet.doPost(AgentServlet.java:145)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
I created two agents right after each other. When trying to set the xmpp account I complains it already has a username and password:
Compare:'merlin'/'merlin' to 'henk'/'askask'
I tried tracing when it goes wrong, but it happens somewhere where the file is created for the agent. FileStateFactory:98
When data is stored in context of an agent and the agent is neatly destroyed the agent isn't made persistent. Because if I terminate the gae and restart it again (locally). The data is gone.
My suspisicion is that it is the default delay of GAE to make the data persistent is the in the way.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.