ClassCastException: oracle.ojc.compiler.AutoBoxingExpression JDeveloper 10.3

I'm getting an odd exception using JDeveloper 10.3 compiling with JDK 1.5.

ClassCastException: oracle.ojc.compiler.AutoBoxingExpression

Anybody run across this before?
I'm mostly an Eclipse guy, so is there something with JDev or the internal OC4J server I'm missing? I haven't started the server.
Who is Participating?
MehtaJasminConnect With a Mentor Author Commented:
When I selected "use javac" in the JDeveloper compiler properties, both errors (this and the class format error in my other thread) resolved. The reason for two threads was that the class format error was discovered before db connection was established, so I hadn't tried to run at that point.
Probably to do with Generics. These days you need to tell the compiler what sort of objects are involved.

Previously : Vector v = new Vector();

with generics:

Vector<String> v = new Vector<String>();

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

MehtaJasminAuthor Commented:
Sure, that makes sense, but the class that's throwing the exception is in the oracle libraries. Maybe my .jars are out of date.

I'll credit for correct response if that's what it turns out to be. Thanks.
MehtaJasminAuthor Commented:
Here's the full error message:

java.lang.ClassCastException: oracle.ojc.compiler.AutoBoxingExpression
      at oracle.ojc.compiler.ClassFileWriter.createClassFile(
      at oracle.ojc.compiler.RawClassSymbol.generateClass(
      at oracle.ojc.compiler.Parser.resolveMethodBodies(
      at oracle.ojc.compiler.Parser.parse(
      at oracle.ojc.compiler.Compiler.main_internal(
      at oracle.ojc.compiler.Compiler.main(
      at oracle.jdeveloper.compiler.Ojc.translate(
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProject(
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$
Sure, that makes sense, but the class that's throwing the exception is in the oracle libraries.
Yes, but it's important to see it anyway. Unfortunately the authors of the code have not seen fit to show the problematic source (of course i'm assuming the error IS caused by a problem in compiling the source) so it makes it difficult to correct.

What i would do in this case is start updating stuff. You should in any case be using a 1.7 compiler (even if you compile to target 1.5). Also update the JDeveloper version if possible.

If that doesn't cure it, let us know
MehtaJasminAuthor Commented:
I've requested that this question be deleted for the following reason:

Problem was solved along with my other question by the credited solution on that thread.
Before you close this, please state the solution here that explains how to get JDeveloper working correctly. It should not be necessary to use a different compiler
MehtaJasminAuthor Commented:
The answer from another thread also corrected this. It was credited and graded A there.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.