You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "winston antony (JIRA)" <de...@tuscany.apache.org> on 2010/08/18 16:54:17 UTC

[jira] Created: (TUSCANY-3655) implementation.spring in a Web Applicaton

implementation.spring in a Web Applicaton
-----------------------------------------

                 Key: TUSCANY-3655
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Spring Implementation Extension
    Affects Versions: Java-SCA-2.0-M5
         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
            Reporter: winston antony


     <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml

applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899996#action_12899996 ] 

Raymond Feng commented on TUSCANY-3655:
---------------------------------------

Please note what I described only applies to the latest code in 2.x trunk.

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Issue Comment Edited: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "winston antony (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900257#action_12900257 ] 

winston antony edited comment on TUSCANY-3655 at 8/19/10 7:46 AM:
------------------------------------------------------------------

Thanks Raymond. I will download the latest code 2.x from Trunk and will try that out.  Will keep you updated.

Also there is another issue in the applicationContext.xml.

I am declaring the SCA namespace as below
<beans  .........
xmlns:sca="http://www.springframework.org/schema/sca"	
http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd" >

and using the below tags in the applicationContext.xml
	<sca:service name="StockQuoteService"
        type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
But this line is showing the error 'Failed to read schema document 'http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd'. 
Where is this schema located? i have all the below jar files under lib directory.
tuscany-implementation-spring-2.0-M5.jar
tuscany-spring-2.0-M5.jar
tuscany-implementation-spring-sca-2.0-M5.jar
tuscany-sca-api-2.0-M5.jar
tuscany-base-2.0-M5.jar

Is there any other jar files to be added here??


      was (Author: winstona@techmahindra.com):
    Thanks Raymond. I will download the latest code 2.x from Trunk and will try that out.  Will keep you updated.

Also there is another issue in the applicationContext.xml.

I am declaring the SCA namespace as below
<beans  .........
xmlns:sca="http://www.springframework.org/schema/sca"	
http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd" >

and using the below tags in the applicationContext.xml
	<sca:service name="StockQuoteService"
        type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
But this line is showing the error 'Failed to read schema document 'http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd'. 
Where is this schema located? i have all the below jar files.
tuscany-implementation-spring-2.0-M5.jar
tuscany-spring-2.0-M5.jar
tuscany-implementation-spring-sca-2.0-M5.jar
tuscany-sca-api-2.0-M5.jar
tuscany-base-2.0-M5.jar

Is there any other jar files to be added here??

  
> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "Luciano Resende (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901502#action_12901502 ] 

Luciano Resende commented on TUSCANY-3655:
------------------------------------------

Overloading is not allowed in remote interfaces per SCA Specification.

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


Re: [jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by Raymond Feng <en...@gmail.com>.
Hi, Mike.

My understanding is that Tuscany 2.x code hasn't fully implemented the latest OASIS SCA Spring CI draft spec yet. I'm interested in helping it out.

Thanks,
Raymond
________________________________________________________________ 
Raymond Feng
rfeng@apache.org
Apache Tuscany PMC member and committer: tuscany.apache.org
Co-author of Tuscany SCA In Action book: www.tuscanyinaction.com
Personal Web Site: www.enjoyjava.com
________________________________________________________________

On Aug 19, 2010, at 7:16 AM, Mike Edwards (JIRA) wrote:

> 
>    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900284#action_12900284 ] 
> 
> Mike Edwards commented on TUSCANY-3655:
> ---------------------------------------
> 
> Winston,
> 
> The Tuscany 2.x code implements the OASIS version of the SCA spec, rather than the earlier OSOA version implemented in 1.x.
> 
> This leads to a change in the namespaces, in particular the one used in the application context, which in 2.x needs to look like this:
> 
> <beans xmlns="http://www.springframework.org/schema/beans"
>       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>       xmlns:sca="http://www.springframework.org/schema/sca"
>       xsi:schemaLocation="
>       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
>       http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">
> 
>    <bean id="HelloworldBean" class="sample.HelloworldImpl">
>    </bean>
> 
> </beans>
> 
> note:  http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd
> 
> You can see this in action in the helloworld-spring sample in the 2.x codebase
> 
>> implementation.spring in a Web Applicaton
>> -----------------------------------------
>> 
>>                Key: TUSCANY-3655
>>                URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>>            Project: Tuscany
>>         Issue Type: Bug
>>         Components: Java SCA Spring Implementation Extension
>>   Affects Versions: Java-SCA-2.0-M5
>>        Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>>           Reporter: winston antony
>> 
>>     <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
>> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.
> 
> -- 
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
> 


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "Mike Edwards (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900284#action_12900284 ] 

Mike Edwards commented on TUSCANY-3655:
---------------------------------------

Winston,

The Tuscany 2.x code implements the OASIS version of the SCA spec, rather than the earlier OSOA version implemented in 1.x.

This leads to a change in the namespaces, in particular the one used in the application context, which in 2.x needs to look like this:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:sca="http://www.springframework.org/schema/sca"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd">

    <bean id="HelloworldBean" class="sample.HelloworldImpl">
    </bean>

</beans>

note:  http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd

You can see this in action in the helloworld-spring sample in the 2.x codebase

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "winston antony (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900338#action_12900338 ] 

winston antony commented on TUSCANY-3655:
-----------------------------------------

I am using the same namespace but still i am not able to use the below tag. It is not recognising the <sca:xxx tags...........in the applicationContext.xml.

<sca:service name=xxxxxx
        type=xxxxx  target=xxxx />  This line shows an error Failed to read schema document 'http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd'.  Please correct me if there is anything wrong.

Am i supposed to use any other jar file or different versions? Currently 2.0-M5 jars are being used.
If you have any sample application for Spring webapplication with Tuscany, plz share the same.

The namespace used in my application is:
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
	xmlns:sca="http://www.springframework.org/schema/sca"	
	xsi:schemaLocation="
   http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd  
   http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd 
   http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
   http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd" >




> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "Raymond Feng (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12899992#action_12899992 ] 

Raymond Feng commented on TUSCANY-3655:
---------------------------------------

At this point, the location can be either an absolute URI or relative to the composite file. For example, you can use:

/WEB-INF/applicationContext.xml (relative to the root)
or
applicationContext.xml (if it's in the same folder as the composite)

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "winston antony (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12901342#action_12901342 ] 

winston antony commented on TUSCANY-3655:
-----------------------------------------

by using the tuscany 2.0 snapshot version, web.composite is able to locate the application context file.  Thanks Raymond.

Now i am getting the below error...........
org.apache.tuscany.sca.interfacedef.OverloadedOperationException: [JCA20001] Cannot overload operation xxx_method_Name on xxx_Interface_name as it is a @Remotable interface....

Is Overloading not allowed here or something else is wrong? Please throw some light on this to resolve this issue.

Thanks in advance

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

Posted by "winston antony (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12900257#action_12900257 ] 

winston antony commented on TUSCANY-3655:
-----------------------------------------

Thanks Raymond. I will download the latest code 2.x from Trunk and will try that out.  Will keep you updated.

Also there is another issue in the applicationContext.xml.

I am declaring the SCA namespace as below
<beans  .........
xmlns:sca="http://www.springframework.org/schema/sca"	
http://www.springframework.org/schema/sca http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd" >

and using the below tags in the applicationContext.xml
	<sca:service name="StockQuoteService"
        type="bigbank.stockquote.StockQuoteService" target="StockQuoteServiceBean"/>
But this line is showing the error 'Failed to read schema document 'http://www.osoa.org/xmlns/sca/1.0/spring-sca.xsd'. 
Where is this schema located? i have all the below jar files.
tuscany-implementation-spring-2.0-M5.jar
tuscany-spring-2.0-M5.jar
tuscany-implementation-spring-sca-2.0-M5.jar
tuscany-sca-api-2.0-M5.jar
tuscany-base-2.0-M5.jar

Is there any other jar files to be added here??


> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: winston antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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


[jira] Commented: (TUSCANY-3655) implementation.spring in a Web Applicaton

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

antony commented on TUSCANY-3655:
---------------------------------

Hi,
How the transaction to be controlled in a  Spring and SCA comibination. The materil which i had seen says that it is to be done at Spring Context level and not at the SCA level. Is this right? If this is the case, how a transcations(ACID) can be controlled across multiple programming languages thorugh SCA?

> implementation.spring in a Web Applicaton
> -----------------------------------------
>
>                 Key: TUSCANY-3655
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3655
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Spring Implementation Extension
>    Affects Versions: Java-SCA-2.0-M5
>         Environment: JSF2.0, Spring3.0, Hibernate3.1 and java-SCA 2.0
>            Reporter: antony
>
>      <implementation.spring location="applicationContext.xml"/>  this is throwing the below error org.apache.tuscany.sca.contribution.processor.ContributionReadException: Location cannot be resloved: applicationContext.xml
> applicationContext.xml is put under web-inf directory as well as under src directory. Still it is not able to find the applicationContext.xml.

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