6.3.0.final kie server returning 405 method not allowed

3,562 views
Skip to first unread message

John Harrison

unread,
Oct 6, 2015, 4:50:52 PM10/6/15
to Drools Usage
Hi,

I've deployed 6.3.0.final kie server on tomcat8 and most operational rest calls are currently returning '405 method not allowed' errors, like:

post to http://localhost:8080/kie-server/services/rest/server/containers/mortgages with body:

<batch-execution lookup="defaultKieSession">
  <insert out-identifier="test">
    <org.mortgages.LoanApplication>
      <amount>1</amount>
    </org.mortgages.LoanApplication>
  </insert>
  <fire-all-rules/>
  <get-objects out-identifier="test"/>
</batch-execution>

returns

  • Status Code: 405 Method Not Allowed
  • Allow: GET, DELETE, OPTIONS, HEAD, PUT
  • Content-Length: 0
  • Date: Tue, 06 Oct 2015 20:44:33 GMT
  • Server: Apache-Coyote/1.1

Also, this appears to work on 6.2.0.final

Has anyone else experienced this/ know of any remedies?

Thanks

John

 

Maciej Swiderski

unread,
Oct 7, 2015, 2:08:52 AM10/7/15
to drools...@googlegroups.com

you need to use http://localhost:8080/kie-server/services/rest/server/containers/instances/mortgages instead as endpoint location as it had to be moved to meet requirements of all supported containers (Wildfly, Tomcat, WebSphere and WebLogic)

Maciej
--
You received this message because you are subscribed to the Google Groups "Drools Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-usage...@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-usage/3f709bcd-c47b-4b7e-9d23-64780724ffed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


John Harrison

unread,
Oct 7, 2015, 1:30:45 PM10/7/15
to Drools Usage
Work great - thanks, Maciej :-)

John

Maciej Swiderski

unread,
Oct 7, 2015, 1:41:47 PM10/7/15
to drools...@googlegroups.com
Regarding running workbench and kie server on same tomcat 8 instance - I ran it today and will write a blog post about it early next week. So stay tuned….

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

John Harrison

unread,
Oct 7, 2015, 7:36:23 PM10/7/15
to Drools Usage
Wonderful - thanks, Maciej :-)

John

John Harrison

unread,
Oct 19, 2015, 6:22:51 PM10/19/15
to Drools Usage
Hi Maciej, All

Is there any update to share on this issue - running workbench and kie server on same tomcat 8 instance?

Thanks

John

Maciej Swiderski

unread,
Oct 20, 2015, 7:54:53 AM10/20/15
to drools...@googlegroups.com
here it is:

took bit more to get into it but finally it’s published and ready to use. 

Hope it helps
Maciej

John Harrison

unread,
Oct 20, 2015, 2:26:08 PM10/20/15
to Drools Usage
Great, Maciej :-)

I'll let you know how it goes - thanks!


John

On Tuesday, October 6, 2015 at 1:50:52 PM UTC-7, John Harrison wrote:

John Harrison

unread,
Nov 10, 2015, 12:04:00 PM11/10/15
to Drools Usage
Hi Maciej, All

I believe I can confirm that I get this same result with 6.3.0.Final - 405 Method Not Allowed.

Has anyone experienced this/ have any ideas?

Thanks

John

realby

unread,
Dec 10, 2015, 5:44:18 AM12/10/15
to Drools Usage
Hi Maciej Swiderski,

Thanks for suggestion, I too had same problem as mentioned in first post so changed as per your suggestion while executing POST call, Now Status is 200 OK but in response I get error as:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response type="FAILURE" msg="Error calling container myproject: org.kie.server.api.marshalling.MarshallingException: Can't unmarshall input string: &lt;batch-execution lookup=&quot;defaultKieSession&quot;&gt;
&lt;insert out-identifier=&quot;message&quot; return-object=&quot;true&quot; entrypoint=&quot;DEFAULT&quot;&gt;
    &lt;test.MyProject.HelloWorld&gt;
        &lt;message&gt;Joe&lt;/message&gt;
    &lt;test.MyProject.HelloWorld&gt;
&lt;/insert&gt;"/>


Any suggestion why? I have placed more details about my Java code and DRL code is in post : http://stackoverflow.com/questions/34194475/helloworld-on-kie-workbench-and-kie-server-version-6-3-0
(as I do not want to spam group with big email).

