Hello Michael and Subhas, thanks for your answers.
Apparently the problem is due to permission. I am using the next
configuration:
<security:identity
authenticate-method="#{defaultAuthenticator.authenticate}"/>
<security:role-based-permission-resolver
enable-role-based-authorization="true"/>
I attached the class that use for my test, in this code not included code
for authenticate. In that sense I have new questions:
1º What is the minimal configuration of Guvnor for use the Knowledge Agent?
2º What code should be included for authentication?
Thanks and regards,
2010/10/20 Subhas <subhas.sing(a)gmail.com>
Give some more details like code and jars in build path. I use
KnowledgeBase and working fine for me.
Thanks,
Subhas
On Wed, Oct 20, 2010 at 12:54 PM, java.developer.researcher <
java.developer.researcher(a)gmail.com> wrote:
>
> Hello,
>
> I am trying of integrate Drools Guvnor with an java web application. I am
> using KnowledgeAgent, but occurs the next exception when execute the code:
>
> java.lang.RuntimeException: java.io.IOException: Server returned HTTP
> response code: 401 for URL:
>
>
http://localhost:8383/drools-guvnor/org.drools.guvnor.Guvnor/package/org....
> at
>
> org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:559)
> at
>
> org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:25)
> at
>
> org.examples.test.TestKnowledgeAgent.getKnowledgeBase(TestKnowledgeAgent.java:63)
> at
> org.examples.test.TestKnowledgeAgent.main(TestKnowledgeAgent.java:28)
> Caused by: java.io.IOException: Server returned HTTP response code: 401
> for
> URL:
>
>
http://localhost:8383/drools-guvnor/org.drools.guvnor.Guvnor/package/org....
> at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
> at
> org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:76)
> at
>
> org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:512)
> ... 3 more
> Exception in thread "main" java.lang.NullPointerException
> at
> org.examples.test.TestKnowledgeAgent.main(TestKnowledgeAgent.java:37)
>
> What is the cause of this exception? How can I solved it?
>
> Any help is welcome.
>
> Regards,
> --
> View this message in context:
>
http://drools-java-rules-engine.46999.n3.nabble.com/Use-Knowledge-Agent-t...
> Sent from the Drools - User mailing list archive at
Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users