“undefined symbol: SQLAllocEnv” error in Java [duplicate]

坚强是说给别人听的谎言 提交于 2019-12-12 19:42:39

问题


I am using java to build an application which requires to use MS Access. I am geting the following error when I run the project:

/usr/lib/jvm/jdk1.7.0/bin/java: symbol lookup error: /usr/lib/jvm/jdk1.7.0/jre/lib/i386/libJdbcOdbc.so: undefined symbol: SQLAllocEnv

What does it mean?


回答1:


As you mention in your previous question you are trying to do development in Linux (Ubuntu) for a project that will ultimately be deployed on Windows. I suspect that you are trying to use the JDBC-ODBC Bridge in Linux without having the appropriate driver software installed.

I have seen many answers that talk about using unixODBC and MDB Tools to manipulate an Access database under Linux, but in my own experience that hasn't worked out very well. Instead I would offer the following advice:

  • If you are developing a project for Windows then do your development under Windows. Then you can use the JDBC-ODBC Bridge and an actual Microsoft Access ODBC driver. However, bear in mind that the JDBC-ODBC Bridge has been removed from JDK8 and is not supported, as mentioned in the previous answer here.

  • If you must do your development under Linux then use UCanAccess (or perhaps just Jackcess, which UCanAccess uses as its lower-level interface to Access database files) and deploy the required components with your application.



来源:https://stackoverflow.com/questions/21930727/undefined-symbol-sqlallocenv-error-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!