You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Scott Eade <se...@backstagetech.com.au> on 2005/09/13 14:48:49 UTC

TurbineAvalonComponentService

The javadoc for TurbineAvalonComponentService includes this:

> If you want to initialize Torque by using the AvalonComponentService,
> you must activate Torque at initialization time by specifying
> services.AvalonComponentService.lookup = org.apache.torque.Torque in
> your TurbineResources.properties.

Shouldn't the lookup value be org.apache.torque.avalon.Torque?  This
would be consistent with
http://people.apache.org/~henning/turbine/turbine-2.3.2-rc1/services/avalon-component-service.html
and 2.3.1.

I have just switched over to 2.3.2-rc1 and lucky me I get:

> 2005-09-13 22:26:09,371 INFO  [Thread-0  ] services.BaseServiceBroker
> - Start Initializing service (early): AvalonComponentService
> 2005-09-13 22:26:09,401 ERROR [Thread-0  ] services.BaseServiceBroker
> - org.apache.turbine.services.InstantiationException: Failed to
> instantiate service AvalonComponentService

My config files haven't changed from 2.3.1.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: TurbineAvalonComponentService

Posted by Scott Eade <se...@backstagetech.com.au>.
Okay, my bad.

When I synced the dependencies with turbine 2.3.2-rc1 I accidentally
replaced the war.bundle property on on avalon-framework-api with
dist.bundle and thus it was not copied across when I built my app.

So the InstantiationException that is thrown when loading
TurbineAvalonComponentService is actually because it could not locate
the classes in avalon-framework-api.

I fixed the property and rebuilt and it is now working correctly.

Thanks Siegfried and Henning for your assistance.

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au



Henning P. Schmiedehausen wrote:

>Scott Eade <se...@backstagetech.com.au> writes:
>  
>
>>I have just switched over to 2.3.2-rc1 and lucky me I get:
>>    
>>
>>>2005-09-13 22:26:09,371 INFO  [Thread-0  ] services.BaseServiceBroker
>>>- Start Initializing service (early): AvalonComponentService
>>>2005-09-13 22:26:09,401 ERROR [Thread-0  ] services.BaseServiceBroker
>>>- org.apache.turbine.services.InstantiationException: Failed to
>>>instantiate service AvalonComponentService
>>>      
>>>
>>My config files haven't changed from 2.3.1.
>>    
>>
>
>That's interesting. Did you update the other dependencies, too or just
>drop-in replaced the turbine.jar? Which JDK?
>
>The following thing works fine with 2.3.2-rc1 + Torque 3.1.1.
>
>TR.props:
>
>--- cut ---
>services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService
>services.AvalonComponentService.componentConfiguration = WEB-INF/conf/componentConfiguration.xml
>services.AvalonComponentService.componentRoles = WEB-INF/conf/roleConfiguration.xml
>services.AvalonComponentService.lookup = org.apache.torque.avalon.Torque
>--- cut ---
>
>roleConfiguration.xml
>
>--- cut ---
><role-list>
>  <role name="org.apache.torque.avalon.Torque"
>        shorthand="torque"
>        default-class="org.apache.torque.avalon.TorqueComponent" />
></role-list>
>--- cut ---
>
>componentConfiguration.xml
>
>--- cut --- 
><componentConfig>
>  <torque>
>    <configfile>WEB-INF/conf/torque.properties</configfile>
>  </torque>
></componentConfig>
>--- cut --- 
>
>2005-09-13 15:18:03,338 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Added Mapping for Service: AvalonComponentService
>[...]
>2005-09-13 15:18:03,356 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Start Initializing service (early): AvalonComponentService
>2005-09-13 15:18:03,773 [main] INFO  org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService - Lookup for Component org.apache.torque.avalon.Torque successful
>2005-09-13 15:18:03,773 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Finish Initializing service (early): AvalonComponentService
>[...]
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: TurbineAvalonComponentService

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Scott Eade <se...@backstagetech.com.au> writes:

>The javadoc for TurbineAvalonComponentService includes this:

>> If you want to initialize Torque by using the AvalonComponentService,
>> you must activate Torque at initialization time by specifying
>> services.AvalonComponentService.lookup = org.apache.torque.Torque in
>> your TurbineResources.properties.

>Shouldn't the lookup value be org.apache.torque.avalon.Torque?  This
>would be consistent with

Yes, it should be. This is a doc error. Just committed a fix.

>http://people.apache.org/~henning/turbine/turbine-2.3.2-rc1/services/avalon-component-service.html
>and 2.3.1.

>I have just switched over to 2.3.2-rc1 and lucky me I get:

