First of all, thanks for your reply! On Tue, May 11, 2010 at 6:33 PM, Christopher Schultz < ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Silvio, > > I'm not familiar with biopython, so... > > On 5/11/2010 11:36 AM, Silvio Tschapke wrote: > > how do I configure tomcat that it finds the biopython libaries? > > Biopython is not included in jython.jar (which I have moved into the > > tomcat/lib folder. > > You probably want this JAR file in your webapp's WEB-INF/lib directory, > rather than in Tomcat's global lib directory. > > > Biopython installs itself into the python26/lib/side-packages folder. > > Okay, what files does it put in there? > There is no jar file. In the side-packages folder it puts a root folder Bio which includes further folders with .py, .pyo, pyc files. > > > But how can I tell tomcat about this? There is no python.jar neither a > > biopython.jar file which I could drop into tomcat/lib. > > So, is biopython a set of binary libraries like .so files? Are you sure > that it can be used in general with jython? If so, you probably just > have to modify your java.library.path system property. > I don't understand this. Do I have to tell Tomcat in a configuration file where it has to search for python or the libraries? Biopython works fine with Python outside my webserver. I am not sure if it works with Jython too. But I thought that Jython works fine with Python and Biopython is a subpackage so there shouldn'b be any problem. But I am not sure. When I write a CGI script which I put into the cgi-bin folder of a http server biopython works fine, because there you have to tell the server where it finds python.exe. > > > While running my Java Servlet which accesses a Jython module, that should > > access a Biopython class, this class cannot be found. > > Can you post the stack trace for the CNFE? > When I call: http://localhost:8080/Test_jee_with_jython/MyServlet I get a HTTP Status 500 error: Apache Tomcat/6.0.26 - Error report Traceback (most recent call last): File "C:/Documents and Settings/silvio/My Documents/eclipse_jee_workspace/Test_jee_with_jython/src/jyimplementation/Calculator.py", line 2, in <module> from Bio import Entrez ImportError: No module named Bio org.python.core.PyException.fillInStackTrace(PyException.java:70) java.lang.Throwable.<init>(Throwable.java:181) java.lang.Exception.<init>(Unknown Source) java.lang.RuntimeException.<init>(Unknown Source) org.python.core.PyException.<init>(PyException.java:46) org.python.core.PyException.<init>(PyException.java:43) org.python.core.PyException.<init>(PyException.java:61) org.python.core.Py.ImportError(Py.java:264) org.python.core.imp.import_first(imp.java:672) org.python.core.imp.import_name(imp.java:756) org.python.core.imp.importName(imp.java:806) org.python.core.ImportFunction.__call__(__builtin__.java:1232) org.python.core.PyObject.__call__(PyObject.java:367) org.python.core.__builtin__.__import__(__builtin__.java:1202) org.python.core.imp.importFromAs(imp.java:884) org.python.core.imp.importFrom(imp.java:860) org.python.pycode._pyx2.f$0(C:/Documents and Settings/silvio/My Documents/eclipse_jee_workspace/Test_jee_with_jython/src/jyimplementation/Calculator.py:7) org.python.pycode._pyx2.call_function(C:/Documents and Settings/silvio/My Documents/eclipse_jee_workspace/Test_jee_with_jython/src/jyimplementation/Calculator.py) org.python.core.PyTableCode.call(PyTableCode.java:165) org.python.core.PyCode.call(PyCode.java:18) org.python.core.Py.runCode(Py.java:1204) org.python.core.__builtin__.execfile_flags(__builtin__.java:541) org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:190) factory.JythonFactory.getJythonObject(JythonFactory.java:21) main.Main.forwardRequest(Main.java:17) servlets.MyServlet.doGet(MyServlet.java:36) javax.servlet.http.HttpServlet.service(HttpServlet.java:617) javax.servlet.http.HttpServlet.service(HttpServlet.java:717) If I change the import command in my jython module from "from Bio import Entrez" to "import Bio.Entrez" it doesn't work neither. By the way..what means CNFE? :) > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkvphvUACgkQ9CaO5/Lv0PAMdACgkk4lhyC8eZkbkrh0x6VULbzu > nMcAoKKPg0THwapz6qDBLrp+znmnPSPr > =gDVj > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >