On 18/08/2010 16:09, Amir Wasim wrote: > Hi all, > > 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.ClassFormatException > at > org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:342) > 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:122) > at > org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178) > at > org.eclipse.jdt.internal.compiler.lookup.Scope.getPackage(Scope.java:2101) > at > org.eclipse.jdt.internal.compiler.ast.QualifiedTypeReference.getTypeBinding(QualifiedTypeReference.java:69) > at > org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:134) > at > org.eclipse.jdt.internal.compiler.ast.LocalDeclaration.resolve(LocalDeclaration.java:138) > at > org.eclipse.jdt.internal.compiler.ast.Block.resolveUsing(Block.java:115) > at > org.eclipse.jdt.internal.compiler.ast.TryStatement.resolve(TryStatement.java:799) > at > org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:429) > at > org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:196) > at > org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:400) > > > Which basically means that the classes referenced in the jsp are not > being loaded through this custom class loader. Can someone please let > me know how to configure it so that the classes in JSPs are also > loaded through this class loader
That seems like an Eclipse specific question, rather than a Tomcat one. 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. p
0x62590808.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature