Trying to deploy to WebSphere Application Server ND

I can deploy my Vaadin Flow .war with Jetty or Jetty Runner but when I try to deploy it to WebSphere I am getting errors…

Vaadin Flow only needs minimum Servlet 3.0 and JDK 8 right?
I checked metadata-complete when deploying the war file in WAS console.

trace.log (attempting to start the web application twice, second time has class loading order changed so parent is last)

[4/12/18 19:46:33:372 UTC]
 00000109 AdminHelper   A   ADMN1008I: An attempt is made to start the masterui-1_0_0a_war application. (User ID = defaultWIMFileBasedRealm/wasadmin)
[4/12/18 19:46:33:383 UTC]
 00000109 CompositionUn A   WSVR0190I: Starting composition unit WebSphere:cuname=masterui-1_0_0a_war in BLA WebSphere:blaname=masterui-1_0_0a_war.
[4/12/18 19:46:33:444 UTC]
 00000109 ApplicationMg A   WSVR0200I: Starting application: masterui-1_0_0a_war
[4/12/18 19:46:33:444 UTC]
 00000109 ApplicationMg A   WSVR0203I: Application: masterui-1_0_0a_war  Application build level: 1.0.0a
[4/12/18 19:46:33:507 UTC]
 00000109 SibMessage    I   [:]
 CWSID0017I: Configuration reload is starting for bus MDM.SIB.op-server1.
[4/12/18 19:46:33:510 UTC]
 00000109 SibMessage    I   [:]
 CWSID0018I: Configuration reload is complete for bus MDM.SIB.op-server1.
[4/12/18 19:46:33:511 UTC]
 00000109 SibMessage    I   [:]
 CWSID0019I: Configuration reload is starting for messaging engine MdmNode01.op-server1-MDM.SIB.op-server1.
[4/12/18 19:46:33:518 UTC]
 00000109 SibMessage    I   [:]
 CWSID0020I: Configuration reload is complete for messaging engine MdmNode01.op-server1-MDM.SIB.op-server1.
[4/12/18 19:46:33:540 UTC]
 00000d3b FfdcProvider  W logIncident FFDC1003I: FFDC Incident emitted on D:\IBM\WebSphere\AppServer\profiles\MdmAppSrv01\logs\ffdc\op-server1_7840e269_18.04.12_19.46.33.5252433143390687983372.txt 219
[4/12/18 19:46:34:431 UTC]
 00000109 webapp        I WebGroup SRVE0169I: Loading Web Module: masterui-1.0.0a.war.
[4/12/18 19:46:34:439 UTC]
 00000109 WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_host/imt
[4/12/18 19:46:50:961 UTC]
 00000109 webapp        I log SRVE0292I: Servlet Message - [masterui-1_0_0a_war#masterui-1.0.0a.war]
:.Initializing AtmosphereFramework
[4/12/18 19:46:50:966 UTC]
 00000109 webapp        W initializeServletContainerInitializers exception.occurred.while.running.ServletContainerInitializers.onStartup
[4/12/18 19:46:51:011 UTC]
 00000109 FfdcProvider  W logIncident FFDC1003I: FFDC Incident emitted on D:\IBM\WebSphere\AppServer\profiles\MdmAppSrv01\logs\ffdc\op-server1_1508b684_18.04.12_19.46.51.0067008499503324464843.txt 131
[4/12/18 19:46:51:015 UTC]
 00000109 webapp        E WebGroup SRVE0015E: Failure to initialize Web application masterui-1.0.0a.war
[4/12/18 19:46:51:025 UTC]
 00000109 FfdcProvider  W logIncident FFDC1003I: FFDC Incident emitted on D:\IBM\WebSphere\AppServer\profiles\MdmAppSrv01\logs\ffdc\op-server1_1508b684_18.04.12_19.46.51.0164848662029229174610.txt 736
[4/12/18 19:46:51:032 UTC]
 00000109 FfdcProvider  W logIncident FFDC1003I: FFDC Incident emitted on D:\IBM\WebSphere\AppServer\profiles\MdmAppSrv01\logs\ffdc\op-server1_1508b684_18.04.12_19.46.51.0252592136961925854831.txt 124
[4/12/18 19:46:51:040 UTC]
 00000109 DeployedAppli W   WSVR0206E: Module, masterui-1.0.0a.war, of application, masterui-1_0_0a_war.ear/deployments/masterui-1_0_0a_war, failed to start
[4/12/18 19:46:51:045 UTC]
 00000109 ApplicationMg W   WSVR0101W: An error occurred starting, masterui-1_0_0a_war
[4/12/18 19:46:51:045 UTC]
 00000109 ApplicationMg A   WSVR0217I: Stopping application: masterui-1_0_0a_war
[4/12/18 19:46:51:068 UTC]
 00000109 ApplicationMg A   WSVR0220I: Application stopped: masterui-1_0_0a_war
[4/12/18 19:46:51:121 UTC]
 00000109 CompositionUn E   WSVR0194E: Composition unit WebSphere:cuname=masterui-1_0_0a_war in BLA WebSphere:blaname=masterui-1_0_0a_war failed to start.

Digging through the FFDC logs I found one that may be a suspect…

[4/12/18 19:46:51:007 UTC]
     FFDC Exception:java.lang.NullPointerException ProbeId:131
	at com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer.validateRouteAnnotation(
	at com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer.lambda$checkForConflictingAnnotations$1(
	at com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer$$Lambda$26.000000005A20E850.accept(Unknown Source)
	at java.util.Spliterators$ArraySpliterator.forEachRemaining(
	at com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer.checkForConflictingAnnotations(
	at com.vaadin.flow.server.startup.AbstractRouteRegistryInitializer$$Lambda$20.00000000556BA280.accept(Unknown Source)

Right now I’ve ran out of ideas to try.

I finally got a working version of my web application that I can deploy to WebSphere by compiling flow from github.

I thought Flow requires Servlet 3.0 according to the documentation online but the pom.xml has servlet 3.1

I recompiled it with Servlet 3.0 and had to fix response.setContentLengthLong because it doesn’t exist in 3.0.

The next issue was AbstractRouteRegistryInitializer class had lines:
Route routeAnnotation = route.getAnnotation(Route.class);
but routeAnnotation is sometimes null, so the if statement after will fail.

Any comments or thoughts …


Does the same problem occur even with a very simple application, like [Vaadin 10 project base]

Can you check with the debugger whether the class that doesn’t return a @Route annotation and causes the NPE actually is a class you have annotated with @Route or not? I mean the Class<?> route in AbstractRouteRegistryInitializer line 113.