You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by csckid <te...@gmail.com> on 2011/12/12 10:18:35 UTC
ioc
I get this exception after I have added tapestry-ioc. I have included spring
too in my pom file
SEVERE: Exception starting filter app
java.lang.NoClassDefFoundError:
org/apache/tapestry5/ioc/services/SymbolProvider
Here is my AppModule.java
package com.kids.crm.services;
import java.io.IOException;
import org.apache.tapestry5.*;
import org.apache.tapestry5.ioc.Configuration;
import org.apache.tapestry5.ioc.MappedConfiguration;
import org.apache.tapestry5.ioc.OrderedConfiguration;
import org.apache.tapestry5.ioc.ServiceBinder;
import org.apache.tapestry5.ioc.annotations.InjectService;
import org.apache.tapestry5.ioc.annotations.Local;
import org.apache.tapestry5.services.Request;
import org.apache.tapestry5.services.RequestFilter;
import org.apache.tapestry5.services.RequestHandler;
import org.apache.tapestry5.services.Response;
import org.slf4j.Logger;
/**
* This module is automatically included as part of the Tapestry IoC
Registry, it's a good place to
* configure and extend Tapestry, or to place your own service definitions.
*/
public class AppModule
{
public static void bind(ServiceBinder binder)
{
// binder.bind(MyServiceInterface.class, MyServiceImpl.class);
}
public static void contributeApplicationDefaults(
MappedConfiguration<String, String> configuration)
{
configuration.add(SymbolConstants.SUPPORTED_LOCALES, "en");
configuration.add(SymbolConstants.PRODUCTION_MODE, "false");
configuration.add(SymbolConstants.APPLICATION_VERSION,
"1.0-SNAPSHOT");
}
public RequestFilter buildTimingFilter(final Logger log)
{
return new RequestFilter()
{
public boolean service(Request request, Response response,
RequestHandler handler)
throws IOException
{
long startTime = System.currentTimeMillis();
try
{
return handler.service(request, response);
}
finally
{
long elapsed = System.currentTimeMillis() - startTime;
log.info(String.format("Request time: %d ms", elapsed));
}
}
};
}
public void contributeRequestHandler(OrderedConfiguration<RequestFilter>
configuration,
@Local
RequestFilter filter)
{
configuration.add("Timing", filter);
}
}
--
View this message in context: http://tapestry.1045711.n5.nabble.com/ioc-tp5067699p5067699.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: ioc
Posted by csckid <te...@gmail.com>.
I found out the problem. This was my initial pom file
<dependency>
<groupId>org.apache.tapestry</groupId>
<artifactId>tapestry-ioc</artifactId>
<version>${tapestry-release-version}</version>
<scope>provided</scope>
</dependency>
I have removed <scope> section and it ran correctly. :D
Anyways, I would like to know what does it mean by adding scope. Or never
mind I haven't google it yet. :D
--
View this message in context: http://tapestry.1045711.n5.nabble.com/ioc-tp5067699p5068378.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org