You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Sebastian Millies (JIRA)" <de...@tuscany.apache.org> on 2010/09/07 17:11:35 UTC

[jira] Created: (TUSCANY-3672) Domain Manager UI cannot deploy composite from HTTP-URL

Domain Manager UI cannot deploy composite from HTTP-URL
-------------------------------------------------------

                 Key: TUSCANY-3672
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3672
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Domain Management
    Affects Versions: Java-SCA-1.6
         Environment: JDK 1.6.0_18, Windows XP
            Reporter: Sebastian Millies


Consider a contribution that is to be added to a domain and requires a system utility or some other java code to 
be available in the classpath of the node in which it is deployed.

If I use a zip format contribution then the zip may contain jars which will be included on the classpath of that contribution. 
I want to upload that zip-file to the domain manager from a webserver, configure a node, start a node on a remote machine
and have that node download the zip-file from the webserver when it reads the node configuration.

However, when I specify an HTTP-URL of a zip-file as the contribution URI while defining the contribution, then when
I go to the composites page and want to add the composite, it is not found. In contrast, when I specify a windows
path (containing no "/") to the same zip-file all works well. 



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


[jira] Commented: (TUSCANY-3672) Domain Manager UI cannot deploy composite from HTTP-URL

Posted by "Sebastian Millies (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913951#action_12913951 ] 

Sebastian Millies commented on TUSCANY-3672:
--------------------------------------------

Unfortunately, it's not so simple. I tried using your suggestion, but:
a) on the "contributions" page, when one clicks on the link to the deployable composite to retrieve the descriptor, the current code works, whereas the modification is needed when adding the composite on the "composites" page
b) neither the current code nor the modification seems to work when the scheme is "http" instead of "file". 
c) the whole domain manager app seems somewhat unstable (e. g. unexpected HTTP 503 responses, the URLs to deployable composites suddenly disappearing from the "contributions" page when navigating back and forth in the browser)

I probably won't have time to look into this issue in the near future. 

> Domain Manager UI cannot deploy composite from HTTP-URL
> -------------------------------------------------------
>
>                 Key: TUSCANY-3672
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3672
>             Project: Tuscany
>          Issue Type: Bug
>          Components: SCA Java Runtime
>    Affects Versions: Java-SCA-1.6
>         Environment: JDK 1.6.0_18, Windows XP
>            Reporter: Sebastian Millies
>
> Consider a contribution that is to be added to a domain and requires a system utility or some other java code to 
> be available in the classpath of the node in which it is deployed.
> If I use a zip format contribution then the zip may contain jars which will be included on the classpath of that contribution. 
> I want to upload that zip-file to the domain manager from a webserver, configure a node, start a node on a remote machine
> and have that node download the zip-file from the webserver when it reads the node configuration.
> However, when I specify an HTTP-URL of a zip-file as the contribution URI while defining the contribution, then when
> I go to the composites page and want to add the composite, it is not found. In contrast, when I specify a windows
> path (containing no "/") to the same zip-file all works well. 

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


[jira] Commented: (TUSCANY-3672) Domain Manager UI cannot deploy composite from HTTP-URL

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906844#action_12906844 ] 

Simon Nash commented on TUSCANY-3672:
-------------------------------------

Some questions:

1. Does the zip file that is causing the problem when loaded from an HTTP server contain any composites or just utility jar files?
2. If the zip file just contains utility jar files, which contribution contains the composite that you are adding when the error occurs? 
3. If there are multiple contributions involved, what are the export/import relationships between them?
4. What is the exact contribution URL for the zip file when the problem occurs?

> Domain Manager UI cannot deploy composite from HTTP-URL
> -------------------------------------------------------
>
>                 Key: TUSCANY-3672
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3672
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Domain Management
>    Affects Versions: Java-SCA-1.6
>         Environment: JDK 1.6.0_18, Windows XP
>            Reporter: Sebastian Millies
>
> Consider a contribution that is to be added to a domain and requires a system utility or some other java code to 
> be available in the classpath of the node in which it is deployed.
> If I use a zip format contribution then the zip may contain jars which will be included on the classpath of that contribution. 
> I want to upload that zip-file to the domain manager from a webserver, configure a node, start a node on a remote machine
> and have that node download the zip-file from the webserver when it reads the node configuration.
> However, when I specify an HTTP-URL of a zip-file as the contribution URI while defining the contribution, then when
> I go to the composites page and want to add the composite, it is not found. In contrast, when I specify a windows
> path (containing no "/") to the same zip-file all works well. 

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


