Java Virtal Machine.net

[ News ] rss

February 01, 2011

Mark Wielaard: New GPG key. Finally created a new GPG key using gnupg. The old one was a DSA/1024 bits one and 8 years old. The new one is a RSA/2048 bits one. I will use the new one in the future to sign any release tarballs I might create. pub 2048R/57816A6A 2011-01-29 Key f...

More »

February 01, 2011

Andrew Hughes: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released!. We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: The IcedTea project provides a harness to build the source code from OpenJDK6 u...

More »

April/2024
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
2122232425 2627
282930    

[ Archives News
for 'Java Technology' ]

home > news > java technology > fixing broken windows #1: beans.xml validation in java ee 6

Fixing Broken Windows #1: beans.xml validation in Java EE 6

CDI is one of the best features of Java EE 6, it gives you - for example - a chance to include a beans.xml file in the WEB-INF folder in order to optimize the beans discovering during the application startup. An empty file is a fair price to pay for the cool features of the CDI but as soon you import the project in your preferred IDE you will see warnings about the impossibility of validating such file. The IDE is doing its job mitigating the risk of work without a chance to validate an XML file, now it is your time to fix this broken window. The beans descriptor schema: beans_1_0.xsd If you mess with the beans.xml file and try to deploy your application, Glassfish V3 will identify the problem because it contains the schema document describing the format of the bean.xml file. You can find this schema in the folder $AS_HOME/glassfish/lib/schemas/beans_1_0.xsd, where $AS_HOME stands for the Glassfish V3 installation folder. Including the proper header in your beans.xml file The only step you need to proceed in order to calm down your IDE is to include the schema declaration in the header of the beans.xml file: ">http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"> Done, just rebuild and refresh the project to see all that boring warnings going away. IMHO it is much more elegant ...


Date: February, 11 2010
Url: http://www.java.net/blog/felipegaucho/archive/2010/02/11/fixing-broken-windows-1-beansxml-validation-java-ee-6


Others News

©2002-2019Java-Virtual-Machine.net icon font | mobiriseextensions.com | bootstrap dropdown menu | formoid.com | css slider