Hi Tom
We were having problems with the python scripting hook too. It turned out to be jar compatibility. I'm not sure if it's the same problem but here's our error and how we solved it. Error: Caused by: java.io.IOException: javax.script.ScriptException: ImportError: No module named types in /h/data/gis/geoserver/external/scripts/wps/buffer.py at line number 1 Solution: Install geoserver pyhton and javascript scripting hooks <initial assumptions - jboss7, java7, geoserver 2.2.4) 1) undeploy geoserver 2) download geoserver python and javascript scripting extensions from http://gridlock.opengeo.org/geoserver/2.2.x/community-latest/ 3) copy both zip files into directory <jboss deployment dir>/geoserver.war/WEB-INF/lib 4) extract both zip files (if prompted to replace, select 'N') 5) in WEB-INF/lib, delete jython-2.5.2.jar 6) access jython download page (http://www.jython.org/downloads.html). Download jython 2.7b1 standalone 7) cp jython-standalone-2.7-b1.jar <jboss deployment dir>/geoserver.war/WEB-INF/lib 8) deploy geoserver 9) create scripting hooks cd <geoserver data dir> cd scripts/wps create buffer.py (code found at http://docs.geoserver.org/latest/en/user/community/scripting/hooks.html) 10) test python hook From: Tom van Tilburg [mailto:[email protected]] Sent: Wednesday, March 27, 2013 8:02 AM To: [email protected] Subject: Re: [Geoserver-users] Python WPS scripting broken in Geoserver 2.3.x I just installed SUN JAVA 1.6 JRE, but the problem persists. Here's a snippet from the error log: 2013-03-27 15:53:58,962 WARN [imagemosaic.ImageMosaicFormat] - java.lang.RuntimeException: java.io.IOException: javax.script.ScriptException: java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/geotools/process/feature/gs/SimpleProcessingCollection in /var/data/tomcat7/webapps/geoserver/data/scripts/wps/mybuffer.py at line number 1 org.geotools.data.DataSourceException: java.lang.RuntimeException: java.io.IOException: javax.script.ScriptException: java.lang.NoClassDefFoundError: java.lang.NoClassDefFoundError: org/geotools/process/feature/gs/SimpleProcessingCollection in /var/data/tomcat7/webapps/geoserver/data/scripts/wps/mybuffer.py at line number 1 Line 1 in mybuffer.py reads: from geoserver.wps import process Java info: Sun Microsystems Inc.: 1.6.0_43 (Java HotSpot(TM) 64-Bit Server VM) (using Tomcat7) As far as I understand the imagemosaic has nothing to do with this, the exception shows up a couple of times at different points in the startup of geoserver on Tomcat7. Chrs, Tom On 27-3-2013 15:11, Rahkonen Jukka wrote: Hi, It is for sure good to test with OpenJDK and Oracle 1.7 JDK, but Geoserver has some known issues with both of them and Oracle 1.6 jre is the officially supported version. Probably it would be more pleasure to test with that first. -Jukka Rahkonen- Tom van Tilburg wrote: Yes, I can see the WPS among the WCS/WFS/WMS services in the left of the menu and my handcrafted python process that I have put in ./data/scripts/wps/ is displayed in the list of WPS processes (py:mybuffer) By the way, I have OpenJDK installed. At the moment I'm testing with Oracle 1.7 JDK and that gives me a javax.script.ScriptException: ImportError: cannot import name process in /var/data/tomcat7/webapps/geoserver/data/scripts/wps/mybuffer.py at line number 1 It's a slightly different server though with Oracle JDK, so I'm testing some more. Chrs, Tom
smime.p7s
Description: S/MIME cryptographic signature
------------------------------------------------------------------------------ Own the Future-Intel® Level Up Game Demo Contest 2013 Rise to greatness in Intel's independent game demo contest. Compete for recognition, cash, and the chance to get your game on Steam. $5K grand prize plus 10 genre and skill prizes. Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________ Geoserver-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
