-
1. Re: UnsatisfiedDependencyException when using @Logger
dan.j.allen Apr 30, 2009 7:28 PM (in response to so38)I believe the problem is that the logger package is not bundling a beans.xml, which is what activates the beans in that artifact. You can either crack it open and put one in there yourself (/META-INF/beans.xml). You may be able to declare it in XML too, but clearly the beans.xml is the easiest approach.
-
2. Re: UnsatisfiedDependencyException when using @Logger
so38 May 1, 2009 1:04 AM (in response to so38)It looks like it just looks for beans.xml not META-INF/beans.xml
Is webbeans supposed to run in Java 5? The LoggerProducer class has Java 6 specific code in it. String didn't get an isEmpty() method until Java 6.
-
3. Re: UnsatisfiedDependencyException when using @Logger
dan.j.allen May 1, 2009 4:02 AM (in response to so38)
It looks like it just looks for beans.xml not META-INF/beans.xmlI'm pretty sure it's META-INF/beans.xml. Chapter 11 of the spec begins:
Bean classes must be deployed in an EAR, WAR, EJB-JAR or JAR archive or directory in the application classpath that
has a file named beans.xml in the metadata directory (META-INF, or WEB-INF in the case of a WAR). If a bean is deployed
to a location that is not in the application classpath, or does not contain a file named beans.xml in the metadata directory,
it will not be discovered by the container.
Is webbeans supposed to run in Java 5? The LoggerProducer class has Java 6 specific code in it. String didn't get an isEmpty() method until Java 6.Oops! That's a mistake. I'm pretty sure the target platform for the Web Beans RI is JDK 5 and above.
-
4. Re: UnsatisfiedDependencyException when using @Logger
so38 May 1, 2009 6:29 AM (in response to so38)
Dan Allen wrote on May 01, 2009 04:02:
It looks like it just looks for beans.xml not META-INF/beans.xml
I'm pretty sure it's META-INF/beans.xml. Chapter 11 of the spec begins:Bean classes must be deployed in an EAR, WAR, EJB-JAR or JAR archive or directory in the application classpath that
has a file named beans.xml in the metadata directory (META-INF, or WEB-INF in the case of a WAR). If a bean is deployed
to a location that is not in the application classpath, or does not contain a file named beans.xml in the metadata directory,
it will not be discovered by the container.
Is webbeans supposed to run in Java 5? The LoggerProducer class has Java 6 specific code in it. String didn't get an isEmpty() method until Java 6.ServletWebBeanDiscovery.scan() hard codes beans.xml so /META-INF/beans.xml is not picked. This should probably be fixed to match the spec.
-
5. Re: UnsatisfiedDependencyException when using @Logger
dan.j.allen May 1, 2009 10:21 AM (in response to so38)Wow, you are just on a roll today with bug reports ;) I filed an issue and corrected it: WBX-38
-
6. Re: UnsatisfiedDependencyException when using @Logger
so38 May 1, 2009 9:18 PM (in response to so38)Here's another one. The same problem exists in the SE module too. The is a beans.xml file but it is in the root of the jar. The code in SEWebBeanDiscovery looks for beans.xml not META-INF/beans.xml.
-
7. Re: UnsatisfiedDependencyException when using @Logger
dan.j.allen May 1, 2009 9:52 PM (in response to so38)Fixed that one too. Clearly a bad pattern got repeated.