You are not logged in.

#1 2011-12-10 11:55:11

tcn
Member
Registered: 2011-09-30
Posts: 24

oracle jdk: java.lang.UnsatisfiedLinkError: no attach in java.library.

Hi!

I'm somewhat surprised that I didn't find anyone (google) having this issue. I just replaced openjdk with Oracle JDK from AUR but e.g. jvisualvm fails because java.library.path isn't set.

java.lang.UnsatisfiedLinkError: no attach in java.library.path
        at java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.lang.Runtime.loadLibrary0(Unknown Source)
        at java.lang.System.loadLibrary(Unknown Source)
        at sun.tools.attach.LinuxVirtualMachine.<clinit>(LinuxVirtualMachine.java:340)
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:124)
        at com.sun.tools.visualvm.attach.AttachModelImpl.printFlag(AttachModelImpl.java:89)
        at com.sun.tools.visualvm.jvm.JVMImpl.isDumpOnOOMEnabled(JVMImpl.java:212)
        at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.updateState(HeapDumpOnOOMEAction.java:83)
        at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.isEnabled(HeapDumpOnOOMEAction.java:77)
        at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.isEnabled(HeapDumpOnOOMEAction.java:46)
        at com.sun.tools.visualvm.core.ui.actions.SingleDataSourceAction.updateState(SingleDataSourceAction.java:77)
        at com.sun.tools.visualvm.heapdump.impl.HeapDumpOnOOMEAction.updateState(HeapDumpOnOOMEAction.java:98)
        at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.initialize(DataSourceAction.java:90)
        at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.doInitialize(DataSourceAction.java:122)
        at com.sun.tools.visualvm.core.ui.actions.DataSourceAction.isEnabled(DataSourceAction.java:99)
        at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getActions(ExplorerContextMenuFactory.java:171)
        at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getSelectionActions(ExplorerContextMenuFactory.java:127)
        at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getActions(ExplorerContextMenuFactory.java:121)
        at com.sun.tools.visualvm.core.explorer.ExplorerContextMenuFactory.getDefaultActionFor(ExplorerContextMenuFactory.java:113)
        at com.sun.tools.visualvm.core.explorer.ExplorerComponent.getDefaultAction(ExplorerComponent.java:195)
        at com.sun.tools.visualvm.core.explorer.ExplorerComponent.access$100(ExplorerComponent.java:70)
        at com.sun.tools.visualvm.core.explorer.ExplorerComponent$1.processMouseEvent(ExplorerComponent.java:110)
        at java.awt.Component.processEvent(Unknown Source)
        at java.awt.Container.processEvent(Unknown Source)
        at java.awt.Component.dispatchEventImpl(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
        at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
        at java.awt.Container.dispatchEventImpl(Unknown Source)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
        at java.awt.EventQueue.access$000(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.awt.EventQueue$3.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.awt.EventQueue$4.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[catch] at java.awt.EventDispatchThread.run(Unknown Source)
SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor com.sun.tools.visualvm.core.ui.DataSourceWindowManager$1
java.lang.NoClassDefFoundError: Could not initialize class sun.tools.attach.LinuxVirtualMachine
        at sun.tools.attach.LinuxAttachProvider.attachVirtualMachine(LinuxAttachProvider.java:63)
        at com.sun.tools.attach.VirtualMachine.attach(VirtualMachine.java:213)
        at com.sun.tools.visualvm.attach.AttachModelImpl.getVirtualMachine(AttachModelImpl.java:124)
        at com.sun.tools.visualvm.attach.AttachModelImpl.printFlag(AttachModelImpl.java:89)
        at com.sun.tools.visualvm.jvm.JVMImpl.isDumpOnOOMEnabled(JVMImpl.java:212)
        at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewModel.initialize(ApplicationOverviewModel.java:223)
        at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewModel.initialize(ApplicationOverviewModel.java:135)
        at com.sun.tools.visualvm.application.views.overview.ApplicationOverviewView.willBeAdded(ApplicationOverviewView.java:56)
        at com.sun.tools.visualvm.core.ui.DataSourceView.viewWillBeAdded(DataSourceView.java:163)
        at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.addViews(DataSourceWindowManager.java:247)
        at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.openWindowAndAddView(DataSourceWindowManager.java:181)
        at com.sun.tools.visualvm.core.ui.DataSourceWindowManager.access$000(DataSourceWindowManager.java:50)
        at com.sun.tools.visualvm.core.ui.DataSourceWindowManager$1.run(DataSourceWindowManager.java:100)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)

Offline

#2 2011-12-10 13:50:43

Spider.007
Member
Registered: 2004-06-20
Posts: 1,133
Website

Re: oracle jdk: java.lang.UnsatisfiedLinkError: no attach in java.library.

I am equally surprised, because I found a lot of hits. The answer might be: http://mail.openjdk.java.net/pipermail/ … 00122.html

Offline

#3 2011-12-10 14:07:12

tcn
Member
Registered: 2011-09-30
Posts: 24

Re: oracle jdk: java.lang.UnsatisfiedLinkError: no attach in java.library.

That's not the answer. This has (and used to and does with openjdk on arch) to work out-of-the-box.

Offline

#4 2011-12-10 14:09:03

Spider.007
Member
Registered: 2004-06-20
Posts: 1,133
Website

Re: oracle jdk: java.lang.UnsatisfiedLinkError: no attach in java.library.

So the Oracle JDK package is missing some configuration? Why not report that to the author of the package @ AUR?

Offline

#5 2012-01-07 15:36:19

tcn
Member
Registered: 2011-09-30
Posts: 24

Re: oracle jdk: java.lang.UnsatisfiedLinkError: no attach in java.library.

The problem is missing libattach.so...

# tar xfv /tmp/jdk-7-linux-x64.tar.gz jdk1.7.0/jre/lib/amd64/libattach.so
jdk1.7.0/jre/lib/amd64/libattach.so
# [root@server lib]# cp jdk1.7.0/jre/lib/amd64/libattach.so /opt/java/jre/lib/amd64/

Last edited by tcn (2012-01-07 15:39:09)

Offline

Board footer

Powered by FluxBB