It looks like now it is finding the spring file but I'm seeing
org.springframework.beans.factory.NoSuchBeanDefinitionException:
No bean named 'MessageServiceBean' is defined

The bean is defined in servlet-context.xml. Are the spring files loaded in
some order? It looks like sca-context.xml is loaded before
servlet-context.xml and doesn't find the bean.


On Tue, Mar 22, 2011 at 6:56 PM, Raymond Feng <enjoyj...@gmail.com> wrote:

> I made one more change in web.xml to use classpath: for Spring config
> location. Can you try again?
>
> Thanks,
> Raymond
>  *________________________________________________________________
>  Raymond Feng
> rf...@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 Mar 22, 2011, at 9:47 AM, Raymond Feng wrote:
>
> Hi,
>
> sample-implementation-spring-helloworld-contribution.jar is copied into the
> WAR as a jar. That's probably why you didn't see the
> WEB-INF/classes/helloworld-context.xml. Can you try to unzip the jar into
> WEB-INF/classes to see if it helps? We also need to figure out a way to
> resolve Spring application context files on the classpath.
>
> Thanks,
> Raymond
>  *________________________________________________________________
>  Raymond Feng
> rf...@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 Mar 22, 2011, at 9:32 AM, Florian Moga wrote:
>
> Hey Raymond,
>
> Yes, I tried deploying sample-implementation-spring-helloworld-webapp.war
> to both Tomcat and Jetty. When I saw the exceptions in logs, I tried copying
> sample-implementation-spring-helloworld-contribution.jar to the lib/ folder
> of Tomcat and removing the provided scope but none didn't fix 
> FileNotFoundException:
> Could not open ServletContext resource
> [/WEB-INF/classes/helloworld-context.xml].
>
> Florian
>
>
> On Tue, Mar 22, 2011 at 5:51 PM, Raymond Feng <enjoyj...@gmail.com> wrote:
>
>> Hi, Florian.
>>
>> Thank you for the feedback. Did you try to deploy the hello-spring.war
>> into Tomcat/Jetty?
>>
>> You are right, the provided scope seems to be an issue (for some reason,
>> "provided" is used by some folks in the wrong way:-). I'll fix it.
>>
>> Thanks,
>> Raymond
>>   *________________________________________________________________
>>  Raymond Feng
>> rf...@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 Mar 22, 2011, at 1:16 AM, Florian Moga wrote:
>>
>> Hi Raymond,
>>
>> Having Spring MVC support in Tuscany sounds and looks great! I had a look
>> at the sample but I haven't been able to start it up successfully. I'm
>> seeing the following in logs:
>>
>> Caused by: java.io.FileNotFoundException: Could not open ServletContext
>> resource [/WEB-INF/classes/helloworld-context.xml]
>>
>> Caused by: java.lang.ClassNotFoundException: sample.DateService
>>
>> This is probably due to the
>> sample-implementation-spring-helloworld-contribution dependency having the
>> scope set to provided. I don't know how that should be handled, I've tried
>> adding the jar to the lib/ folder in Tomcat but the first error was still
>> appearing. How should I do this correctly?
>>
>> Thanks,
>>
>> Florian
>>
>>
>> On Tue, Mar 22, 2011 at 12:33 AM, Raymond Feng <enjoyj...@gmail.com>wrote:
>>
>>> Hi,
>>>
>>> I recently added support of Spring MVC integration for Tuscany on top of
>>> the Tuscany/Spring web application feature.
>>>
>>>
>>> https://cwiki.apache.org/confluence/download/attachments/5964931/Spring+Tuscany.pptx
>>>
>>> To support the Spring MVC which has a servlet-scoped application context,
>>> I added code to allow Tuscany to start/stop a node per servlet and enhanced
>>> the CompositeContext and Spring implementation provider to link the Spring
>>> application context to Tuscany.
>>>
>>> Here is a working sample:
>>>
>>>
>>> https://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/sca-java-2.x/implementation-spring/(You
>>>  can find how to invoke it at
>>> https://svn.apache.org/repos/asf/tuscany/sandbox/rfeng/sca-java-2.x/implementation-spring/helloworld-spring-webapp/src/test/java/sample/HelloworldClientTestCase.java
>>> )
>>>
>>> (PS: I'm all confused by the move of our samples into various
>>> contrib/unreleased folders and had a difficult time to dig out the
>>> Spring/Tuscany integration sample. For now, I leave it in my sandbox before
>>> the sample structure is settled. )
>>>
>>> Thanks,
>>> Raymond
>>> *________________________________________________________________
>>>  Raymond Feng
>>> rf...@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
>>> ________________________________________________________________*
>>>
>>>
>>
>>
>
>
>

Reply via email to