getting bsh/Interpreter exception while running createme.bsh (ref- http://jpos.org/blog/2007/10/jpos-ee-setup-howto/)

516 views
Skip to first unread message

Abdul Qavi Paracha

unread,
Dec 13, 2009, 6:19:38 AM12/13/09
to jPOS Users
hi
I've installed all components of jpos-ee, and have set jpos-ee
environment. Now i am following http://jpos.org/blog/2007/10/jpos-ee-setup-howto/
to create database, but i encounter an exception while running

$ bin/bsh createme.bsh

Complete exception is as below:

Exception in thread "main" java.lang.NoClassDefFoundError: bsh/
Interpreter
Caused by: java.lang.ClassNotFoundException: bsh.Interpreter
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Could not find the main class: bsh.Interpreter. Program will exit.

I've searched a lot, but found no material regarding this exception.

Plz help me
Best regards

Mark Salter

unread,
Dec 13, 2009, 6:34:18 AM12/13/09
to jpos-...@googlegroups.com
Abdul Qavi Paracha wrote:

> I've installed all components of jpos-ee, and have set jpos-ee
> environment. Now i am following http://jpos.org/blog/2007/10/jpos-ee-setup-howto/
> to create database, but i encounter an exception while running
Have you run ant?

>
> $ bin/bsh createme.bsh
What is createme.bsh?

>
> Complete exception is as below:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: bsh/
> Interpreter
> Caused by: java.lang.ClassNotFoundException: bsh.Interpreter
> at java.net.URLClassLoader$1.run(Unknown Source)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown Source)
> at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Could not find the main class: bsh.Interpreter. Program will exit.
Do you have Beanshell?

--
Mark

Abdul Qavi

unread,
Dec 13, 2009, 6:47:29 AM12/13/09
to jpos-...@googlegroups.com
On Sun, Dec 13, 2009 at 4:34 PM, Mark Salter <marks...@talktalk.net> wrote:
Abdul Qavi Paracha wrote:

> I've installed all components of jpos-ee, and have set jpos-ee
> environment. Now i am following http://jpos.org/blog/2007/10/jpos-ee-setup-howto/
> to create database, but i encounter an exception while running
Have you run ant?
 
yes i've run ant.

>
> $ bin/bsh createme.bsh
What is createme.bsh?

createme.bsh file contains the following code

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've written this code inside createme.bsh file b/c i read the following mail.
http://markmail.org/message/7qigjokvgnpquvzo#query:+page:1+mid:daxalczultupsisa+state:results
 
 

>
> Complete exception is as below:
>
> Exception in thread "main" java.lang.NoClassDefFoundError: bsh/
> Interpreter
> Caused by: java.lang.ClassNotFoundException: bsh.Interpreter
>         at java.net.URLClassLoader$1.run(Unknown Source)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> Could not find the main class: bsh.Interpreter.  Program will exit.
Do you have Beanshell?

--
Mark

--
You received this message because you are subscribed to the  "jPOS Users" group.
Please see http://jpos.org/wiki/JPOS_Mailing_List_Readme_first
To post to this group, send email to jpos-...@googlegroups.com
To unsubscribe, send email to jpos-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jpos-users

Mark Salter

unread,
Dec 13, 2009, 7:08:39 AM12/13/09
to jpos-...@googlegroups.com
Abdul Qavi wrote:
> >
> > Complete exception is as below:
> >
> > Exception in thread "main" java.lang.NoClassDefFoundError: bsh/
> > Interpreter
> > Caused by: java.lang.ClassNotFoundException: bsh.Interpreter
> > at java.net.URLClassLoader$1.run(Unknown Source)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClass(Unknown Source)
> > at java.lang.ClassLoader.loadClassInternal(Unknown Source)
> > Could not find the main class: bsh.Interpreter. Program will exit.
> Do you have Beanshell?
>
Do you have Beanshell, which is where bsh.Interpreter will come from?

--
Mark

Abdul Qavi

unread,
Dec 13, 2009, 7:11:45 AM12/13/09
to jpos-...@googlegroups.com
Sorry i did not see this line when i replied u before.
No i don't have Beanshell. How can i get it, and use??

Mark Salter

unread,
Dec 13, 2009, 7:29:44 AM12/13/09
to jpos-...@googlegroups.com
Abdul Qavi wrote:
> Sorry i did not see this line when i replied u before.
> No i don't have Beanshell. How can i get it, and use??

http://tinyurl.com/yceksv8

--
Mark

Abdul Qavi

unread,
Dec 13, 2009, 8:01:12 AM12/13/09
to jpos-...@googlegroups.com

Sir, i've downloaded Beanshell (bsh-2.0b4.jar). But just after downloading i found out that it already exists under

jposee-read-only\build\lib

Abdul Qavi

unread,
Dec 13, 2009, 11:39:42 AM12/13/09
to jpos-...@googlegroups.com
Thank you so much Mark for your so generous help. I've finally solved the problem. With reference to mail at
i created bsh.bat file, and it worked for me.
Best regards

Abdul Qavi

unread,
Dec 16, 2009, 2:22:09 AM12/16/09
to jpos-...@googlegroups.com
Hi dear Mark, i've successfully set the jPOS-ee environment and have run tutorial at
http://jpos.org/blog/2007/10/jpos-ee-setup-howto/

Initially i started with jPOsClient and server, and understood jPOS environment completely. But then somebody suggested me to work in JPOS-EE. So i started JPOS-EE, followed the tutorial at  http://jpos.org/blog/2007/10/jpos-ee-setup-howto/

NOw please suggest me, what to do now-on. Any tutorials from where i can learn jPOS-EE more in depth

Best regards

Mark Salter

unread,
Dec 16, 2009, 2:54:52 AM12/16/09
to jpos-...@googlegroups.com
Abdul Qavi wrote:
> NOw please suggest me, what to do now-on. Any tutorials from where i can
> learn jPOS-EE more in depth

Search this mailing list - I gave you some words to look for.

Get the Programmers Guide from jpos.org ($50).

Search this mailing list some more for guidance on the items in the
Programmers Guide you need more detail on.

To my knowledge, you need to get the interface specification for the
device you are trying to talk at through your TCP/IP to RS-232 bridge.
You currently hope they 'talk' ISO8583, but I suspect they won't. You
also want to interact with the devices on a use by use (card swiped
basis), but from what I look at (for the devices) I suspect this will
not be possible.

You need to plan your approach carefully.

Good luck.

--
Mark

Abdul Qavi

unread,
Dec 16, 2009, 2:58:43 AM12/16/09
to jpos-...@googlegroups.com
Thank u so much. Now i follow all your above suggestions
Good luck.
Reply all
Reply to author
Forward
0 new messages