<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
<title>IIDS forum</title>
<link>http://www.agentscape.org/forums</link>
<description> IIDS forum</description>
<language>en</language>
<docs>http://backend.userland.com/rss</docs>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=259#259</link>
<guid isPermaLink="false">259@http://www.agentscape.org/forums</guid>
<description>Yes, yes, yes! It's finally working! :)Not the most elegant solution, but it works... that's good enough for now.Thank you!Ben

</description>
<content:encoded><![CDATA[<p>Yes, yes, yes! It's finally working! :)<br /><br />Not the most elegant solution, but it works... that's good enough for now.<br /><br />Thank you!<br />Ben</p>]]></content:encoded>
<pubDate>Sat, 13 Mar 2010 00:51:55 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=258#258</link>
<guid isPermaLink="false">258@http://www.agentscape.org/forums</guid>
<description>Ah!That is exactly what is going wrong there. Very clever.The deserialization is done using the context class loader from the current thread. This fails when running as a servlet (the thread that does the invocation is from the agent server).Seeing as this problem is caused by AgentScape, I think we should fix this, but I'm not sure when we will do this.A quick fix for you may be to set the context class loader manually at the start of doGet(). This should of course be done automatically by agentscape.

Code:protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
  ClassLoader original = Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(MyServlet.class.getClassLoader());

  // do the work
  // ...

  // when finished put back the original classloader
  Thread.currentThread().setContextClassLoader(original);
}

This seems to work for me..Good luck!Reinier

</description>
<content:encoded><![CDATA[<p>Ah!<br />That is exactly what is going wrong there. Very clever.<br /><br />The deserialization is done using the context class loader from the current thread. This fails when running as a servlet (the thread that does the invocation is from the agent server).<br /><br />Seeing as this problem is caused by AgentScape, I think we should fix this, but I'm not sure when we will do this.<br /><br />A quick fix for you may be to set the context class loader manually at the start of doGet(). This should of course be done automatically by agentscape.<br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 19.5em"><pre>protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
  ClassLoader original = Thread.currentThread().getContextClassLoader();
  Thread.currentThread().setContextClassLoader(MyServlet.class.getClassLoader());

  // do the work
  // ...

  // when finished put back the original classloader
  Thread.currentThread().setContextClassLoader(original);
}</pre></div></div></div><p>This seems to work for me..<br /><br />Good luck!<br />Reinier</p>]]></content:encoded>
<pubDate>Fri, 12 Mar 2010 15:08:44 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=257#257</link>
<guid isPermaLink="false">257@http://www.agentscape.org/forums</guid>
<description>Hi again,I have finally pinpointed the problem which I have been having. The difference to your example was that I was trying to call the proxy from within a HttpServlet which the source agent publishes (see attached modified example).Excerpt from the log file:

Code:Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
putTestSimple(): Received input Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
received simple reply: Reply from CE0CCEE33BA9583A8E6FDD25D915B468E58321CD to test input
putTest(): Received input Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
java.lang.ClassNotFoundException: examples.proxyservlet.lib.Test
[...]

Function putTestSimple() is the same as putTest() but it returns a String instead of a Test object. So the creation of the proxy object works, the proxy method is executed successfully and the return value is sent to the source agent; it fails when it tries to unserialize the value.So my guess at this point is that the problem has something to do with the thread in which the servlet (or servlet container?) is running... I haven't investigated this yet, but if this is the case then I can probably solve the problem by creating a custom thread for issuing proxy calls; I would rather avoid having to create this &#34;extra layer&#34; though, if somehow possible...Can you offer any ideas or comments on this, Reinier?Cheers,Ben

