5 Replies Latest reply on Mar 3, 2012 11:27 PM by rtskoo rtskoo

    Follow seam 3 doc but still have problem about solder Typed loggers:"Invalid logger interface...(implementation not found)"

    rtskoo rtskoo Newbie

      I use seam3 in jboss7.1(JDK1.7).

      I have followed seam3 doc about solder logging and added solder-tooling in the pom.xml.Also I see the solder-tooling-3.1.0.Final.jar in the build path . But when I run the code ,the page shows: Invalid logger interface com.gp.efr.log.LoginLog (implementation not found)

       

      Stack trace:

      java.lang.IllegalArgumentException: Invalid logger interface com.gp.efr.log.LoginLog (implementation not found)
      at org.jboss.solder.logging.Logger.getMessageLogger(Logger.java:2061)
      at org.jboss.solder.logging.Logger.getMessageLogger(Logger.java:2017)
      at org.jboss.solder.logging.TypedMessageLoggerProducer.produceTypedLogger(TypedMessageLoggerProducer.java:57)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)

      ...

       

      What is the problem,please?

       

      java code below :

      (1)

      LoginLog.java:

       

      package com.gp.efr.log;

      import org.jboss.solder.logging.Logger.Level;

      import org.jboss.solder.logging.Log;

      import org.jboss.solder.logging.MessageLogger;

      import org.jboss.solder.messages.Message;

       

       

      @MessageLogger

      public interface LoginLog {

          @Log(level = Level.INFO)

          @Message("Received login request  %s")

          void loginInfoReceived(String name);

       

      }

       

      (2)

      Another file uses LoginLog.java:

      import org.jboss.solder.logging.Logger;

      import org.jboss.solder.logging.TypedCategory;

      ....

       

      public class LoginManager {

       


      @Inject @TypedCategory(LoginManager.class)

      private LoginLog loginLog;

      ...

      public LoginManager(){

      }

       

      public String m1(){

      ...

       


      loginLog.loginInfoReceived( "a");

      ...

      }

      .......

      }