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

Possible bug when using <weld:scan>

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • None
    • 1.1.1.Final
    • None

    Description

      A project has two jars.
      One jar contains beans in package `org.jboss.jawabot`.
      Other has WEB-INF/beans.xml (used by weld-servlet-core through embedded Jetty), which contains

          <weld:scan>
              <weld:include name="org.jboss.jawabot.**"/>
               ...
      

      This causes CDI to stop working, giving errors like "Unable to resolve dependency XY" or (after removing this @Inject) this:

      Exception in thread "main" org.jboss.weld.exceptions.DeploymentException: WELD-001417 Enabled interceptor class <class&gt;org.jboss.weld.environment.se.jpa.JpaTransactionInterceptor</class&gt; in jar:file:/mnt/ssd1/data/.m2/repository/org/jboss/jawabot/JawaBot-core/2.0.0-SNAPSHOT/JawaBot-core-2.0.0-SNAPSHOT.jar!/META-INF/beans.xml@11 is neither annotated @Interceptor nor registered through a portable extension
              at org.jboss.weld.bootstrap.Validator.validateEnabledInterceptorClasses(Validator.java:466)
      

      , despite the class has @Interceptor (and the same class works fine with the other module).

      The project is at http://ondrazizka.googlecode.com/svn/trunk/bots/JawaBot/branches/2.0/ rev. 293
      To see the error, run mvn dependency:copy-dependencies java -cp ... org.jboss.jawabot.JawaBotApp Or simply run the web module in NetBeans.

      Attachments

        Activity

          People

            pmuiratbleepbleep Pete Muir (Inactive)
            ozizka_jira Ondrej Zizka (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: