JPOS Real-Time Monitoring Tool

571 views
Skip to first unread message

mwyc...@gmail.com

unread,
Oct 6, 2008, 2:34:10 AM10/6/08
to jPOS Users
Good day all,

hoping you are fine.

Members, please advise me on the following;

I was meant to understand that JPOS has a Real-Time Monitoring Tool
(Web-based), how does this tool work?
How do we active/configure it for use in a JPOS environment?

thanks&regards,

Alejandro Revilla

unread,
Oct 6, 2008, 5:50:22 PM10/6/08
to jpos-...@googlegroups.com
If you use Q2 then you can monitor many jPOS components using JMX.

jPOS-EE also has a status monitoring module, you can have a look at
http://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/

--Alejandro

mwyc...@gmail.com

unread,
Oct 7, 2008, 6:47:59 AM10/7/08
to jPOS Users
Alejandro,

Do you mean running the ISOServer with the following option would
invoke the JMX Agent;
java -Dcom.sun.management.jmxremote -jar q2.jar

OR there is some extra work that has to be done?

Do I need to download some JMX API or its part of the JDK
distribution.
Please advise.

Also where can I get the download for JPOSEE, currently when I try
http://code.google.com/p/jposee/downloads/list , the list is empty.

Meanwhile http://jposee.googlecode.com/svn/trunk/jposee returns "page
cannot be found" error.

thanks

On Oct 7, 12:50 am, Alejandro Revilla <a...@jpos.org> wrote:
> If you use Q2 then you can monitor many jPOS components using JMX.
>
> jPOS-EE also has a status monitoring module, you can have a look athttp://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/
>
> --Alejandro
>
>
>
> On Sun, Oct 05, 2008 at 11:34:10PM -0700, mwycli...@gmail.com wrote:
>
> > Good day all,
>
> > hoping you are fine.
>
> > Members, please advise me on the following;
>
> > I was meant to understand that JPOS has a Real-Time Monitoring Tool
> > (Web-based), how does this tool work?
> > How do we active/configure it for use in a JPOS environment?
>
> > thanks&regards,- Hide quoted text -
>
> - Show quoted text -

Mark Salter

unread,
Oct 7, 2008, 7:35:44 AM10/7/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> OR there is some extra work that has to be done?

