pippo icon indicating copy to clipboard operation
pippo copied to clipboard

ERROR ro.pippo.core.PippoFilter - Cannot create application with className 'com.ab.abc.APIApplication'

Open Widiyanto opened this issue 5 years ago • 7 comments

Widiyanto avatar May 29 '19 03:05 Widiyanto

at ro.pippo.core.PippoFilter.createApplication(PippoFilter.java:271) at ro.pippo.core.PippoFilter.init(PippoFilter.java:77) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:5037) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5739) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1707) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1697) at java.util.concurrent.FutureTask.run(FutureTask.java:266) 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) Caused by: java.lang.ClassNotFoundException: com.ab.abc.APIApplication at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1955) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1798) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at ro.pippo.core.PippoFilter.createApplication(PippoFilter.java:267) ... 13 more

Widiyanto avatar May 29 '19 03:05 Widiyanto

APIApplication extends ro.pippo.core.Application

Widiyanto avatar May 29 '19 04:05 Widiyanto

How is packaged the application, it's a war file deployed in Tomcat or you use the Pippo launcher from a main static void method? Please give us more information.

decebals avatar May 29 '19 07:05 decebals

yes a war file deployed in Tomcat.

my web.xml:

<filter>
    <filter-name>pippo</filter-name>
    <filter-class>ro.pippo.core.PippoFilter</filter-class>
    <init-param>
        <param-name>applicationClassName</param-name>
        <param-value>com.ab.abc.APIApplication</param-value>
    </init-param>
</filter>

Widiyanto avatar May 29 '19 07:05 Widiyanto

In this case please take a look inside of your war file (it's a zip) to see if you find your application class in WEB-INF/classes directory. I suspect that your war file doesn't contains all your classes.

I recommand you to develope your application using Pippo launcher (to use the Tomcat container embeded in your application via the pippo-tomcat module). Deploy your application as war file only at final and only if you have a constrain (your employer has explicitly requested you to provide a war file). In this mode you are more productive.

decebals avatar May 29 '19 08:05 decebals

WEB-INF/classes inside my war file i have all classes include APIApplication.class

Widiyanto avatar May 29 '19 09:05 Widiyanto

I will try myself to reproduce the problem and I will come back with a response asap.

decebals avatar May 29 '19 09:05 decebals