another way opposite:
add logger service to AppModule:
public Logger buildLogger(final Logger log){
return log;
}
and inject at your page:
...
@Inject
private Logger log;
...
On Wed, Aug 4, 2010 at 6:44 AM, Yunhua Sang <[email protected]> wrote:
> 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 <[email protected]> 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: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
--
cleverpig(Dan)
Location: Beijing
Address: Room 4018,No.A2 South Avenue Fuxingmen Beijing,P.R.China
Zipcode: 100031
MSN: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]