Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1217

Missing resource bundle entry causes exception during logging.

XMLWordPrintable

    • Hide

      Create a simple interceptor with a method that does not match the expected signature.

      @Transaction
      @Interceptor
      public class TestInterceptor {

      @AroundInvoke
      public Object createBatchTransaction(final InvocationContext context)
      throws Exception

      { return context.proceed(); }

      public void doSomething(final Object evt)

      { // do some stuff }

      }

      Show
      Create a simple interceptor with a method that does not match the expected signature. @Transaction @Interceptor public class TestInterceptor { @AroundInvoke public Object createBatchTransaction(final InvocationContext context) throws Exception { return context.proceed(); } public void doSomething(final Object evt) { // do some stuff } }

      Adding a method to an interceptor that does not match the expected signature causes a warning to be logged. This throws an error due to a missing resource entry.

      java.util.MissingResourceException: Can't find resource for bundle ch.qos.cal10n.util.CAL10NResourceBundle, key INTERCEPTOR_METHOD_DOES_NOT_HAVE_CORRECT_TYPE_OF_ARGUMENT
      at java.util.ResourceBundle.getObject(ResourceBundle.java:374)
      at java.util.ResourceBundle.getString(ResourceBundle.java:334)
      at ch.qos.cal10n.MessageConveyor.getMessage(MessageConveyor.java:82)
      at org.jboss.weld.logging.WeldMessageConveyor.getMessage(WeldMessageConveyor.java:66)
      at org.slf4j.cal10n.LocLogger.warn(LocLogger.java:141)
      at org.jboss.weld.interceptor.reader.InterceptorMetadataUtils.isValidBusinessMethodInterceptorMethod(InterceptorMetadataUtils.java:109)

              marko.luksa@gmail.com Marko Luksa (Inactive)
              smangan_jira smangan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: