You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by mukund19 <sm...@gmail.com> on 2018/05/14 22:37:24 UTC

Deploying WAR in TomEE

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

Re: Deploying WAR in TomEE

Posted by Mark Struberg <st...@yahoo.de.INVALID>.
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 <sm...@gmail.com>:
> 
> 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