Worklight 6.1 - error on sending notification to android device on real server

人走茶凉 提交于 2019-12-11 18:25:40

问题


I'm trying to send notification to android device. On my Worklight Studio I have succeeded to make subscription + notification.

When I trying to do it on real worklight server(on liberty), I have succeeded to make subscription, but I can't send notification.

I'm trying to send notification on browser like that:

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

At the adapter I added:

<procedure name="submitNotification" securityTest="wl_unprotected" />

And, still I get this error:

 Exception thrown by application class 'com.worklight.core.auth.impl.AuthenticationFilter.doFilter:235'
java.lang.RuntimeException: javax.servlet.ServletException: Can not access development servlets in production mode
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:235)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: javax.servlet.ServletException: Can not access development servlets in production mode
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:136)
... 2 more

回答1:


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.



来源:https://stackoverflow.com/questions/25911492/worklight-6-1-error-on-sending-notification-to-android-device-on-real-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!