[jira] Commented: (TUSCANY-3672) Domain Manager UI cannot deploy composite from HTTP-URL

Posted by "Sebastian Millies (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12906888#action_12906888 ] 

Sebastian Millies commented on TUSCANY-3672:
--------------------------------------------

The zip file contains exactly one contribution with one composite file, plus a number of jar files. The deployable composite is redundantly specified in the sca-contribution.xml. 

The URL entered on the Domain Manager UI is: http://localhost/com.softwareag.tuscanyProject1.zip
This gets transformed internally when the composite is loaded to http://localhost/com.softwareag.tuscanyProject1.zip!/server.composite

As far as I can see, it is org.apache.tuscany.sca.domain.manager.impl.DomainManagerUtil#compositeAlternateLink(String , String)
which is at fault, as it simply assumes any URI with "!/" and containing a file name with an extension must point to a jar-file and prepends "jar:" to the protocol, whereupon the composite cannot be found. At least, deleting the prefix from the variable "uri"  in the debugger solves the problem for my zip-file.

Code extract:

       int e = uri.indexOf("!/"); 
        if (e != -1) {
            int s = uri.lastIndexOf('/', e - 2) +1;
            if (uri.substring(s, e).contains(".")) { 
                uri = "jar:" + uri;                                           // <-- mistake
            } else {
                uri = uri.substring(0, e) + uri.substring(e + 1);
            }
        }

> Domain Manager UI cannot deploy composite from HTTP-URL
> -------------------------------------------------------
>
>                 Key: TUSCANY-3672
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3672
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Domain Management
>    Affects Versions: Java-SCA-1.6
>         Environment: JDK 1.6.0_18, Windows XP
>            Reporter: Sebastian Millies
>
> Consider a contribution that is to be added to a domain and requires a system utility or some other java code to 
> be available in the classpath of the node in which it is deployed.
> If I use a zip format contribution then the zip may contain jars which will be included on the classpath of that contribution. 
> I want to upload that zip-file to the domain manager from a webserver, configure a node, start a node on a remote machine
> and have that node download the zip-file from the webserver when it reads the node configuration.
> However, when I specify an HTTP-URL of a zip-file as the contribution URI while defining the contribution, then when
> I go to the composites page and want to add the composite, it is not found. In contrast, when I specify a windows
> path (containing no "/") to the same zip-file all works well. 

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


[jira] Commented: (TUSCANY-3672) Domain Manager UI cannot deploy composite from HTTP-URL

Posted by "Simon Nash (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12907148#action_12907148 ] 

Simon Nash commented on TUSCANY-3672:
-------------------------------------

Can you submit a patch to fix this and attach it to the JIRA?  I'm not very very familiar with the code, but one approach could be to change the test to look for ".jar" in the URL rather than looking for ".".

> Domain Manager UI cannot deploy composite from HTTP-URL
> -------------------------------------------------------
>
>                 Key: TUSCANY-3672
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3672
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Domain Management
>    Affects Versions: Java-SCA-1.6
>         Environment: JDK 1.6.0_18, Windows XP
>            Reporter: Sebastian Millies
>
> Consider a contribution that is to be added to a domain and requires a system utility or some other java code to 
> be available in the classpath of the node in which it is deployed.
> If I use a zip format contribution then the zip may contain jars which will be included on the classpath of that contribution. 
> I want to upload that zip-file to the domain manager from a webserver, configure a node, start a node on a remote machine
> and have that node download the zip-file from the webserver when it reads the node configuration.
> However, when I specify an HTTP-URL of a zip-file as the contribution URI while defining the contribution, then when
> I go to the composites page and want to add the composite, it is not found. In contrast, when I specify a windows
> path (containing no "/") to the same zip-file all works well. 

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