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 197409 - NetbinoxHooks.findLibrary's implementation incorrect
Summary: NetbinoxHooks.findLibrary's implementation incorrect
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.0.1
Hardware: PC Other
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-04 19:05 UTC by stoto79
Modified: 2011-04-18 08:28 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stoto79 2011-04-04 19:05:42 UTC
Copied from https://bug.oraclecorp.com/pls/bug/webbug_edit.edit_info_top?rptno=11933128

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
The loading of native libraries doesn't work in jdev under netbinox.

Steps to Reproduce:
-------------------

1) View - Database - Database Navigator
2) Press the (+) to launch the create database connection dialg
3) Enter the following details:
Connection Type: Oracle (JDBC)
Username: scott
@ Password: tiger
Driver: oci8
Hostname: adc2180465.us.oracle.com
Port: 1521
SID: db112

4) Press "Test Connection"
-> Test failed: ClassLoader.findLibrary failed to return an absolute path:
ocijdbc11 

As far as I can tell the reason for this is
org.apidesign.netbinox.NetbinoxHooks . I think its findLibrary
implementation is wrong:

public String findLibrary(BaseData bd, String string) {
 return string;
}

This shouldn't return null if it isn't going to actually find the library.
Returning string just breaks the loading of any library from the
LD_LIBRARY_PATH.

If you have the library in question (ocijdbc11 ) on your library path then
the connection attempt should work. Note that if the native library and the
ojdb6.jar don't match versions the test will still fail with an error message
about the major/minor versions not matching - in the event of this error
message the native lib has been loaded properly.
Comment 1 Jaroslav Tulach 2011-04-05 04:00:26 UTC
It would help me to have the bundle in question (at least the important part of the manifest and info about files layout), so I can write reliable unit test. Hopefully I find it reading 11933128.
Comment 2 Jaroslav Tulach 2011-04-05 15:20:21 UTC
The fix for this bug is likely to be in 
http://source.apidesign.org/hg/netbinox/
Hg repository. Thus adding NO70 keyword.
Comment 3 Jaroslav Tulach 2011-04-06 09:34:15 UTC
Fixed in release691 branch: http://source.apidesign.org/hg/netbinox/rev/aa4e055db136
Comment 4 Jaroslav Tulach 2011-04-06 09:52:20 UTC
Available in build #247 of
http://deadlock.netbeans.org/hudson/job/netbinox691/