|
From: Leif M. <le...@ta...> - 2003-11-25 14:56:08
|
Elhanan,
Is this a program that you have written or is it something that you
are simply trying to
get integrated with the wrapper. You sent me a lot. I tried looking it
all over, but may
have missed something. It sounds like your only remaining problems are
path related.
One thing that you need to know about how the Wrapper currently
works is that it
always sets the current user.dir of the JVM to be the location of the
Wrapper.exe file.
All paths are then relative to this location. So if you create a file:
new File( "tmp/0" )
then this File object will represent a file called "0", located in a
directory, "tmp", which
is located in the current user directory, which is the location of the
Wrapper.exe file.
If you really want to accessing the tmp directory in the root, then
you need to do the
following: new File( "/tmp/0" )
This tells Java to start and the root directory, ignoring the current
user directory.
It is possible to override the default user.dir when the JVM is
launched by explicitly
setting the user.dir property as a system property. This can be done
using the following
parameter in your wrapper.conf file.
wrapper.java.additional.1=-Duser.dir=/
The above sets the user dir to the root directory. Note that this
WILL BREAK all
relative path handling by the Wrapper and you will need to start
specifying fully
qualified paths in your wrapper.conf file. I don't normally suggest
this, because path
problems tend to quickly multiply.
If you have access to the source of the compass application, I would
suggest trying
to figure out another way to correct those path issues from within the
application.
It seems like you should have been having similar problems when running
from a batch
file. Did that batch file include and cds or anything to change the
current directory to
the root?
Cheers,
Leif
P.S. Please post to the list rather than to me directly. It helps other
to learn by making
your questions and my answers searchable.
אלחנן מעיין wrote:
> We have progress
> By changing the login account on both services and starting them I did
> get the lacombi.trc file however when I used the calling sample
> something went wrong in the server as u will see in the log of server.log
>
> I suspect (and leif I'm asking u that as well) that services whatever
> their account may be, cannot access resources servers and since all of
> our oracle dll our on a network that could be a problem.
>
>
> -----Original Message-----
> From: com...@ge... [mailto:com...@ge...]
> Sent: Tuesday, November 25, 2003 2:04 PM
> To: אלחנן מעיין
> Subject: RE: [Wrapper-user] configuring Wrapper to run to java classes
> to run as one service. ..
>
> yes
> Gen Re
> Life/Health Client Services
> Systems
>
> E-Mail: com...@ge...
> Tel: +49 - 221- 9738 - 500
> Fax: +49 - 221- 9738 - 984
>
>
>
>
>
>
> אלחנן
> מעיין
>
>
> <elhanan@migdal-g To:
> "'com...@ge...'"
> <com...@ge...>
>
> roup.co.il>
> cc:
>
>
> Subject: RE:
> [Wrapper-user] configuring Wrapper to run to java classes to
>
> 25.11.2003 12:48 run as one
> service. ..
>
>
>
>
>
>
>
>
>
>
>
>
> Did u get the other files before?
>
> -----Original Message-----
> From: com...@ge... [mailto:com...@ge...]
> Sent: Tuesday, November 25, 2003 1:47 PM
> To: אלחנן מעיין
> Subject: RE: [Wrapper-user] configuring Wrapper to run to java classes to
> run as one service. ..
>
> Hi Elhanan,
> Sorry ... no files attached ...
>
> kind regards
> Marcus Tkotz
>
> Gen Re
> Life/Health Client Services
> Systems
>
> E-Mail: com...@ge...
> Tel: +49 - 221- 9738 - 500
> Fax: +49 - 221- 9738 - 984
>
>
>
> אלחנן מעיין
>
> <elhanan@migdal-g To:
> "'com...@ge...'" <com...@ge...>
>
> roup.co.il> cc:
>
> Subject: RE:
> [Wrapper-user]
> configuring Wrapper to run to java classes to
>
> 25.11.2003 12:38 run as one
> service. ..
>
>
>
>
>
>
>
> Extract the following zip files in their directories (meaning
> compasscli.zip into c:\compasscli\ and compassrv.zip into c:\compassrv)
>
> It assumes u have c:\compass library
> Then in the bin directory use
> InstallCompassServer-NT.bat
> And
> InstallCAS-NT.bat
>
> Then inorder to run it in normal mode use
> startCompassserver.bat
> and
> startCAS.bat
>
> inorder to test the call run starttestloc.bat from c:\compasscli\
>
> u should get the file name 0 in tmp directory INSIDE the bin directory if
> all goes well. If it does try starting the services Compass Server and
> CompassCAS in the services tab.
>
> Change the oracle connection string INSIDE the bin directory in the
> profile.aes to your own.
>
> -----Original Message-----
> From: com...@ge... [mailto:com...@ge...]
> Sent: Tuesday, November 25, 2003 1:22 PM
> To: אלחנן מעיין
> Subject: RE: [Wrapper-user] configuring Wrapper to run to java classes to
> run as one service. ..
>
> Hello Elhanan,
> It is me, Marcus to answer ...
>
> We are very happy to hear that some of the problems (libsybdb.dll)
> could be
> resolved. At the moment cas.cfg is locked. What about creating a copy
> in a
> different directory? But we will have a closer look.
>
> From the information given we can't say anything why the COMPASS server
> won't start. It would be a great help for us to be able to run the
> COMPASS
> server (at Cologne) the same way as you run it. Can you provide us with
> anything that allows the COMPASS server to run as a service (e.g. Wrapper
> code, start-routines ...)? From the logs we can't see how the COMPASS
> server is called by a client. Can you provide us with the calls?
>
> Kind regards
> Marcus Tkotz
>
> Gen Re
> Life/Health Client Services
> Systems
>
> E-Mail: com...@ge...
> Tel: +49 - 221- 9738 - 500
> Fax: +49 - 221- 9738 - 984
>
>
> אלחנן מעיין
>
> <elhanan@migdal-g To:
> "'com...@ge...'" <com...@ge...>, 'Leif Mortenson'
>
> roup.co.il> <le...@ta...>
>
> cc: עודד רזניק
> <to...@mi...>
>
> 25.11.2003 09:14 Subject: RE:
> [Wrapper-user]
> configuring Wrapper to run to java classes to
>
> run as one service. ..
>
>
>
>
>
> Once again I'm uniting my answer to both because the problem was in both
> areas.
>
> lucas (your answer is just below this answer)
> once u told me that dll was in fact a DLL for Sybase I guess that once
> again compass tried to read from the directory the wrapper was
> launched (a
> sub directory with in compasssrv which launches the jvm), and when it
> didn’t' find it there, it reverted to towards default values (sysbase)
> when
> I copied profile.aes to the bin directory and this lacombi said ora73.dll
> was missing, as leif wrote all paths to other dll's must be declared,
> so I
> added that path to oracle library in the wrapper config files, and that
> solved that problem BUT then It screamed it couldn't write the report
> file
> to the directory (tmp) so off course I created that directory as well in
> the bin, and this time everything worked, that is compass server answered
> me.
>
> The problem why I had to launch 2 jvm sepratly is because compasserver
> class completely locks cas.cfg, with no regards to the wrapper, if I
> try to
> create compassserer class and CAS class in my own little java class, cas
> class won't be able to read the cas.cfg file becosue compassserver class
> locks it. If u have anything to solve it I'd be happy to hear it.
>
> Leif
> As u can see I have a problem here with the wrapper because I keep having
> to replicate the root directory's files into the bin directory where the
> wrapper is (copying the application config files, creating directories,
>
> etc..) I have to find way to either fool the compass into thinking it is
> laucned from root directory, or config the wrapper to launch from the
> root
> directory (i.e change the install/uninstall batch files, and the run
> batch
>
> files)
>
> Lucas and leif
>
> Now I'm faced with another problem, I said the application worked, but it
> only worked with run batch files, if tried using it via services applet,
> nothing seems to work, although in the services applet I press start and
> they simply started, but when I tried calling the java server with the
> api's I got some reply but it simply hung there , it did manage to see
> the
> servers (otherwise it would have crashd and exited) I'm sending lucas
> log.txt,server.log and server0.log files bugt although profile.aes had a
> log setting I couldn't find the lacombi.trc file anywhere
>
> Lucas: the wrapperCAS.conf and wrapperserver.conf files also contain the
> screen output from the servers (as there was no screen when I started the
>
> services)
>
> Another issue I'm concerned about is the ORDER the services are started,
> compassserver services must be started first because it waits and listens
> on port 4712 then cas services is started and they both communicate with
> each other, I don't how windows handles this wait in between (to be
> safe I
> stopped both services, started the first one, waited, and then started
> the
> second one).
>
> Elhanan,
> After reading through all of this, the final problem is that the
> executable lacombi.exe binary can not locate a required dll file. I am
> not really clear how that relates to the Wrapper? Is that application
> being launched by one of your 2 JVMs?
>
> If the DLL is required as a JNI native library by one of the
> classes in
> your Java application then you must include the location of the DLL on
> your
> java library path. When you run Java without the wrapper, it uses a
> default
> library path that includes the windows directory and user directory.
> When
> running with the Wrapper, you must set this manually in the wrapper.conf
> file.
>
> Since you can not locate this file anyplace, not sure if that is your
> problem however.
>
> Other than that, it sounds like your 2 JVMs are starting up
> correctly.
> Could you please set the wrapper.debug=true property in both of your
> wrapper.conf files. Then reply with the 2 wrapper.conf files and
> wrapper.log files as attachments. Please only include the log output
> for a
> SINGLE JVM invocation.
>
> I may be able to spot something to help you out.
>
> Cheers,
> Leif
>
> -----Original Message-----
> From: com...@ge... [mailto:com...@ge...]
> Sent: Monday, November 24, 2003 10:31 AM
> To: אלחנן מעיין
> Subject: RE: [Wrapper-user] configuring Wrapper to run to java classes to
> run as one service. ..
>
> Hello Elhanan,
> I'm answering the topic of requiring the "libsybdb.dll" by lacombi.exe.
> This is simply that COMPASS was told to access a Sybase database and
> it is
> not able to locate the library needed for this. As far as I know you are
> using Oracle. COMPASS is told by "profile.aes" which database to connect.
> Could you please check if all entries are right in this file?
>
> I'm not with you when you describe the process of starting two servers.
> Which problem shall be solved with this design ?
>
> Kind regards
> Marcus Tkotz
>
> Gen Re
> Life/Health Client Services
> Systems
>
> E-Mail: com...@ge...
> Tel: +49 - 221- 9738 - 500
> Fax: +49 - 221- 9738 - 984
>
> אלחנן מעיין
>
> <elhanan@migdal-g To:
> "'wra...@li...'"
> <wra...@li...>,
>
> roup.co.il>
> "'com...@gc...'"
> <com...@gc...>
>
> cc: עודד רזניק
> <to...@mi...>
>
> 23.11.2003 18:59 Subject: RE:
> [Wrapper-user]
> configuring Wrapper to run to java classes to run
>
> as one service. ..
>
>
>
>
> I'm sending this to both of u since I don't know exactly where the
> problem
> exists
>
> First I discovered I cannot launch the 2 class (compasserver,cas) in code
> from the same jvm because compassserver locks cas.cfg
>
> I know this because after remarking the first class (comapsserver) and
> telling the batch file to raise the original class and then my class with
> my code, only then it worked, by trying your code as u wrote it, the 2nd
> class keeps saying that it could find the CASListenport on line 4
> (which is
> in cas.cfg, which it couldn't read I guess)
>
> So I was left with the 2nd alternative:
>
> After creating to adtional directories (confCAS,confSERVER) and modifying
> and creating 2 install files, 2 run files, and 2 uninstall files (by
> simply
> chaning each files conf directory to my own directories) I was able to
> install the services.
>
> After changing the conf files according I was left the following
> problems.
> The classes won't run unless they will have server.cfg and cas.cfg in the
> directory where wrapper.exe exists. Even though i specified the the root
> directory in wrapper.java.class parameters
>
> Originally thought both files were in the same directory as the original
> batch file. This is not a major problem because after copying both files
> into Directories it seemed to work. Also comass also demanded the
> directory
> lacid (also located in the root directory of the application) will be
> copied to the directory of batch files
>
> Now the real problem started when I tried accessing compass with java
> client api sample... suddenly windows alerted the lacombi.exe needed the
> file libsybdb.dll and couldn't find it. The strange thing is that I
> REALLY
> couldn't find it, now in my entire c drive and not in the network
> directory
> which contains the oracle.dll
>
> Also I've checked lacombi with dependency walker an it really doesn't
> reference this dll.
>
> Running compass normally does not raise this error. I have no idea
> what is
> this dll for.
>
> -----Original Message-----
> From: Leif Mortenson [mailto:le...@ta...]
> Sent: Friday, November 21, 2003 12:20 PM
> To: wra...@li...
> Subject: Re: [Wrapper-user] configuring Wrapper to run to java classes to
> run as one service. ..
>
> Elhanan,
> Just like Java, the Wrapper only allows you to specify a single class
> when it it launches the JVM. In your application, you are launching the
> two classes in two different JVM instances.
>
> There are a couple ways to do you may want to be doing.
>
> 1) Launch two copies of the Wrapper. This can easily be done by creating
> two different wrapper.conf files. Either install them in different
> locations or take care that the log and any pid files are named uniquely
> and things should work great. If you are running under NT you can even
> setup a dependency on the other server using the
> wrapper.ntservice.dependency.<n> properties.
>
> 2) Depending on how your applications work. You may also be able to
> simply
> run both of your applications from within the same JVM. To do this
> create
> a simple class that does the following:
>
> public static main(String[] args)
> {
> Thread t1 = new Thread()
> {
> public void run()
> {
> CR.Compass.Server.CompassServer.main( new String[] {} );
> }
> };
> t1.start();
>
> Thread t2 = new Thread()
> {
> public void run()
> {
> CR.Compass.Server.CAS.CAS.main( new String[] { "0" } );
> }
> };
> t2.start();
> }
>
> I didn't compile the above, but it should work. Just specify this
> new
> class as the first wrapper.app.parameter and then specify
> org.tanukisoftware.wrapper.WrapperSimpleApp
>
> as the wrapper.java.mainclass. It should work.
>
> If you found the support or the product useful, drop by the following
> as well. http://wrapper.tanukisoftware.org/doc/english/donate.html
>
> Let me know if you have any other questions.
>
> Cheers,
> Leif
>
> אלחנן מעיין wrote:
>
> > Hi…
> >
> > i have the following batch file to run a java server:
> >
> >
> >
> > start java -cp lib\compass320.jar CR.Compass.Server.CompassServer
> >
> > java -cp lib\compass320.jar CR.Compass.Server.CAS.CAS 0
> >
> >
> >
> > as u can see I need to invoke to 2 classes at the same time (which are
> > from the same jar)…
> >
> >
> >
> > is there a way to do this in wrapper?
> >
>
> -------------------------------------------------------
> This SF.net email is sponsored by: SF.net Giveback Program. Does
> SourceForge.net help you be more productive? Does it help you create
> better code? SHARE THE LOVE, and help us help YOU! Click Here:
> http://sourceforge.net/donate/
> _______________________________________________
>
> Wrapper-user mailing list
> Wra...@li...
> https://lists.sourceforge.net/lists/listinfo/wrapper-user
>
>
>
>
> (See attached file: wrapperserver.conf)
> (See attached file: wrappercas.conf)
> (See attached file: log.txt)
> (See attached file: server0.log)
> (See attached file: server.log)
> (See attached file: wrapperserver.log)
> (See attached file: wrapperCAS.log)
>
>
>
>
>
>
>
>
>
>
>
>
>
> This mail was scanned and found secure
>
> The contents of this email and any attachments are confidential.
> It is intended for the named recipient(s) only.
> If you have received this email in error please notify the sender
> immediately through the
> technological support center,email:he...@mi... and do not
> disclose the contents to any one or make copies.
>
>
>------------------------------------------------------------------------
>
><02:58:45.468> [main] Main called
><02:58:46.546> [main] [Network.connect] New socket : Socket[addr=127.0.0.1/127.0.0.1,port=4711,localport=1370]
><02:58:46.562> [main] [Order.constructor] opCode init : 3
><02:58:46.562> [main] [NetworkLayerClient.synchCall] started
><02:58:46.562> [main] [Order.writeOrder synch] opCode :3
><02:58:46.562> [main] [Order.writeHeader] called with 3
><02:58:46.562> [main] [Network.writeInteger] started
><02:58:46.562> [main] [Network.writeInteger] started
><02:58:46.562> [main] [Network.writeInteger] started
><02:58:46.562> [main] [Network.writeInteger] started
><02:58:46.562> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:46.562> [main] [Order.constructor] default init
><02:58:46.562> [main] [Order.readResult] started
><02:58:46.562> [main] [Order.readHeader] called
><02:58:46.562> [main] [Network.readInteger] started
><02:58:46.578> [main] [Network.readInteger] started
><02:58:46.578> [main] [Order.readResult] opCode : 3 error Code 0
><02:58:46.578> [main] [Order.constructor] opCode init : 6
><02:58:46.578> [main] [NetworkLayerClient.synchCall] started
><02:58:46.578> [main] [Order.writeOrder synch] opCode :6
><02:58:46.578> [main] [Order.writeHeader] called with 6
><02:58:46.578> [main] [Network.writeInteger] started
><02:58:46.578> [main] [Network.writeString] ELHANAN
><02:58:46.578> [main] [Network.writeString]
><02:58:46.593> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:46.593> [main] [Order.constructor] default init
><02:58:46.593> [main] [Order.readResult] started
><02:58:46.593> [main] [Order.readHeader] called
><02:58:46.593> [main] [Network.readInteger] started
><02:58:48.062> [main] [Network.readInteger] started
><02:58:48.062> [main] [Order.readResult] opCode : 6 error Code 0
><02:58:48.062> [main] [Order.constructor] opCode init : 5
><02:58:48.062> [main] [NetworkLayerClient.synchCall] started
><02:58:48.062> [main] [Order.writeOrder synch] opCode :5
><02:58:48.062> [main] [Order.writeHeader] called with 5
><02:58:48.062> [main] [Network.writeInteger] started
><02:58:48.062> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:48.062> [main] [Order.constructor] default init
><02:58:48.062> [main] [Order.readResult] started
><02:58:48.062> [main] [Order.readHeader] called
><02:58:48.062> [main] [Network.readInteger] started
><02:58:48.656> [main] [Network.readString] started
><02:58:48.656> [main] [Network.readString] finished
><02:58:48.656> [main] [Network.readInteger] started
><02:58:48.656> [main] [Order.readResult] opCode : 5 error Code 0
>AWIGetTextualResult err : 0 result Error: file tmp\0 is not open
><02:58:48.656> [main] [Order.constructor] opCode init : 2
><02:58:48.656> [main] [NetworkLayerClient.synchCall] started
><02:58:48.656> [main] [Order.writeOrder synch] opCode :2
><02:58:48.656> [main] [Order.writeHeader] called with 2
><02:58:48.656> [main] [Network.writeInteger] started
><02:58:48.656> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:48.656> [main] [Order.constructor] default init
><02:58:48.656> [main] [Order.readResult] started
><02:58:48.656> [main] [Order.readHeader] called
><02:58:48.656> [main] [Network.readInteger] started
><02:58:48.656> [main] [Network.readString] started
><02:58:48.656> [main] [Network.readString] finished
><02:58:48.656> [main] [Network.readInteger] started
><02:58:48.656> [main] [Order.readResult] opCode : 2 error Code 0
>return code err 0rc 0
><02:58:48.656> [main] [Order.constructor] opCode init : 3
><02:58:48.656> [main] [NetworkLayerClient.synchCall] started
><02:58:48.656> [main] [Order.writeOrder synch] opCode :3
><02:58:48.656> [main] [Order.writeHeader] called with 3
><02:58:48.656> [main] [Network.writeInteger] started
><02:58:48.656> [main] [Network.writeInteger] started
><02:58:48.656> [main] [Network.writeInteger] started
><02:58:48.656> [main] [Network.writeInteger] started
><02:58:48.656> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:48.656> [main] [Order.constructor] default init
><02:58:48.656> [main] [Order.readResult] started
><02:58:48.671> [main] [Order.readHeader] called
><02:58:48.671> [main] [Network.readInteger] started
><02:58:49.281> [main] [Network.readInteger] started
><02:58:49.281> [main] [Order.readResult] opCode : 3 error Code 0
><02:58:49.281> [main] [Order.constructor] opCode init : 6
><02:58:49.281> [main] [NetworkLayerClient.synchCall] started
><02:58:49.281> [main] [Order.writeOrder synch] opCode :6
><02:58:49.281> [main] [Order.writeHeader] called with 6
><02:58:49.281> [main] [Network.writeInteger] started
><02:58:49.281> [main] [Network.writeString] ELHANAN
><02:58:49.281> [main] [Network.writeString]
><02:58:49.281> [main] [NetworkLayerClient.synchCall] read Order from net
><02:58:49.281> [main] [Order.constructor] default init
><02:58:49.281> [main] [Order.readResult] started
><02:58:49.281> [main] [Order.readHeader] called
><02:58:49.281> [main] [Network.readInteger] started
>
>
|