Deploying WAR in TomEE

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

Deploying WAR in TomEE

mukund19
I have my WAR inside webapps of TomEE. After delpoying, when I try to run the
application, it says it is not able to see the classes that are present
under Project/WEB-INF/classes.

I created the WAR file from eclipse by right clicking the project and
selecting Export as WAR file.

I also tried packaging those classes into a separate jar and loaded that jar
under WEB-INF/lib.

I am not sure why it is not able to see the classes that are undeployed
under WEB-INF/classes.

Could someone please help me with this ?


Error Log :

java.lang.NoClassDefFoundError: Could not initialize class
com.app.auth.AuthenticationService
    com.app.auth.AuthenticationInit.doInit(AuthenticationInit.java:14)
    org.zkoss.zk.ui.metainfo.InitiatorInfo.doInit(InitiatorInfo.java:148)
   
org.zkoss.zk.ui.metainfo.InitiatorInfo.newInitiator(InitiatorInfo.java:143)
    org.zkoss.zk.ui.metainfo.PageDefinition.doInit(PageDefinition.java:396)
    org.zkoss.zk.ui.impl.Initiators.doInit(Initiators.java:58)
    org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:378)
    org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:312)
   
org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
   
org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
Reply | Threaded
Open this post in threaded view
|

Re: Deploying WAR in TomEE

Mark Struberg-2
There is a difference between ClassNotFoundException and NoClassDefFoundError

ClassNotFoundException: the class you were looking for could not be found.

NoClassDefFoundError: some other Class your own class needs could not be loaded.

Essentially com.app.auth.AuthenticationService is there, but it is missing some class it depends on.
So you are essentially missing some jar in your WAR.

LieGrue,
strub



> Am 15.05.2018 um 00:37 schrieb mukund19 <[hidden email]>:
>
> I have my WAR inside webapps of TomEE. After delpoying, when I try to run the
> application, it says it is not able to see the classes that are present
> under Project/WEB-INF/classes.
>
> I created the WAR file from eclipse by right clicking the project and
> selecting Export as WAR file.
>
> I also tried packaging those classes into a separate jar and loaded that jar
> under WEB-INF/lib.
>
> I am not sure why it is not able to see the classes that are undeployed
> under WEB-INF/classes.
>
> Could someone please help me with this ?
>
>
> Error Log :
>
> java.lang.NoClassDefFoundError: Could not initialize class
> com.app.auth.AuthenticationService
>    com.app.auth.AuthenticationInit.doInit(AuthenticationInit.java:14)
>    org.zkoss.zk.ui.metainfo.InitiatorInfo.doInit(InitiatorInfo.java:148)
>
> org.zkoss.zk.ui.metainfo.InitiatorInfo.newInitiator(InitiatorInfo.java:143)
>    org.zkoss.zk.ui.metainfo.PageDefinition.doInit(PageDefinition.java:396)
>    org.zkoss.zk.ui.impl.Initiators.doInit(Initiators.java:58)
>    org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:378)
>    org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:312)
>
> org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215)
>
> org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
>    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
>    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
>
>
>
> --
> Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html