-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: reveng hashcode() boolean..int casting exception
PostPosted: Fri Feb 17, 2006 3:07 pm 
Regular
Regular

Joined: Sat Nov 06, 2004 5:20 pm
Posts: 54
Location: Collierville, TN
Using tools 3.1.0.beta4 and j2sdk1.4.2_09.

In reverse engineering db2 tables from the 400 the hashcode() method created has casting errors - casting from boolean to int.

This happens in the tablenameID.java class which comprises the composite-id.

partial stack trace:
Code:
    [javac] C:\eclipse\workspace\dbFramework\src\com\eaidbmodel\tones\sdltndata\Obstq900Id.java:603: inconvertible types
    [javac] found   : boolean
    [javac] required: int
    [javac] result = 37 * result + (int) this.isSTCLP();
    [javac] ^
    [javac] C:\eclipse\workspace\dbFramework\src\com\eaidbmodel\tones\sdltndata\Obstq900Id.java:603: incompatible types
    [javac] found   : java.lang.String
    [javac] required: int
    [javac] result = 37 * result + (int) this.isSTCLP();
    [javac] ^
    [javac] 20 errors

BUILD FAILED
C:\eclipse\workspace\dbFramework\build.xml:123: Compile failed; see the compiler error output for details.
   at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:933)
   at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:757)
   at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
   at org.apache.tools.ant.Task.perform(Task.java:364)
   at org.apache.tools.ant.Target.execute(Target.java:341)
   at org.apache.tools.ant.Target.performTasks(Target.java:369)
   at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
   at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
   at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
   at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
   at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
   at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
   at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)

Total time: 34 seconds


How do I overcome the casting exceptions? Tweak the template?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.