KnowledgeAgent and applyChangeSet

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

KnowledgeAgent and applyChangeSet

bob.breitling
If I have a KnowledgeAgent and I create a URL Resource and set its basicAuthenication, username and password attributes then I call the agents applyChangeSet method I get a HTTPD 401 response from the Guvnor.  It does not happen to my resourse which has a valid username and password, but it happens to the resource in the changeSet xml tag.

It would seem to me that the resources that are built from the resource I passed would inherit the basicAuthenication, username and password attributes that I set and know work, but they don't and I get this error.

If I debug the code and filling in those values on the resource passed to the createPackageFromResource method before the resource stream is read the code works.

I am using the NilAuthenicator in the Guvnor components.xml and that seems to be working.  I get access to the Guvnor without being asked for credentials.

I tried to configure my jboss (4.2.0) in login-config.xml to allow access to everything as guest.  But no luck.

Any suggestions?

Bob
Reply | Threaded
Open this post in threaded view
|

Re: KnowledgeAgent and applyChangeSet

Benson Fung-2
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: KnowledgeAgent and applyChangeSet

bob.breitling
Here is the JBOSS log entries when this happens:

14:19:24,314 INFO  [http-0.0.0.0-8080-1] [STDOUT] java.lang.RuntimeException: KnowledgeAgent exception while trying to deserialize KnowledgeDefinitionsPackage  
14:19:24,315 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:664)
14:19:24,316 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:889)
14:19:24,317 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)
14:19:24,318 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)
14:19:24,319 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
14:19:24,320 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)
.
.
.
14:19:24,378 INFO  [http-0.0.0.0-8080-1] [STDOUT] Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/drools-guvnor/org.drools.guvnor.Guvnor/package/com.rrd.xspace.drools/LATEST
14:19:24,379 INFO  [http-0.0.0.0-8080-1] [STDOUT] at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
14:19:24,380 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
14:19:24,380 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
14:19:24,381 INFO  [http-0.0.0.0-8080-1] [STDOUT] at org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:652)

Hope this is what you were looking for...

Bob
Reply | Threaded
Open this post in threaded view
|

Re: KnowledgeAgent and applyChangeSet

aps4u
Hello Bob, Did you solve this problem? I am new to BRMS, I am also getting the same error! Please help