0

java.lang.NoClassDefFoundError: bsh/NameSpace

asked 2010-06-16 12:36:27 +0800

eptx gravatar image eptx
130 3

A modified Keystroke/Events example throws an exception when I hit enter in the textbox. I've tried both java and groovy versions. Neither work.

What could be causing this and how can I get more debug information to track down such errors?

Error Msg...
SEVERE: >>java.lang.NoClassDefFoundError: bsh/NameSpace
>>java.lang.ClassNotFoundException: bsh.NameSpace
>> at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)


Code....
<zk>
<grid fixedLayout="true" width="400px">
<rows>
<row>
Password
<textbox id="inp" onOK="doOk()" onCancel="doCancel()" ctrlKeys="^a#f2" onCtrlKey="doCtrlKey()" type="password" value="123456789" width="150px" />
</row>
</rows>
</grid>
<zscript language="Groovy">
import org.zkoss.zul.Messagebox

void doOk() {
Messagebox.show("ENTER key is pressed", "OK", Messagebox.OK, Messagebox.EXCLAMATION);
inp.focus();
}

</zscript>
</zk>

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-06-17 19:52:49 +0800

PeterKuo gravatar image PeterKuo
481 2

Yes, you have to have another account for wiki.
We haven't have single sign-on for wiki and forum.

We should put maven related article together, at least we can add "See Also" link in the tail of each article.
You may write as you like, and modify afterward.

The accumulation of little good will can change the world.
Thank you.

link publish delete flag offensive edit

answered 2010-06-17 13:12:58 +0800

eptx gravatar image eptx
130 3

Sure! Where exactly? and do I need another account? When I search for maven from zkoss.org home I get the following top three hits.
1. http://www.zkoss.org/smalltalks/foodtogo/zkfoodtogo.dsp
Dated...2007
2. http://docs.zkoss.org/wiki/ZK/How-Tos/Installation/How_to_Install_ZK_on_Maven
Should be removed/replaced...not much to do with ZK really
3. http://docs.zkoss.org/wiki/How-Tos/Installation/How_to_Add_Library_into_Maven_Repository_Manually
Dated 2008/2009 forum post

I'd like to put it somewhere to easily be found. Would be be great to have documentation by version. I've found it frustrating to sift through 3,4, and 5 year old information that may or may not be relevant to 5.x versions

link publish delete flag offensive edit

answered 2010-06-16 20:11:26 +0800

PeterKuo gravatar image PeterKuo
481 2

@eptx
would you like to edit the wiki page about maven to share your experience?

link publish delete flag offensive edit

answered 2010-06-16 17:23:37 +0800

eptx gravatar image eptx
130 3

I switched to bsh 2.0b4 and all appears to be working now. Would be nice to get the dependencies clear for beginners ;-)

<dependency>
<groupId>bsh</groupId>
<artifactId>bsh</artifactId>
<version>2.0b4</version>
</dependency>

link publish delete flag offensive edit

answered 2010-06-16 16:34:10 +0800

eptx gravatar image eptx
130 3

I'm using maven with zkplus and zul dependencies...thought bsh.jar would be included? After adding the bsh (v1.3.0) dependency, the bsh.jar file is there and I get a different error...

Sourced file: inline evaluation of: `` doOk();'' : Attempt to resolve method: focus() on undefined variable or class name: inp : at Line: 15 : in file: inline evaluation of: `` import org.zkoss.zul.Messagebox; void doOk() { Messagebox.show("ENTER . . . '' : inp .focus ( )

If I change the zkscript langage to Groovy....

Sourced file: inline evaluation of: `` doOk();'' : Command not found: doOk() : at Line: 6 : in file: inline evaluation of: `` doOk();'' : doOk ( )

Code ...
<zk>
<grid fixedLayout="true" width="400px">
<rows>
<row>
Password
<textbox id="inp" onOK="doOk()" type="password" value="123456789" width="150px" />
</row>
</rows>
</grid>
<zscript language="Groovy">

def doOk = {
Messagebox.show("ENTER key is pressed", "OK", Messagebox.OK, Messagebox.EXCLAMATION)
inp.focus()
}

</zscript>
</zk>

link publish delete flag offensive edit

answered 2010-06-16 14:43:41 +0800

caclark gravatar image caclark
1753 2 5
http://clarktrips.intltwi...

and you put the bsh.jar in your WEB-INF/lib?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2010-06-16 12:36:27 +0800

Seen: 1,328 times

Last updated: Jun 17 '10

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More