[rules-users] how to get the pkg from guvnor by KnowledgeAgent?

ethan fisheep.yu at qq.com
Mon Feb 18 12:35:16 EST 2013


Dear all, I want to deploy pkg from guvnor by KnowledgeAgent. The code like
below:

    	KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent(
"MyAgent" );
    	kagent.applyChangeSet(
ResourceFactory.newUrlResource("http://localhost:8080/guvnor/org.drools.guvnor.Guvnor/package/test/LATEST/ChangeSet.xml")
);
    	KnowledgeBase kbase = kagent.getKnowledgeBase();

But I got an error from guvnor:

WARN  19-02 01:02:56,853 (RulesRepositoryManager.java:getRulesRepository:70) 	
Creating RulesRepository with default username.
=============== session-guest-33
INFO  19-02 01:02:56,856 (DemoAuthenticator.java:authenticate:54) 	 Demo
login for user (null) failed: unsupported username/credential.
WARN  19-02 01:02:56,857 (AuthorizationHeaderChecker.java:loginByHeader:65) 	
Unable to authenticate for rest api: null

I think the problem is the knowledgeAgent can't authenticate sucessful, but
I don't know how to set the username and password when knowledgeAgent send
request to get pkg. Anybody can help me? Thanks.
  



--
View this message in context: http://drools.46999.n3.nabble.com/how-to-get-the-pkg-from-guvnor-by-KnowledgeAgent-tp4022417.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list