For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 5 replies, 5 voices, and was last updated 20 years, 8 months ago by
Scott Anderson.
-
AuthorPosts
-
rwm70cMemberI’m having an issue with compilations of jsp’s in a myeclipse web project. All classes specific to the project end up returning an error in the JSP indicating the class file cannot be found (cannot access n: bad class file webroot\WEB-INF\clasees\n.class). The class file is definitely in the indicated directory and location.
The application works when deployed so the errors are red herrings. They are a bit annoying, however, since they tend to make it difficult to find real errors. The issue seems to have occured when I switched to using java 5 and Tomcat. All compliance levels are at 5 and I’ve verified that everything is pointing at the same jdk. I’ve updated to the latest version of MyEclipse with no success.
The error definitely appears to be some type of class path issue where the JSP compiler is using a different class path then the general application. I can’t find any location where this is set independently, however.
Any ideas?
December 13, 2005 at 11:29 am #243037
johnlabargeMemberI have a similar issue with 1.4.2. I am wondering if there is some sort of special rule for where to put source code if you want JSP validation to work. This is driving me nuts as the src is clearly in the build path, and works fine everywhere but the jsp. The error comes when I <%page import=”org.package.*”%> which is in the directory src/org/package.
The little error thingy never goes away. Please make it go away!
Please let me know if you figure this out!
December 13, 2005 at 11:30 am #243038
johnlabargeMemberCorrection, it is <%@page import=”org.package.*”%> (just so I don’t get tossed for a typo)
December 13, 2005 at 1:20 pm #243047
Riyad KallaMemberGuys,
Try right clicking on your project root, going to MyEclipse > Remove all error markersand then clean/rebuild your project. Do the markers come back? They could be stale, and this is a known bug.
December 23, 2005 at 2:02 pm #243638
vstrugatskyMemberI have the same problem. I tried removing validaton markers and turning off JSP validation. When turned back on, the errors return. The project can be deployed successfully, so this appears to be a problem with JSP validation.
December 23, 2005 at 3:12 pm #243642
Scott AndersonParticipantcannot access n: bad class file webroot\WEB-INF\clasees\n.class
All compliance levels are at 5
JSP validation uses your external JDK, first on your classpath, to compile your JSPs in order to check them. If your external JDK is 1.4.x and all your classes are generated in a 1.5 format, it won’t be able to read your class files, thus resulting in the ‘bad class’ error you’re seeing. To see what JDK is used by the JSP validator, open a command shell and type ‘java -version’. If it’s not a 1.5 JDK, the mismatch is likely the source of the errors since the version used internally by Eclipse must match the one used by the JSP validator.
-
AuthorPosts
