Custom Process "GetCapabilities" Error

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom Process "GetCapabilities" Error

fran
Hi all,

I have recently been trying out uploading a custom process through the WPS Admin console as per the tutorial, which appears to have worked fine, however when I try to access the GetCapabilities functionality I am presented with the following message:

HTTP Status 500 - Servlet.init() for servlet wpsServlet threw exception

type Exception report

message Servlet.init() for servlet wpsServlet threw exception

description The server encountered an internal error that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: Servlet.init() for servlet wpsServlet threw exception
        org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
        org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        java.lang.Thread.run(Thread.java:745)

root cause

java.lang.ClassCastException: wps.server.TestProcess cannot be cast to org.n52.wps.server.IAlgorithmRepository
        org.n52.wps.server.RepositoryManager.loadAllRepositories(RepositoryManager.java:115)
        org.n52.wps.server.RepositoryManager.<init>(RepositoryManager.java:64)
        org.n52.wps.server.RepositoryManager.getInstance(RepositoryManager.java:170)
        org.n52.wps.server.WebProcessingService.init(WebProcessingService.java:147)
        org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
        org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
        org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
        org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
        org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
        org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
        org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
        java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        java.lang.Thread.run(Thread.java:745)

note The full stack trace of the root cause is available in the Apache Tomcat/7.0.52 (Ubuntu) logs.

Has anyone seen this message before?  This custom process has worked previously and no code has been changed, it extends AbstractSelfDescribingAlgorithm and the .java and class files are in the classes folder under WEB-INF.  The custom process is also displayed when I click on "Algorithm Repositories" in the WPS Admin console.  

Any help you can provide would be appreciated.

Thanks,
Fran
Reply | Threaded
Open this post in threaded view
|

Re: Custom Process "GetCapabilities" Error

BenjaminPross
Hello Fran,

I cannot reproduce this. Could you attach the TestProcess.java file here?

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: Custom Process "GetCapabilities" Error

fran
In reply to this post by fran
Hi Benjamin,

Here is the TestProcess.java file

TestProcess.java

Thanks,
Fran
Reply | Threaded
Open this post in threaded view
|

Re: Custom Process "GetCapabilities" Error

BenjaminPross
I think, I found the issue. It seems that you added the process as algorithm repository by mistake. Could you check the admin console for something like this:


The important part would be the class name of your process.

Delete this repository (click on the red cross over the repository name).

Instead, add your algorithm to the LocalAlgorithmRepository:



Hope this helps.

Cheers,

Benjamin
Reply | Threaded
Open this post in threaded view
|

Re: Custom Process "GetCapabilities" Error

fran
In reply to this post by fran
Thanks for your help Benjamin, it all works correctly now.

Fran