This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Rust Web Development and have Bastian Gruber on-line!
See this thread for details.
Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

JSP unable to find classes

 
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I recently started using a company to host a java web site. I have been unable to get my site running when I deploy on there virtual host. They use something called the NGASI Application Engine.

FYI - My code works in my development site on my computer.

I have uploaded my application. It's pretty straight forward stuff. The JSP pages are in the context root and the classes are in the WEB-INF/classes directory as they should be.

Whenever one of my JSP pages tries to call a class it can't find the class. This is the error I see on the web page:

An error occurred at line: 3 in the jsp file: /index.jsp
MLOGlobal cannot be resolved
1: <%@ page import="mlo.*" %>
2:
3: <% MLOGlobal.checkGlobalVariables();%>


When I check my log file this is the stack trace I see:

May 26, 2008 12:36:24 PM org.apache.jasper.compiler.JDTCompiler$1 findType
SEVERE: Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.(ClassFileReader.java:329)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:206)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:178)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:123)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getType(PackageBinding.java:126)
at org.eclipse.jdt.internal.compiler.lookup.Scope.findType(Scope.java:1327)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:2351)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getBinding(Scope.java:1568)
at org.eclipse.jdt.internal.compiler.ast.SingleNameReference.resolveType(SingleNameReference.java:797)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:310)
at org.eclipse.jdt.internal.compiler.ast.MessageSend.resolveType(MessageSend.java:344)
at org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:882)
at org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Block.java:115)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TryStatement.java:751)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:432)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:190)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:403)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1047)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:1094)
at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:353)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:596)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:411)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:413)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:308)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
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:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)


I have been trying to figure this out for a while. Any help would be really appreciated.

Thanks.

Peter
[ June 03, 2008: Message edited by: Peter Bergoff ]
 
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is the jar file for the mio.* classes?
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

I did not use a war or jar file. I have loaded the files directly into the context using the standard directory structure. That's how I've done it on my computer as well and it's worked.

Thanks for your help!
 
Bear Bibeault
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you've placed the un-jarred class files for the mlo.* classes where?

P.S. Could you do all of our eyes a favor and used mixed case for your display name?
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Bear,

Per your request, case updated. : )

The files are placed in WEB-INF/classes/mlo.
 
Bear Bibeault
Sheriff
Posts: 67618
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm, when i first looked at your post, I though that:

org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException

was a ClassNotFound exception.

I'm not familiar with Eclipse but I'd assume that this means that the class file is malformed in some way.

First thing that I'd try is to clean out all the class files and build from scratch. Meantime, I'm going to move this to the IDEs forum where the Eclipse-savvy hang out.
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bear!

Yeah, that is weird to see an eclipse type message. I have seen error messages due to jdk version mismatch between the eclipse used to compile vs. the tomcat app server's jdk. I developed using jdk 1.6.0_04 while the virtual app server only goes up to jdk 1.6.0_03, which is what it's currently set to.
[ May 28, 2008: Message edited by: Peter Bergoff ]
 
Peter Bergoff
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I deleted and reloaded my classes and it did find them. I didn't change anything but now it did work. Weird stuff. Thanks Bear.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic