Jasperserver & SQLAnywhere JDBC

瀏覽次數:536 次
跳到第一則未讀訊息

springbok

未讀,
2010年10月14日 清晨6:05:432010/10/14
收件者:SQL Anywhere Web Development
Hi,

I'm not sure if this is the most appropriate group for this question,
it is related to our web app development so I thought I'd start here.

I'm trying to connect JasperServer to my SQLAnywhere V12 DB using the
SQLA JDBC drivers and I'm having some problems. I've used Google and
tried all sorts of things without any luck.

My Environment:

Ubuntu 9.04
PATH=/opt/sqlanywhere12/sun/jre160_x86/bin:/opt/sqlanywhere12/bin32:/
usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
LD_LIBRARY_PATH=/opt/sqlanywhere12/lib32:/opt/sqlanywhere12/sun/
jre160_x86/lib/i386/client:/opt/sqlanywhere12/sun/jre160_x86/lib/i386/
server:/opt/sqlanywhere12/sun/jre160_x86/lib/i386:/opt/sqlanywhere12/
sun/jre160_x86/lib/i386/native_threads

In my Jasperserver I created a new datasource and I've tried both the
V3 & V4 JDBC drivers, i.e. sajdbc4.jar & sajdbc.jar using the
following:

V3:
Driver: sybase.jdbc.sqlanywhere.IDriver
URL: jdbc:sqlanywhere:server=jobbeatasa;host=ubuntu-rails3.local:2638

In my tomcat6 log file I have the following:

java.lang.ClassNotFoundException: sybase.jdbc.sqlanywhere.IDriver
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1645)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:
1491)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
...

V4:
Driver: sybase.jdbc4.sqlanywhere.IDriver
URL: jdbc:sqlanywhere:server=jobbeatasa;host=ubuntu-rails3.local:2638

This time I get an exception message in JasperServer:

type Exception report

message

description The server encountered an internal error () that prevented
it from fulfilling this request.

exception

org.springframework.web.util.NestedServletException: Handler
processing failed; nested exception is java.lang.UnsatisfiedLinkError:
no dbjdbc12 in java.library.path

org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:
924)

org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:
807)

org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:
571)

org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:
511)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
...

I think Jasperserver is unable to find the SQLA JDBC stuff, I've tried
copying the jar files to the tomcat/lib directory as well as the
jasperserver/drivers directory without any luck.

I've got no idea what to try next so any help greatly appreciated.

Thanks,

Etienne.


Eric Farrar

未讀,
2010年10月14日 上午10:08:522010/10/14
收件者:SQL Anywhere Web Development
Hello Etienne,

Here are some suggestions from one of our engineers:

I would suggest sticking to sajdbc4.jar and trying to figure out why
the JasperServer VM cannot find libdbjdbc12.so in the
LD_LIBRARY_PATH.
1. Make sure that the VM is 32 bit since the LD_LIBRARY_PATH does not
have any of the 64 bit libraries in the path. If the VM is 64 bit,
then lib64 needs to be in the path. If the VM is really 32-bit, then
maybe JasperServer is not using the LD_LIBRARY_PATH at all.
2. See if there is a setting or something to indicate which additional
libraries are needed.
3. Make sure that the configuration actually supports JNI. If not,
then the SA JDBC driver cannot be used.


Let me know if any of those help,

- Eric

springbok

未讀,
2010年10月15日 凌晨2:36:322010/10/15
收件者:SQL Anywhere Web Development
Hi Eric,

Thanks for looking into this for me so quickly.

Do I have to copy any of the files anywhere, or will it work as long
as I have all the correct environment variables setup? I think I may
still have to copy the jar files as the SQLA java path were they
reside is not in any path in the environment. In the Jasper docs
(http://jasperforge.org/plugins/mwiki/index.php/Jasperserver/
DataSources) it does say to copy the jar to the tomcat directory which
I did without any luck.

I'm not sure if Jasperserver supports JNI, how would I check that? I
did do a Google search but I could not find anything with JNI &
Jasperserver.

I'm not all that familiar with JAVA & JDBC so I feel a bit lost, there
does not seem to be a whole lot of easily accessible documentation
that describes in detail how to set these things up, especially when
dealing with different vendors trying to get them to work together is
a bit of a challenge.

Thanks again,

Etienne.
回覆所有人
回覆作者
轉寄
0 則新訊息