5 Replies Latest reply: Sep 30, 2011 9:23 AM by Guo-Guang Chiou RSS

HTTP Status 404 - Could not find resource for relative....

Guo-Guang Chiou Newbie

I deploed a process and then able to retrive process information by posting url like "http://localhost:8080/gwt-console-server/rs/process/definitions.

the json result is as below:

{

-definitions:[

     {

          id: "hello:,

          name: "HelloWorld",

          version: 0,

          packageName: "defaultPackage",

          deploymentId: "N/A",

          suspend: false      

     },

.

.

.

.

    ]

}

 

i follow the url format as below to delete the hello process.

POST/gwt-console-server/rs/process/definition/{id}/remove
*/*application/json

 

at the end, the  result is as following.

HTTP Status 404 - Could not find resource for relative : /process/definition/hello/remove of full path: http://localhost:8080/gwt-console-server/rs/process/definition/hello/remove


type Status report

message Could not find resource for relative : /process/definition/hello/remove of full path: http://localhost:8080/gwt-console-server/rs/process/definition/hello/remove

description The requested resource (Could not find resource for relative : /process/definition/hello/remove of full path: http://localhost:8080/gwt-console-server/rs/process/definition/hello/remove) is not available.


JBoss Web/2.1.3.GA

HTTP status 404 mesage showed up.

 

What did I miss ???

  • 1. Re: HTTP Status 404 - Could not find resource for relative....
    Guo-Guang Chiou Newbie

    I changed my way to delete process resources by using "http://anonsvn.jboss.org/repos/riftsaw/trunk/samples/quickstart/management/src/org/jboss/riftsaw/management" .

     

    It's ok to delete the process's instance.

     

    however, when it comes to delete the process, it shows the result as the following:

     

    JSon Result: => <html><head><title>JBoss Web/2.1.3.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.UnsupportedOperationException

              org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)

              org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)

              org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)

              javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

              org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    </pre></p><p><b>root cause</b> <pre>java.lang.UnsupportedOperationException

              org.jbpm.integration.console.CommandDelegate.removeProcess(CommandDelegate.java:229)

              org.jbpm.integration.console.ProcessManagement.removeProcessDefinition(ProcessManagement.java:56)

              org.jboss.bpm.console.server.ProcessMgmtFacade.removeDefinitionsJSON(ProcessMgmtFacade.java:175)

              sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              java.lang.reflect.Method.invoke(Method.java:597)

              org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)

              org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)

              org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)

              org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)

              org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)

              javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

              org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/2.1.3.GA</h3></body></html>

    -----------------------------

    <html><head><title>JBoss Web/2.1.3.GA - Error report</title><style><!--H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}HR {color : #525D76;}--></style> </head><body><h1>HTTP Status 500 - </h1><HR size="1" noshade="noshade"><p><b>type</b> Exception report</p><p><b>message</b> <u></u></p><p><b>description</b> <u>The server encountered an internal error () that prevented it from fulfilling this request.</u></p><p><b>exception</b> <pre>org.jboss.resteasy.spi.UnhandledException: java.lang.UnsupportedOperationException

              org.jboss.resteasy.core.SynchronousDispatcher.handleApplicationException(SynchronousDispatcher.java:319)

              org.jboss.resteasy.core.SynchronousDispatcher.handleException(SynchronousDispatcher.java:230)

              org.jboss.resteasy.core.SynchronousDispatcher.handleInvokerException(SynchronousDispatcher.java:206)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:360)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)

              javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

              org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    </pre></p><p><b>root cause</b> <pre>java.lang.UnsupportedOperationException

              org.jbpm.integration.console.CommandDelegate.removeProcess(CommandDelegate.java:229)

              org.jbpm.integration.console.ProcessManagement.removeProcessDefinition(ProcessManagement.java:56)

              org.jboss.bpm.console.server.ProcessMgmtFacade.removeDefinitionsJSON(ProcessMgmtFacade.java:175)

              sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

              sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

              sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

              java.lang.reflect.Method.invoke(Method.java:597)

              org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:117)

              org.jboss.resteasy.core.ResourceMethod.invokeOnTarget(ResourceMethod.java:260)

              org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:232)

              org.jboss.resteasy.core.ResourceMethod.invoke(ResourceMethod.java:166)

              org.jboss.resteasy.core.DispatcherUtilities.getJaxrsResponse(DispatcherUtilities.java:142)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)

              org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:173)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:93)

              org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:68)

              javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

              org.jboss.bpm.console.server.util.GWTJsonFilter.doFilter(GWTJsonFilter.java:59)

              org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

    </pre></p><p><b>note</b> <u>The full stack trace of the root cause is available in the JBoss Web/2.1.3.GA logs.</u></p><HR size="1" noshade="noshade"><h3>JBoss Web/2.1.3.GA</h3></body></html>

  • 2. Re: HTTP Status 404 - Could not find resource for relative....
    Jeff Yu Master

    from the log trace: java.lang.UnsupportedOperationException

     

    This means this operation is not supported.

  • 3. Re: HTTP Status 404 - Could not find resource for relative....
    Guo-Guang Chiou Newbie

    Hi Jeff,

     

    thanks for your reminding.

     

    by the way, if i want to delete a process deployed, how can i do it any way?

  • 4. Re: HTTP Status 404 - Could not find resource for relative....
    Jeff Yu Master

    In which project? jBPM or RiftSaw? If it is in RiftSaw, you can remove the bpel artifact from the deploy folder. I don't think we have exposed this operation as a RESTful web serivce. I am not sure about the jBPM side.

  • 5. Re: HTTP Status 404 - Could not find resource for relative....
    Guo-Guang Chiou Newbie

    After the installation of jBPM 5,

    Restful APIs for managing processes, instances, tasks, forms can be found at

    http://localhost:8080/gwt-console-server/rs/server/resources.

     

    and result is as following

    MethodPathDescriptionConsumesProduces
    Server Info
    General REST server information
    GET/gwt-console-server/rs/server/status
    */*application/json
    GET/gwt-console-server/rs/server/resources
    */*text/html
    Process Management
    Process related data.
    POST/gwt-console-server/rs/process/definition/{id}/new_instance
    */*application/json
    POST/gwt-console-server/rs/process/instance/{id}/state/{next}
    */*application/json
    GET/gwt-console-server/rs/process/definition/{id}/image
    */*image/*
    GET/gwt-console-server/rs/process/instance/{id}/activeNodeInfo
    */*application/json
    GET/gwt-console-server/rs/process/definition/history/{id}/nodeInfo
    */*application/json
    GET/gwt-console-server/rs/process/definitions
    */*application/json
    POST/gwt-console-server/rs/process/definition/{id}/remove
    */*application/json
    GET/gwt-console-server/rs/process/definition/{id}/instances
    */*application/json
    GET/gwt-console-server/rs/process/instance/{id}/dataset
    */*text/xml
    POST/gwt-console-server/rs/process/instance/{id}/end/{result}
    */*application/json
    POST/gwt-console-server/rs/process/instance/{id}/delete
    */*application/json
    POST/gwt-console-server/rs/process/tokens/{id}/transition
    */*application/json
    POST/gwt-console-server/rs/process/tokens/{id}/transition/default
    */*application/json
    Task Lists
    Access task lists
    GET/gwt-console-server/rs/tasks/{idRef}
    */*application/json
    GET/gwt-console-server/rs/tasks/{idRef}/participation
    */*application/json
    Task Management
    Manage task instances
    POST/gwt-console-server/rs/task/{taskId}/assign/{ifRef}
    */*application/json
    POST/gwt-console-server/rs/task/{taskId}/release
    */*application/json
    POST/gwt-console-server/rs/task/{taskId}/close
    */*application/json
    POST/gwt-console-server/rs/task/{taskId}/close/{outcome}
    */*application/json
    User management
    Manage user and groups
    POST/gwt-console-server/rs/identity/sid/invalidate
    */*text/plain
    GET/gwt-console-server/rs/identity/sid
    */*text/plain
    GET/gwt-console-server/rs/identity/secure/sid
    */*text/plain
    GET/gwt-console-server/rs/identity/user/roles
    */*application/json
    GET/gwt-console-server/rs/identity/user/{actorId}/groups/
    */*application/json
    GET/gwt-console-server/rs/identity/group/{groupName}/members
    */*application/json
    GET/gwt-console-server/rs/identity/user/{actorId}/actors
    */*application/json
    Process Engine
    Process runtime state
    GET/gwt-console-server/rs/engine/deployments
    */*application/json
    POST/gwt-console-server/rs/engine/deployment/{id}/delete
    */*application/json
    POST/gwt-console-server/rs/engine/deployment/{id}/suspend
    */*application/json
    GET/gwt-console-server/rs/engine/jobs
    */*application/json
    POST/gwt-console-server/rs/engine/job/{id}/execute
    */*application/json
    POST/gwt-console-server/rs/engine/deployment/{id}/resume
    */*application/json
    Form Processing
    Web based form processing
    GET/gwt-console-server/rs/form/task/{id}/render
    */*text/html
    GET/gwt-console-server/rs/form/process/{id}/render
    */*text/html
    POST/gwt-console-server/rs/form/task/{id}/complete
    multipart/form-datatext/html
    POST/gwt-console-server/rs/form/process/{id}/complete
    multipart/form-datatext/html

     

    No description is provided.

     

    So I tried one of rest api which I think is to delete a process.

    At last, it can not work.

    Any way, thank you very much Jeff.

     

    I will keep trying these APIs and see its result.