Solved

Odd error in JDeveloper 10.3 - class format error

Posted on 2014-02-03
12
479 Views
Last Modified: 2014-02-06
When I try to run web applications in a certain project in JDeveloper 10.3, I'm getting the following (sparsely documented) error:

C:\foo\WEB-INF\jsp\welcome.jsp
Error: class format error: MyClass.class on classpath C:\foo\WEB-INF\clases\blah\MyClass.class

The class named varies from app to app, but it's always in an import statement in the jsp page.
0
Comment
Question by:MehtaJasmin
  • 7
  • 2
  • 2
12 Comments
 
LVL 6

Expert Comment

by:Mahesh Bhutkar
ID: 39831659
Can you confirm MyClass.java file is compiled & corresponding MyClass.class file generated ?

Give fully qualified name for your class. (packagename.classname) like
<%@ page import="blah.MyClass"%>

Still if it is not done then you can delete the compiled class files in the project and recompile entire project once.
0
 

Author Comment

by:MehtaJasmin
ID: 39836662
Yes, the source file is compiled and the corresponding .class file was generated. The fully qualified class name is also in the import statement.

This is running on Windows 7. These projects have been stable for years and I'm tasked wit adding enhancements, but I'm trying to run from JDeveloper 10.3 first.
0
 

Author Comment

by:MehtaJasmin
ID: 39838848
I've requested that this question be deleted for the following reason:

I need to resubmit with better and more complete information and include more communities.
0
 

Author Comment

by:MehtaJasmin
ID: 39838849
Sorry for doing the modification to the question incorrectly. Leaving it open. Thanks.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39838851
I need to resubmit with better and more complete information and include more communities.

You don't need to delete the question to do that:

a. append the info to this question
b. the moderators will add more zones

Still if it is not done then you can delete the compiled class files in the project and recompile entire project once.
Did you do that - and i mean all class files?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 6

Accepted Solution

by:
Mahesh Bhutkar earned 500 total points
ID: 39838976
Just try to compile your classes with javac & see the result.

I found simillar issue in Oracle Community Forum,
https://community.oracle.com/thread/353084?start=15&tstart=0
0
 

Author Comment

by:MehtaJasmin
ID: 39838981
Yes, I deleted the entire classes directory and recompiled. Same result.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39839046
You should not get a class format error with a fresh compilation except perhaps  there are conflicts between the compile time and runtime vm versions. Check both. They should be the same and up-to-date
0
 

Author Comment

by:MehtaJasmin
ID: 39839130
Running command line ant compile, everything compiles successfully, but the same errors using JDeveloper build.
0
 

Author Comment

by:MehtaJasmin
ID: 39839184
The JDev run configurations has the project compiler selected, which is 1.5.0_45, so that looks like the same between compile and runtime.
0
 

Author Comment

by:MehtaJasmin
ID: 39839302
bonzermahesh, that was it. I'm far more experienced with Eclipse, and didn't notice the "use javac" checkbox in the run configurations at first. So now, it compiles with no errors like it did with ant. Thanks all!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
for i loop in grovy 1 46
Image decoding from Camera 3 72
Java Loop 6 49
why cannot we forward request once the response is committed 2 33
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now