|
From: <spf...@no...> - 2005-08-29 15:53:54
|
Hello Leif
thanks for the quick help, yes you're right, just insert the \sqllib\bin
dir from DB2 to the
java library path an the app runs.
btw great tool the java service wrapper.
rgds Stefan
Stefan,
I think that driver makes use of a native library. (DLL) The
problem is most likely
being caused by the Wrapper not being able to locate that DLL on the
library path.
When run without the Wrapper, the JVM defaults to the Windows PATH as its
library path. When running with the Wrapper however, you are specifying
a specific
path.
I would suggest figuring out where your native library is located
and then adding
another wrapper.java.library.path.n entry so that location is included.
Another
option is to get the standalone behavior by adding the PATH with:
wrapper.java.library.path.append_system_path=true
http://wrapper.tanukisoftware.org/doc/english/prop-java-library-path-append-system-path.html
Make sure you test in console mode before running as a service. The
PATH
option may not work if the dll is located on the user PATH but not on
the system
PATH. That 's why I prefer to say where the DLL is located, or even
copy it into
the directory where the wrapper.dll is located.
Cheers,
Leif
spf...@no... wrote:
>
> Hello
>
> i've got a java program that runs fine without the wrapper.
> when i start the program with the wrapper i becom en error when i will
> open
> a jdbc connection to a DB2 Database (8.2).
> Normaly when a SQL Exception with "No suitable driver" comes then it
> is a diffrerent driver then the db2 version.
> but i take the driver from the DB2 driver directory. Also the
> application without service wrapper runs with this
> DB2 JDBC Driver. I use the thick db2 driver.
>
>
> here the log output: (log level debug)
> wrapper | --> Wrapper Started as Console
> wrapper | Using system timer.
> wrapperp | server listening on port 32000.
> wrapper | Classpath element, wrapper.java.classpath.9, does not
> exist: ../lib/com.ibm.mqbin.jar
> wrapper | Launching a JVM...
> wrapper | command: "C:\WINDOWS\system32\java.exe" -Xms30m -Xmx128m
> -Djava.library.path="../lib" -classpath "../bin;../l
>
ib/wrapper.jar;../bin;../config;../lib/log4j-1.2.8.jar;C:\Programme\IBM\SQLLIB\java\db2java.zip;../lib/jms.jar;../lib/co
>
>
m.ibm.mq.jar;../lib/com.ibm.mqbin.jar;../lib/com.ibm.mqjms.jar;../lib/connector.jar;../lib/xercesImpl.jar;../lib/xml-api
>
> s.jar;../lib/jdom.jar;../lib/NovaFrame.jar"
> -Dwrapper.key="mylFDA_Sr5Qx3NSJ" -Dwrapper.port=32000
> -Dwrapper.debug="TRUE"
> -Dwrapper.use_system_time="TRUE" -Dwrapper.version="3.1.2"
> -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10
> " -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp
> ch.novanet.em.synchronizer.StartUp shop
> wrapper | JVM started (PID=5336)
> jvm 1 | WrapperManager class initialized by thread: main Using
> classloader: sun.misc.Launcher$AppClassLoader@133056f
>
> jvm 1 | Wrapper Manager: JVM #1
> jvm 1 | Wrapper Manager: Registering shutdown hook
> jvm 1 | Wrapper Manager: Using wrapper
> jvm 1 | Loaded native library: wrapper.dll
> jvm 1 | Calling native initialization method.
> jvm 1 | Initializing WrapperManager native library.
> jvm 1 | Java Executable: C:\WINDOWS\system32\java.exe
> jvm 1 | Windows version: 5.1.2600
> jvm 1 | Java Version : 1.5.0_02-b09 Java HotSpot(TM) Client VM
> jvm 1 | Java VM Vendor : Sun Microsystems Inc.
> jvm 1 |
> jvm 1 | Wrapper (Version 3.1.2) http://wrapper.tanukisoftware.org
> jvm 1 |
> jvm 1 |
>
WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@13e8d89,
> args["shop"]) called by thread: mai
> n
> jvm 1 | Open socket to wrapper...
> jvm 1 | Opened Socket
> jvm 1 | Send a packet KEY : mylFDA_Sr5Qx3NSJ
> jvm 1 |
> handleSocket(Socket[addr=localhost/127.0.0.1,port=32000,localport=2685])
> wrapperp | accepted a socket from 127.0.0.1 on port 2685
> wrapperp | read a packet KEY : mylFDA_Sr5Qx3NSJ
> wrapper | Got key from JVM: mylFDA_Sr5Qx3NSJ
> wrapperp | send a packet LOW_LOG_LEVEL : 1
> wrapperp | send a packet PING_TIMEOUT : 30
> wrapper | Start Application.
> wrapperp | send a packet START : start
> jvm 1 | Received a packet LOW_LOG_LEVEL : 1
> jvm 1 | Wrapper Manager: LowLogLevel from Wrapper is 1
> jvm 1 | Received a packet PING_TIMEOUT : 30
> jvm 1 | Wrapper Manager: PingTimeout from Wrapper is 30000
> jvm 1 | Received a packet START : start
> jvm 1 | calling listener.start()
> jvm 1 | WrapperSimpleApp: start(args)
> jvm 1 | WrapperSimpleApp: invoking main method
> jvm 1 | StartUp Mode: shop
> jvm 1 | 2005-08-29 16:28:59,233 ERROR poller.DbPoller - Error
> while executing SQL statement!
> jvm 1 | java.sql.SQLException: No suitable driver
> jvm 1 | at java.sql.DriverManager.getConnection(Unknown Source)
> jvm 1 | at java.sql.DriverManager.getConnection(Unknown Source)
> jvm 1 | at
>
ch.novanet.framework.util.poller.DbPoller.executePolling(DbPoller.java:53)
>
> jvm 1 | at
> ch.novanet.framework.util.poller.DbPoller.notify(DbPoller.java:39)
> jvm 1 | at
>
ch.novanet.framework.util.timer.TimingManager.notify(TimingManager.java:104)
>
> jvm 1 | at
> ch.novanet.framework.util.timer.TimingTask.run(TimingTask.java:50)
> jvm 1 | at java.util.TimerThread.mainLoop(Unknown Source)
> jvm 1 | at java.util.TimerThread.run(Unknown Source)
> jvm 1 | 2005-08-29 16:28:59,924 INFO mom.QueueConnectionHandler
> - Queue Session created ..
>
> rgds Stefan
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|