开发者

seam solder (former weld-extensions project) is not initialized

开发者 https://www.devze.com 2023-02-05 01:01 出处:网络
I want to use logger in my java web application. I\'m using JBossAS 6.0.0.final, cdi (weld), jsf ... etc. Seam solder proposes to use an abstract logger is not tying to a concrete implementation (sl

I want to use logger in my java web application.

I'm using JBossAS 6.0.0.final, cdi (weld), jsf ... etc. Seam solder proposes to use an abstract logger is not tying to a concrete implementation (slf4j, log4j, etc) using jboss-logging api.

In order to get this logger in your code will need to write

@ Inject 
org.jboss.logging.Logger log 

seam-solder.jar has the producer for this logger.

package org.jboss.seam.solder.log; 
... 
class LoggerProducers 
{ 
   @ Produces 
   org.jboss.logging.Logger produceLog (InjectionPoint injectionPoint) {} 

} 

When I deploying my application, I get an error

15:51:18,300 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error 开发者_高级运维installing to Start: name=vfs:///C:/Java/jboss-6.0.0.Final/server/default/deploy/kamis-web-client.5.0.0-SNAPSHOT.ear_WeldBootstrapBean state=Create: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Logger] with qualifiers [@Default] at injection point [[field] @Inject private ru.kamis.suite.webclient.web.breadcrumbs.BreadcrumbsManager.log]

This is due to the seam-solder.jar has not META-INF/beans.xml file, and it is necessary for cdi container.

If to add beans.xml file in seam-solder.jar manually, then the application works WELL.

How to do without hacks?

To build my application I use maven, so my solution is not comfortable and NOT fine.

PS: Former weld-extensions project contained META-INF/beans.xml file in jar.


with seam-solder-3.0.0.Beta1 there should be no need to modify the jar

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号