Java / Tomcat / Jython Problem running on FC4

Charlie McVeigh cmcveigh at adelphia.net
Wed Apr 5 14:17:55 UTC 2006


I have an interesting problem trying to deploy a Java web application to
my instance of Tomcat running on my FC4 machine.  

Here are the facts:

1) I have installed Sun Java 1.5.0.05-1 per the instuctions at
www.fedorafaq.org.  

2) rpm -qa | grep -i java gives me:

java-1.5.0-sun-devel-1.5.0.05-1jpp
java-1.5.0-sun-1.5.0.05-1jpp
java-1.5.0-sun-jdbc-1.5.0.05-1jpp
java-1.5.0-sun-src-1.5.0.05-1jpp
java-1.5.0-sun-fonts-1.5.0.05-1jpp
java-1.5.0-sun-plugin-1.5.0.05-1jpp
java-1.5.0-sun-demo-1.5.0.05-1jpp
java-1.4.2-gcj-compat-1.4.2.0-40jpp_31rh.FC4.2
java-1.5.0-sun-alsa-1.5.0.05-1jpp

3) I am trying to deploy a .war file to my tomcat/webapps directory.  I
am running Tomcat 5.5.9.

4) The .war file that I am using works correctly on my colleagues
Windows XP, Solaris 10, Mac OS X machines - I know the .war file is OK.

5) When I start Tomcat I get the following Jython errors with embedded
Windows path names in the error output  (the embedded path names happen
to be the correct path to the original developers source code on his
Windows machine - yet I am deploying to a FC4 machine!):


..
...
....
2006-03-05 16:11:23,771 [main] ERROR - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'complexityFormController' defined in ServletContext
resource [/WEB-INF/ithc-servlet.xml]: Instantiation of bean failed;
nested exception is org.springframework.beans.FatalBeanException: Could
not instantiate class [com.ithc.web.mvc.admin.ScriptUploadController];
constructor threw exception; nested exception is
org.python.core.PyException: null
org.springframework.beans.FatalBeanException: Could not instantiate
class [com.ithc.web.mvc.admin.ScriptUploadController]; constructor threw
exception; nested exception is org.python.core.PyException: null
Traceback (innermost last):
  File "<Parser.py>", line 7, in ?
  File "C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib\tokenize.py", line
31, in ?
  File "C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib\re.py", line 7,
in ?
  File "C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib\sre.py", line 168,
in ?
AttributeError: java package 'sys' has no attribute 'hexversion'

	at org.python.core.Py.AttributeError(Py.java:93)
	at org.python.core.PyObject.noAttributeError(PyObject.java:1088)
	at org.python.core.PyObject.__getattr__(PyObject.java:1083)
	at sre$py.f$0(C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib\sre.py:168)
	at sre$py.call_function(C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib
\sre.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:213)
	at org.python.core.PyCode.call(PyCode.java:14)
	at org.python.core.imp.createFromCode(imp.java:191)
	at org.python.core.imp.createFromPyClass(imp.java:92)
	at org.python.core.imp.loadFromSource(imp.java:400)
	at org.python.core.imp.find_module(imp.java:308)
	at org.python.core.imp.import_next(imp.java:505)
	at org.python.core.imp.import_name(imp.java:584)
	at org.python.core.imp.importName(imp.java:625)
	at org.python.core.ImportFunction.load(__builtin__.java:1006)
	at org.python.core.ImportFunction.__call__(__builtin__.java:999)
	at org.python.core.PyObject.__call__(PyObject.java:572)
	at org.python.core.__builtin__.__import__(__builtin__.java:971)
	at org.python.core.imp.importOne(imp.java:634)
	at re$py.f$0(C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib\re.py:7)
	at re$py.call_function(C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib
\re.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:213)
	at org.python.core.PyCode.call(PyCode.java:14)
	at org.python.core.imp.createFromCode(imp.java:191)
	at org.python.core.imp.createFromPyClass(imp.java:92)
	at org.python.core.imp.loadFromSource(imp.java:400)
	at org.python.core.imp.find_module(imp.java:308)
	at org.python.core.imp.import_next(imp.java:505)
	at org.python.core.imp.import_name(imp.java:584)
	at org.python.core.imp.importName(imp.java:625)
	at org.python.core.ImportFunction.load(__builtin__.java:1006)
	at org.python.core.ImportFunction.__call__(__builtin__.java:999)
	at org.python.core.PyObject.__call__(PyObject.java:572)
	at org.python.core.__builtin__.__import__(__builtin__.java:971)
	at org.python.core.imp.importOne(imp.java:634)
	at tokenize$py.f$0(C:\eclipse\workspace\iTHC\WEB-INF\jython\Lib
\tokenize.py:31)
	at tokenize$py.call_function(C:\eclipse\workspace\iTHC\WEB-INF\jython
\Lib\tokenize.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:213)
	at org.python.core.PyCode.call(PyCode.java:14)
	at org.python.core.imp.createFromCode(imp.java:191)
	at org.python.core.imp.createFromPyClass(imp.java:92)
	at org.python.core.imp.loadFromSource(imp.java:400)
	at org.python.core.imp.find_module(imp.java:308)
	at org.python.core.imp.import_next(imp.java:505)
	at org.python.core.imp.import_name(imp.java:584)
	at org.python.core.imp.importName(imp.java:625)
	at org.python.core.ImportFunction.load(__builtin__.java:1006)
	at org.python.core.ImportFunction.__call__(__builtin__.java:999)
	at org.python.core.PyObject.__call__(PyObject.java:572)
	at org.python.core.__builtin__.__import__(__builtin__.java:971)
	at org.python.core.imp.importOne(imp.java:634)
	at org.python.pycode._pyx0.f$0(<Parser.py>:7)
	at org.python.pycode._pyx0.call_function(<Parser.py>)
	at org.python.core.PyTableCode.call(PyTableCode.java:213)
	at org.python.core.PyCode.call(PyCode.java:14)
	at org.python.core.Py.runCode(Py.java:1182)
	at
org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:167)
	at com.ithc.web.mvc.admin.PythonView.<init>(PythonView.java:23)
	at
com.ithc.web.mvc.admin.ScriptUploadController.<init>(ScriptUploadController.java:53)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
	at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
	at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:174)
	at
org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:150)
	at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:52)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:449)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:345)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
....
...
..


This problem has all of my colleagues stumped as well - especially since
the .war file works unchanged for them on the other OS's mentioned
above.  I would appreciate any thoughts that any of the Java Gurus on
the board may have.

Charlie




More information about the fedora-list mailing list