[rules-users] regarding drools guvnor and eclipse IDE

Sai Nadh adisya.sai at gmail.com
Thu Oct 18 11:03:48 EDT 2012


thank you  very much sir,
but i am new to this environment, please  kindly help me

i am getting the following exceptions when i run the application, please
suggest me to overcome these exceptions



java.lang.RuntimeException: Unable to parse ChangeSet
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:448)
at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:180)
at
com.org.alert.test.SampleTestClass.createKnowledgeBase(SampleTestClass.java:82)
at com.org.alert.test.SampleTestClass.main(SampleTestClass.java:26)
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.http.HttpClient.New(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown
Source)
at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
at org.drools.io.impl.UrlResource.getReader(UrlResource.java:214)
at
org.drools.agent.impl.KnowledgeAgentImpl.getChangeSet(KnowledgeAgentImpl.java:446)
... 3 more


thanks in advance
regards
sainadh



On Thu, Oct 18, 2012 at 6:36 PM, Michael Anstis <michael.anstis at gmail.com>wrote:

> Do you receive any error messages?
>
> Did you look at the example I linked to last time?
>
> Change-sets need a UID and PWD in them (as per the example), however IIRC
> the one generated by Guvnor does not include them.
>
> There have been various work-arounds discussed on this mailing list
> before. Please feel free to seach for them.
>
> With kind regards,
>
> Mike
>
> On 18 October 2012 13:27, Sai Nadh <adisya.sai at gmail.com> wrote:
>
>>
>> How can i access the rules (which i have created in Drools Guvnor) to my
>> java application?
>> plz give me some example....
>>
>> i have tried with below code, is there any mistakes?? if yes pls
>> mention....
>>
>>
>> private static KnowledgeBase createKnowledgeBase() {
>>
>>  KnowledgeBase kbase = KnowledgeBaseFactory.newKnowledgeBase();
>>
>> KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
>> "MyAgent" );
>>
>> KnowledgeAgentConfiguration kaconf =
>> KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
>>
>> kaconf.setProperty( "drools.agent.scanDirectories", "false" );
>>
>> kagent.applyChangeSet( ResourceFactory.newUrlResource("
>> http://localhost:8080/guvnor/rest/packages/ProductPositionAlert/assets/change-set.xml/source")
>> );
>>
>> return   kbase;
>>
>>  }
>>
>>
>>
>> my guvnor package sanpshot details are
>>
>> [image: Inline image 2]
>>
>>
>> thanks in advance
>> --
>> *Regards*
>> * sainadh*
>>
>>
>> * *
>>
>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
*Regards*
*SAI BABA NADH*

+91 7411680125
* *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20121018/903d9264/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 135893 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20121018/903d9264/attachment-0001.png 


More information about the rules-users mailing list