Я пытался заставить старое приложение Java 7 EE WebSocket: https://www.oracle.com/webfolder/technetwork/tutorials/obe/java/HomeWebsocket/WebsocketHome.html работать в Payara Server 5.184 #badassfish (build 89)
Однако WebSocket (@ServerEndpoint) не удается создать.
Severe: Exception in thread "glassfish-web-async-thread-1" Severe:
java.lang.NullPointerException at
org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.processAllDataRead(InputBuffer.java:492) at
org.apache.catalina.connector.InputBuffer$ReadHandlerImpl.access$800(InputBuffer.java:385) at
org.apache.catalina.connector.InputBuffer$ReadHandlerImpl$2.run(InputBuffer.java:475) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at
java.lang.Thread.run(Thread.java:748)
При включении режима разработки CDI я вижу:
WARN: WELD-001703: Unable to determine the @Intercepted Bean<?> for
[UnbackedAnnotatedField] @Inject @Intercepted private
org.jboss.weld.probe.InvocationMonitor.interceptedBean WARN:
PROBE-000020: A problem occured during monitoring of bean instance
construction: null java.lang.RuntimeException: at
com.magicpigeon.websocket.DeviceWebSocketServer.<init>(DeviceWebSocketServer.java:1) at
com.magicpigeon.websocket.DeviceWebSocketServer$Proxy$_$$_WeldSubclass.<init>(Unknown Source) at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
DeviceWebSocketServer
- мой класс @ServerEndpoint.
Есть ли ошибка, связанная с CDI? Чего мне не хватать?
Код здесь: https://github.com/DanielMerchan/WebsocketHome, если кто-то хочет попробовать. В прошлом это работало в моих старых Netbeans со Glassfish (не помню версию).
Спасибо.