Thanks in advance !

Regards,
Real

Maciej Swiderski

unread,
Dec 10, 2015, 5:46:59 AM12/10/15
to drools...@googlegroups.com
check server.log for details

Maciej

realby

unread,
Dec 10, 2015, 6:00:58 AM12/10/15
to Drools Usage
This is the error message (Somewhere is server code there appears to be bug, is it known bug ?):

2015-12-10 16:11:24,935 ERROR [org.kie.server.services.impl.KieContainerCommandServiceImpl] (default task-63) Error calling container 'myproject': org.kie.server.api.marshalling.MarshallingException: Can't unmarshall input string: <batch-execution lookup="defaultKieSession">
<insert out-identifier="message" return-object="true" entrypoint="DEFAULT">
    <test.MyProject.HelloWorld>
        <message>Joe</message>
    <test.MyProject.HelloWorld>
</insert>
at org.kie.server.api.marshalling.jaxb.JaxbMarshaller.unmarshall(JaxbMarshaller.java:197) [kie-server-api-6.3.0.Final.jar:6.3.0.Final]
at org.kie.server.services.impl.KieContainerCommandServiceImpl.callContainer(KieContainerCommandServiceImpl.java:104) [kie-server-services-common-6.3.0.Final.jar:6.3.0.Final]
at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:73) [kie-server-rest-drools-6.3.0.Final.jar:6.3.0.Final]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_60]
at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_60]
at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:296) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:250) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:237) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) [resteasy-jaxrs-3.0.8.Final.jar:]
at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) [resteasy-jaxrs-3.0.8.Final.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) [jboss-servlet-api_3.1_spec-1.0.0.Final.jar:1.0.0.Final]
at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:113) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:27) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:61) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.ServletSecurityConstraintHandler.handleRequest(ServletSecurityConstraintHandler.java:56) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:58) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:70) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.security.handlers.SecurityInitialHandler.handleRequest(SecurityInitialHandler.java:76) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:25) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:240) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:227) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:73) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:146) [undertow-servlet-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.Connectors.executeRootHandler(Connectors.java:177) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:727) [undertow-core-1.0.15.Final.jar:1.0.15.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]

Maciej Swiderski

unread,
Dec 10, 2015, 6:04:23 AM12/10/15
to drools...@googlegroups.com
This is not a bug. KIE Server in 6.3.0 supports JAXB, JSON and Xstream. Since default is JAXB you would need to provide JAXB valid content. Alternatively you could set HTTP header to inform KIE Server to use Xstream as marshaller:
Header name: X-KIE-ContentType
Header Value XSTREAM

Maciej

realby

unread,
Dec 11, 2015, 12:34:23 AM12/11/15
to Drools Usage
Thanks Ton ! Maciej Swiderski

It is working now :)

Laura Elizabeth F. C.

unread,
Mar 22, 2016, 6:32:13 PM3/22/16
to Drools Usage
Hi, I am trying to follow this example https://github.com/jbossdemocentral/brms-weightwatcher-realtime-decision-server-demo ( Using eap 6.4 y brms 6.2)

-------------------------------------------------------------------------------------------------
standalone.xml 
 <system-properties>
        <property name="org.kie.server.repo" value="${jboss.server.data.dir}"/>
        <property name="org.kie.example" value="true"/>
        <property name="org.kie.demo" value="false"/>
        <property name="org.jbpm.designer.perspective" value="full"/>
        <property name="org.uberfire.nio.git.dir" value="${jboss.home.dir}/bin"/>
        <property name="org.uberfire.metadata.index.dir" value="${jboss.home.dir}/bin"/>
        <property name="org.kie.server.user" value="kieserver"/>
        <property name="org.kie.server.pwd" value="kieserver1!"/>
        <property name="org.kie.server.location" value="http://localhost:8080/kie-server/services/rest/server"/>
        <property name="org.kie.server.controller" value="http://localhost:8080/business-central/rest/controller"/>
        <property name="org.kie.server.controller.user" value="kieserver"/>
        <property name="org.kie.server.controller.pwd" value="kieserver1!"/>
        <property name="org.jbpm.server.ext.disabled" value="true"/>
<property name="org.kie.server.persistence.ds" value="java:jboss/datasources/PersistenciaJBPMS6p2"/>
<property name="org.kie.server.persistence.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
<property name="org.kie.server.persistence.tm" value="org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform"/>
        <property name="org.kie.server.id" value="local-server-123"/>
    </system-properties>
