Solved

ClassCastException: oracle.ojc.compiler.AutoBoxingExpression JDeveloper 10.3

Posted on 2014-02-03
10
295 Views
Last Modified: 2014-02-12
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.
0
Comment
Question by:MehtaJasmin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
10 Comments
 
LVL 16

Expert Comment

by:krakatoa
ID: 39829463
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>();

etc.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39829501
0
 

Author Comment

by:MehtaJasmin
ID: 39829522
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.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 

Author Comment

by:MehtaJasmin
ID: 39829536
Here's the full error message:

java.lang.ClassCastException: oracle.ojc.compiler.AutoBoxingExpression
      at oracle.ojc.compiler.ClassFileWriter.createClassFile(ClassFileWriter.java:1224)
      at oracle.ojc.compiler.RawClassSymbol.generateClass(Symbol.java:7217)
      at oracle.ojc.compiler.Parser.resolveMethodBodies(Parser.java:8397)
      at oracle.ojc.compiler.Parser.parse(Parser.java:7823)
      at oracle.ojc.compiler.Compiler.main_internal(Compiler.java:978)
      at oracle.ojc.compiler.Compiler.main(Compiler.java:745)
      at oracle.jdeveloper.compiler.Ojc.translate(Ojc.java:1486)
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildGraph(UnifiedBuildSystem.java:300)
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProjectFiles(UnifiedBuildSystem.java:515)
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildProject(UnifiedBuildSystem.java:608)
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.buildAll(UnifiedBuildSystem.java:665)
      at oracle.jdeveloper.compiler.UnifiedBuildSystem$CompileThread.run(UnifiedBuildSystem.java:893)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39829664
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
0
 

Author Comment

by:MehtaJasmin
ID: 39839658
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.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39839659
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
0
 

Accepted Solution

by:
MehtaJasmin earned 0 total points
ID: 39839830
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.
0
 

Author Closing Comment

by:MehtaJasmin
ID: 39852787
The answer from another thread also corrected this. It was credited and graded A there.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Unhandled exception type Exception 18 65
Adding multiple JVM environments to RedHat 6 7 81
ArrayList Adding/settign data 3 37
Java List 4 76
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

734 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