axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex G (JIRA)" <>
Subject [jira] Created: (AXIS2-2679) DeploymentClassloader unable to access resources from parent classloader
Date Wed, 16 May 2007 22:30:16 GMT
DeploymentClassloader unable to access resources from parent classloader

                 Key: AXIS2-2679
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: 1.2
            Reporter: Alex G

The following code does not work:
                AxisService serv = <GET SERVICE SOMEHOW>
                _log.debug("DEPLOYED SERVICE: " + serv.getName());
      "************* SPRING LOAD *****************");

                ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(
                        new String[] { "/META-INF/spring/web-components.xml" },

It complains about missing schemas (since web-components.xml is using spring schemas).
I tracked the problem down to Axis2 DeploymentClassloader and discovered that this classloader
would not load any resource that is located in the parent classloader dues to the following

    public InputStream getResourceAsStream(String name) {
       URL url =findResource(name);
            try {
                return url.openStream();
            } catch (IOException e) {
                throw new RuntimeException(e);
        return null;

Acoording to J2SE API spec (in my interpretaion), first line should be
URL url =getResource(name); and not URL url =findResource(name);

Changing findResource to getResource - fixes the problem.

Formal diff:

==== modules/kernel/src/org/apache/axis2/deployment/ - modules/kernel/src/org/apache/axis2/deployment/
<         URL url =findResource(name);
>         URL url =getResource(name);

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message