-------------------------------------------------------------------------------------------------
this's the log:

C:\EAP\6p4_brms_2\EAP-6.4.0\standalone\log\server.log (48 hits)
Line 240: 17:14:57,773 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (ServerService Thread Pool -- 57) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 240: 17:14:57,773 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (ServerService Thread Pool -- 57) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 243: 17:14:57,802 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 243: 17:14:57,802 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 246: 17:14:57,868 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (ServerService Thread Pool -- 52) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Line 256: 17:14:58,225 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 52) HHH000388: Unsuccessful: create table SolicitantePer (id bigint generated by default as identity, primary key (id))
Line 257: 17:14:58,226 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 52) ERROR: syntax error at or near "generated"
Line 257: 17:14:58,226 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 52) ERROR: syntax error at or near "generated"
Line 257: 17:14:58,226 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] (ServerService Thread Pool -- 52) ERROR: syntax error at or near "generated"
Line 366: 17:15:07,816 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 366: 17:15:07,816 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 369: 17:15:08,475 INFO  [org.hibernate.engine.jdbc.internal.LobCreatorBuilder] (ServerService Thread Pool -- 56) HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException
Line 419: 17:15:09,592 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (ServerService Thread Pool -- 56) HHH000261: Table found: public.errorinfo
Line 422: 17:15:09,594 INFO  [org.hibernate.tool.hbm2ddl.TableMetadata] (ServerService Thread Pool -- 56) HHH000126: Indexes: [errorinfo_pkey]
Line 635: 17:15:17,830 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 635: 17:15:17,830 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 645: 17:15:23,378 ERROR [org.eclipse.jgit.util.FS] (MSC service thread 1-7) Caught exception in FS.readPipe(): java.io.IOException: Cannot run program "bash" (in directory "C:\Users\laura.florian"): CreateProcess error=2, El sistema no puede encontrar el archivo especificado
Line 645: 17:15:23,378 ERROR [org.eclipse.jgit.util.FS] (MSC service thread 1-7) Caught exception in FS.readPipe(): java.io.IOException: Cannot run program "bash" (in directory "C:\Users\laura.florian"): CreateProcess error=2, El sistema no puede encontrar el archivo especificado
Line 740: Caused by: java.io.IOException: CreateProcess error=2, El sistema no puede encontrar el archivo especificado
Line 752: 17:15:27,373 ERROR [stderr] (MSC service thread 1-7) ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider com.sun.script.javascript.RhinoScriptEngineFactory not found
Line 754: 17:15:27,839 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 754: 17:15:27,839 WARN  [org.kie.server.services.impl.controller.DefaultRestControllerImpl] (KieServer-ControllerConnect) Exception encountered while syncing with controller at http://localhost:8080/business-central/rest/controller/server/local-server-123 error Error while sending PUT request to http://localhost:8080/business-central/rest/controller/server/local-server-123 response code 403
Line 756: 17:15:30,454 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) SQL Error: 0, SQLState: 53100
Line 757: 17:15:30,455 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) ERROR: could not extend file "global/13253": No space left on device
Line 757: 17:15:30,455 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) ERROR: could not extend file "global/13253": No space left on device
Line 854: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 856: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 974: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 976: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1097: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 1099: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1120: 17:15:30,996 WARN  [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) SQL Error: 0, SQLState: 53100
Line 1121: 17:15:30,996 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) ERROR: could not extend file "global/13253": No space left on device
Line 1121: 17:15:30,996 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (MSC service thread 1-7) ERROR: could not extend file "global/13253": No space left on device
Line 1231: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 1233: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1364: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 1366: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1500: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 1502: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1522: 17:15:31,448 WARN  [org.jbpm.kie.services.impl.KModuleDeploymentService] (MSC service thread 1-7) Unexpected error while deploying unit org.guvnor:guvnor-asset-mgmt-project:6.3.0.Final-redhat-4: java.lang.RuntimeException: Unable to commit transaction
Line 1636: Caused by: org.postgresql.util.PSQLException: ERROR: could not extend file "global/13253": No space left on device
Line 1638: at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
Line 1658: 17:15:31,598 WARN  [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (MSC service thread 1-7) Error when deploying unit org.guvnor:guvnor-asset-mgmt-project:6.3.0.Final-redhat-4 [strategy=SINGLETON] error message java.lang.RuntimeException: Unable to commit transaction
Line 1658: 17:15:31,598 WARN  [org.jbpm.console.ng.bd.backend.server.DeploymentManagerEntryPointImpl] (MSC service thread 1-7) Error when deploying unit org.guvnor:guvnor-asset-mgmt-project:6.3.0.Final-redhat-4 [strategy=SINGLETON] error message java.lang.RuntimeException: Unable to commit transaction
Line 1686: 17:15:34,772 WARN  [org.jbpm.kie.services.impl.KModuleDeploymentService] (EJB default - 4) Unexpected error while deploying unit Pacifico:pruebitaP:1.0: java.lang.RuntimeException: Cannot find KieModule: Pacifico:pruebitaP:1.0
Line 1768: 17:15:41,598 ERROR [org.drools.compiler.kie.builder.impl.AbstractKieModule] (EJB default - 8) Unable to build KieBaseModel:kbase
Line 1769: Error importing : 'org.json.JSONObject'

sreekanda...@gmail.com

unread,
Aug 2, 2016, 2:44:19 PM8/2/16
to Drools Usage
Hi Mick,

I have the similar issue, I have hosted the Rule engine on the KIE server and i have followed the below link to consume the services.



My code snippets

CategoryObj cat = new CategoryObj();
Map count = new HashMap<>();
Map sorted = new HashMap<>();
sorted.put("A", "NEGATIVE");
sorted.put("A", "NEGATIVE");
sorted.put("B", "NEGATIVE");
sorted.put("B", "POSITIVE");
sorted.put("B", "POSITIVE");
count.put("A", 2);
count.put("B", 3);
cat.setCountMap(count);
cat.setSortedMap(sorted);
InsertObjectCommand insertObjectCommand = new InsertObjectCommand(cat, "f1");
       FireAllRulesCommand fireAllRulesCommand = new FireAllRulesCommand("defaultKieSession");

       List<GenericCommand<?>> commands = new ArrayList<GenericCommand<?>>();
       commands.add(insertObjectCommand);
       commands.add(fireAllRulesCommand);
       BatchExecutionCommand command = new BatchExecutionCommandImpl(commands);

       String xStreamXml = BatchExecutionHelper.newXStreamMarshaller().toXML(command);
       System.out.println("The input" + xStreamXml);
       
       KieServicesConfiguration config =  KieServicesFactory.
               newRestConfiguration("http://a140lcok.ustr.com:8080/kie-server/services/rest/server",
               "kieserver",
               "kieserver1!");
       KieServicesClient kieServicesClient = KieServicesFactory.newKieServicesClient(config);
        
     //  kieServicesClient.getContainerInfo("Myrules");
       
       kieServicesClient.executeCommands("Myrules", xStreamXml);



The input XML.

<insert out-identifier="f1" return-object="true" entry-point="DEFAULT">
    <com.ust.digital.rules.CategoryObj>
      <countMap>
        <entry>
          <string>A</string>
          <int>2</int>
        </entry>
        <entry>
          <string>B</string>
          <int>3</int>
        </entry>
      </countMap>
      <sortedMap>
        <entry>
          <string>A</string>
          <string>NEGATIVE</string>
        </entry>
        <entry>
          <string>B</string>
          <string>POSITIVE</string>
        </entry>
      </sortedMap>
    </com.ust.digital.rules.CategoryObj>
  </insert>
  <fire-all-rules out-identifier="myFireCommand"/>
</batch-execution>


The exception is 

org.kie.server.client.KieServicesException: Unexpected HTTP response code when requesting URI 'http://a140lcok.ustr.com:8080/kie-server/services/rest/server/containers/Myrules'! Error code: 405, message: Method Not Allowed
at org.kie.server.client.impl.KieServicesClientImpl.createExceptionForUnexpectedResponseCode(KieServicesClientImpl.java:416)
at org.kie.server.client.impl.KieServicesClientImpl.makeHttpPostRequestAndCreateServiceResponse(KieServicesClientImpl.java:213)
at org.kie.server.client.impl.KieServicesClientImpl.executeCommands(KieServicesClientImpl.java:133)
at com.ust.digital.common.util.TestUtlity.main(TestUtlity.java:90)



Please share your thoughts.

Thanks
Sree
Reply all
Reply to author
Forward
0 new messages