New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnsatisfiedLinkError occurs in libjaybird22_x64.so undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE [JDBC259] #306
Comments
Commented by: @mrotteveel The problem is most likely caused by a missing libstdc++.so.6 on your machine. If not, then you should be able to install it using: |
Commented by: @mrotteveel BTW: As far as I can tell Jaybird itself does not depend on libstdc++6 (according to the ldd output), so it might be a dependency of Java. |
Modified by: @mrotteveelassignee: Roman Rokytskyy [ rrokytskyy ] => Mark Rotteveel [ avalanche1979 ] |
Commented by: @mrotteveel After some further investigating, it seems that the problem is with libjaybird. ldd -r shows that this symbol (and some others) are undefined: mark@ubuntu-x64:~/development/jaybird/client-java/native$ ldd -r libjaybird22_x64.so |
Commented by: @mrotteveel Could you check if the attached version of the library solves the problem for you? |
Modified by: @mrotteveelAttachment: libjaybird22_x64.so [ 12177 ] |
Commented by: @mrotteveel Attached libjaybird22_x64.so was compiled by including <syslibset libs="stdc++,dl"/> into the gcc linker definition in build_native.xml (apparently the already included <linkerarg value="-ldl"/> and <linkerarg value="-lstdc++"/> are ignored). The ldd output is now good: |
Commented by: Martin Mayerhofer (mmayerhofer) I tried the attached library and the UnsatisfiedLinkError is gone, nevertheless there is another error popping up which also ends in the native library, I have both http://libfbembed.so + http://libfbclient.so (both ver. 2.5.1) in my library path. Exception: org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize - Could not find or load the firebird client library. |
Commented by: @mrotteveel Typical debugging problem :( Solve one problem and another pops up. I will investigate further. |
Commented by: @mrotteveel I tried this under Ubuntu 12.04 As far as I can see under Ubuntu 12.04, the libfbembed2.5 package does not create a /usr/lib/libfbembed.so or /usr/lib/x86_64-linux-gnu/libfbembed.so symlink to /usr/lib/x86_64-linux-gnu/libfbembed.so.2.5.1. After adding this symlink manually the library is found. BTW: I didn't get the original undefined symbol error with the original libjaybird22_x64.so under Ubuntu 12.04. Which Java version do you have installed? I installed openjdk-6-jdk; maybe the errors depend on the exact java version. |
Commented by: Martin Mayerhofer (mmayerhofer) I have following java version installed: Java VM Version: java version "1.6.0_30" Just to add some more information, I used following libraries: edit: corrected libary link |
Commented by: @mrotteveel That download is for the Windows 64 Firebird Embedded, which is not going to work under Ubuntu ;) Could you please check which http://libfbembed.so files are available on your computer. Most likely you are missing the http://libfbembed.so symlink itself (that was the problem on my ubuntu 12.04 VM). I would also like to know which Ubuntu package you installed for Java, as your version info differs from the openjdk-6-jdk I installed using apt-get and that package reports: |
Commented by: Martin Mayerhofer (mmayerhofer) sorry pasted the wrong link, of course the windows version will not work under ubuntu ;) here is the correct link: http://sourceforge.net/projects/firebird/files/firebird-linux-amd64/2.5.1-Release/FirebirdCS-2.5.1.26351-0.amd64.tar.gz/download as for the java installation, I downloaded it from oracle: http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u30-oth-JPR |
Commented by: @mrotteveel I expected that you would have used the packages from the Ubuntu 12.04 repository itself. I am not sure if I have time to dive deeper into it this week, and I am on holiday from next Saturday. For the embedded library loading be sure to check that the library (or its symlink) is called http://libfbembed.so, and that it is in the actual library path (either specified in java.library.path, or ld.so.conf or in LD_LIBRARY_PATH). With the Firebird embedded library from the Ubuntu repository I had the same(?) problem as it did not have a http://libfbembed.so library (just a so.2.5 and so.2.5.1). |
Commented by: Paolo (pcucchi) I've the same problem in 32 bit system: http://libjaybird22.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE Is there a build that fixes this problem also for 32 bit system? uts@uts-desktop:/usr/lib/i686$ ldd -r /home/uts/NetBeansProjects/ladon/lib/win/32/libjaybird22.so My system is: |
Commented by: Martin Mayerhofer (mmayerhofer) Currently the only solution would be that you compile the natives on your own, including the fix to the build_native.xml which Mark mentioned earlier ... |
Commented by: @mrotteveel I will upload a new version of the 32 bit library later today. |
Modified by: @mrotteveelAttachment: http://libjaybird22.so [ 12180 ] |
Commented by: @mrotteveel Attached correctly linked 32 bit http://libjaybird22.so |
Commented by: @mrotteveel This issue needs to be linked to Version Jaybird 2.2.1 when it is created |
Modified by: @mrotteveelFix Version: Jaybird 2.3 [ 10440 ] |
Commented by: @mrotteveel Committed fixed build file to trunk and Branch_2_2 |
Modified by: @mrotteveelFix Version: Jaybird 2.2.1 [ 10474 ] |
Commented by: Paolo (pcucchi) I've set library path to FirebirdCS-2.5.1.26351-0.amd64/buildroot/opt/firebird/lib/libfbclient.so or /opt/firebird/lib (after installing it) or /usr/lib64 but I always have "Could not find or load the firebird client library" If I statically load library through System.loadlibrary() I've no error. What could be wrong? My system properties: Runtime error: org.firebirdsql.gds.impl.jni.InternalError: FirebirdApiBinding::Initialize - Could not find or load the firebird client library. |
Modified by: @mrotteveelstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Martin Mayerhofer (mmayerhofer)
Attachments:
libjaybird22_x64.so
libjaybird22.so
Votes: 1
libjaybird22_x64.so (ver. 2.2.0-release) / http://libfbembed.so (ver. 2.5.1) is present in the java.library.path and an exception gets thrown when trying to create a database connection to an embedded database
Exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/rgba/IdeaProjects/TimeAttendant/libjaybird22_x64.so: /home/rgba/IdeaProjects/TimeAttendant/libjaybird22_x64.so: undefined symbol: _ZTVN10__cxxabiv117__class_type_infoE
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1732)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1028)
at org.firebirdsql.gds.impl.jni.JniGDSImpl.initJNIBridge(JniGDSImpl.java:63)
at org.firebirdsql.gds.impl.jni.JniGDSImpl.<clinit>(JniGDSImpl.java:24)
at org.firebirdsql.gds.impl.jni.EmbeddedGDSFactoryPlugin.getGDS(EmbeddedGDSFactoryPlugin.java:40)
at org.firebirdsql.gds.impl.GDSFactory.getGDSForType(GDSFactory.java:220)
at org.firebirdsql.jca.FBManagedConnectionFactory.getGDS(FBManagedConnectionFactory.java:114)
at org.firebirdsql.jdbc.AbstractDriver.connect(AbstractDriver.java:124)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at FBConnect.main(FBConnect.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Java Code:
import org.firebirdsql.jdbc.FBResultSet;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
public class FBConnect {
public static void main(String[] args) {
}
}
Java VM Version:
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode)
OS:
Ubuntu 12.04
Commits: c6e191d 39f5dc0
The text was updated successfully, but these errors were encountered: