|
From: Ashley H. <ah...@te...> - 2006-07-06 05:12:13
|
Hi Leif,
This was exactly the problem. It works like a beauty now.
Thanks a lot for your help, it is greatly appreciated.
Ashley
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...] On Behalf Of Leif
Mortenson
Sent: Thursday, July 06, 2006 3:05 PM
To: wra...@li...
Subject: Re: [Wrapper-user] .properties and .xml file not loading up on
classpath UNIX
Ashley,
Ok. I see. The problem is not that you are unable to locate a jar, the
problem is that you are unable to locate a file:
jvm 1 | Initial SessionFactory creation failed:
org.hibernate.HibernateException: /hibernate.cfg.xml not found
The problem is that jar files need to be explicitly specified on the
classpath. But you are looking for a resource on the classpath. In that
case, you should only be specifying the directory.
Change your classpath to this and give it another try:
wrapper.java.classpath.1=../target/*.jar
wrapper.java.classpath.2=../target
Not sure why it was working on windows for you. Maybe the ../target/.
directory was being added. I'll play around with that.
Cheers,
Leif
Ashley Hurkoo wrote:
> I am running the daemon as root so I guess it is unlikely that there
> would be any permission problem.
>
> I need the file hibernate.cfg.xml on my classpath. Here is the log
output:
>
>
> wrapper | --> Wrapper Started as Console wrapper | Using tick timer.
> wrapperp | server listening on port 32000.
> wrapper | Command[0] : java
> wrapper | Command[1] : -Djava.library.path=../bin wrapper |
> Command[2] : -classpath wrapper | Command[3] :
> ../target/telstraGMLC.properties:../target/optusGMLC.properties:../tar
> get/mo
> bilaris_telstra.properties:../target/mobilaris_poclient.properties:../
> target
> /log4j.properties:../target/hutchLocation.properties:../target/hiberna
> te.cfg
> .xml:../target/errorMsg.properties:../target/dao.properties:../target/
> daemon
>
config.properties:../target/config.properties:../target/QueueItem.hbm.xml:..
> /target/Position.hbm.xml:../target/LocationServiceApp.properties:../ta
> rget/C
> achedAddress.hbm.xml:../target/matrix-positioning-1.2.jar:../lib/xalan
> -old.j
> ar:../lib/ssllib-1.6.jar:../lib/saaj-old.jar:../lib/poapi-2.0.jar:../l
> ib/mys
> ql-connector-java-3.1.12-bin.jar:../lib/mobilaris-sax-3.0.jar:../lib/m
> obilar
> is-geodesy-3.0.jar:../lib/matrix-geospatial-1.1-SNAPSHOT.jar:../lib/ma
> trix-c
> ore-1.0-SNAPSHOT.jar:../lib/log4j-1.2.8.jar:../lib/locdriver-1.5.jar:.
> ./lib/
> locationbrick-1.4.jar:../lib/junit-3.8.1.jar:../lib/jta-unknown.jar:..
> /lib/j
>
bossall-client-4.0.4.GA.jar:../lib/jaxrpc-old.jar:../lib/javamail-1.3.2.jar:
> ../lib/hibernate-3.1.3.jar:../lib/dom4j-old.jar:../lib/commons-logging
> -1.0.4
> .jar:../lib/commons-lang-2.1.jar:../lib/commons-id-0.1-dev.jar:../lib/
> common
> s-httpclient-2.0.jar:../lib/commons-discovery-old.jar:../lib/commons-d
> igeste
>
r-1.7.jar:../lib/commons-configuration-1.1.jar:../lib/commons-collections-3.
> 1.jar:../lib/cglib-nodep-2.1_3.jar:../lib/axis-1.4.jar:../lib/antlr-2.
> 7.4.ja
> r:../bin/wrapper.jar
> wrapper | Command[4] : -Dwrapper.key=jPYOKzunGl_jhiyC wrapper |
> Command[5] : -Dwrapper.port=32000 wrapper | Command[6] :
> -Dwrapper.jvm.port.min=31000 wrapper | Command[7] :
> -Dwrapper.jvm.port.max=31999 wrapper | Command[8] :
> -Dwrapper.debug=TRUE wrapper | Command[9] : -Dwrapper.pid=3491
> wrapper | Command[10] : -Dwrapper.version=3.2.0 wrapper |
> Command[11] : -Dwrapper.native_library=wrapper wrapper | Command[12]
> : -Dwrapper.cpu.timeout=10 wrapper | Command[13] : -Dwrapper.jvmid=1
> wrapper | Command[14] : org.tanukisoftware.wrapper.WrapperSimpleApp
> wrapper | Command[15] : com.tenzeng.matrix.positioning.worker.Daemon
> wrapper | Launching a JVM...
> jvm 1 | WrapperManager class initialized by thread: main Using
> classloader: sun.misc.Launcher$AppClassLoader@133056f
> jvm 1 | Wrapper (Version 3.2.0) http://wrapper.tanukisoftware.org
> jvm 1 |
> jvm 1 | Wrapper Manager: JVM #1
> jvm 1 | Running a 32-bit JVM.
> jvm 1 | Wrapper Manager: Registering shutdown hook
> jvm 1 | Wrapper Manager: Using wrapper
> jvm 1 | Load native library. One or more attempts may fail if platform
> specific libraries do not exist.
> jvm 1 | Loading native library failed: libwrapper-linux-x86-32.so
Cause:
> java.lang.UnsatisfiedLinkError: no wrapper-linux-x86-32 in
java.library.path
> jvm 1 | Loaded native library: libwrapper.so
> jvm 1 | Calling native initialization method.
> jvm 1 | Inside native WrapperManager initialization method
> jvm 1 | Java Version : 1.5.0_07-b03 Java HotSpot(TM) Client VM
> jvm 1 | Java VM Vendor : Sun Microsystems Inc.
> jvm 1 |
> jvm 1 |
> WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@15eb0
> a9,
> args[]) called by thread: main
> jvm 1 | Open socket to wrapper...Wrapper-Connection
> jvm 1 | Opened Socket from 31000 to 32000
> jvm 1 | Send a packet KEY : jPYOKzunGl_jhiyC
> jvm 1 |
handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31000])
> wrapperp | accepted a socket from 127.0.0.1 on port 31000 wrapperp |
> read a packet KEY : jPYOKzunGl_jhiyC wrapper | Got key from JVM:
> jPYOKzunGl_jhiyC wrapperp | send a packet LOW_LOG_LEVEL : 1 wrapperp |
> send a packet PING_TIMEOUT : 30 wrapperp | send a packet PROPERTIES :
> (Property Values) 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 PROPERTIES : (Property Values)
> jvm 1 | Monitoring of the JVM thread count will be delayed for 1
seconds.
> jvm 1 | Received a packet START : start
> jvm 1 | calling listener.start()
> jvm 1 | WrapperSimpleApp: start(args) Will wait up to 2 seconds for the
> main method to complete.
> jvm 1 | WrapperSimpleApp: invoking main method
> jvm 1 | Initial SessionFactory creation failed:
> org.hibernate.HibernateException: /hibernate.cfg.xml not found
> jvm 1 | WrapperSimpleApp: main method completed
> jvm 1 | WrapperSimpleApp: start(args) end. Main Completed=true,
> exitCode=null
> jvm 1 | returned from listener.start()
> jvm 1 | Send a packet STARTED :
> wrapperp | read a packet STARTED :
> wrapper | JVM signalled that it was started.
> wrapperp | send a packet PING : ping
> jvm 1 | Received a packet PING : ping
> jvm 1 | Send a packet PING : ok
> jvm 1 | Non-daemon thread count = 1 - 1(system) = 0
> jvm 1 | All non-daemon threads have stopped. Exiting.
> jvm 1 | WrapperManager.stop(0) called by thread: Wrapper-Connection
> jvm 1 | Send a packet STOP : 0
> wrapperp | read a packet PING : ok
> wrapper | Got ping response from JVM
> wrapperp | read a packet STOP : 0
> wrapper | JVM requested a shutdown. (0) wrapper |
> wrapperStopProcess(0) called.
> wrapper | Sending stop signal to JVM
> wrapperp | send a packet STOP : NULL
> jvm 1 | Thread, Wrapper-Connection, handling the shutdown process.
> jvm 1 | calling listener.stop()
> jvm 1 | WrapperSimpleApp: stop(0)
> jvm 1 | returned from listener.stop()
> jvm 1 | Send a packet STOPPED : 0
> wrapperp | read a packet STOPPED : 0
> wrapper | JVM signalled that it was stopped.
> jvm 1 | Closing socket.
> wrapperp | socket read no code (closed?).
> wrapperp | server listening on port 32001.
> wrapper | Signal trapped. Details:
> wrapper | signal number=17 (SIGCHLD), source="unknown"
> wrapper | Received SIGCHLD, calling wait().
> wrapper | wait() returned, child process should be gone.
> jvm 1 | calling System.exit(0)
> wrapper | JVM process is gone.
> wrapper | JVM exited normally.
> wrapper | <-- Wrapper Stopped
>
>
>
>
>
>
> -----Original Message-----
> From: wra...@li...
> [mailto:wra...@li...] On Behalf Of Leif
> Mortenson
> Sent: Thursday, July 06, 2006 2:35 PM
> To: wra...@li...
> Subject: Re: [Wrapper-user] .properties and .xml file not loading up
> on classpath UNIX
>
> Ashley,
> Can you post the debug output? If the files are showing up on the
> generated command
> line as the full classpath correctly then the wildcards are being
> expanded correctly. Java is not able to handle wildcards in its
classpath.
>
> If the files shown on the class also exist, then I would next
> assume that there are some
> permission problems with them. Have you checked that?
>
> Cheers,
> Leif
>
> Ashley Hurkoo wrote:
>
>> I have a list of .properties and .xml file that I want to load on the
>> classpath. They are in my target directory.
>>
>> I have
>>
>> wrapper.java.classpath.1=../target/*.*
>>
>>
>> These files are loading up correctly on my windows box but not on my
>> unix box. I turned debug on, and the files are on the classpath.
>>
>> Can anyone help?
>>
>>
>
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42 _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
> ----------------------------------------------------------------------
> --
>
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier Download IBM WebSphere Application Server v.1.0.1 based on
> Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=1216
> 42
>
> ----------------------------------------------------------------------
> --
>
> _______________________________________________
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|