From: Jason H <sco...@ya...> - 2013-09-26 18:00:07
|
I am trying to get these to work together. Others have, but I cannot figure out my problem. Error: java.lang.NoClassDefFoundError: Could not initialize class eu.webtoolkit.jwt.WApplication ( full error: http://pastebin.com/gNYU6h2B ) My Dependencies: Jython 2.5.3 Webtoolkit 3.3.0 (http://www.webtoolkit.eu/jwt/download) Tomcat 7 Platform = Windows 7 Files in tomcat's webapps\demo (demo is my project name): demo: + WHello.py + WEB-INF/ ++ web.xml ++ lib/ +++ jython.jar +++ jwt-3.3.0.jar +++ slf4j-log4j12-1.7.5.jar What is wrong? If I remove the jwt-3.3.0.jar, I get a "eu" not found exception, so with the jar in place it is finding it! Many thanks! web.xml------------------START <web-app> <servlet> <servlet-name>PyServlet</servlet-name> <servlet-class>org.python.util.PyServlet</servlet-class> <load-on-startup>1</load-on-startup> <init-param> <param-name>debug</param-name> <param-value>1</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>PyServlet</servlet-name> <url-pattern>*.py</url-pattern> </servlet-mapping> </web-app> web.xml--------------------END WHello.py------------------START from eu.webtoolkit.jwt import WtServlet #error here from eu.webtoolkit.jwt import WApplication from eu.webtoolkit.jwt import WEnvironment from eu.webtoolkit.jwt import WText from eu.webtoolkit.jwt import WLineEdit from eu.webtoolkit.jwt import WPushButton from eu.webtoolkit.jwt import Side from eu.webtoolkit.jwt import WBreak from eu.webtoolkit.jwt import Signal class WHello(WtServlet): def createApplication(self, env): return WHelloApplication(env) class WHelloApplication(WApplication): def __init__(self, env): WApplication.__init__(self, env) self.setTitle( 'Hello world' ) self.getRoot().addWidget(WText("Your name, please ? ")) self.nameEdit = WLineEdit(self.getRoot()) self.nameEdit.setFocus() self.button = WPushButton("Greet me.", self.getRoot()) self.button.setMargin(5, Side.Left) self.getRoot().addWidget(WBreak()) self.greeting = WText(self.getRoot()) self.listener = ButtonClickedListener(self) self.button.clicked().addListener(self, self.listener) class ButtonClickedListener(Signal.Listener): def __init__(self, app): self.app = app def trigger(self): print "Print statements can be seen in catalina.out log file." self.app.greeting.setText("Hello there, " + self.app.nameEdit.getText()) WHello.py------------------END |