You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Stefan Schuetz <st...@wammel.com> on 2010/11/03 21:13:07 UTC

Unknown Configuration changes with Tap 5.2 and Chenillekit 1.3.0 - Quartz

Hi,

after updating Tap to 5.2.2 and updating Chenillekit to the latest 1.3.0 Snapshot i've a configuration issue.
I can't get this chenillekit-quartz part working again.

Here's my (old) configuration (same as in doc) in my app-module:
public static void contributeSchedulerFactory(OrderedConfiguration<Resource> configuration) {
	configuration.add("quartz.properties", new ClasspathResource("quartz.properties"));
}

And exactly this is throwing an exception now:
Caused by: java.lang.IllegalArgumentException: Service contribution (to service 'SchedulerFactory') was an instance of org.apache.tapestry5.ioc.internal.util.ClasspathResource, which is not assignable to the configuration type java.net.URL.

This does not work too:
configuration.add("quartz.properties", new URL("quartz.properties"));

I really have no idea what i've to do to get this to work.

Here is the source of the ChenilleKitQuartzModule:
https://nexus.codehaus.org/service/local/repositories/snapshots/archive/org/chenillekit/chenillekit-quartz/1.3.0-SNAPSHOT/chenillekit-quartz-1.3.0-20101101.135039-2-sources.jar/!/org/chenillekit/quartz/ChenilleKitQuartzModule.java


Any suggestions?

Thx in advance,
Stefan



Re: Unknown Configuration changes with Tap 5.2 and Chenillekit 1.3.0 - Quartz

Posted by Stefan Schuetz <st...@wammel.com>.
Wow, that was fast!

Thanks for the fast reply. Now it's up and running again.


Stefan


Am 03.11.2010 um 21:20 schrieb Sven Homburg:

> sorry for bad documentation.
> try this
> 
> /**
> * configuring the quartz scheduler.
> *
> * @param configuration configuration map
> */
> public void contributeSchedulerFactory(OrderedConfiguration<URL>
> configuration)
> {
> String fileName = applConfigDir + "/quartz.properties";
> File file = new File(fileName);
> if (!file.canRead())
> throw new RuntimeException(String.format("can't read file '%s'",
> file.toURI()));
> 
> try
> {
> configuration.add("configuration", file.toURI().toURL());
> }
> catch (MalformedURLException e)
> {
> throw new RuntimeException(e);
> }
> }
> 
> 
> with regards
> Sven Homburg
> Founder of the Chenille Kit Project
> http://chenillekit.codehaus.org
> 
> 
> 
> 
> 2010/11/3 Stefan Schuetz <st...@wammel.com>
> 
>> Hi,
>> 
>> after updating Tap to 5.2.2 and updating Chenillekit to the latest 1.3.0
>> Snapshot i've a configuration issue.
>> I can't get this chenillekit-quartz part working again.
>> 
>> Here's my (old) configuration (same as in doc) in my app-module:
>> public static void
>> contributeSchedulerFactory(OrderedConfiguration<Resource> configuration) {
>> configuration.add("quartz.properties", new
>> ClasspathResource("quartz.properties"));
>> }
>> 
>> And exactly this is throwing an exception now:
>> Caused by: java.lang.IllegalArgumentException: Service contribution (to
>> service 'SchedulerFactory') was an instance
>> of org.apache.tapestry5.ioc.internal.util.ClasspathResource, which is not
>> assignable to the configuration type java.net.URL.
>> 
>> This does not work too:
>> configuration.add("quartz.properties", new URL("quartz.properties"));
>> 
>> I really have no idea what i've to do to get this to work.
>> 
>> Here is the source of the ChenilleKitQuartzModule:
>> 
>> https://nexus.codehaus.org/service/local/repositories/snapshots/archive/org/chenillekit/chenillekit-quartz/1.3.0-SNAPSHOT/chenillekit-quartz-1.3.0-
>> 20101101.135039-2-sources.jar/!/org/chenillekit/quartz/ChenilleKitQuartzModule.java
>> 
>> 
>> Any suggestions?
>> 
>> Thx in advance,
>> Stefan
>> 
>> 
>> 


Re: Unknown Configuration changes with Tap 5.2 and Chenillekit 1.3.0 - Quartz

Posted by Massimo Lusetti <ml...@gmail.com>.
On Wed, Nov 3, 2010 at 9:20 PM, Sven Homburg <ho...@googlemail.com> wrote:

> sorry for bad documentation.
> try this

Yep, but actually the doc in the source repo are right simply the
published docs are out of date...

Cheers
-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Unknown Configuration changes with Tap 5.2 and Chenillekit 1.3.0 - Quartz

Posted by Sven Homburg <ho...@googlemail.com>.
sorry for bad documentation.
try this

/**
 * configuring the quartz scheduler.
 *
 * @param configuration configuration map
 */
public void contributeSchedulerFactory(OrderedConfiguration<URL>
configuration)
{
String fileName = applConfigDir + "/quartz.properties";
File file = new File(fileName);
if (!file.canRead())
throw new RuntimeException(String.format("can't read file '%s'",
file.toURI()));

try
{
configuration.add("configuration", file.toURI().toURL());
}
catch (MalformedURLException e)
{
throw new RuntimeException(e);
}
}


with regards
Sven Homburg
Founder of the Chenille Kit Project
http://chenillekit.codehaus.org




2010/11/3 Stefan Schuetz <st...@wammel.com>

> Hi,
>
> after updating Tap to 5.2.2 and updating Chenillekit to the latest 1.3.0
> Snapshot i've a configuration issue.
> I can't get this chenillekit-quartz part working again.
>
> Here's my (old) configuration (same as in doc) in my app-module:
> public static void
> contributeSchedulerFactory(OrderedConfiguration<Resource> configuration) {
> configuration.add("quartz.properties", new
> ClasspathResource("quartz.properties"));
> }
>
> And exactly this is throwing an exception now:
> Caused by: java.lang.IllegalArgumentException: Service contribution (to
> service 'SchedulerFactory') was an instance
> of org.apache.tapestry5.ioc.internal.util.ClasspathResource, which is not
> assignable to the configuration type java.net.URL.
>
> This does not work too:
> configuration.add("quartz.properties", new URL("quartz.properties"));
>
> I really have no idea what i've to do to get this to work.
>
> Here is the source of the ChenilleKitQuartzModule:
>
> https://nexus.codehaus.org/service/local/repositories/snapshots/archive/org/chenillekit/chenillekit-quartz/1.3.0-SNAPSHOT/chenillekit-quartz-1.3.0-
> 20101101.135039-2-sources.jar/!/org/chenillekit/quartz/ChenilleKitQuartzModule.java
>
>
> Any suggestions?
>
> Thx in advance,
> Stefan
>
>
>