>> 2005-09-13 22:26:09,371 INFO  [Thread-0  ] services.BaseServiceBroker
>> - Start Initializing service (early): AvalonComponentService
>> 2005-09-13 22:26:09,401 ERROR [Thread-0  ] services.BaseServiceBroker
>> - org.apache.turbine.services.InstantiationException: Failed to
>> instantiate service AvalonComponentService

>My config files haven't changed from 2.3.1.

That's interesting. Did you update the other dependencies, too or just
drop-in replaced the turbine.jar? Which JDK?

The following thing works fine with 2.3.2-rc1 + Torque 3.1.1.

TR.props:

--- cut ---
services.AvalonComponentService.classname=org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService
services.AvalonComponentService.componentConfiguration = WEB-INF/conf/componentConfiguration.xml
services.AvalonComponentService.componentRoles = WEB-INF/conf/roleConfiguration.xml
services.AvalonComponentService.lookup = org.apache.torque.avalon.Torque
--- cut ---

roleConfiguration.xml

--- cut ---
<role-list>
  <role name="org.apache.torque.avalon.Torque"
        shorthand="torque"
        default-class="org.apache.torque.avalon.TorqueComponent" />
</role-list>
--- cut ---

componentConfiguration.xml

--- cut --- 
<componentConfig>
  <torque>
    <configfile>WEB-INF/conf/torque.properties</configfile>
  </torque>
</componentConfig>
--- cut --- 

2005-09-13 15:18:03,338 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Added Mapping for Service: AvalonComponentService
[...]
2005-09-13 15:18:03,356 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Start Initializing service (early): AvalonComponentService
2005-09-13 15:18:03,773 [main] INFO  org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService - Lookup for Component org.apache.torque.avalon.Torque successful
2005-09-13 15:18:03,773 [main] INFO  org.apache.turbine.services.BaseServiceBroker - Finish Initializing service (early): AvalonComponentService
[...]


	Best regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: TurbineAvalonComponentService

Posted by Scott Eade <se...@backstagetech.com.au>.
Hi Siegfried,

Not much is actually being output to the log.

Running via debug I can see that BaseServiceBroker is catching a
NoClassDefFoundError when executing:

    service = (Service)
Class.forName("org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService").newInstance();

This is caught and rethrown as an InstantiationException with the message:

     "A class referenced by " +
"org.apache.turbine.services.avaloncomponent.TurbineAvalonComponentService"
+ " is unavailable. Check your jars and classes."

Which is then immediately caught and rethrown as an
InstantiationException with the message:

    "Failed to instantiate service " + "AvalonComponentService"

Which is all that appears in the log.

Well that was fun, but why can't TurbineAvalonComponentService be
located?  It certainly exists in the same jar as BaseServiceBroker.

Scott


Siegfried Goeschl wrote:

> Hi Lucky Scott,
>
> any chance to get more logging output to see what went wrong (withou
> being in my office)?!
>
> Cheers,
>
> Siegfried Goeschl
>
>
> Scott Eade wrote:
>
>> I have just switched over to 2.3.2-rc1 and lucky me I get:
>>
>>> 2005-09-13 22:26:09,371 INFO  [Thread-0  ] services.BaseServiceBroker
>>> - Start Initializing service (early): AvalonComponentService
>>> 2005-09-13 22:26:09,401 ERROR [Thread-0  ] services.BaseServiceBroker
>>> - org.apache.turbine.services.InstantiationException: Failed to
>>> instantiate service AvalonComponentService
>>
>>
>> My config files haven't changed from 2.3.1.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org


Re: TurbineAvalonComponentService

Posted by Siegfried Goeschl <si...@it20one.at>.
Hi Lucky Scott,

any chance to get more logging output to see what went wrong (withou 
being in my office)?!

Cheers,

Siegfried Goeschl


Scott Eade wrote:

>The javadoc for TurbineAvalonComponentService includes this:
>
>  
>
>>If you want to initialize Torque by using the AvalonComponentService,
>>you must activate Torque at initialization time by specifying
>>services.AvalonComponentService.lookup = org.apache.torque.Torque in
>>your TurbineResources.properties.
>>    
>>
>
>Shouldn't the lookup value be org.apache.torque.avalon.Torque?  This
>would be consistent with
>http://people.apache.org/~henning/turbine/turbine-2.3.2-rc1/services/avalon-component-service.html
>and 2.3.1.
>
>I have just switched over to 2.3.2-rc1 and lucky me I get:
>
>  
>
>>2005-09-13 22:26:09,371 INFO  [Thread-0  ] services.BaseServiceBroker
>>- Start Initializing service (early): AvalonComponentService
>>2005-09-13 22:26:09,401 ERROR [Thread-0  ] services.BaseServiceBroker
>>- org.apache.turbine.services.InstantiationException: Failed to
>>instantiate service AvalonComponentService
>>    
>>
>
>My config files haven't changed from 2.3.1.
>
>Scott
>
>  
>