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

Reply via email to