- This topic has 9 replies, 4 voices, and was last updated 18 years, 8 months ago by
Riyad Kalla.
-
AuthorPosts
-
Chandra ShirashyadMemberHi,
I am working on a web project to deploy on tomcat server. I have several JSP files and a few servlets and some class files (used as beans). In one of my class files on the first line I have this red error marker. When I moved my mouse on it it displays the following:Multiple markers at this line
– The type java.lang.object cannot be resolved. It is indirectly referenced from the required .class files
– 82 changed linesWhat does this mean? I can’t find any help about this error anywhere. I searched on this website and on google. Nothing found. By the way when I deployed my war files, the class files were not created and deployed. Please let me know how to fix this. My deadline is fast approaching.
Thanks in advance.
Chandra
Riyad KallaMemberChandra,
This sounds like a straight Eclipse error. What does your classpath look like? Right click on your Project root > Properties > Java Build Path > Libraries, tell me what is listed.
Chandra ShirashyadMemberRiyad,
Thanks for quick response. There are two entries there: commons-fileupload-1.0.jar and J3EE 1.4 Library Container. The library container had a bunch of jars under it from activation.jar to xml-apis.jar.Am I missing something?
Chandra.
Riyad KallaMemberAhh yea you are missing your JRE System Library (your main JDK classes), hit “Add Library” and then “J2SE System Library” and hit OK, then rebuild app (it will prompt you).
Chandra ShirashyadMemberRiyad,
Thanks. I just figured that out. I had accidentally removed it earlier. However there is another problem. I am using mail API in my servlet to send email. When I deploy my app to Tomcat and try the servlet. I get the error “java.lang.NoClassDefFoundError: javax/mail/Address”. Looks like I need to deploy mail.jar and activation.jar along with my application. Where in myEclipse do I specify that?Chandra.
Riyad KallaMemberChandra,
As with any web application (and MyEclipse) those libraries will need to into your WebRoot/WEB-INF/lib directory.
maxwildcatMemberi’m sorry, i’m having the same problem but i’m not sure i understand the reply (about the library) could you elaborate on how to add the userlibrary and how to find it (if it on my hdd)
Riyad KallaMemberMax,
All libraries are added to your project build path via youir project properties then clicking Java Build Path and then the Libraries tab.If you don’t know where this file is, you can safely download JavaMail API from Sun’s site, it’s a free framework you can use. When you get the activation and javamail JARs ready, drop them into your WEB-INF/lib dir, MyEclipse will automatically mount them into your build path for you.
anindya_y2kMemberi have mapped my project in eclipse 3.2.but i am getting the similar error. but the multiple markers error is not at a .class file.
i have written some code where i have used enumeration. the error says“Multiple Markers at this line” Syntax error on token “enum” ++ expected–Enumeration cannot be resolved
whereas in the code i have imported java.util.enumeration successfully.
interestingly the line “java.util.enumeration” dont throw any error but where i am making an objectEnumeration enum;
it throws the above error
i have placed all the jars which are required by my project and i dont have any other error except this error.
in addition JRE System Library is also at the Java Build Path along with the jars which are dependent on projectit will be great if you suggest something
———————————
Anindya Chakraborty
JP Morgan Chase
Corporate Internate group
Riyad KallaMemberAnindya,
Are you working on a Java 1.4 project or 1.5? I’m curious if you need the Enumeration class or the enum type. Also is it a mistype that you imported java.util.enumeration (lowecase E) or did you really type that import in, in which case it needs to be an upper case E. -
AuthorPosts