One possibility is that the service you are contributing does not implement
the correct interface, though I'm pretty sure there should be checks in
place for that.  I wrote the ChainBuilder code in HiveMind a couple of years
back!

Basically, your contributions are mixed in with Tapestry's and anybody
else's to form a chain-of-command.  The exception inside the constructor
indicates that there was an issue converting the List to an object array (of
the service interface type) and the most likely cause there is that your
contributed service is the wrong type.

On 4/25/07, Paul Stanton <[EMAIL PROTECTED]> wrote:

Howard,

At present this is all the output I'm getting, I haven't enabled
Log4j/Logging yet though (haven't decided on the best way to do so).

org.apache.hivemind.ApplicationRuntimeException: Unable to construct
service tapestry.init.MasterInitializer: Failure invoking constructor
for class $ApplicationInitializer_1122b245fc1:
java.lang.ArrayStoreException
   location:

jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/TapestryStart/WEB-INF/lib/tapestry-
framework-4.1.1.jar!/META-INF/tapestry.init.xml,
line 27, column 60

org.apache.hivemind.ApplicationRuntimeException: Failure invoking
constructor for class $ApplicationInitializer_1122b245fc1:
java.lang.ArrayStoreException
   location:

jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%205.5/webapps/TapestryStart/WEB-INF/lib/tapestry-
framework-4.1.1.jar!/META-INF/tapestry.init.xml,
line 27, column 60

org.apache.hivemind.ApplicationRuntimeException: Failure invoking
constructor for class $ApplicationInitializer_1122b245fc1:
java.lang.ArrayStoreException

java.lang.ArrayStoreException
java.lang.System.arraycopy(Native Method)
java.util.ArrayList.toArray(ArrayList.java:304)

$ApplicationInitializer_1122b245fc1.<init>($ApplicationInitializer_1122b245fc1.java)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(
NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:494)
org.apache.hivemind.util.ConstructorUtils.invoke(ConstructorUtils.java
:139)
org.apache.hivemind.util.ConstructorUtils.invokeMatchingConstructor(
ConstructorUtils.java:92)
org.apache.hivemind.util.ConstructorUtils.invokeConstructor(
ConstructorUtils.java:79)
org.apache.hivemind.lib.chain.ChainBuilderImpl.createInstance(
ChainBuilderImpl.java:109)
org.apache.hivemind.lib.chain.ChainBuilderImpl.buildImplementation(
ChainBuilderImpl.java:58)

$ChainBuilder_1122b245fb8.buildImplementation($ChainBuilder_1122b245fb8.java)

$ChainBuilder_1122b245fb7.buildImplementation($ChainBuilder_1122b245fb7.java)
org.apache.hivemind.lib.chain.ChainFactory.createCoreServiceImplementation
(ChainFactory.java:67)

$ServiceImplementationFactory_1122b245fb6.createCoreServiceImplementation($ServiceImplementationFactory_1122b245fb6.java)

$ServiceImplementationFactory_1122b245fb5.createCoreServiceImplementation($ServiceImplementationFactory_1122b245fb5.java)

org.apache.hivemind.impl.InvokeFactoryServiceConstructor.constructCoreServiceImplementation
(InvokeFactoryServiceConstructor.java:62)

org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructCoreServiceImplementation
(AbstractServiceModelImpl.java:108)

org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructNewServiceImplementation
(AbstractServiceModelImpl.java:158)

org.apache.hivemind.impl.servicemodel.AbstractServiceModelImpl.constructServiceImplementation
(AbstractServiceModelImpl.java:140)

org.apache.hivemind.impl.servicemodel.SingletonServiceModel.getActualServiceImplementation
(SingletonServiceModel.java:69)

$ApplicationInitializer_1122b245fb4._service($ApplicationInitializer_1122b245fb4.java)

$ApplicationInitializer_1122b245fb4.initialize($ApplicationInitializer_1122b245fb4.java)

$ApplicationInitializer_1122b245fb3.initialize($ApplicationInitializer_1122b245fb3.java)
org.apache.tapestry.ApplicationServlet.initializeApplication(
ApplicationServlet.java:299)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:198)

Howard Lewis Ship wrote:
> Check your console; there is almost certainly additional output
> describing
> why the code failed.
>
> On 4/25/07, Paul Stanton <[EMAIL PROTECTED]> wrote:
>>
>> Thanks Marcus,
>>
>> I think I'm closer but it still doesn't work. I've updated my
>> hivemodule.xml, so now the initializer part reads:
>>
>> <contribution configuration-id="tapestry.init.ApplicationInitializers">
>>     <command id="zzz" object="service:zzz"/>
>> </contribution>
>>
>> But now I get the following exception:
>>
>> org.apache.hivemind.ApplicationRuntimeException: Unable to construct
>> service tapestry.init.MasterInitializer: Failure invoking constructor
>> for class $ApplicationInitializer_1122afa4f72:
>> java.lang.ArrayStoreException
>>    location:
>> jar:file:tapestry-framework-4.1.1.jar!/META-INF/tapestry.init.xml, line
>> 27, column 60
>>
>> Is there any documentation for this besides the hivedocs?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

Reply via email to