[Biojava-l] Problem with downloading Genbank-sequence

Felix Dreher dreher at mpiib-berlin.mpg.de
Fri Dec 2 07:48:00 EST 2005


Hello,

the exception I posted in the last mail had nothing to do with the 
application server I use. It was an IDE specific bug: 'Java Studio 
Creator Early Access 2' failed to execute the build.xml-file properly 
when creating biojava.jar.
This was solved by using Netbeans to build the jar-file again and 
deleting and re-adding it in StudioCreator.

Greetings,
Felix



Felix Dreher wrote:

> Hi,
>
> the problem is the security-policy of the container I use for my 
> web-application. In this case it's the 'Sun Java System Application 
> Server Platform Edition 8.1'. As Thomas Down suggested, the Server 
> prohibits the creation of ClassLoaders, however they are needed by 
> BioJava.
> So I tried to customise the Server-configuration 'server.policy'-file 
> by adding a new line. Here is the code fraction:
>
>
> grant {
>     permission java.lang.RuntimePermission  "loadLibrary.*";
>        ...
>        ...  
>     //new line:
>     permission java.lang.RuntimePermission  "createClassLoader";
> };
>
>
> As some ClassLoader seems to have permission now, I think this was the 
> right starting point - and also the exception thrown changed. It's the 
> following:
>
>     org.biojava.bio.BioError: Unable to initialize DNATools
>     org.biojava.bio.seq.DNATools.(DNATools.java:119)
>     org.biojava.bio.seq.db.GenbankSequenceDB.getAlphabet(GenbankSequenceDB.java:66)
>     org.biojava.bio.seq.db.GenbankSequenceDB.getSequence(GenbankSequenceDB.java:121)
>     rnai.GenbankDownload.loadGenBankSequence(GenbankDownload.java:23)
>     rnai.seq_input2.prerender(seq_input2.java:296)
>     com.sun.web.ui.appbase.faces.ViewHandlerImpl.prerender(ViewHandlerImpl.java:788)
>     com.sun.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:282)
>     com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)
>     com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
>     com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)
>     javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>     sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>     un.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     java.lang.reflect.Method.invoke(Method.java:585)
>     org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
>     java.security.AccessController.doPrivileged(Native Method)
>     javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
>     org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
>
>     org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
>     java.security.AccessController.doPrivileged(Native Method)
>     com.sun.web.ui.util.UploadFilter.doFilter(UploadFilter.java:179)
>
> ---
>
> DNATools.java calls the following line in AlphabetManager.java:
>
>     InputStream alphabetStream =
>     ClassTools.getClassLoader(AlphabetManager.class).getResourceAsStream("org/biojava/bio/symbol/AlphabetManager.xml");
>
>
> So I suppose that the change in the Server-Configuration-file is not 
> 'globally enough' to affect all custom ClassLoader-calls.
> Maybe someone has experienced something similar or knows something 
> about this specific Server?
>
> Thanks,
> Felix
>
>
>
>-- 
>Felix Dreher
>Max-Planck-Institute for Infection Biology
>Campus Charité Mitte
>Department of Immunology
>Mailing address: Schumannstraße 21/22
>Visitors: Virchowweg 12
>10117 Berlin
>Germany
>Tel.: +49 (0)30 28460-254 / -494
>Mobile: +49 (0)163 7542426
>  
>


-- 
Felix Dreher
Max-Planck-Institute for Infection Biology
Campus Charité Mitte
Department of Immunology
Mailing address: Schumannstraße 21/22
Visitors: Virchowweg 12
10117 Berlin
Germany
Tel.: +49 (0)30 28460-254 / -494
Mobile: +49 (0)163 7542426



More information about the Biojava-l mailing list