Kie Server cannot register to Workbench 6.5.0.Final, response code 404, on same weblogic12.2.1.2

570 views
Skip to first unread message

Ligong Xu

unread,
Jan 2, 2017, 2:46:29 PM1/2/17
to Drools Setup
I have been struggling for days to register Kie Execution Server to Drools Workbench.  Both war files are version 6.5.0.Final and deployed as exploded directory on same weblogic12.2.1.2 instance.  Workbench itself works just fine; I can access http://localhost:7001/drools-wb to edit example mortgages project without problem. I can also invoke empty Kie Execution Server restful endpoint fine, e.g., http://localhost:7001/kie-server/services/rest/server. The problem is the Kie Execution Server is NOT registered to Workbench server. I tried a similar setup on Wildfly 10, and it works fine, but stuck on weblogic with console error showing response code 404. If I try to deploy container from Workbench to Kie Execution Server, there is no server connection at all. 

On the server console log, there is response code 404 error every 10 seconds:

----

<Jan 2, 2017, 1:39:21,685 PM EST> <Debug> <org.kie.server.api.marshalling.BaseMarshallerBuilder> <BEA-000000> <[org.kie.server.api.marshalling.BaseMarshallerBuilder:build] About to build default instance of JSON marshaller with classes null and class loader weblogic.utils.classloaders.ChangeAwareClassLoader@30359674 finder: weblogic.utils.classloaders.CodeGenClassFinder@5a815290 annotation: kie-server@kie-server>
<Jan 2, 2017, 1:39:21,689 PM EST> <Debug> <org.kie.server.services.impl.controller.DefaultRestControllerImpl> <BEA-000000> <[org.kie.server.services.impl.controller.DefaultRestControllerImpl:makeHttpPutRequestAndCreateCustomResponse] About to send PUT request to 'http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01' with payload '{
  "version" : "6.5.0.Final",
  "name" : "kie-server-localhost01",
  "capabilities" : [ "KieServer", "BRM", "BRP" ],
  "id" : "kie-server-localhost01"
}'>

Jan 02, 2017 1:39:21 PM org.kie.server.services.impl.controller.DefaultRestControllerImpl connect
WARNING: Exception encountered while syncing with controller at http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 error Error while sending PUT request to http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 response code 404

<Jan 2, 2017, 1:39:21,720 PM EST> <Warning> <org.kie.server.services.impl.controller.DefaultRestControllerImpl> <BEA-000000> <Exception encountered while syncing with controller at http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 error Error while sending PUT request to http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 response code 404>

<Jan 2, 2017, 1:39:21,723 PM EST> <Debug> <org.kie.server.services.impl.controller.DefaultRestControllerImpl> <BEA-000000> <[org.kie.server.services.impl.controller.DefaultRestControllerImpl:connect] Exception encountered while syncing with controller at http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 error Error while sending PUT request to http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 response code 404
java.lang.IllegalStateException: Error while sending PUT request to http://localhost:7001/drools-wb/rest/controller/server/kie-server-localhost01 response code 404
        at org.kie.server.services.impl.controller.DefaultRestControllerImpl.makeHttpPutRequestAndCreateCustomResponse(DefaultRestControllerImpl.java:63)
        at org.kie.server.services.impl.controller.DefaultRestControllerImpl.connect(DefaultRestControllerImpl.java:139)
        at org.kie.server.services.impl.controller.ControllerConnectRunnable.run(ControllerConnectRunnable.java:62)
        at java.lang.Thread.run(Thread.java:745)
>

--- 



Workbench and Kie Server run on the same weblogic admin server instance. I have set up data source, jms etc according to Red Hat Jboss BRMS Oracle Weblogic Installation and Configuration Guide.   Here are the command parameters starting WLS:

Starting WLS with line:
C:\work\Java\JDK18~1.0_1\bin\java -server -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n -Djava.compiler=NONE  -Xms512m -Xmx2048m -XX:CompileThreshold=8000 -Dweblogic.Name=AdminServer -Djava.security.policy=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\weblogic.policy -Xverify:none  -Djava.system.class.loader=com.oracle.classloader.weblogic.LaunchClassLoader  -javaagent:C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server\lib\debugpatch-agent.jar -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole... -Dwls.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server -Dweblogic.home=C:\Oracle\MIDDLE~1\ORACLE~1\wlserver\server     
-Djavax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory 
-Dorg.uberfire.start.method=ejb 
-Dorg.uberfire.domain=OracleDefaultLoginConfiguration 
-Dorg.kie.executor.jms.cf=jms/cf/KIE.EXECUTOR 
-Dorg.kie.executor.jms.queue=jms/KIE.EXECUTOR 
-Dorg.kie.server.id=kie-server-localhost01 -Dorg.kie.server.user=kieserver 
-Dorg.kie.server.pwd=Kieserver1! 
-Dorg.kie.server.controller.user=appuser -Dorg.kie.server.controller.pwd=Appuser1! 
-Dorg.jbpm.server.ext.disabled=true 
-Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true  
-Dkie.server.jms.queues.response=jms/KIE.SERVER.RESPONSE 
-Dorg.kie.server.domain=OracleDefaultLoginConfiguration 
 weblogic.Server


Thanks for your help!


Maciej Swiderski

unread,
Jan 3, 2017, 6:43:00 AM1/3/17
to drools...@googlegroups.com
I might be mistaken but drools-wb is for development purpose only and for regular use you should use kie-drools-wb 

Maciej
--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.
To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/e78ab380-3689-4a9f-8897-2edf5113dbec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Michael Anstis

unread,
Jan 3, 2017, 6:44:12 AM1/3/17
to drools...@googlegroups.com
You are not mistaken Maciej.

drools-wb is not available in our release distributions (only kie-wb and kie-drools-wb). We do not build a WAR for drools-wb either.

Maciej

To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-setup/e78ab380-3689-4a9f-8897-2edf5113dbec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup+unsubscribe@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Ligong Xu

unread,
Jan 3, 2017, 11:42:45 AM1/3/17
to Drools Setup
Thanks for your response. I got Drools workbench and Kie Execution server from Drools.org download site. The terms are confusing, kie-wb, kie-drools-wb, drools-wb etc. Drools workbench I mentioned is kie-drools-wb.  

https://download.jboss.org/drools/release/6.5.0.Final/kie-drools-wb-6.5.0.Final-weblogic12.war

After more digging, I think the response 404 error is due to the old jersey 1.x version in workbench(kie-drools-wb)  weblogic distribution running on Weblogic 12.2.1.2.  Weblogic 12.2.1.2 supports Jersey 2. Should I update the drools workbench to Jersey 2.x or stay with Jersey 1.x for restful webservice for kie-drools-wb ?  Your recommendation is appreciated.  kie-drools-wb for Wildfly distribution uses Jersey 2.x, and it works perfectly.


