The following comment has been added to this issue:
Author: James Carman
Created: Thu, 23 Sep 2004 5:10 AM
Body:
I have had this problem before too. I wanted to pass my service a list of
Strings as its parameters, but when I try I get the following exception. I do
think this is a bug, too. I just totally forgot about it, because I just
worked around it to get my example working.
<configuration-point id="greetings" occurs="1..n">
<schema>
<element name="greeting">
<attribute name="pattern" required="true"/>
<rules>
<push-attribute attribute="pattern"/>
<invoke-parent method="addElement"/>
</rules>
</element>
</schema>
</configuration-point>
<contribution configuration-id="greetings">
<greeting pattern="Howdy, {0}!" />
<greeting pattern="Hello, {0}!" />
<greeting pattern="Hey, {0}!" />
</contribution>
org.apache.hivemind.ApplicationRuntimeException: Unable to construct
configuration hivemind.article.greetings: Unable to translate 'Howdy, {0}!' to
type java.lang.Object: No property editor for java.lang.Object.
at
org.apache.hivemind.impl.ConfigurationPointImpl.constructElementsList(ConfigurationPointImpl.java:209)
at
org.apache.hivemind.impl.ConfigurationPointImpl.constructElements(ConfigurationPointImpl.java:150)
at
org.apache.hivemind.impl.ElementsInnerProxyList.inner(ElementsInnerProxyList.java:46)
at
org.apache.hivemind.impl.ElementsInnerProxyList.size(ElementsInnerProxyList.java:62)
at
org.apache.hivemind.impl.ElementsProxyList.size(ElementsProxyList.java:60)
at
example.service.impl.HelloServiceImpl.sayHello(HelloServiceImpl.java:34)
at $PooledProxy_ff2b2f5979_14.sayHello($PooledProxy_ff2b2f5979_14.java)
at example.service.impl.HelloServiceImpl.main(HelloServiceImpl.java:49)
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:324)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78)
Caused by: org.apache.hivemind.ApplicationRuntimeException: Unable to translate
'Howdy, {0}!' to type java.lang.Object: No property editor for java.lang.Object.
at
org.apache.hivemind.schema.rules.SmartTranslator.translate(SmartTranslator.java:83)
at
org.apache.hivemind.schema.rules.PushAttributeRule.begin(PushAttributeRule.java:41)
at
org.apache.hivemind.impl.SchemaElement.fireBegin(SchemaElement.java:209)
at
org.apache.hivemind.impl.SchemaProcessorImpl.processElement(SchemaProcessorImpl.java:213)
at
org.apache.hivemind.impl.SchemaProcessorImpl.processRootElement(SchemaProcessorImpl.java:188)
at
org.apache.hivemind.impl.SchemaProcessorImpl.process(SchemaProcessorImpl.java:176)
at
org.apache.hivemind.impl.ConfigurationPointImpl.constructElementsList(ConfigurationPointImpl.java:202)
... 12 more
Caused by: org.apache.hivemind.ApplicationRuntimeException: No property editor
for java.lang.Object.
at
org.apache.hivemind.schema.rules.SmartTranslator.translate(SmartTranslator.java:72)
... 18 more
Exception in thread "main"
---------------------------------------------------------------------
View this comment:
http://issues.apache.org/jira/browse/HIVEMIND-15?page=comments#action_53353
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/HIVEMIND-15
Here is an overview of the issue:
---------------------------------------------------------------------
Key: HIVEMIND-15
Summary: hivemind fails on translating a string attribute in a string
Type: Wish
Status: Closed
Priority: Major
Resolution: CANNOT REPRODUCE
Project: HiveMind
Components:
framework
Versions:
1.0
Assignee: Howard M. Lewis Ship
Reporter: Christian Domsch
Created: Fri, 2 Jul 2004 5:46 AM
Updated: Thu, 23 Sep 2004 5:10 AM
Environment: Windows 2000, Eclipse 3.0, j2sdk1.4.2
Description:
I have a configuration-point that builds a list of strings. When I build the
schema for the cp, hivemind expects a translator for an attribute. Since I want
to have Strings in my list, I don't need a translator.
Sadly the SmartTranslator fails on translating a string into a string, so I had
to write my own (very simple implementation :-). Maybe I did something wrong in
my configuration-point:
configuration-point (id=model) {
schema {
element (name=model) {
attribute (name=name required=true)
rules {
push-attribute (attribute=name)
invoke-parent (method=addElement)
}
}
}
}
contribution (configuration-id=model) {
model (name=MyModelName)
}
If this is correct, it would be a great enhancement, if hivemind would be able
to "translate" strings into strings without implementing a custom translator.
This is not very intuitive.
Greetings,
Christian Domsch
---------------------------------------------------------------------
JIRA INFORMATION:
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
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]