</description>
<content:encoded><![CDATA[<p>Hi again,<br /><br />I have finally pinpointed the problem which I have been having. The difference to your example was that I was trying to call the proxy from within a HttpServlet which the source agent publishes (see attached modified example).<br /><br />Excerpt from the log file:<br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 12em"><pre>Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
putTestSimple(): Received input Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
received simple reply: Reply from CE0CCEE33BA9583A8E6FDD25D915B468E58321CD to test input
putTest(): Received input Test Message from source 69D712083C5FE807F2C890E8D8AC8A39C0AE20FC to CE0CCEE33BA9583A8E6FDD25D915B468E58321CD
java.lang.ClassNotFoundException: examples.proxyservlet.lib.Test
[...]</pre></div></div></div><p>Function putTestSimple() is the same as putTest() but it returns a String instead of a Test object. <br />So the creation of the proxy object works, the proxy method is executed successfully and the return value is sent to the source agent; it fails when it tries to unserialize the value.<br /><br />So my guess at this point is that the problem has something to do with the thread in which the servlet (or servlet container?) is running... I haven't investigated this yet, but if this is the case then I can probably solve the problem by creating a custom thread for issuing proxy calls; I would rather avoid having to create this &quot;extra layer&quot; though, if somehow possible...<br /><br />Can you offer any ideas or comments on this, Reinier?<br /><br />Cheers,<br />Ben</p>]]></content:encoded>
<pubDate>Fri, 12 Mar 2010 13:15:50 +0100</pubDate>
</item>
<item>
<title>Classpath problems in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=256#256</link>
<guid isPermaLink="false">256@http://www.agentscape.org/forums</guid>
<description>Ah fantastic, thanks Michel!I knew it would be something simple like that!Cheers,Tim

</description>
<content:encoded><![CDATA[<p>Ah fantastic, thanks Michel!<br /><br />I knew it would be something simple like that!<br /><br />Cheers,<br /><br />Tim</p>]]></content:encoded>
<pubDate>Thu, 11 Mar 2010 12:56:10 +0100</pubDate>
</item>
<item>
<title>Classpath problems in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=255#255</link>
<guid isPermaLink="false">255@http://www.agentscape.org/forums</guid>
<description>Hi Tim,You should put your libraries in .../src/lib not .../libThe ant-build process will copy them from src/lib to lib and also add src/lib to the classpathwhile compiling AgentScape.Good luck,Michel

</description>
<content:encoded><![CDATA[<p>Hi Tim,<br /><br />You should put your libraries in .../src/lib not .../lib<br /><br />The ant-build process will copy them from src/lib to lib and also add src/lib to the classpath<br />while compiling AgentScape.<br /><br />Good luck,<br />Michel</p>]]></content:encoded>
<pubDate>Thu, 11 Mar 2010 10:10:20 +0100</pubDate>
</item>
<item>
<title>Classpath problems in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=254#254</link>
<guid isPermaLink="false">254@http://www.agentscape.org/forums</guid>
<description>Hi,I'm building a servlet for an agent which allows the user to upload a file to the agent.&#160; As you probably know the native Java servlet API doesn't handle multipart forms, so I'm trying to use the Apache Commons fileupload and io libraries.With other 3rd-party libraries I've used in AgentScape I have simply copied the jar to the lib/ directory and updated the agentscape-common.mf manifest, however when I did this for the fileupload and io libraries I received an error such as this:

Code:    [javac] Compiling 1 source file to /home/tim/AgentScape/build/classes
    [javac] /home/tim/AgentScape/src/java/org/project/web/scoreServlet.java:14: package org.apache.commons.fileupload.servlet does not exist
    [javac] import org.apache.commons.fileupload.servlet.*;

I'm probably missing something obvious here, so I've attached my agentscape-common.mf if it's any help.Any help you can give me would be fantastic,All the best,Tim

</description>
<content:encoded><![CDATA[<p>Hi,<br /><br />I'm building a servlet for an agent which allows the user to upload a file to the agent.&nbsp; As you probably know the native Java servlet API doesn't handle multipart forms, so I'm trying to use the Apache Commons fileupload and io libraries.<br /><br />With other 3rd-party libraries I've used in AgentScape I have simply copied the jar to the lib/ directory and updated the agentscape-common.mf manifest, however when I did this for the fileupload and io libraries I received an error such as this:<br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 7.5em"><pre>    [javac] Compiling 1 source file to /home/tim/AgentScape/build/classes
    [javac] /home/tim/AgentScape/src/java/org/project/web/scoreServlet.java:14: package org.apache.commons.fileupload.servlet does not exist
    [javac] import org.apache.commons.fileupload.servlet.*;</pre></div></div></div><p>I'm probably missing something obvious here, so I've attached my agentscape-common.mf if it's any help.<br /><br />Any help you can give me would be fantastic,<br /><br />All the best,<br /><br />Tim</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 23:03:13 +0100</pubDate>
</item>
<item>
<title>Servlet questions in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=253#253</link>
<guid isPermaLink="false">253@http://www.agentscape.org/forums</guid>
<description>Hi again,I have a few questions about servlets in agentscape...1) Is it possible to add some &#34;top level&#34; url which would redirect to an agent's servlet? I mean for example to be able to say that `http://lookupserver/MySuperServlet´should automatically serve the servlet from a certain agent. This would make it much easier to remember a servlet url, as it doesn't change each time I restart an agent...2) I have one servlet which takes a bit longer to compute it's response (depending on the POST data a few seconds or more); if I try and access a different servlet while the first servlet request is still &#34;running&#34; then it seems to mess up the two http requests; the second request receives the response from the first (as soon as the first is finished), and the first one never finishes loading... I hope this is not too confusing ;-) middleware.log logs this message:

Code:2010-03-10 19:42:21,034 ERROR [btpool0-1] &#60;&#62; communicator.SystemServiceProxy (SystemServiceProxy.java:308) - NO ONE WAITING FOR REPLY REFID 48

Thanks,Benedit: I've attached the code which I used for testing...

</description>
<content:encoded><![CDATA[<p>Hi again,<br /><br />I have a few questions about servlets in agentscape...<br /><br />1) Is it possible to add some &quot;top level&quot; url which would redirect to an agent's servlet? I mean for example to be able to say that `http://lookupserver/MySuperServlet´<br />should automatically serve the servlet from a certain agent. This would make it much easier to remember a servlet url, as it doesn't change each time I restart an agent...<br /><br />2) I have one servlet which takes a bit longer to compute it's response (depending on the POST data a few seconds or more); if I try and access a different servlet while the first servlet request is still &quot;running&quot; then it seems to mess up the two http requests; the second request receives the response from the first (as soon as the first is finished), and the first one never finishes loading... <br />I hope this is not too confusing ;-) middleware.log logs this message:<br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 4.5em"><pre>2010-03-10 19:42:21,034 ERROR [btpool0-1] &lt;&gt; communicator.SystemServiceProxy (SystemServiceProxy.java:308) - NO ONE WAITING FOR REPLY REFID 48</pre></div></div></div><p>Thanks,<br />Ben<br /><br />edit: I've attached the code which I used for testing...</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 21:09:20 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=252#252</link>
<guid isPermaLink="false">252@http://www.agentscape.org/forums</guid>
<description>Thank you for the example! I thought my agents were set up pretty much the same way, but I must be missing something... they are still not working while your example and a few more complicated modified versions of it are running just fine. I use netbeans' build script for the jar-file building process, so I probably have an error in there somewhere... The following is what I add in `build.xml´ and for your example this also works (I created one project for each agent, put the library files into the target agent's project and added respective library dependencies). In order for the manifest to be constructed properly main.class needs to be set in the project properties. 

Code:    &#60;property name=&#34;store.dir&#34; value=&#34;../../AgentScape/agentlib&#34;/&#62;
    &#60;target name=&#34;-post-jar&#34;&#62;
        &#60;copy todir=&#34;${store.dir}&#34;&#62;
            &#60;fileset dir=&#34;${dist.dir}&#34;/&#62;
        &#60;/copy&#62;
    &#60;/target&#62;

Thanks again for your help!

</description>
<content:encoded><![CDATA[<p>Thank you for the example! I thought my agents were set up pretty much the same way, but I must be missing something... they are still not working while your example and a few more complicated modified versions of it are running just fine. <br /><br />I use netbeans' build script for the jar-file building process, so I probably have an error in there somewhere... The following is what I add in `build.xml´ and for your example this also works (I created one project for each agent, put the library files into the target agent's project and added respective library dependencies). In order for the manifest to be constructed properly main.class needs to be set in the project properties. <br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 12em"><pre>    &lt;property name=&quot;store.dir&quot; value=&quot;../../AgentScape/agentlib&quot;/&gt;
    &lt;target name=&quot;-post-jar&quot;&gt;
        &lt;copy todir=&quot;${store.dir}&quot;&gt;
            &lt;fileset dir=&quot;${dist.dir}&quot;/&gt;
        &lt;/copy&gt;
    &lt;/target&gt;</pre></div></div></div><p>Thanks again for your help!</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 18:31:14 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=251#251</link>
<guid isPermaLink="false">251@http://www.agentscape.org/forums</guid>
<description>For what it's worth, this is the example code that I used.Unzip it in the agentscape root dir, and copy the contents from build.part.xml to build.xmlGood luck!

</description>
<content:encoded><![CDATA[<p>For what it's worth, this is the example code that I used.<br /><br />Unzip it in the agentscape root dir, and copy the contents from build.part.xml to build.xml<br /><br />Good luck!</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 11:34:52 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=250#250</link>
<guid isPermaLink="false">250@http://www.agentscape.org/forums</guid>
<description>Hello,unfortunately I have been unable to reproduce your problem.I created two agents, which both use an external library (in agentlib/lib).Sending an object from one agent to another (where the object bytecode is supplied by the library) using an AgentProxy did not produce any errors.I fear that I have no further ideas as to what could be the cause of your problem, so maybe you could supply me with more details about the setup/libraries of your agent?

</description>
<content:encoded><![CDATA[<p>Hello,<br /><br />unfortunately I have been unable to reproduce your problem.<br /><br />I created two agents, which both use an external library (in agentlib/lib).<br />Sending an object from one agent to another (where the object bytecode is supplied by the library) using an AgentProxy did not produce any errors.<br /><br />I fear that I have no further ideas as to what could be the cause of your problem, so maybe you could supply me with more details about the setup/libraries of your agent?</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 11:27:30 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=249#249</link>
<guid isPermaLink="false">249@http://www.agentscape.org/forums</guid>
<description>Just to make sure we are not missing anything, instantiating the class uk.ac.bath.cs.energydata.entities.Test using 'new Test()' or similar is working? It is only the deserialization that is not working?

Yes, that's working. Thank you very much for having a look at this!Cheers,Ben

</description>
<content:encoded><![CDATA[<blockquote><div class="incqbox"><p>Just to make sure we are not missing anything, instantiating the class uk.ac.bath.cs.energydata.entities.Test using 'new Test()' or similar is working? It is only the deserialization that is not working?</p></div></blockquote><p>Yes, that's working. <br /><br />Thank you very much for having a look at this!<br /><br />Cheers,<br />Ben</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 10:19:03 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=248#248</link>
<guid isPermaLink="false">248@http://www.agentscape.org/forums</guid>
<description>Hi Ben,if any of the libraries cannot be found then your agent would not even be able to start. So, the class path entries (and subdirectories) should be fine.We have had a look at the stack trace and will try to localize the problem.Just to make sure we are not missing anything, instantiating the class uk.ac.bath.cs.energydata.entities.Test using 'new Test()' or similar is working? It is only the deserialization that is not working?I will try to test a similar case and see what I can find.Cheers!Reinier

</description>
<content:encoded><![CDATA[<p>Hi Ben,<br /><br />if any of the libraries cannot be found then your agent would not even be able to start. So, the class path entries (and subdirectories) should be fine.<br /><br />We have had a look at the stack trace and will try to localize the problem.<br /><br /><br />Just to make sure we are not missing anything, instantiating the class uk.ac.bath.cs.energydata.entities.Test using 'new Test()' or similar is working? It is only the deserialization that is not working?<br /><br /><br />I will try to test a similar case and see what I can find.<br /><br />Cheers!<br />Reinier</p>]]></content:encoded>
<pubDate>Wed, 10 Mar 2010 10:15:57 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=247#247</link>
<guid isPermaLink="false">247@http://www.agentscape.org/forums</guid>
<description>The test class is not directly embedded in the agent jar file, but inside a referenced jar library. The library jar is in agentlib/lib/library.jar and the agent manifest references it as lib/library.jar... Having it in a subdirectory (lib) shouldn't matter, right?

</description>
<content:encoded><![CDATA[<p>The test class is not directly embedded in the agent jar file, but inside a referenced jar library. The library jar is in agentlib/lib/library.jar and the agent manifest references it as lib/library.jar... Having it in a subdirectory (lib) shouldn't matter, right?</p>]]></content:encoded>
<pubDate>Mon, 08 Mar 2010 15:48:17 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=246#246</link>
<guid isPermaLink="false">246@http://www.agentscape.org/forums</guid>
<description>Hello,each agent receives a special class loader so it sometimes has a little bit of problems using auxiliary classes. However, if using the classes under normal circumstances (regular program code) is not a problem, then it seems strange that the unmarshalling fails to find the class.The proxy/envelope should use the context class loader (the class loader for the current thread) when reading objects.This one should be the URL class loader setup for the agent. As there is an URL class loader in the stack trace, it seems that the correct class loader is used.Is the class that you try to load (uk.ac.bath.cs.energydata.entities.Test) embedded in the agent jar file?If it is not, then you should put a reference to this library in the jar manifest (and make sure the library is present in either the lib/ or agentlib/ directory).Good luck!Reinier

</description>
<content:encoded><![CDATA[<p>Hello,<br /><br />each agent receives a special class loader so it sometimes has a little bit of problems using auxiliary classes. However, if using the classes under normal circumstances (regular program code) is not a problem, then it seems strange that the unmarshalling fails to find the class.<br /><br />The proxy/envelope should use the context class loader (the class loader for the current thread) when reading objects.This one should be the URL class loader setup for the agent. As there is an URL class loader in the stack trace, it seems that the correct class loader is used.<br /><br />Is the class that you try to load (uk.ac.bath.cs.energydata.entities.Test) embedded in the agent jar file?<br /><br />If it is not, then you should put a reference to this library in the jar manifest (and make sure the library is present in either the lib/ or agentlib/ directory).<br /><br />Good luck!<br /><br />Reinier</p>]]></content:encoded>
<pubDate>Mon, 08 Mar 2010 14:45:19 +0100</pubDate>
</item>
<item>
<title>Problem with JarClassLoader and File.separatorChar in AgentScape : Trouble Shooting</title>
<link>http://www.agentscape.org/forums/viewtopic.php?pid=245#245</link>
<guid isPermaLink="false">245@http://www.agentscape.org/forums</guid>
<description>Thanks, no worries. I experimented a bit with the webservice stuff but eventually decided against using it...Instead I've looked at the AgentProxyHandler example and tried to implement that... Following the example this is working nicely now, the only problem I have is a ClassNotFound exception which I get when I try to send my own classes via the proxy; primitive types and serializable java classes work fine.

Code:java.lang.ClassNotFoundException: uk.ac.bath.cs.energydata.entities.Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.iids.aos.util.MyObjectInputStream.resolveClass(MyObjectInputStream.java:51)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at org.iids.aos.util.Marshaller.unmarshallObject(Marshaller.java:331)
    at org.iids.aos.messagecenter.Envelope.readObject(Envelope.java:429)
    at org.iids.aos.messagecenter.Envelope.getData(Envelope.java:300)
    at org.iids.aos.messagecenter.Envelope.getData(Envelope.java:276)
    at org.iids.aos.agent.proxy.AgentProxy.receiveReply(AgentProxy.java:529)
    at org.iids.aos.agent.proxy.AgentProxy.waitForReply(AgentProxy.java:464)
    at org.iids.aos.agent.proxy.AgentProxy.invoke(AgentProxy.java:185)
    at org.iids.aos.agent.proxy.AgentProxy.invoke(AgentProxy.java:664)
    ...

I have the respective Class available in both agents (for the 2nd one it is contained in an imported library) and I can use it in my agent code without problem; it's only the object deserialization which isn't work... Any tipps? Cheers,Ben

</description>
<content:encoded><![CDATA[<p>Thanks, no worries. I experimented a bit with the webservice stuff but eventually decided against using it...<br /><br />Instead I've looked at the AgentProxyHandler example and tried to implement that... Following the example this is working nicely now, the only problem I have is a ClassNotFound exception which I get when I try to send my own classes via the proxy; primitive types and serializable java classes work fine.<br /><br /></p><div class="codebox"><div class="incqbox"><h4>Code:</h4><div class="scrollbox" style="height: 35em"><pre>java.lang.ClassNotFoundException: uk.ac.bath.cs.energydata.entities.Test
    at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.iids.aos.util.MyObjectInputStream.resolveClass(MyObjectInputStream.java:51)
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1575)
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1667)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1323)
    at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
    at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
    at org.iids.aos.util.Marshaller.unmarshallObject(Marshaller.java:331)
    at org.iids.aos.messagecenter.Envelope.readObject(Envelope.java:429)
    at org.iids.aos.messagecenter.Envelope.getData(Envelope.java:300)
    at org.iids.aos.messagecenter.Envelope.getData(Envelope.java:276)
    at org.iids.aos.agent.proxy.AgentProxy.receiveReply(AgentProxy.java:529)
    at org.iids.aos.agent.proxy.AgentProxy.waitForReply(AgentProxy.java:464)
    at org.iids.aos.agent.proxy.AgentProxy.invoke(AgentProxy.java:185)
    at org.iids.aos.agent.proxy.AgentProxy.invoke(AgentProxy.java:664)
    ...</pre></div></div></div><p>I have the respective Class available in both agents (for the 2nd one it is contained in an imported library) and I can use it in my agent code without problem; it's only the object deserialization which isn't work... Any tipps? <br /><br />Cheers,<br />Ben</p>]]></content:encoded>
<pubDate>Sun, 07 Mar 2010 10:58:51 +0100</pubDate>
</item>
</channel>
</rss>
