This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 68595 - DefaultAdaptor fails to compile on jdk6 (java6) jdbc 4.0
Summary: DefaultAdaptor fails to compile on jdk6 (java6) jdbc 4.0
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-13 03:50 UTC by mdaniel
Modified: 2007-02-09 01:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch against DefaultAdaptor (1.62 KB, patch)
2005-11-13 03:50 UTC, mdaniel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mdaniel 2005-11-13 03:50:08 UTC
Due to the new methods introduced in JDK6 (Java6, JDBC 4.0), the DefaultAdapter
fails to compile. This patch addresses that until futher work can be done on it.

Tested with java full version "1.6.0-rc-b60" if anyone cares.
Comment 1 mdaniel 2005-11-13 03:50:40 UTC
Created attachment 26894 [details]
Patch against DefaultAdaptor
Comment 2 mdaniel 2005-11-13 03:51:06 UTC
Sorry, corrected type-o in the Summary
Comment 3 Andrei Badea 2005-11-13 11:56:48 UTC
Thank you for the patch, but it would cause the compilation to fail on pre-1.6
JDKs because of the java.sql.RowIdLifetime return value of getRowIdLifetime().
RowIdLifeitme is an enumeration introduced in 1.6.

See also issue 60508. I will probably close this issue as a duplicate of issue
60508, unless you provide a better patch, of course :-)
Comment 4 mdaniel 2005-11-13 17:58:52 UTC
I didn't provide the build.xml patch because I don't have a lot of experience 
with or confidence in the NB build system, but I believe that is the solution to 
these kinds of problems. For an example, look at the way FOP separates out the 
Java version-specific code: http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/
trunk/src/

NetBeans cannot be the first project to confront this problem; are there best 
practices anyone knows of?
Comment 5 Jesse Glick 2006-12-29 00:28:38 UTC
Seems broken in trunk; at least my build from inside the IDE (running JDK 7)
broke on db, even though my nbbuild/user.build.properties specifies
nbjdk.home=/space/jdk5. Didn't issue #60508 claim it was fixed? I am confused.
Comment 6 Andrei Badea 2007-01-02 10:37:34 UTC
jglick: it was fixed. It broke again when I fixed issue 85352. Thanks for the
reproducible use case. 

I used <available resource="java/sql/RowIdLifetime.class" to detect if
RowIdLifetime is on the classpath. In your scenario was erroneously found in the
host JDK. Hopefully fixed now, commit log in issue 85352. Please have a look at
it if you have the time. Do I get it right that nbjdk.bootclasspath is only
defined when a nbjdk.home or nbjdk.active are defined?

Closing this issue, please reopen issue 85352 if you still encounter problems.
Comment 7 Jesse Glick 2007-02-09 01:48:39 UTC
Works in all 6 combos: with Ant's JDK 5 or 6, and with nbjdk.home 5 or 6 or
undefined.