You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Jeremy Boynes (JIRA)" <tu...@ws.apache.org> on 2006/04/26 02:09:03 UTC
[jira] Assigned: (TUSCANY-219) @Property on a setter method does
not work
[ http://issues.apache.org/jira/browse/TUSCANY-219?page=all ]
Jeremy Boynes reassigned TUSCANY-219:
-------------------------------------
Assign To: Jim Marino
Should go away when Jim changes the annotation introspector but assigning it to him so he does not forget.
> @Property on a setter method does not work
> ------------------------------------------
>
> Key: TUSCANY-219
> URL: http://issues.apache.org/jira/browse/TUSCANY-219
> Project: Tuscany
> Type: Bug
> Components: Java SCA Core
> Reporter: Jean-Sebastien Delfino
> Assignee: Jim Marino
>
> This is a significant problem as following the recommended practice for JavaBean properties causes an exception.
> To reproduce the problem, modify org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentImpl as follows:
> private String greetingMiddle;
>
> @Property
> public void setGreetingMiddle(String greetingMiddle) {
> this.greetingMiddle = greetingMiddle;
> }
>
> public String getGreetingMiddle() {
> return greetingMiddle;
> }
> run mvn from helloworldmc.
> Here's the surefire report:
> -------------------------------------------------------------------------------
> Battery: org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase
> -------------------------------------------------------------------------------
> Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 1.034 sec
> testGeetings(org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase) Time elapsed: 1.008 sec <<< ERROR!
> [ stdout ] ---------------------------------------------------------------
> [ stderr ] ---------------------------------------------------------------
> [ stacktrace ] -----------------------------------------------------------
> org.apache.tuscany.core.config.InvalidSetterException: public void org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentImpl.setGreetingMiddle(java.lang.String)
> at org.apache.tuscany.core.config.impl.Java5ComponentTypeIntrospector.addProperty(Java5ComponentTypeIntrospector.java:332)
> at org.apache.tuscany.core.config.impl.Java5ComponentTypeIntrospector.introspectPublicMethods(Java5ComponentTypeIntrospector.java:288)
> at org.apache.tuscany.core.config.impl.Java5ComponentTypeIntrospector.introspectAnnotatedMembers(Java5ComponentTypeIntrospector.java:201)
> at org.apache.tuscany.core.config.impl.Java5ComponentTypeIntrospector.introspect(Java5ComponentTypeIntrospector.java:80)
> at org.apache.tuscany.container.java.loader.JavaImplementationLoader.loadComponentTypeByIntrospection(JavaImplementationLoader.java:119)
> at org.apache.tuscany.container.java.loader.JavaImplementationLoader.loadComponentType(JavaImplementationLoader.java:112)
> at org.apache.tuscany.container.java.loader.JavaImplementationLoader.load(JavaImplementationLoader.java:91)
> at org.apache.tuscany.container.java.loader.JavaImplementationLoader.load(JavaImplementationLoader.java:51)
> at org.apache.tuscany.core.loader.impl.StAXLoaderRegistryImpl.load(StAXLoaderRegistryImpl.java:64)
> at org.apache.tuscany.core.loader.assembly.ComponentLoader.load(ComponentLoader.java:80)
> at org.apache.tuscany.core.loader.assembly.ComponentLoader.load(ComponentLoader.java:53)
> at org.apache.tuscany.core.loader.impl.StAXLoaderRegistryImpl.load(StAXLoaderRegistryImpl.java:64)
> at org.apache.tuscany.core.loader.assembly.AggregateLoader.loadAggregate(AggregateLoader.java:43)
> at org.apache.tuscany.core.loader.assembly.ModuleLoader.load(ModuleLoader.java:39)
> at org.apache.tuscany.core.loader.assembly.ModuleLoader.load(ModuleLoader.java:32)
> at org.apache.tuscany.core.loader.impl.StAXLoaderRegistryImpl.load(StAXLoaderRegistryImpl.java:64)
> at org.apache.tuscany.core.config.impl.StAXModuleComponentConfigurationLoaderImpl.loadModule(StAXModuleComponentConfigurationLoaderImpl.java:51)
> at org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:98)
> at org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:88)
> at org.apache.tuscany.core.config.impl.AbstractModuleComponentConfigurationLoader.loadModuleComponent(AbstractModuleComponentConfigurationLoader.java:61)
> at org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:103)
> at org.apache.tuscany.core.client.TuscanyRuntime.<init>(TuscanyRuntime.java:67)
> at org.apache.tuscany.samples.helloworldmc.HelloWorldServiceComponentTestCase.testGeetings(HelloWorldServiceComponentTestCase.java:30)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at junit.framework.TestCase.runTest(TestCase.java:154)
> at junit.framework.TestCase.runBare(TestCase.java:127)
> at junit.framework.TestResult$1.protect(TestResult.java:106)
> at junit.framework.TestResult.runProtected(TestResult.java:124)
> at junit.framework.TestResult.run(TestResult.java:109)
> at junit.framework.TestCase.run(TestCase.java:118)
> at junit.framework.TestSuite.runTest(TestSuite.java:208)
> at junit.framework.TestSuite.run(TestSuite.java:203)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira