Hi,<br><br>I am following below article to call drools server with a client. I met a Marshaller issue.<br><br><a href="http://www.plugtree.com/?p=469">http://www.plugtree.com/?p=469</a><br><br>I found that <a href="http://www.jboss.com/products/rules/drools-api/apidocs/org/drools/command/BatchExecutionCommand.html" title="class or interface in org.drools.command">BatchExecutionCommand</a> is changed to BatchExecutionCommandImpl<br>
<br>when I call<br> jaxbContext = DroolsJaxbContextHelper.createDroolsJaxbContext(myDomainClasses, null);<br><br>errors happen.<br><br>java.lang.Error: Unresolved compilation problem: <br><br>    at org.plugtree.drools.server.util.DroolsJaxbContextHelper.createDroolsJaxbContext(DroolsJaxbContextHelper.java:75)<br>
    at org.plugtree.drools.server.DroolsServerTest.testDroolsServer(DroolsServerTest.java:75)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>    at java.lang.reflect.Method.invoke(Method.java:597)<br>    at junit.framework.TestCase.runTest(TestCase.java:168)<br>    at junit.framework.TestCase.runBare(TestCase.java:134)<br>
    at junit.framework.TestResult$1.protect(TestResult.java:110)<br>    at junit.framework.TestResult.runProtected(TestResult.java:128)<br>    at junit.framework.TestResult.run(TestResult.java:113)<br>    at junit.framework.TestCase.run(TestCase.java:124)<br>
    at junit.framework.TestSuite.runTest(TestSuite.java:232)<br>    at junit.framework.TestSuite.run(TestSuite.java:227)<br>    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)<br>    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)<br>
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br>
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br><br><br>If I use below sentence<br>
String xmlReq = BatchExecutionHelper.newXStreamMarshaller().toXML(cmd);<br>The error information is<br><br>java.lang.NullPointerException<br>    at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeText(PrettyPrintWriter.java:203)<br>
    at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeAttributeValue(PrettyPrintWriter.java:195)<br>    at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.addAttribute(PrettyPrintWriter.java:190)<br>    at com.thoughtworks.xstream.io.WriterWrapper.addAttribute(WriterWrapper.java:41)<br>
    at org.drools.runtime.help.impl.XStreamXML$InsertConverter.marshal(XStreamXML.java:119)<br>    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)<br>    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)<br>
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)<br>    at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.writeItem(AbstractCollectionConverter.java:64)<br>
    at com.thoughtworks.xstream.converters.collections.CollectionConverter.marshal(CollectionConverter.java:55)<br>    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)<br>
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)<br>    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)<br>    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter$2.visit(AbstractReflectionConverter.java:115)<br>
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:129)<br>    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.doMarshal(AbstractReflectionConverter.java:100)<br>
    at com.thoughtworks.xstream.converters.reflection.AbstractReflectionConverter.marshal(AbstractReflectionConverter.java:58)<br>    at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:68)<br>
    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:78)<br>    at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:63)<br>    at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:98)<br>
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:38)<br>    at com.thoughtworks.xstream.XStream.marshal(XStream.java:837)<br>    at com.thoughtworks.xstream.XStream.marshal(XStream.java:826)<br>
    at com.thoughtworks.xstream.XStream.toXML(XStream.java:801)<br>    at com.thoughtworks.xstream.XStream.toXML(XStream.java:789)<br>    at org.plugtree.drools.server.DroolsServerTest.testDroolsServer(DroolsServerTest.java:81)<br>
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
    at java.lang.reflect.Method.invoke(Method.java:597)<br>    at junit.framework.TestCase.runTest(TestCase.java:168)<br>    at junit.framework.TestCase.runBare(TestCase.java:134)<br>    at junit.framework.TestResult$1.protect(TestResult.java:110)<br>
    at junit.framework.TestResult.runProtected(TestResult.java:128)<br>    at junit.framework.TestResult.run(TestResult.java:113)<br>    at junit.framework.TestCase.run(TestCase.java:124)<br>    at junit.framework.TestSuite.runTest(TestSuite.java:232)<br>
    at junit.framework.TestSuite.run(TestSuite.java:227)<br>    at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)<br>    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)<br>
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br>
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br>    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)<br><br><br>How can I Marshaller the command?<br>
<br>BR<br>Xinhua<br><br><br><br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 9:50 PM, Xinhua Zhu <span dir="ltr">&lt;<a href="mailto:xhzhu@it.uts.edu.au">xhzhu@it.uts.edu.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
oh, thanks.<br><br>If you replace <br>address=&quot;/kservice/rest&quot; <br>with <br>address=&quot;/rest&quot;<br><br>in camel-server.xml<br><br>there should be only one &quot;kservice&quot; is ok.<br><br>br<br><font color="#888888">xinhua</font><div>
<div></div><div class="h5"><br>
<br><br><div class="gmail_quote">On Thu, Oct 14, 2010 at 5:24 PM, Ji Oh Yoo <span dir="ltr">&lt;<a href="mailto:jioh.yoo.dev@gmail.com" target="_blank">jioh.yoo.dev@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
hmm.. I just found the answer: in camel-client.xml, make your to uri to:<br>
<br>
&lt;to<br>
uri=&quot;cxfrs://<a href="http://localhost:8080/drools-server-app/kservice/kservice/rest" target="_blank">http://localhost:8080/drools-server-app/kservice/kservice/rest</a>&quot;/&gt;<br>
instead of just one &quot;kservice&quot;.<br>
<br>
And I am not sure why the kservice is written twice.<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-drools-server-tp1698427p1699021.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Question-about-drools-server-tp1698427p1699021.html</a><br>


</font><div><div></div><div>Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>