Failed to load application

Hello
i am new in this forum but i have been enjoying and using it mill toolkit…

i am working on a project where we are using it mill framework…

our application was working fine until recently i had a very confusing error…i tried everything but i think i have to turn for the final hope. . .

here is my error below . . .

24-Apr-2008 01:14:08 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Allocate exception for servlet Kalenga
javax.servlet.ServletException: Failed to load application class: main.MasterPageLayout
at com.itmill.toolkit.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:249)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1164)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:132)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:211)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:817)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:623)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:444)
at java.lang.Thread.run(Unknown Source)

i am using apache tomcat version 6 and java version 5

hope my error details from eclipse can help in case some more info is needed then please ask for details and i will reply back

thnkx
new babe

It seems that for some reason classloader can not load your application class-file (main.MasterPageLayout). Just to make sure, have you checked that the application class-file has not been somehow corrupted (try to recompile it) and it exists in correct directory?

Can you post more details? It looks like it’s not finding your main Application class, but it impossible to tell why from the exception. A copy of web.xml and directory structure would help…

Some things to check:

Have you renamed main.MasterPageLayout but forgotten to update web.xml? …this happens all the time :wink:

If you’re using a jar, is it packaged correctly? It’s for instance easy to package one level too high, so that it contains e.g classes/com/itmill/… instead of just com/itmill/…

These are just some wild guesses…

Best Regards,
Marc

hello again

thank you very much Joonas Lehtinen, your brief description of the problem was very useful…

for some reason the main.MasterPageLayout was the one with problem… i have no idea how it happened because the whole application was fine but it stopped working suddenly and that was very confusing…

i deleted main.MasterPageLayout.java file and created a new one and now works fine. . . .

thanks for the assistance. . .

it mill,
new babe. .

hello

I am having a similar issue. I am simply trying to go through the address book tutorial. below is the error i receive

23.02.2009 09:51:34 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Allocate exception for servlet AddressBook
javax.servlet.ServletException: Failed to load application class: com.itmill.dev.addressbooktutorial.AddressBookApplication
at com.itmill.toolkit.terminal.gwt.server.ApplicationServlet.init(ApplicationServlet.java:292)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1172)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:808)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)

I tried the suggestions but no luck. Could anyone please help if possible. Feel free to ask for more details.

Thanks in advance,
Saifee

my web.xm looks like this

<?xml version="1.0" encoding="UTF-8"?> AddressBook AddressBook com.itmill.toolkit.terminal.gwt.server.ApplicationServlet application com.itmill.dev.addressbooktutorial.AddressBookApplication

I am using java version 1.6.0_11 and apache tomcat v6.0

please let me know if u need any further information.

Regards,
Saifee

hey

are you trying to import an existing demo project? which editor are you using?
well, when i had similar problem i realized that the problem was caused by Eclipse IDE.
what i did was to delete all java class in Eclipse folder: build/classes files and then recompile the whole project again.

it worked after recompiling. you can try this solution

hope it works for you

mwandu

hi:

Thanks for the response buddy.

I am using the eclipse IDE and no i am not importing an existing project. I am simply trying to go through the address book tutorial from the IT Mill Toolkit website and I am just trying to run a simple hello world application as a start up.

But it keeps throwing the exception each time.

The build folder is empty.

Any ideas?

Regards,
Saifee

hello
if the build folder is empty then that is why it is throwing an error…[quote]
Allocate exception for servlet AddressBook
javax.servlet.ServletException: Failed to load application class: com.itmill.dev.addressbooktutorial.AddressBookApplication
[/quote]
i have experienced this problem several times when you try to create a project from scratch but usually it is a problem with Eclipse IDE…don’t know why…but for some reasons it does not depoly the files when you are compiling the project…

machine and eclipse IDE…create a simple J2EE separate project without using IT mill toolkit…if it runs and Java Class files are deployed in build then Eclipse IDE is fine…
…and then delete AddressBook main application class and then add same file again…

then lets see what happens :?:

i will try the demo addressbook also… :slight_smile:

good luck

For some reason your application server can not find compiled java classes. Does eclipse report any errors and does the project build? Have you added it mill toolkit jar to build libraries list? Do you have any errors in the console then you start the application server (apache tomcat)?

Issue resolved… This morning I just did a clean for the project and retired and it works…

My next issue is to access data from my existing java project.

I have a combo box in the itmill project and I am trying to poulate it with data from the other project. I have added the .jar files and also the project on the build path of the existing itmill project. But when I try to run the application it throws the class not found error.

java.lang.ClassNotFoundException: com.abb.demo.fepapp.FepsApp

Any suggestions …

Regards,
Saifee

[quote= saifeeman]
I have a combo box in the itmill project and I am trying to poulate it with data from the other project. I have added the .jar files and also the project on the build path of the existing itmill project. But when I try to run the application it throws the class not found error.

java.lang.ClassNotFoundException: com.abb.demo.fepapp.FepsApp

Any suggestions …
[/quote]See
this thread for answers for the previous question

Hi:

well the post on that thread is from me as well. I realized that this wasnt the right topic. so i started a new thread with that topic. Anyways i havent received any answers yet. If any of you guys know a way to resolve the issue or can guide me in the right direction , please let me know

Regards,
Saifee

Just a quick status note: this issue is resolved in the other thread:
http://forum.itmill.com/posts/list/676.page

I had the same problem this morning.
The error message is misleading somehow.
For me, that was because the ITMill’s jar file was not put in WEB-INF/lib folder, not because the class file was not found! (I haven’t yet migrated to Vaadin!)
Next time you get this message, check the contents of your war file to make sure that all the class files are there ALONG WITH A JAR FILE -_-