I would carefully follow the instructions at the link Alejandro gave
(http://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/) first.

As you are running windows the steps are a bit different and you must
satisfy the recommended prerequisites, which include, but are not
limited to :-

- Getting an svn client (so you can sign out the code (I use tortoisesvn
from http://tortoisesvn.tigris.org/),
- Getting ant installed and available on your path (ant.apache.org),
- Installing and running a MySql database server
- Downloading and setting up cygwin (www.cygwin.com) to allow you to use
the scripts that are downloaded, instead of putting together your own
for windows.

Each of these items has a how-to of their own, so take your time carry
out each step in the jpos-ee how-to correctly and completely before
moving onto the next. I think you will find it challenging, but worthwhile.

>
> Do I need to download some JMX API or its part of the JDK
> distribution.

It is separate but it will be downloaded as part of the svn checkout -
or subsequent "ant" invocation. Certainly when I followed the how-to,
it was just there I didn't download anything directly myself.

I followed this (http://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/)
how-to quite recently, and I would say that on windows it is much harder
(than on unix). Mainly because of the absence of facilities and the
need to setup 'basic' tools like svn. I did not use cygwin myself, but
I know this mailing list does have guidance should you need it.

Take particular care with :-

- space character in the names of directories in which jars are kept,
- running the commands in the correct directory :-
invoking bsh needs to be done from inside the build folder,
invoking ant takes place within the folder you checked
everything out to.

Once you have jpos-ee setup and running, then Andy's on-boarding guide
will make more sense to you as it will align with your vanilla setup.

> Also where can I get the download for JPOSEE, currently when I try
> http://code.google.com/p/jposee/downloads/list , the list is empty.

See above and below...

>
> Meanwhile http://jposee.googlecode.com/svn/trunk/jposee returns "page
> cannot be found" error.

You need to know that you should use a subversion client to checkout the
code and fixtures (following the instructions on the link given).

--
Mark

Alejandro Revilla

unread,
Oct 8, 2008, 8:58:14 AM10/8/08
to jpos-...@googlegroups.com
>
> Do you mean running the ISOServer with the following option would
> invoke the JMX Agent;
> java -Dcom.sun.management.jmxremote -jar q2.jar
>
That can be a start, you can use jconsole or you can create your own JMX-based
monitoring application.

You can also use the jPOS ISOMeter and create a swing based monitoring
tool (provided your jPOS application can access a display and it's not a
daemon/service).

Or you can use something like Nagios and create some small services in
jPOS to be more Nagios friendly.


mwyc...@gmail.com

unread,
Oct 9, 2008, 5:28:39 AM10/9/08
to jPOS Users
Thanks Mark,

Actually it seems I had skipped a number of steps.

So Ideally I need to go through the following stages first;
- Getting an svn client
- Getting ant installed and available on your path (ant.apache.org),
( This I already have)
- Installing and running a MySql database server ( I have an instance
already)
- Downloading and setting up cygwin (www.cygwin.com)

Let me do that and then get back to the jpos-ee-setup-howto.

thanks

On Oct 7, 2:35 pm, Mark Salter <marksal...@talktalk.net> wrote:
> mwycli...@gmail.com wrote:
> > OR there is some extra work that has to be done?
>
> I would carefully follow the instructions at the link Alejandro gave
> (http://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/) first.
>
> As you are running windows the steps are a bit different and you must
> satisfy the recommended prerequisites, which include, but are not
> limited to  :-
>
> - Getting an svn client (so you can sign out the code (I use tortoisesvn
> fromhttp://tortoisesvn.tigris.org/),
> >http://code.google.com/p/jposee/downloads/list, the list is empty.
>
> See above and below...
>
>
>
> > Meanwhilehttp://jposee.googlecode.com/svn/trunk/jposeereturns "page

Mark Salter

unread,
Oct 9, 2008, 5:35:29 AM10/9/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> Actually it seems I had skipped a number of steps.
>
> So Ideally I need to go through the following stages first;
> - Getting an svn client

Yep, so you can checkout the code.

> - Getting ant installed and available on your path (ant.apache.org),
> ( This I already have)

Ok, good.

> - Installing and running a MySql database server ( I have an instance
> already)

Excellent

> - Downloading and setting up cygwin (www.cygwin.com)

So you may make use of the unix scripts that are provided, the
alternative is to prepare your own, although a fairly recent discussion
on this mailing list did include a windows bat file from Dave I think.

These are the primary prerequisites that are needed just because you are
a windows user 8(. Although you have some boxes checked already.

>
> Let me do that and then get back to the jpos-ee-setup-howto.

Have fun.

--
Mark

mwyc...@gmail.com

unread,
Oct 9, 2008, 5:42:33 AM10/9/08
to jPOS Users
Thanks Alejandro,

Well, I tried option 1, where I ran the following command
;
java -Dcom.sun.management.jmxremote -jar q2.jar

It gave me the following message on the ISOServer scree;
C:\>java -Dcom.sun.management.jmxremote -jar q2.jar
Created MBeanServer with ID: 60420f:11ce0bbd529:-8000:nep001:1

But on launching the jconsole tool I was unable to connect to the
Local q2.jar process.
Its gives a msg that "The management agent is not enabled on this
process.
So am wondering what could be the cause for this problem.

As for the Nagios option, I understand Nagios is made to run on Linux
os, have you tried it on Windows?
How will I be able to do the monitoring for my windows based JPOS Host
application?

I didn't get a clear understanding of the JPOS Isometer approach to
monitoring, do you mind giving me some
direction on how to achieve it?

thanks

mwyc...@gmail.com

unread,
Oct 9, 2008, 5:55:03 AM10/9/08
to jPOS Users
Alight, let me give it a shot.

Let me ask you, is svn a command when used in this context.

svn checkout http://jposee.googlecode.com/svn/trunk/ jposee

how about the keyword checkout, is it an option passed to svn?

thanks

On Oct 9, 12:35 pm, Mark Salter <marksal...@talktalk.net> wrote:

Mark Salter

unread,
Oct 9, 2008, 7:03:29 AM10/9/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> Let me ask you, is svn a command when used in this context.
>
> svn checkout http://jposee.googlecode.com/svn/trunk/ jposee

This would be the command that you would type at a command prompt to
invoke a command line svn client.

Did you download the tigris tortoisesvn client I pointed you towards?
If you did and allowed the right mouse button integration, then you can
access the tortoisesvn interface by right clicking your mouse on a
folder in an explorer window and then click :-

TortoiseSVN >
and then
Repo-browser

Enter the url http://jposee.googlecode.com/svn/ in the dialogue provided
and the repository will be displayed and you can check out the trunk to
the base folder of your choice.



>
> how about the keyword checkout, is it an option passed to svn?

It is and would result in the code being checked out from the repository
into the directory in which you are sitting at the command prompt. If
you are using the tortoiseSVN gui, then the command happens behind the
scenes.


--
Mark

Mark Salter

unread,
Oct 9, 2008, 7:13:55 AM10/9/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

>
> As for the Nagios option, I understand Nagios is made to run on Linux
> os, have you tried it on Windows? How will I be able to do the
> monitoring for my windows based JPOS Host application?

You would have to write the code to run inside of your jPOS solution
that Nagios could query for your status(es). This is mentioned :-

"and create some small services in jPOS..."

>
> I didn't get a clear understanding of the JPOS Isometer approach to
> monitoring, do you mind giving me some direction on how to achieve
> it?

If your jPOS solution is running on a machine with a screen (a keyboard
and mouse might be useful too) that a gui display can be rendered onto,
then an ISOMeter will display the status of a channel say within a swing
rendered display. This would allow visual monitoring and some interaction.

"use the jPOS ISOMeter and create a swing based monitoring tool"


--
Mark

mwyc...@gmail.com

unread,
Oct 10, 2008, 3:34:59 PM10/10/08
to jPOS Users
Yes I have downloaded the Tortoisesvn client, the msi version.

Thanks for giving me the right direction
Let me now install it on my machine and follow the steps as you have
described below.

Did you say i need to have cygwin? you know its a heavy env and am
finding it had to fully downlaod & install.

regards,

On Oct 9, 2:03 pm, Mark Salter <marksal...@talktalk.net> wrote:
> mwycli...@gmail.com wrote:
> > Let me ask you, is svn a command when used in this context.
>
> > svn checkouthttp://jposee.googlecode.com/svn/trunk/jposee
>
> This would be the command that you would type at a command prompt to
> invoke a command line svn client.
>
> Did you download the tigris tortoisesvn client I pointed you towards?
> If you did and allowed the right mouse button integration, then you can
>  access the tortoisesvn interface by right clicking your mouse on a
> folder in an explorer window and then click :-
>
>         TortoiseSVN >
>          and then
>         Repo-browser
>
> Enter the urlhttp://jposee.googlecode.com/svn/in the dialogue provided

mwyc...@gmail.com

unread,
Oct 10, 2008, 3:55:11 PM10/10/08
to jPOS Users
Sorry if am asking so many questions,
but i really did understand what you meant by
>"use the jPOS ISOMeter and create a swing based monitoring tool"
what does it take to achive it.

Do i simply have to make all the definitions in the isometer xml file
with say tags like
<menubar id="MAIN">
<object class="org.jpos.ui.action.Exit" id="exit" /> etc

or you mean something else, please help me understand that concept.

Alejandro gave me some isometer file definitions which have helped me
incorporate some functionality in the isometer GUI with action menus.
Challenge is on how to code the functionality for functions like
signon, signoff etc.
The Exit/Quit function is working fine, but i really didn't understand
how its possible because when i look at the isometer definition all i
have is
<menuitem id="Quit" accesskey="Q" action="exit" /> with in the <ui>
tag and
<object class="org.jpos.ui.action.Exit" id="exit" />

I don't see the relationship between the two items. I thought that may
be the id would match.
But they don't, in <menuitem> id="Quit" while in <object> id="exit".
May be you could help me understand the technique used.



thanks,

do you mean

On Oct 9, 2:13 pm, Mark Salter <marksal...@talktalk.net> wrote:

Mark Salter

unread,
Oct 10, 2008, 6:26:36 PM10/10/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> Did you say i need to have cygwin? you know its a heavy env and am
> finding it had to fully downlaod & install.

I think you might need it, but it is easy to install, but a large
download, I agree.

Without it, you will need to write or locate a windows equivalents of
the bash scripts provided. As I said before I think Dave shared a
windows version of at least one of them on this list.


--
Mark

David Bergert

unread,
Oct 10, 2008, 8:00:38 PM10/10/08
to jpos-...@googlegroups.com
Look at these .bat file to start -- you will need to modify them a little I
believe,

http://jpos.svn.sourceforge.net/viewvc/jpos/branches/v1_5_3/jpos/bin/

David Bergert

unread,
Oct 10, 2008, 8:13:52 PM10/10/08
to jpos-...@googlegroups.com
Another place to look:
http://code.google.com/p/jposee/source/browse/#svn/trunk/opt/wrapper_windows
/bin

Dave Bergert
http://www.paymentsystemblog.com

> -----Original Message-----
> From: David Bergert [mailto:dberg...@gmail.com]
> Sent: Friday, October 10, 2008 7:01 PM
> To: 'jpos-...@googlegroups.com'
> Subject: RE: JPOS Real-Time Monitoring Tool
>
> Look at these .bat file to start -- you will need to modify them a
> little I believe,
>
> http://jpos.svn.sourceforge.net/viewvc/jpos/branches/v1_5_3/jpos/bin/
>
>
> > -----Original Message-----
> > From: jpos-...@googlegroups.com [mailto:jpos-
> us...@googlegroups.com]
> > On Behalf Of Mark Salter
> > Sent: Friday, October 10, 2008 5:27 PM
> > To: jpos-...@googlegroups.com
> > Subject: Re: JPOS Real-Time Monitoring Tool
> >
> >

mwyc...@gmail.com

unread,
Oct 11, 2008, 9:20:34 AM10/11/08
to jPOS Users
Thanks Dave,

Let me try out those options.

On Oct 11, 3:00 am, "David Bergert" <dbergert...@gmail.com> wrote:
> Look at these .bat file to start -- you will need to modify them a little I
> believe,
>
> http://jpos.svn.sourceforge.net/viewvc/jpos/branches/v1_5_3/jpos/bin/
>
>
>
> > -----Original Message-----
> > From: jpos-...@googlegroups.com [mailto:jpos-...@googlegroups.com]
> > On Behalf Of Mark Salter
> > Sent: Friday, October 10, 2008 5:27 PM
> > To: jpos-...@googlegroups.com
> > Subject: Re: JPOS Real-Time Monitoring Tool
>
> > mwycli...@gmail.com wrote:
>
> > > Did you say i need to have cygwin? you know its a heavy env and am
> > > finding it had to fully downlaod & install.
> > I think you might need it, but it is easy to install, but a large
> > download, I agree.
>
> > Without it, you will need to write or locate a windows equivalents of
> > the bash scripts provided.  As I said before I think Dave shared a
> > windows version of at least one of them on this list.
>
> > --
> > Mark- Hide quoted text -

mwyc...@gmail.com

unread,
Oct 11, 2008, 11:16:48 AM10/11/08
to jPOS Users
Hellos,

I have some problem getting jPOS-EE using subversion.
I am using TortoiseSVN but i get this error;

Checkout from http://jposee.googlecode.com/svn/trunk/jposee, revision
HEAD, Fully recursive, Externals included
URL 'http://jposee.googlecode.com/svn/trunk/jposee' doesn't exist

What could be the problem?

How about for JPOS, what is the URL to the latest subversion?

regards,

On Oct 7, 2:35 pm, Mark Salter <marksal...@talktalk.net> wrote:
> mwycli...@gmail.com wrote:
> > OR there is some extra work that has to be done?
>
> I would carefully follow the instructions at the link Alejandro gave
> (http://jpos.org/blog/2007/10/11/jpos-ee-setup-howto/) first.
>
> As you are running windows the steps are a bit different and you must
> satisfy the recommended prerequisites, which include, but are not
> limited to  :-
>
> - Getting an svn client (so you can sign out the code (I use tortoisesvn
> fromhttp://tortoisesvn.tigris.org/),
> >http://code.google.com/p/jposee/downloads/list, the list is empty.
>
> See above and below...
>
>
>
> > Meanwhilehttp://jposee.googlecode.com/svn/trunk/jposeereturns "page

Mark Salter

unread,
Oct 11, 2008, 1:56:20 PM10/11/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:
> I have some problem getting jPOS-EE using subversion.
> I am using TortoiseSVN but i get this error;
>
> Checkout from http://jposee.googlecode.com/svn/trunk/jposee, revision
> HEAD, Fully recursive, Externals included
> URL 'http://jposee.googlecode.com/svn/trunk/jposee' doesn't exist
>
> What could be the problem?
The url to use is:-

http://jposee.googlecode.com/svn/trunk/

However, the google code @
http://code.google.com/p/jposee/source/checkout states the svn command
line as:-

"
# Non-members may check out a read-only working copy anonymously over HTTP.
svn checkout http://jposee.googlecode.com/svn/trunk/ jposee-read-only
"

As you can see, there is a space before jposee (which might be confusing
you as you missed it), but can someone say if the 'jposee-read-only'
part is correct.

--
Mark

mwyc...@gmail.com

unread,
Oct 11, 2008, 2:31:48 PM10/11/08
to jPOS Users
Hi Dave,

I have sucessfully created the "jposee" and user "sa"

But am stuck on the next steps;

First of all "ant run" is giving some errors along the way.

Given that I have downloaded the your bin tarbal which contains files
bsh.bat, build.bat, console.bat etc
how do I then use those files to achieve the following step on the
jpos-ee setup howto

> Use a little Java or BeanShell script to create your DB and initial user
You can use bin/bsh to invoke a Beanshell. If you are on Windows you
may want to use cygwin or create yourself a BSH.BAT based on our unix
based bin/bsh script and run:

Also how do i use the following piece of code to complete the setup?

import java.util.*;
import org.jpos.ee.*;
import org.hibernate.*;

DB db = new DB();
db.createSchema (null, true);

db.open();
.....................................................
....................................................

Building JPOSEE with "ant run" and creating the DB with initial user,
which step should come first?

regards,

On Oct 11, 3:00 am, "David Bergert" <dbergert...@gmail.com> wrote:
> Look at these .bat file to start -- you will need to modify them a little I
> believe,
>
> http://jpos.svn.sourceforge.net/viewvc/jpos/branches/v1_5_3/jpos/bin/
>
>
>
> > -----Original Message-----
> > From: jpos-...@googlegroups.com [mailto:jpos-...@googlegroups.com]
> > On Behalf Of Mark Salter
> > Sent: Friday, October 10, 2008 5:27 PM
> > To: jpos-...@googlegroups.com
> > Subject: Re: JPOS Real-Time Monitoring Tool
>
> > mwycli...@gmail.com wrote:
>
> > > Did you say i need to have cygwin? you know its a heavy env and am
> > > finding it had to fully downlaod & install.
> > I think you might need it, but it is easy to install, but a large
> > download, I agree.
>
> > Without it, you will need to write or locate a windows equivalents of
> > the bash scripts provided.  As I said before I think Dave shared a
> > windows version of at least one of them on this list.
>
> > --
> > Mark- Hide quoted text -

Mark Salter

unread,
Oct 11, 2008, 5:06:09 PM10/11/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:
> First of all "ant run" is giving some errors along the way.
This will be because you don't have the database to backup the
processing as well as other things - I guessing.

>> Use a little Java or BeanShell script to create your DB and initial user
> You can use bin/bsh to invoke a Beanshell. If you are on Windows you
> may want to use cygwin or create yourself a BSH.BAT based on our unix
> based bin/bsh script and run:
>
> Also how do i use the following piece of code to complete the setup?
>
> import java.util.*;
> import org.jpos.ee.*;
> import org.hibernate.*;
>
> DB db = new DB();
> db.createSchema (null, true);
>
> db.open();
> .....................................................
> ....................................................

Use bsh.bat to invoke beanshell (bsh) and then paste the code into the
bsh 'command prompt'. This java code will run (in java) under beanshell
and create and populate the required tables for the example.

>
> Building JPOSEE with "ant run" and creating the DB with initial user,
> which step should come first?

I don't think the order matters between these two. When you run the bsh
above the tables will be created in the db using the initial user.

--
Mark

Alejandro Revilla

unread,
Oct 11, 2008, 5:08:52 PM10/11/08
to jpos-...@googlegroups.com
>
> As you can see, there is a space before jposee (which might be confusing
> you as you missed it), but can someone say if the 'jposee-read-only'
> part is correct.
>
jposee-read-only is just a suggested local directory name, could be any name you want.

If you don't add a directory name, then files are checked out in a directory called 'trunk'. The -read-only suffix is just a suggested eye catcher so you get to know that you can't commit stuff there because you're hitting the read-only repository.

Mark Salter

unread,
Oct 11, 2008, 5:11:42 PM10/11/08
to jpos-...@googlegroups.com
Alejandro Revilla wrote:
>> but can someone say if the
>> 'jposee-read-only' part is correct.
>>
> jposee-read-only is just a suggested local directory name, could be
> any name you want.

I see; it is the local folder name into which the source is checked out
to ; got it. I thought it was a component on the server 8(.

>
> If you don't add a directory name, then files are checked out in a
> directory called 'trunk'. The -read-only suffix is just a suggested
> eye catcher so you get to know that you can't commit stuff there
> because you're hitting the read-only repository.

Thanks Alejandro.

--
Mark

mwyc...@gmail.com

unread,
Oct 12, 2008, 7:06:51 AM10/12/08
to jPOS Users
Thanks,

It finally worked out.

I used this approach as you had suggested earlier.

TortoiseSVN >
and then
Repo-browser

Entered the url http://jposee.googlecode.com/svn/ in the dialogue
provided
and the repository was be displayed .

regards,

How about for JPOS latest subversion.
I have tried with url 'http://jpos.svn.sourceforge.net/jpos/trunk'
but i get some error that;
Repository moved temporarily to
'http://jpos.svn.sourceforge.net/viewvc/jpos/trunk' please relocate

Eeven when i relocate and use 'http://jpos.svn.sourceforge.net/viewvc/
jpos/trunk'
still it fails.

On Oct 11, 8:56 pm, Mark Salter <marksal...@talktalk.net> wrote:
> mwycli...@gmail.com wrote:
> > I have some problem getting jPOS-EE using subversion.
> > I am using TortoiseSVN but i get this error;
>
> > Checkout fromhttp://jposee.googlecode.com/svn/trunk/jposee, revision
> > HEAD, Fully recursive, Externals included
> > URL 'http://jposee.googlecode.com/svn/trunk/jposee'doesn't exist
>
> > What could be the problem?
>
> The url to use is:-
>
>        http://jposee.googlecode.com/svn/trunk/
>
> However, the google code @http://code.google.com/p/jposee/source/checkoutstates the svn command

mwyc...@gmail.com

unread,
Oct 12, 2008, 8:03:21 AM10/12/08
to jPOS Users
Hi,

Please hlep me on this, I really haven't clearly understood this stmt
(invoking the beanshell from bsh.bat).

I have created a file db.bsh in folder (c:\projects\jposee\bin\) and
pasted the following contents;
import java.util.*;
import org.jpos.ee.*;
import org.hibernate.*;

DB db = new DB();
db.createSchema (null, true);

db.open();

Transaction tx = db.beginTransaction();
User user = new User();
// user='admin', password='test'
user.setNick ("admin");
user.setPassword ("66d4aaa5ea177ac32c69946de3731ec0");
user.setName ("System Administrator");
user.grant ("login");
user.grant ("operator");
user.grant ("useradmin");
user.grant ("sysconfig");
user.grant ("admin");
db.session().save (user);

tx.commit();
db.close();

I have also copied the bsh.bat file int to the same folder (c:\projects
\jposee\bin\)
Below are its contents;

@echo off
REM $Id$
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02
set PATH=%JAVA_HOME%\bin;%PATH%
set JAVA=%JAVA_HOME%\bin\java
set cp=build\classes;build\examples;%CLASSPATH%
for %%i in (lib\*.jar) do call bin\cp.bat %%i
for %%i in (ext\*.jar) do call bin\cp.bat %%i
set CP=%CP%;%JAVA_HOME%\lib\tools.jar

%JAVA% -classpath %CP% bsh.Interpreter %1 %2 %3 %4 %5

set cp=

So how do i then invoke the bsh.bat?
When i double click on it, it just blacks out.

If i try to go via the windows command prompt, i again get issues as
shown below

C:\Projects\jposee\bin>bsh.bat test.bsh
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Projects\jposee\bin>bsh test.bsh
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

C:\Projects\jposee\bin>

regards,

On Oct 12, 12:06 am, Mark Salter <marksal...@talktalk.net> wrote:

Mark Salter

unread,
Oct 12, 2008, 10:36:24 AM10/12/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:

> Please hlep me on this, I really haven't clearly understood this stmt
> (invoking the beanshell from bsh.bat).

Where to start?

Beanshell is a way of running java code, interpreted at runtime rather
than compiled into a class file.

> So how do i then invoke the bsh.bat?

You need to type :-

bin\bsh.bat

at a command prompt whilst in your checkout folder (that includes the
folders bin and build). As it stands it needs to run 'in' that folder
so that the folders it references are present, but there still might be
problems.

> When i double click on it, it just blacks out.

?


>
> If i try to go via the windows command prompt, i again get issues as
> shown below
>
> C:\Projects\jposee\bin>bsh.bat test.bsh
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.

A space character is treated as a separator of parameters. Because your
folder names include spaces, you should enclose them (or a block of
them) in quotes (") to stop that happening.

>
> C:\Projects\jposee\bin>bsh test.bsh
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.

Your bsh.bat does *not* take a file as a parameter, you might be able to
use redirection, to enter the file, but I copied and pasted the whole
text into the beanshell (bsh) once it was ready for input.

The DB setup code is just java, perhaps you will find it easier to place
the code in a java program and run it from there?

--
Mark

mwyc...@gmail.com

unread,
Oct 12, 2008, 12:01:31 PM10/12/08
to jPOS Users
Hi,

I have accessed the bsh% command prompt,
but once i paste there the java code, i get some errors along the way;

bsh % import java.util.*;
import org.jpos.ee.*;
import org.hibernate.*;

DB db = new DB();
db.createSchema (null, true);

db.open();

Transaction tx = db.beginTransaction();
User user = new User();
// user='admin', password='test'
user.setNick ("admin");
user.setPassword ("66d4aaa5ea177ac32c69946de3731ec0");
user.setName ("System Administrator");
user.grant ("login");
user.grant ("operator");
user.grant ("useradmin");
user.grant ("sysconfig");
user.grant ("admin");
db.session().save (user);

tx.commit();
bsh % bsh % bsh % bsh % // Error: EvalError: Typed variable
declaration : Class:
DB not found in namespace : at Line: 8 : in file: <unknown file> : DB

bsh % // Error: EvalError: Attempt to resolve method: createSchema()
on undefine
d variable or class name: db : at Line: 9 : in file: <unknown file> :
db .create
Schema ( null , true )

bsh % bsh % // Error: EvalError: Attempt to resolve method: open() on
undefined
variable or class name: db : at Line: 11 : in file: <unknown file> :
db .open (
)

bsh % bsh % // Error: EvalError: Typed variable declaration : Class:
Transaction
not found in namespace : at Line: 13 : in file: <unknown file> :
Transaction

bsh % // Error: EvalError: Typed variable declaration : Class: User
not found in
namespace : at Line: 14 : in file: <unknown file> : User

bsh % // Error: EvalError: Attempt to resolve method: setNick() on
undefined var
iable or class name: user : at Line: 16 : in file: <unknown file> :
user .setNic
k ( "admin" )
.........................................
......................................

I wonder what the problem could be.

regards,

On Oct 12, 12:06 am, Mark Salter <marksal...@talktalk.net> wrote:

Alejandro Revilla

unread,
Oct 12, 2008, 3:56:04 PM10/12/08
to jpos-...@googlegroups.com
It seems that build/jpos-ee.jar or build/classes is probably not in your
classpath (have a look at your bin/bsh.bat file and add it there).

mwyc...@gmail.com

unread,
Oct 13, 2008, 6:56:15 AM10/13/08
to jPOS Users
Hi,

I have done that, but still i get issues;
see below

C:\Projects\jposee>bin\bsh.bat
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.

Below are the details of bin\bsh.bat
@echo off
REM $Id$
set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02
set JAVA=%JAVA_HOME%\bin\java
set cp=build\classes;build\examples;build\jpos-ee.jar;%CLASSPATH%
for %%i in (lib\*.jar) do call bin\cp.bat %%i
for %%i in (ext\*.jar) do call bin\cp.bat %%i
set CP=%CP%;%JAVA_HOME%\lib\tools.jar

%JAVA% -classpath %CP% bsh.Interpreter %1 %2 %3 %4 %5

set cp=

And cp.bat has the following
set CP=%CP%;%1


regards,
> > > - Show quoted text -- Hide quoted text -

Mark Salter

unread,
Oct 13, 2008, 8:09:00 AM10/13/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:
> I have done that, but still i get issues;
There must be a command that includes a space that you have not put
quotes around?

> see below
>
> C:\Projects\jposee>bin\bsh.bat
> 'C:\Program' is not recognized as an internal or external command,
> operable program or batch file.

Same error, so you have not fixed it?

>
> Below are the details of bin\bsh.bat
> @echo off
> REM $Id$
> set JAVA_HOME=C:\Program Files\Java\jdk1.6.0_02
> set JAVA=%JAVA_HOME%\bin\java
> set cp=build\classes;build\examples;build\jpos-ee.jar;%CLASSPATH%
> for %%i in (lib\*.jar) do call bin\cp.bat %%i
> for %%i in (ext\*.jar) do call bin\cp.bat %%i
> set CP=%CP%;%JAVA_HOME%\lib\tools.jar
>
> %JAVA% -classpath %CP% bsh.Interpreter %1 %2 %3 %4 %5
>
> set cp=
>
> And cp.bat has the following
> set CP=%CP%;%1

Comment out or delete the "@echo off". Then when you run it, you will
see all of the output, the last entry before the error message will show
the problem.

I can see the your JAVA_HOME variable includes spaces, this is likely
the problem?

--
Mark

mwyc...@gmail.com

unread,
Oct 13, 2008, 10:49:37 AM10/13/08
to jPOS Users
Thanks guys,

With all your advice I have atleast some kind of positive out put and
am now able to login thru the jposee web interface;
However, I have had to modify the classpath and include .\build\jpos-
ee.jar;.\build\classes
like Alejandro had advised.
Though am doing it directly from the windows command prompt and not
through bsh.bat
by setting the classpath as above and then running "java
bsh.Interpreter"
and pasting the contents directly on the bsh command prompt as Mark
had adavised earlier.

C:\Projects\jposee>set classpath=.\;C:\Program Files\Java
\jre1.6.0_02\lib\ext;C:
\Program Files\Java\jre1.6.0_02\lib\ext\bsh-2.0b4.jar;C:\Program Files
\Java\jdk1
.6.0_02\lib;.\build\jpos-ee.jar;.\build\classes;%classpath%
C:\Projects\jposee>java bsh.Interpreter

BeanShell 2.0b4 - by Pat Niemeyer (p...@pat.net)
bsh % import java.util.*;
import org.jpos.ee.*;
import org.hibernate.*;
DB db = new DB();
db.createSchema (null, true);
db.open();
Transaction tx = db.beginTransaction();
User user = new User();
// user='admin', password='test'
user.setNick ("admin");
user.setPassword ("66d4aaa5ea177ac32c69946de3731ec0");
user.setName ("System Administrator");
user.grant ("login");
user.grant ("operator");
user.grant ("useradmin");
user.grant ("sysconfig");
user.grant ("admin");
db.session().save (user);
tx.commit();
bsh % bsh % bsh % bsh % 15:23:41,477 WARN ConfigurationFactory:127 -
No configu
ration found. Configuring ehcache from ehcache-failsafe.xml found in
the classp
ath: jar:file:/C:/Projects/jposee/build/lib/ehcache-1.2.2.jar!/ehcache-
failsafe.
xml
bsh % alter table eeuser_perms drop foreign key FK3A72BAAF52638F6A
alter table eeuser_props drop foreign key FK3A78989CA043F41A
alter table rc_locale drop foreign key FK9293D428BFCB64F9
alter table revision drop foreign key FKF074B7DB52638F6A
............................................
...........................................

But now, why this WARNING? Could there be something wrong/missing?

bsh % bsh % bsh % bsh % 15:23:41,477 WARN ConfigurationFactory:127 -
No configu
ration found. Configuring ehcache from ehcache-failsafe.xml found in
the classp
ath: jar:file:/C:/Projects/jposee/build/lib/ehcache-1.2.2.jar!/ehcache-
failsafe.
xml

Also what DB is the jposee web interface using? Is it the mysql i
installed or some other java DB?
Which RDBMS is this statement refering to?
DB db = new DB();

regards,

On Oct 13, 3:09 pm, Mark Salter <marksal...@talktalk.net> wrote:

Alejandro Revilla

unread,
Oct 13, 2008, 12:56:30 PM10/13/08
to jpos-...@googlegroups.com
>
> But now, why this WARNING? Could there be something wrong/missing?
>
Feel free to ignore it, Hibernate uses its defaults.

mwyc...@gmail.com

unread,
Oct 14, 2008, 11:28:49 AM10/14/08
to jPOS Users
Thanks Alejandro.

mwyc...@gmail.com

unread,
Oct 15, 2008, 4:59:01 AM10/15/08
to jPOS Users
Hellos,

A quick one.

Why is it that when the jposee server is running , it consumes so much
of the computer resources?
On a simple machine like mine, processing nearly comes to a halt.

Are there certain components that one can disable or some kind of
parameters that one can set to
improve performance?

regards,

Alejandro Revilla

unread,
Oct 15, 2008, 6:30:18 AM10/15/08
to jpos-...@googlegroups.com
>
> Why is it that when the jposee server is running , it consumes so much
> of the computer resources?
> On a simple machine like mine, processing nearly comes to a halt.
>
You definitely have something wrong, we have systems processing massive
loads and consuming less than 10% CPU. There has to be some busy loop
there in your setup/application.

mwyc...@gmail.com

unread,
Oct 16, 2008, 6:02:55 PM10/16/08
to jPOS Users
Well, I will try it out on a different machine and see the behavior.

Do you think my inclusion of most of the optional modules from the opt
folder into the modules folder
contributes to the resource consuming effect of my jpos-ee server?

Mark Salter

unread,
Oct 16, 2008, 7:17:22 PM10/16/08
to jpos-...@googlegroups.com
mwyc...@gmail.com wrote:
> Well, I will try it out on a different machine and see the behavior.
Ok, but it is likely to be something in the code (rather than the hardware).

What spec machine do you have?


--
Mark

mwyc...@gmail.com

unread,
Oct 17, 2008, 2:48:11 PM10/17/08
to jPOS Users
> What spec machine do you have?

OS Name - Microsoft Windows XP Professional
Version - 5.1.2600 Service Pack 2 Build 2600
OS Manufacturer - Microsoft Corporation
System Manufacturer -TOSHIBA
System Type - X86-based PC
Processor - x86 Family 15 Model 2 Stepping 9 GenuineIntel ~2657 Mhz
Total Physical Memory - 256.00 MB
Available Physical Memory - 38.36 MB
Total Virtual Memory - 2.00 GB
Available Virtual Memory -1.96 GB
HDD -37.2


On Oct 17, 2:17 am, Mark Salter <marksal...@talktalk.net> wrote:
Reply all
Reply to author
Forward
0 new messages