You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jose Luis Alba (JIRA)" <de...@tuscany.apache.org> on 2008/12/02 10:22:44 UTC

[jira] Created: (TUSCANY-2702) Tuscany webapps doesn't work with JBoss AS 4.x

Tuscany webapps doesn't work with JBoss AS 4.x
----------------------------------------------

                 Key: TUSCANY-2702
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2702
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-1.3.2
         Environment: JBoss AS 4.x
            Reporter: Jose Luis Alba
             Fix For: Java-SCA-1.3.2


After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
Here it goes:

1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
2. URL points to the directory of a SCA webapp directory deployed in JBoss.

When running in JBoss the URL.getConnection() returns an instance of sun.net.www.protocol.file.FileURLConnection.
The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
(more accurate).

After reading all sources of PackageProcessor (the ones using the InputStream obtained from
the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.

Then, temporary, I've changed the code to:

        try {
            if (!new File(sourceURL.toURI()).isDirectory()) {
            // lines 357 to 369
            }
        } catch (URISyntaxException ex) {
            ex.printStackTrace();
        }
        
And it worked fine.


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


[jira] Resolved: (TUSCANY-2702) Tuscany webapps doesn't work with JBoss AS 4.x

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng resolved TUSCANY-2702.
-----------------------------------

    Resolution: Fixed

Fixed under r745752 based on the proposed solution. Thanks.

> Tuscany webapps doesn't work with JBoss AS 4.x
> ----------------------------------------------
>
>                 Key: TUSCANY-2702
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2702
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.3.2
>         Environment: JBoss AS 4.x
>            Reporter: Jose Luis Alba
>            Assignee: Raymond Feng
>             Fix For: Java-SCA-1.3.2
>
>
> After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
> Here it goes:
> 1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
> 2. URL points to the directory of a SCA webapp directory deployed in JBoss.
> When running in JBoss the URL.getConnection() returns an instance of org.jboss.net.protocol.file.FileURLConnection.
> The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
> Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
> a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
> error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
> (more accurate).
> After reading all sources of PackageProcessor (the ones using the InputStream obtained from
> the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
> FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.
> Then, temporary, I've changed the code to:
>         try {
>             if (!new File(sourceURL.toURI()).isDirectory()) {
>             // lines 357 to 369
>             }
>         } catch (URISyntaxException ex) {
>             ex.printStackTrace();
>         }
>         
> And it worked fine.

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


[jira] Updated: (TUSCANY-2702) Tuscany webapps doesn't work with JBoss AS 4.x

Posted by "Jose Luis Alba (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jose Luis Alba updated TUSCANY-2702:
------------------------------------

    Description: 
After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
Here it goes:

1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
2. URL points to the directory of a SCA webapp directory deployed in JBoss.

When running in JBoss the URL.getConnection() returns an instance of org.jboss.net.protocol.file.FileURLConnection.
The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
(more accurate).

After reading all sources of PackageProcessor (the ones using the InputStream obtained from
the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.

Then, temporary, I've changed the code to:

        try {
            if (!new File(sourceURL.toURI()).isDirectory()) {
            // lines 357 to 369
            }
        } catch (URISyntaxException ex) {
            ex.printStackTrace();
        }
        
And it worked fine.


  was:
After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
Here it goes:

1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
2. URL points to the directory of a SCA webapp directory deployed in JBoss.

When running in JBoss the URL.getConnection() returns an instance of sun.net.www.protocol.file.FileURLConnection.
The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
(more accurate).

After reading all sources of PackageProcessor (the ones using the InputStream obtained from
the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.

Then, temporary, I've changed the code to:

        try {
            if (!new File(sourceURL.toURI()).isDirectory()) {
            // lines 357 to 369
            }
        } catch (URISyntaxException ex) {
            ex.printStackTrace();
        }
        
And it worked fine.



I made a mistake in describing the problem. JBoss uses org.jboss.net.protocol.file.FileURLConnection and not sun.net.www.protocol.file.FileURLConnection. And that is the source of the problem.

> Tuscany webapps doesn't work with JBoss AS 4.x
> ----------------------------------------------
>
>                 Key: TUSCANY-2702
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2702
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.3.2
>         Environment: JBoss AS 4.x
>            Reporter: Jose Luis Alba
>             Fix For: Java-SCA-1.3.2
>
>
> After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
> Here it goes:
> 1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
> 2. URL points to the directory of a SCA webapp directory deployed in JBoss.
> When running in JBoss the URL.getConnection() returns an instance of org.jboss.net.protocol.file.FileURLConnection.
> The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
> Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
> a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
> error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
> (more accurate).
> After reading all sources of PackageProcessor (the ones using the InputStream obtained from
> the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
> FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.
> Then, temporary, I've changed the code to:
>         try {
>             if (!new File(sourceURL.toURI()).isDirectory()) {
>             // lines 357 to 369
>             }
>         } catch (URISyntaxException ex) {
>             ex.printStackTrace();
>         }
>         
> And it worked fine.

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


[jira] Assigned: (TUSCANY-2702) Tuscany webapps doesn't work with JBoss AS 4.x

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Raymond Feng reassigned TUSCANY-2702:
-------------------------------------

    Assignee: Raymond Feng

> Tuscany webapps doesn't work with JBoss AS 4.x
> ----------------------------------------------
>
>                 Key: TUSCANY-2702
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2702
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Core Runtime
>    Affects Versions: Java-SCA-1.3.2
>         Environment: JBoss AS 4.x
>            Reporter: Jose Luis Alba
>            Assignee: Raymond Feng
>             Fix For: Java-SCA-1.3.2
>
>
> After a lot of debugging I've found what's happening with JBoss (versions 4.x, on 5 it's solved) and Tuscany.
> Here it goes:
> 1. We are at ContributionServiceImpl of the Tuscany 1.3.2 source, lines 357-369.
> 2. URL points to the directory of a SCA webapp directory deployed in JBoss.
> When running in JBoss the URL.getConnection() returns an instance of org.jboss.net.protocol.file.FileURLConnection.
> The FileUrlConnection when invokes the getInputStream() tries to instantiate a FileInputStream.
> Here URL points to a directory (calculator-sample-webapp.war for example), then FileInputStream throws
> a FileNotFoundException (see FileInputStream signature in javadocs). On windows machines the
> error message is 'Access Denied' (?) and on Unix machines the error message is 'Is not a Directory'
> (more accurate).
> After reading all sources of PackageProcessor (the ones using the InputStream obtained from
> the URLConnection) I've seen that only JarContributionProcessor uses the InputStream object.
> FolderContributionProcessor, the one who reads directories, don't uses the InputStream object.
> Then, temporary, I've changed the code to:
>         try {
>             if (!new File(sourceURL.toURI()).isDirectory()) {
>             // lines 357 to 369
>             }
>         } catch (URISyntaxException ex) {
>             ex.printStackTrace();
>         }
>         
> And it worked fine.

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