Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » loaderClass for jsps and eclipse launcher config
loaderClass for jsps and eclipse launcher config [message #553727] Wed, 18 August 2010 15:44
No real name is currently offline No real nameFriend
Messages: 1
Registered: August 2010
Junior Member
HI, i have a question regarding tomcat class loader

I have configured to load my classes through my custom class loader and have it configured in my Catalina as follows

<Loader loaderClass="de.fwsb.loader.EncryptedClassLoader" delegate="true" />

The EncryptedClassLoader extends org.apache.catalina.loader.WebappClassLoader class.

The web server starts fine, which means the class loader is working fine, because the server is started through our own contextListner which is loaded through this class loader.#
The problem is that when i visit the index page i get the following exception,

org.eclipse.jdt.internal.compiler.classfmt.ClassFormatExcept ion
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init >(ClassFileReader.java:342)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompile r.java:206)
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompile r.java:178)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.a skForType(LookupEnvironment.java:122)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getT ypeOrPackage(PackageBinding.java:178)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Sc ope.java:2101)
at org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference .getTypeBinding(QualifiedTypeReference.java:69)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveT ype(TypeReference.java:134)
at org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resol ve(LocalDeclaration.java:138)
at org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Blo ck.java:115)
at org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(T ryStatement.java:799)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclarat ion.resolveStatements(AbstractMethodDeclaration.java:429)
at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.reso lveStatements(MethodDeclaration.java:196)
at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclarat ion.resolve(AbstractMethodDeclaration.java:400)


Which basically means that the classes referenced in the jsp are not being loaded through this custom class loader.

I had asked this question at tomcat mailing list but i was told that it seems like an Eclipse specific question, rather than a Tomcat one. As, the Eclipse IDE uses a custom config when launching apps in Tomcat, you'll have to track down where that config is and adjust it if possible.

Can someone please let me know how to configure it so that the classes in JSPs are also loaded through this class loader.
Regards,
Amir
Previous Topic:Source ranges and buffer out of sync (Javamodel)
Next Topic:Build error does not annotate file, package, or project with error
Goto Forum:
  


Current Time: Fri Apr 26 00:14:08 GMT 2024

Powered by FUDForum. Page generated in 0.03618 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top