[jboss-jira] [JBoss JIRA] Updated: (JBPM-992) ProcessClassLoader : cannot load resource from code deployed inside a process archive

Tom Baeyens (JIRA) jira-events at lists.jboss.org
Mon Jun 25 05:45:27 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBPM-992?page=all ]

Tom Baeyens updated JBPM-992:
-----------------------------

    Fix Version/s: jBPM jPDL 3.2.2
                       (was:  jBPM jPDL 3.2.1)

> ProcessClassLoader : cannot load resource from code deployed inside a process archive
> -------------------------------------------------------------------------------------
>
>                 Key: JBPM-992
>                 URL: http://jira.jboss.com/jira/browse/JBPM-992
>             Project: JBoss jBPM
>          Issue Type: Bug
>          Components: Core Engine
>    Affects Versions: jBPM jPDL 3.2
>         Environment: enterprise JBPM : process archive deployed and serialized into database
>            Reporter: Adrian Dimulescu
>         Assigned To: Tom Baeyens
>             Fix For: jBPM jPDL 3.2.2
>
>         Attachments: jbpm-patch-classloading-resource.patch
>
>
> A Java class deployed with a process archive may need access to a class path resource deployed in the same process archive.
> A common example is an ActionHandler implementation that calls a remote EJB and needs a jndi.properties file containin remote appserver location. In order to load that it calls :
> this.getClass().getClassLoader().getResourceAsStream("jndi.properties")
> This call generates a java.lang.NullPointerException which I think justifies the classification of this issue as a bug.
> Looking inside the ProcessClassLoader class, I see that in order to load a class, a "classes/" prefix. Indeed, the "par" format wants that all compiled classes be locates underneath the "classes/" directory. The JBPM_BYTEARRAY.NAME_ field in the database table confirms this : the NAME_ of the jndi.properties resource is : "classes/jndi.properties".
> Still the ProcessClassLoader.getResourceAsStream method does not use the classes prefix. 
> The fix look thus simple, i.e. adding that prefix.
> Second problem :  if the resource is not found, a delegation should be made to the parent classloader.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list