I think you're right, it should be the jar.

The jar is there however, and I can see it contains the SimpleProcessingCollection method.
I'm a bit stuck on the options, except for going back to 2.2

Regards,
 Tom


On 28-3-2013 16:48, Bessette-Halsema, Dominique E wrote:

Yes we used the plugin with geoserver 2.2.4 and we did not overwrite the original jars. Our error was due to the jython jar delivered with the geoserver python plugin was based on Java5 and we are using Java7. Maybe yours is a geotools jar missing/mismatch issue?? The jar containing org/geotools/process/feature/gs/SimpleProcessingCollectionis the gt-process-feature.jar

Dom

*From:*Tom van Tilburg [mailto:[email protected]]
*Sent:* Thursday, March 28, 2013 3:52 AM
*To:* Bessette-Halsema, Dominique E
*Cc:* [email protected]
*Subject:* Re: [Geoserver-users] Python WPS scripting broken in Geoserver 2.3.x

Hi Dominique,

Thanks for this information.
I assume you also have the WPS plugin installed? And did you let the WPS plugin overwrite original JAR files? (I did not)

I tried your solution following the steps (using geoserver 2.3.0 instead) and replacing jython but curiously I ended up having the error you described yourself:

java.lang.RuntimeException:

        java.io.IOException: javax.script.ScriptException: ImportError:

        No module named types in

/var/data/tomcat7/webapps/geoserver/data/scripts/wps/mybuffer.py

        at line number 1 at

org.geoserver.script.wps.ScriptProcessFactory.getDescription(ScriptProcessFactory.java:112)

        at

org.geoserver.wps.web.WPSRequestBuilderPanel.initProcessView(WPSRequestBuilderPanel.java:250)

        at

org.geoserver.wps.web.WPSRequestBuilderPanel.access$000(WPSRequestBuilderPanel.java:63)

        at

org.geoserver.wps.web.WPSRequestBuilderPanel$5.onUpdate(WPSRequestBuilderPanel.java:225)





Seems it is really a 2.3 problem with jython?
(For the record: I also tried nightly war files with the plugins.)

Regards,
 Tom


On 27-3-2013 16:51, Bessette-Halsema, Dominique E wrote:

    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]
    <mailto:[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


------------------------------------------------------------------------------
Own the Future-Intel&reg; 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

Reply via email to