Search code examples
ibm-mobilefirst

Worklight 6.0.0.2 javax.servlet.ServletException: Can not access development servlets in production mode


Sometime I see in my websphere proile log for Worklight have an error message:

[Servlet Error]-[DevRootServlet]: javax.servlet.ServletException: Can not access development servlets in production mode

I don't know where is error message come from? but my WL application still working fine. Anybody can help me to fix this issue? I'm using WL version 6.0.0.2

Thanks


Solution

  • Check if my answer from another similar question helps you: Worklight 6.1 - error on sending notification to android device on real server


    Take a look at this part from the error message:

    Caused by: javax.servlet.ServletException: Can not access development servlets in production mode at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:136)

    Now see the URL you are using:

    http://serverIp:9080/worklighttime/dev/invoke?adapter=PushAdapter&procedure=submitNotification&parameters=[%27user%27,%27text
    message%27]
    

    The /dev/ denotes basically a "development servlet", which as the error says - cannot be used when in production. "In production" basically means "any server that is not inside Worklight Studio", Worklight Studio being the development environment.

    Try to remove the /dev/ from the URL and see whether this helps, or maybe a different error will then be given.