Here is configuration snippet for Jersey 1.x  in web.xml of kie-drools-wb-6.5.0.Final-weblogic12.war:
 
  <!-- REST servlets -->
  <servlet>
    <servlet-name>RestServlet</servlet-name>
    <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
    <!-- REST Permissions -->
    <init-param>
      <param-name>com.sun.jersey.spi.container.ResourceFilters</param-name>
      <param-value>com.sun.jersey.api.container.filter.RolesAllowedResourceFilterFactory</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>RestServlet</servlet-name>
    <url-pattern>/rest/*</url-pattern>
  </servlet-mapping>

Maciej Swiderski

unread,
Jan 3, 2017, 11:54:07 AM1/3/17
to drools...@googlegroups.com
there should be some errors saying why the REST endpoint didn’t start. Can you check server log?

In addition you can check if any other REST endpoint works in kie-drools-wb app for instance http://localhost:7001/drools-wb/rest/repositories

Maciej
--
You received this message because you are subscribed to the Google Groups "Drools Setup" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-setup...@googlegroups.com.

To post to this group, send email to drools...@googlegroups.com.

Prashant Dwivedi

unread,
Dec 20, 2017, 9:55:11 AM12/20/17
to Drools Setup
Getting same error on weblogic 12c . Is there any resolution found?

<Dec 20, 2017 8:22:00,606 PM IST> <Warning> <org.kie.server.services.impl.controller.DefaultRestControllerImpl> <BEA-000000> <Exception encountered while syncing with controller at http://localhost:7001/kie-wb/rest/controller/server/default-kie-server
error Error while sending PUT request to http://localhost:7001/kie-wb/rest/controller/server/default-kie-server response code 404>

Set JAVA_OPTIONS as

set JAVA_OPTIONS=%SAVE_JAVA_OPTIONS% -Djavax.xml.bind.context.factory=com.sun.xml.bind.v2.ContextFactory -Dorg.uberfire.start.method=ejb -

Dorg.uberfire.domain=OracleDefaultLoginConfiguration -Dorg.kie.demo=false -Dorg.uberfire.nio.git.ssh.enabled=false -Dorg.uberfire.nio.git.daemon.enabled=false -

Dorg.uberfire.nio.git.dir=D:\dev\git -Dkie.server.jms.queues.response=jms/KIE.SERVER.RESPONSE -Dorg.jbpm.designer.perspective=ruleflow -Dorg.uberfire.start.method=ejb 

-Dorg.uberfire.domain=OracleDefaultLoginConfiguration -Dorg.kie.executor.jms.cf=jms/cf/KIE.EXECUTOR -Dorg.kie.executor.jms.queue=jms/KIE.EXECUTOR -

Dcom.sun.jersey.server.impl.cdi.lookupExtensionInBeanManager=true -Dorg.kie.server.id=default-kie-server -Dorg.kie.server.controller=http://localhost:7001/kie-

wb/rest/controller -Dorg.kie.server.controller.user=kieuser -Dorg.kie.server.controller.pwd=Noida@123 -Dorg.kie.server.location=http://localhost:7001/kie-

server/services/rest/server -Dorg.kie.server.persistence.ds=jdbc/jbpm -Dorg.kie.server.persistence.dialect=org.hibernate.dialect.H2Dialect  -

Dorg.kie.server.persistence.tm=org.hibernate.service.jta.platform.internal.WeblogicJtaPlatform -Dorg.kie.server.domain=OracleDefaultLoginConfiguration -

Dorg.kie.server.user=kieuser -Dorg.kie.server.pwd=Noida@123 -DUseSunHttpHandler=true

Thanks,
Prashant

Prashant Dwivedi

unread,
Dec 21, 2017, 2:21:24 AM12/21/17
to Drools Setup
Hi Ligong Xu,
  Did you find any solution for the same? I am also getting the same error.

shubham shrivastava

unread,
Dec 21, 2017, 3:54:10 AM12/21/17
to Drools Setup
Hello Maciej Swidersk,
                                     along with kie workbench on weblogic i also installed kie-server seperately and getting 403 forbidden on calling http://localhost:5005/kie-server/services/rest/server.     am i right or wrong dont know as without kie-server i am only able to use workbench and not able to make endpoint server registeration.


On Tuesday, 3 January 2017 22:24:07 UTC+5:30, Maciej Swiderski wrote:

shubham shrivastava

unread,
Jan 8, 2018, 1:04:08 AM1/8/18
to Drools Setup
Hi all,
         i installed kie-wb on weblogic 12c successfully and able to use all the components but when i am going to register a endpoint for rule deployments its giving error unable to connect endpoint.

Kie wb URL:- localhost:5005/droolsWB.

endpoint url ===?? no idea
 i tried for :-localhost:5005/droolsWB/kie-server/services/rest/server.

after that i installed kie-server-6.2.0.final-ee7.war on same weblogic12c as kie-server(name)
when i am trying to hit "localhost:5005/kie-server/services/rest/server." it is giving 403 forbidden( i tried a lot to resolve issue but no luck)

can someone understand my problem and revert ?????

On Tuesday, 3 January 2017 22:24:07 UTC+5:30, Maciej Swiderski wrote:
Reply all
Reply to author
Forward
0 new messages