Re: java sqlite on FreeBSD 6.0 = FIXED

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Re: java sqlite on FreeBSD 6.0 = FIXED

Frédéric de la Goublaye
Well it is working on the console and with java/tomcat !
Yes !!!!!!!!

I should write a FreeBSD javasqlite page somewhere ...

java test
WARNING: using non-UTF SQLite2 engine
LIB version: 2.8.16
DB version: 3.2.7

  ----- Original Message -----
  From: Frédéric de la Goublaye
  To: [hidden email]
  Sent: Sunday, December 04, 2005 2:36 PM
  Subject: java sqlite on FreeBSD 6.0


  Thanks for your quick support.
  I am making some progress ...


  I copy  jawt_md.h and jni_md.h from the sub directory /usr/local/jdk1.4.2/include/freebsd/
  to the directory /usr/local/jdk1.4.2/include/

  I do not really know what I am doing but ... it is working.


   make
  ./libtool gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include -I/usr/local/include  -DHAVE_SQLITE2=1 -DHAVE_SQLITE3=1  -DHAVE_SQLITE_FUNCTION_TYPE=1  -DHAVE_SQLITE_OPEN_AUX_FILE=0  -DHAVE_SQLITE_SET_AUTHORIZER=1  -DHAVE_SQLITE_TRACE=1  -DHAVE_SQLITE_COMPILE=1  -DHAVE_SQLITE_PROGRESS_HANDLER=1 native/sqlite_jni.c
  rm -f .libs/sqlite_jni.lo
  gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include -I/usr/local/include -DHAVE_SQLITE2=1 -DHAVE_SQLITE3=1 -DHAVE_SQLITE_FUNCTION_TYPE=1 -DHAVE_SQLITE_OPEN_AUX_FILE=0 -DHAVE_SQLITE_SET_AUTHORIZER=1 -DHAVE_SQLITE_TRACE=1 -DHAVE_SQLITE_COMPILE=1 -DHAVE_SQLITE_PROGRESS_HANDLER=1 native/sqlite_jni.c  -fPIC -DPIC -o .libs/sqlite_jni.lo
  gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0 -I/usr/local/include -I/usr/local/include -DHAVE_SQLITE2=1 -DHAVE_SQLITE3=1 -DHAVE_SQLITE_FUNCTION_TYPE=1 -DHAVE_SQLITE_OPEN_AUX_FILE=0 -DHAVE_SQLITE_SET_AUTHORIZER=1 -DHAVE_SQLITE_TRACE=1 -DHAVE_SQLITE_COMPILE=1 -DHAVE_SQLITE_PROGRESS_HANDLER=1 native/sqlite_jni.c -o sqlite_jni.o >/dev/null 2>&1
  mv -f .libs/sqlite_jni.lo sqlite_jni.lo
  ./libtool gcc -o libsqlite_jni.la sqlite_jni.lo  -rpath /usr/local/lib /usr/local/lib/libsqlite.a /usr/local/lib/libsqlite3.la

  *** Warning: Linking the shared library libsqlite_jni.la against the
  *** static library /usr/local/lib/libsqlite.a is not portable!
  rm -fr .libs/libsqlite_jni.la .libs/libsqlite_jni.* .libs/libsqlite_jni.*
  gcc -shared  sqlite_jni.lo  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib  /usr/local/lib/libsqlite.a /usr/local/lib/libsqlite3.so -lc  -Wl,-soname -Wl,libsqlite_jni.so.0 -o .libs/libsqlite_jni.so.0
  (cd .libs && rm -f libsqlite_jni.so && ln -s libsqlite_jni.so.0 libsqlite_jni.so)
  (cd .libs && rm -f libsqlite_jni.so && ln -s libsqlite_jni.so.0 libsqlite_jni.so)
  ar cru .libs/libsqlite_jni.a /usr/local/lib/libsqlite.a  sqlite_jni.o  /usr/local/lib/libsqlite.a
  ranlib .libs/libsqlite_jni.a
  creating libsqlite_jni.la
  (cd .libs && rm -f libsqlite_jni.la && ln -s ../libsqlite_jni.la libsqlite_jni.la)

  #make test
  /usr/local/jdk1.4.2/bin/javac test.java


  # java test
  Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in java.library.path
  Exception in thread "main" java.lang.UnsatisfiedLinkError: version
          at SQLite.Database.version(Native Method)
          at test.main(test.java:72)

  # java -jar sqlite.jar test
  Unable to load sqlite: java.lang.UnsatisfiedLinkError: no sqlite_jni in java.library.path
  Exception in thread "main" java.lang.UnsatisfiedLinkError: open
          at SQLite.Database.open(Native Method)
          at SQLite.Shell.main(Shell.java:494)


  Have you any idear ?
  Thanks

  Frédéric


  ----- Original Message -----
  From: "Frédéric de la Goublaye" <[hidden email]>
  To: "Panagiotis Astithas" <[hidden email]>
  Sent: Sunday, December 04, 2005 2:05 PM
  Subject: Re: java sqlite on FreeBSD 6.0


  > Ouah ! Thanks for your quick support
  >
  > I reinstall sqlite3 with the ports
  >
  > I tried this command:
  >
  > ./configure --with-jdk=/usr/local/jdk1.4.2
  >
  > Now I have the message:
  >
  > configure: WARNING: setting generic JNI include file directives!
  > setting JNI include file
  > directives: -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0
  >
  > but the make gives this error:
  >
  > make
  > ./libtool
  > gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0
  > -I/usr/local/include -I/usr/local/include  -DHAVE_SQLITE2=1 -DHAVE_SQLITE3=1
  >  -DHAVE_SQLITE_FUNCTION_TYPE=1  -DHAVE_SQLITE_OPEN_AUX_FILE=0  -DHAVE_SQLITE_SET_AUTHORIZER=1
  >  -DHAVE_SQLITE_TRACE=1  -DHAVE_SQLITE_COMPILE=1  -DHAVE_SQLITE_PROGRESS_HANDLER=1
  > native/sqlite_jni.c
  > rm -f .libs/sqlite_jni.lo
  > gcc -c -Wall -O -fPIC -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd6.0
  > -I/usr/local/include -I/usr/local/include -DHAVE_SQLITE2=1 -DHAVE_SQLITE3=1
  > -DHAVE_SQLITE_FUNCTION_TYPE=1 -DHAVE_SQLITE_OPEN_AUX_FILE=0 -DHAVE_SQLITE_SET_AUTHORIZER=1
  > -DHAVE_SQLITE_TRACE=1 -DHAVE_SQLITE_COMPILE=1 -DHAVE_SQLITE_PROGRESS_HANDLER=1
  > native/sqlite_jni.c  -fPIC -DPIC -o .libs/sqlite_jni.lo
  > In file included from native/sqlite_jni.h:2,
  >                 from native/sqlite_jni.c:20:
  > /usr/local/jdk1.4.2/include/jni.h:27:20: jni_md.h: No such file or directory
  > In file included from native/sqlite_jni.h:2,
  >                 from native/sqlite_jni.c:20:
  > /usr/local/jdk1.4.2/include/jni.h:45: error: syntax error before "jsize"
  > /usr/local/jdk1.4.2/include/jni.h:45: warning: type defaults to `int' in
  > declaration of `jsize'
  >
  >
  >
  >
  > ----- Original Message -----
  > From: "Panagiotis Astithas" <[hidden email]>
  > To: "Frédéric de la Goublaye" <[hidden email]>
  > Cc: <[hidden email]>
  > Sent: Sunday, December 04, 2005 1:08 PM
  > Subject: Re: java sqlite on FreeBSD 6.0
  >
  >
  >> Frédéric de la Goublaye wrote:
  >>
  >> [...]
  >>
  >> > install jdk1.4.10: working good (from ports jdk14 after refresh with
  >> cvsup)
  >> > install tomcat 5.5.12: working good
  >> >
  >> > installed sqlite-3.2.7 from www.sqlite.org: (re-compile src): working
  >> good
  >>
  >> Note that you can find a port for this in databases/sqlite3.
  >>
  >> [...]
  >>
  >>> configure: WARNING: setting generic JNI include file directives!
  >>> setting JNI include file
  >>> directives: -I/usr/local/include -I/usr/local/include/freebsd6.0
  >>
  >> This must be your problem. The configure script does not find the jdk
  >> header files. For jdk14 you should
  >> have -I/usr/local/jdk1.4.2/include -I/usr/local/jdk1.4.2/include/freebsd.
  >>
  >>> using JDBC driver from JDBC2x directory
  >>> configure: creating ./config.status
  >>> config.status: creating Makefile
  >>>
  >>> make
  >>>
  >>> /usr/local/bin/javac  SQLite/Authorizer.java
  >>> /usr/local/bin/javac  SQLite/BusyHandler.java
  >>> /usr/local/bin/javac  SQLite/Callback.java
  >>> /usr/local/bin/javac  SQLite/Database.java
  >>> /usr/local/bin/javac  SQLite/Shell.java
  >>> ./libtool
  >>> cc  -I/usr/local/include  -DHAVE_SQLITE2=0 -DHAVE_SQLITE3=1  -o
  >>> native/mkconst native/mkconst.c /usr/local/lib/libsqlite3.la
  >>> mkdir native/.libs
  >>> gcc -I/usr/local/include -DHAVE_SQLITE2=0 -DHAVE_SQLITE3=1 -o
  >>> native/mkconst native/mkconst.c
  >>>  /usr/local/lib/libsqlite3.so -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath  
  >>> -Wl,/usr/local/lib
  >>> native/mkconst > SQLite/Constants.java
  >>> /usr/local/bin/javac  SQLite/Constants.java
  >>> /usr/local/bin/javac  SQLite/StringEncoder.java
  >>> /usr/local/bin/javac  SQLite/JDBCDriver.java
  >>> /usr/local/bin/javac  SQLite/JDBC2x/JDBCConnection.java
  >>> /usr/local/bin/jar cmf manifest sqlite.jar SQLite/Authorizer.class
  >>> SQLite/BusyHandler.class  SQLite/Callback.class  SQLite/Database.class
  >>> SQLite/Exception.class  SQLite/Shell.class  SQLite/TableResult.class
  >>> SQLite/Function.class  SQLite/FunctionContext.class
  >>> SQLite/Constants.class  SQLite/Trace.class  SQLite/Vm.class
  >>> SQLite/ProgressHandler.class  SQLite/StringEncoder.class
  >>> SQLite/DBDump.class  SQLite/JDBCDriver.class
  >>> SQLite/JDBC2x/JDBCConnection.class  SQLite/JDBC2x/JDBCStatement.class
  >>> SQLite/JDBC2x/JDBCResultSet.class
  >>> SQLite/JDBC2x/JDBCResultSetMetaData.class
  >>> SQLite/JDBC2x/JDBCDatabaseMetaData.class
  >>> SQLite/JDBC2x/JDBCPreparedStatement.class
  >>> SQLite/JDBC2x/TableResultX.class  SQLite/JDBC2x/DatabaseX.class
  >>> /usr/local/bin/javah -jni -o native/sqlite_jni.h SQLite.Database
  >>> SQLite.Vm  SQLite.FunctionContext
  >>> ....
  >>> ....
  >>>
  >>> native/sqlite_jni.h:111: error: syntax error before "jstring"
  >>> native/sqlite_jni.h:112: error: syntax error before '*' token
  >>> native/sqlite_jni.h:112: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Database_version'
  >>> native/sqlite_jni.h:112: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:119: error: syntax error before "jstring"
  >>> native/sqlite_jni.h:120: error: syntax error before '*' token
  >>> native/sqlite_jni.h:120: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Database_dbversion'
  >>> native/sqlite_jni.h:120: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:127: error: syntax error before "void"
  >>> native/sqlite_jni.h:135: error: syntax error before "void"
  >>> native/sqlite_jni.h:143: error: syntax error before "void"
  >>> native/sqlite_jni.h:152: error: syntax error before '*' token
  >>> native/sqlite_jni.h:152: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Database_error_1string'
  >>> native/sqlite_jni.h:152: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:159: error: syntax error before "void"
  >>> native/sqlite_jni.h:167: error: syntax error before "void"
  >>> native/sqlite_jni.h:175: error: syntax error before "void"
  >>> native/sqlite_jni.h:184: error: syntax error before '*' token
  >>> native/sqlite_jni.h:184: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Database_is3'
  >>> native/sqlite_jni.h:184: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:191: error: syntax error before "void"
  >>> native/sqlite_jni.h:199: error: syntax error before "void"
  >>> native/sqlite_jni.h:207: error: syntax error before "void"
  >>> native/sqlite_jni.h:215: error: syntax error before "void"
  >>> native/sqlite_jni.h:235: error: syntax error before '*' token
  >>> native/sqlite_jni.h:235: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Vm_step'
  >>> native/sqlite_jni.h:235: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:242: error: syntax error before "jboolean"
  >>> native/sqlite_jni.h:243: error: syntax error before '*' token
  >>> native/sqlite_jni.h:243: warning: type defaults to `int' in declaration
  >>> of `Java_SQLite_Vm_compile'
  >>> native/sqlite_jni.h:243: warning: data definition has no type or storage
  >>> class
  >>> native/sqlite_jni.h:250: error: syntax error before "void"
  >>> native/sqlite_jni.h:258: error: syntax error before "void"
  >>> native/sqlite_jni.h:266: error: syntax error before "void"
  >>> native/sqlite_jni.h:285: error: syntax error before "void"
  >>> native/sqlite_jni.h:293: error: syntax error before "void"
  >>> native/sqlite_jni.h:301: error: syntax error before "void"
  >>> native/sqlite_jni.h:309: error: syntax error before "void"
  >>> ....
  >>> native/sqlite_jni.c: At top level:
  >>> native/sqlite_jni.c:702: error: syntax error before "void"
  >>> native/sqlite_jni.c:110: warning: 'seterr' defined but not used
  >>> native/sqlite_jni.c:120: warning: 'setvmerr' defined but not used
  >>> native/sqlite_jni.c:165: warning: 'globrefset' defined but not used
  >>> native/sqlite_jni.c:214: warning: 'transfree' defined but not used
  >>> native/sqlite_jni.c:222: warning: 'trans2iso' defined but not used
  >>> native/sqlite_jni.c:331: warning: 'busyhandler3' defined but not used
  >>> native/sqlite_jni.c:353: warning: 'progresshandler' defined but not used
  >>> native/sqlite_jni.c:372: warning: 'callback' defined but not used
  >>> native/sqlite_jni.c:625: warning: 'doclose' defined but not used
  >>> *** Error code 1
  >>>
  >>> Stop in /usr/local/sqlite/javasqlite-20050608.
  >>
  >
_______________________________________________
[hidden email] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "[hidden email]"