Bug 166844 - openjdk7 can't open library when remote debug enabled
Summary: openjdk7 can't open library when remote debug enabled
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: java (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-java (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-11 15:20 UTC by Liang Xu
Modified: 2019-01-15 16:22 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Liang Xu 2012-04-11 15:20:11 UTC
We upgrade the openjdk on Freebsd8 from 6 to 7. Now when the remote debug is enabled, the JVM cant start and throw following errors:
Apr  5 16:08:56 TPC-D16-14 appsrv[90192]:
Apr  5 16:09:06 TPC-D16-14 appsrv[90192]: Launching a JVM...
Apr  5 16:09:06 TPC-D16-14 appsrv[90192]: JVM exited while loading the application.
Apr  5 16:09:06 TPC-D16-14 appsrv[90192]: NPT ERROR: Cannot open library

It turns out to be on library no found by the JVM. Then, I find a workaround by creating a link under /usr/local/lib/
ln -s /usr/local/openjdk7/jre/lib/amd64/libnpt.so /usr/local/lib/libnpt.so

Thanks.

How-To-Repeat: 1. Install openjdk7
ftp://ftp.freebsd.org/pub/FreeBSD/ports/amd64/packages-8-stable/java/openjdk-7.2.13.tbz
2. enable remote debug
wrapper.java.additional.43=-agentlib:jdwp=transport=dt_socket,address=0.0.0.0:8000,server=y,suspend=n
3. java program fail to start
Comment 1 Jonathan Chen 2012-06-25 08:05:09 UTC
This also happens on FreeBSD 9-STABLE/amd64.
-- 
Jonathan Chen <jonc@chen.org.nz>
Comment 2 Lapo Luchini 2012-07-03 14:38:18 UTC
Seems to be that it also happens in latest openjdk6-b25_1.
Comment 3 yerenkow 2012-11-15 13:50:56 UTC
Actually this should be easily fixed in our javavmwrapper;

tryJavaCommand () {
...

should check if we are trying to run openjdk7's java, and simply made:

  export LD_LIBRARY_PATH=/usr/local/openjdk7/jre/lib/amd64:$LD_LIBRARY_PATH


then all goes well (it seems so).


-- 
Regards,
Alexander Yerenkow
Comment 4 Greg Lewis freebsd_committer 2013-01-01 21:09:05 UTC
Responsible Changed
From-To: freebsd-java->glewis

I'll take it.
Comment 5 Mark Linimon 2013-08-09 02:34:33 UTC
----- Forwarded message from Jonathan Chen <jonc@chen.org.nz> -----

Date: Fri, 19 Jul 2013 10:04:25 +1200
From: Jonathan Chen <jonc@chen.org.nz>
To: glewis@freebsd.org
Cc: freebsd-java@freebsd.org
Subject: java/166844: openjdk7 can't open library when remote debug enabled

Hi Greg,

I noticed that you've picked up this PR (yay!). Would it be too much
to hope that you've managed to find the cause for it and a possible
fix? Or is the javavmwrapper work-around the only recourse for now?

Cheers
--
Jonathan Chen <jonc@chen.org.nz>
_______________________________________________
freebsd-java@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"

----- End forwarded message -----
Comment 6 Jonathan Chen 2013-12-23 05:23:35 UTC
Hi,

This is now appears to be working with openjdk-7.45.18, on 
amd-64/9.2-STABLE r258726.

Cheers.
-- 
Jonathan Chen <jonc@chen.org.nz>
----------------------------------------------------------------------
           "You can get farther with a kind word and a gun
                       than you can with a kind word alone" - Al Capone
Comment 7 Tom Judge freebsd_committer 2014-02-28 22:38:39 UTC
I just ran into this on 9.2/amd64:

openjdk-7.51.13_1,1            Java Development Kit 7
javavmwrapper-2.4_3            Wrapper script for various Java Virtual
Machines

While using maven to build apache tika.
Comment 8 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:33 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped