- This topic has 4 replies, 3 voices, and was last updated 13 years, 2 months ago by Brian Fernandes.
-
AuthorPosts
-
Jan PfeiferMemberhave a few some strange issues with my class after migrating from JDK5/Tomcat5 to JDK6/Tomcat7 both with MyEclipse 9.
Whenever I try to access ‘myclass’ via jsp:usebean I got following error
org.apache.jasper.JasperException: javax.servlet.ServletException: java.lang.ClassFormatError: Illegal class modifiers in class myclass: 0x209
The rest of log points nowhere. By trial and error I have trimmed huge class to the following problematic part:
... public class myclass implements Serializable ... rf = store.getDefaultFolder(); f = (IMAPFolder)rf; final IMAPStore storeNew = store; Object val = f.doCommand(new IMAPFolder.ProtocolCommand() { <-- problem propably starts here public Object doCommand(IMAPProtocol p) throws ProtocolException { ...
The next strange thing is that collegue is using the same enviroment with no problems. I have compared our class files and the only difference is in byte. My class ends with ’02 09′, his ’06 09′
After several days I am out of options how to get rid of it. I have reinstalled JDK and reinstalled/updated MyEclipse to 9.1.
support-swapnaModeratorJanPfeifer,
Sorry that you are seeing this issue with MyEclipse.
1) This can be caused by bytecodes generated from older versions of JDK. Take a look at this bug :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=65471312) Can you try to recompile your java classes using javac compiler for JDK 1.6 and check to see if the issue persists ?
3) Are you using any older collection APIs in your code?
4) Clear the contents of the .log file which is located at <workspace dir>/.metadata/.log. Replicate the issue and paste the entire contents of the .log file for us to investigate further?
5) Can you give us detail steps on how you are migrating the project for us to be able to replicate the issue at our end?
Jan PfeiferMemberThank you for quick response.
Ad 1) I read it earlier. But all was set to use latest JDK1.6. I reinstalled MyEclipse and now I am using its JDK1.6 13
Ad 2) I recomiled class with javac JDK6. It produces different working result!
Ad 3) Maybe,somewhere. But I have minimalised problematic class to few lines with inner class. (See attachment)
Ad4) Ok
Ad5) It is quite complicated. Large project and so on. I have eneded with fresh install of JDK6/MyEclipse/Tomcat7
I have added source,log file and both compilation results to the attachment.
Hope it helps.Attachments:
You must be logged in to view attached files.
support-swapnaModeratorJanPfeifer,
I have escalated it to a dev team member. They will get back to you.
Sorry for the inconvenience caused.
Brian FernandesModeratorJan,
I’m quite sure there is still something awry with your compiler settings, the error does seem to signify this.
1) Can you tell me exactly what JRE you have selected under Window > Preferences > Java > Installed JREs?
2) What do you have set under Window > Preferences > Java > Compiler as the compliance level? Do you have the “Use default compliance settings” box checked?
3) For each of the projects that are part of your deployment (web projects, dependent Java projects, etc) can you go to Project properties > Java Compiler and see what settings are in use there? They should ideally all use the workspace settings (Enable project settings should be unchecked) – if you do have project specific settings, what are they compliance values there?
4) Have you tried cleaning and re-building all the projects using Project > Clean?
-
AuthorPosts