sorry,fix what i said:DAOs/Services should used @InjectResource! Note this conmment: "It is necessary to use @InjectResource, to indicate that the thing (the Logger) being injected is a resource specific to the service, rather than a general object provided via the MasterObjectProvider service."
On Thu, Aug 5, 2010 at 9:34 AM, cleverpig <greatclever...@gmail.com> wrote: > yes,you bet. > in T5,Pages and DAOs/Services should used @Inject. > > On Wed, Aug 4, 2010 at 3:00 PM, Moritz Gmelin <moritz.gme...@gmx.de> wrote: >> Hi, >> >> this was indeed the correct answer. >> >> In Rest Services the logger must be injected with @InjectResource. In >> Tapestry Pages (within the same project) one has to use @Inject. >> >> This was hard to track down since I got the error when accessing a page. >> While the actual error was in the RestService class. >> >> Thanks for your help. >> >> M. >> >> Am 04.08.2010 um 00:44 schrieb Yunhua Sang: >> >>> see https://issues.apache.org/jira/browse/TAP5-977 >>> >>> Quoted from comment: >>> >>> "It is necessary to use @InjectResource, to indicate that the thing >>> (the Logger) being injected is a resource specific to the service, >>> rather than a general object provided via the MasterObjectProvider >>> service." >>> >>> >>> So this problem is not related to dependencies. >>> >>> Yunhua >>> >>> On Tue, Aug 3, 2010 at 3:57 PM, Moritz Gmelin <moritz.gme...@gmx.de> wrote: >>>> Hi, >>>> >>>> I am having some troubles with a T5 application integrating >>>> tapestry-resteasy and tapestry-security. >>>> I'm getting >>>> No service implements the interface org.slf4j.Logger >>>> as soon as I try to inject a Logger in a page or service. >>>> If I remove the tapestry-resteasy dependency from the application, I can >>>> inject that Logger with no problems. >>>> >>>> Here's the pom.xml used. >>>> >>>> Any clues on why this is happening? >>>> >>>> Thanks >>>> >>>> Moritz >>>> >>>> <project xmlns="http://maven.apache.org/POM/4.0.0" >>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 >>>> http://maven.apache.org/xsd/maven-4.0.0.xsd"> >>>> <modelVersion>4.0.0</modelVersion> >>>> >>>> <groupId>com.wuuzl</groupId> >>>> <artifactId>WuuzlServer</artifactId> >>>> <version>0.0.1-SNAPSHOT</version> >>>> <packaging>war</packaging> >>>> >>>> <name>WuuzlServer</name> >>>> <url>http://maven.apache.org</url> >>>> >>>> <properties> >>>> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> >>>> </properties> >>>> >>>> <repositories> >>>> <repository> >>>> <id>repository.jboss.org</id> >>>> <name>JBoss Maven Repository</name> >>>> <url>http://repository.jboss.org/maven2</url> >>>> <layout>default</layout> >>>> </repository> >>>> </repositories> >>>> >>>> <dependencies> >>>> <dependency> >>>> <groupId>junit</groupId> >>>> <artifactId>junit</artifactId> >>>> <version>3.8.1</version> >>>> <scope>test</scope> >>>> </dependency> >>>> <dependency> >>>> <groupId>org.apache.tapestry</groupId> >>>> <artifactId>tapestry-core</artifactId> >>>> <version>5.1.0.5</version> >>>> <type>jar</type> >>>> <scope>compile</scope> >>>> </dependency> >>>> <dependency> >>>> <groupId>org.apache.tapestry</groupId> >>>> <artifactId>tapestry-hibernate</artifactId> >>>> <version>5.1.0.5</version> >>>> <type>jar</type> >>>> <scope>compile</scope> >>>> </dependency> >>>> <dependency> >>>> <groupId>postgresql</groupId> >>>> <artifactId>postgresql</artifactId> >>>> <version>8.4-701.jdbc4</version> >>>> <type>jar</type> >>>> <scope>compile</scope> >>>> </dependency> >>>> <dependency> >>>> <groupId>org.tynamo</groupId> >>>> <artifactId>tapestry-security</artifactId> >>>> <version>0.2.0</version> >>>> <type>jar</type> >>>> <scope>compile</scope> >>>> </dependency> >>>> <dependency> >>>> <groupId>org.apache.tapestry</groupId> >>>> <artifactId>tapestry-upload</artifactId> >>>> <version>5.1.0.5</version> >>>> <type>jar</type> >>>> <scope>compile</scope> >>>> </dependency> >>>> >>>> <dependency> >>>> <groupId>org.tynamo</groupId> >>>> <artifactId>tapestry-resteasy</artifactId> >>>> <version>0.2.0</version> >>>> <type>jar</type> >>>> </dependency> >>>> >>>> </dependencies> >>>> >>>> <build> >>>> <plugins> >>>> <plugin> >>>> <groupId>org.apache.maven.plugins</groupId> >>>> >>>> <artifactId>maven-compiler-plugin</artifactId> >>>> <configuration> >>>> <source>1.5</source> >>>> <target>1.5</target> >>>> <optimize>true</optimize> >>>> <encoding>UTF-8</encoding> >>>> </configuration> >>>> </plugin> >>>> </plugins> >>>> </build> >>>> </project> >>>> >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > > > -- > cleverpig(Dan) > Location: Beijing > Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China > Zipcode: 100031 > MSN: great_liu...@hotmail.com > QQ: 149291732 > Skype: cleverpigatmatrix > Facebook ID:cleverpig > Blog: cleverpig.name/dan/ > Tags: del.icio.us/cleverpig > Twitter: twitter.com/cleverpig > 新浪微博: t.sina.com.cn/cleverpig > Organization: www.beijing-open-party.org > or...@facebook: http://www.facebook.com/group.php?gid=8159558294 > -- cleverpig(Dan) Location: Beijing Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China Zipcode: 100031 MSN: great_liu...@hotmail.com QQ: 149291732 Skype: cleverpigatmatrix Facebook ID:cleverpig Blog: cleverpig.name/dan/ Tags: del.icio.us/cleverpig Twitter: twitter.com/cleverpig 新浪微博: t.sina.com.cn/cleverpig Organization: www.beijing-open-party.org or...@facebook: http://www.facebook.com/group.php?gid=8159558294 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org