I was playing around with CDI on Glassfish but did not get too far. As soon as I put an empyt beans.xml in /WebContent/META-INF I get the following error:
cannot Deploy CDI_Example Deployment Error for module: CDI_Example: Exception while loading the app : org.glassfish.deployment.common.DeploymentException: WELD-001201 Error loading beans.xml URL: null
The Weld documentation says the file may be empty but it looks like Glassfish v3 expects anything within the file.
Anybody got an idea?
Thx
"Empty" does not mean that beans.xml should be completely empty. It means that you don't have to specify anything, but it should at least contain the following content:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
</beans>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With