Separating Java EE components in different projects - jpa

i'm trying to learn how to separate java EE components.
i want to separate my jpa entities, ejbs, and web client into different projects
so i developed four different projects and compiled them in their own jars/wars
DomainEntities - contains my JPA entities
RemoteInterface - contains remote interfaces (i'm trying to separate the implementation)
RemoteEJB - implements the interface from RemoteInterface (project 2)
WebApp Client (i have a servlet that calls RemoteInterface to test if the ejb is working)
DomainEntities' jar structure is
DomainEntities
-META-INF
-MANIFEST.MF
-entities
-Student.class
RemoteEJB's jar structure is
RemoteEJB
-META-INF
-MANIFEST.MF
-persistence.xml
-sample
MyStatelessBean.class
The persistence.xml in RemoteEJB is (based on searching the web):
<?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="RemoteEJBPU" transaction-type="JTA"><provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/pwucdb</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<!--<jar-file>DomainEntities.jar</jar-file>-->
</persistence-unit>
</persistence>
the jta datasource is defined in my glassfish server.
the exclude-unlisted-classes and jar-file tags are based on my research on separating the jpa entities on a different jar. when i uncomment the jar-file tag, the ejb cannot be deployed to the server,so i comment it.
the servlet that calls uses the ejb is:
#WebServlet(name = "NewServlet", urlPatterns = {"/NewServlet"})
public class NewServlet extends HttpServlet {
#EJB
private MyRemoteInterface myRemoteInterface;
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
try (PrintWriter out = response.getWriter()) {
out.println(myRemoteInterface.getMessage());
out.println("Num of records retrived: " + myRemoteInterface.getStudents().size());
}
}
#Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
#Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
}
when i try to access the servlet i am having this warning/error
WARNING: The collection of metamodel types is empty. Model classes may not have been found during entity search for Java SE and some Java EE container managed persistence units. Please verify that your entity classes are referenced in persistence.xml using either <class> elements or a global <exclude-unlisted-classes>false</exclude-unlisted-classes> element
WARNING: A system exception occurred during an invocation on EJB MyStatelessBean method public java.util.List sample.MyStatelessBean.getStudents()
javax.ejb.EJBException
.....
Caused by: java.lang.IllegalArgumentException: An exception occurred while creating a query in EntityManager:
Exception Description: Error compiling the query [SELECT s FROM Student s]. Unknown entity type [Student].
at org.eclipse.persistence.internal.jpa.EntityManagerImpl.createQuery(EntityManagerImpl.java:1477)
if i comment out exclude-unlisted-classes tag, uncomment the jar-file tag and deploy. i get this server warning:
a jar-file [DomainEntities.jar] specified in persistence.xml is not found
The server also looked for a file called [...\build\DomainEntities_jar].

I recommend to bundle that JAR's and WAR's into an EAR-Archive.
If you use maven you could add this plugin to the EAR's pom:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.8</version>
<configuration>
<version>6</version>
<encoding>${project.build.sourceEncoding}</encoding>
<defaultLibBundleDir>APP-INF/lib</defaultLibBundleDir>
<fileNameMapping>no-version</fileNameMapping>
<displayName>${project.artifactId}</displayName>
<modules>
<jarModule>
<groupId>${project.groupId}</groupId>
<artifactId>domain</artifactId>
</jarModule>
<ejbModule>
<groupId>${project.groupId}</groupId>
<artifactId>ejb</artifactId>
</ejbModule>
</modules>
</configuration>
</plugin>
Thus all libs of the EAR will be copied into /APP-INF/lib.
In this scope its now accessible from the EJB view. Just call it like this:
<jar-file>APP-INF/lib/domain.jar</jar-file>
Note the
<fileNameMapping>no-version</fileNameMapping>
thats really important if you want to change the version of your domain-archive frequently otherwise you have to edit the EJB's persistence.xml all the time ;)
Some additions:
If you bundle everything into an EAR-Archive its not neccessary to use Remote Interfaces anymore. You just need Local Interfaces for that. Thats a good thing because accessing an EJB over Remote Interfaces is much slower than accessing them with Local Interfaces. Thats because Java serializes all objects to send them over the network.

Related

Gettting WELD Exception on server startup of weblogic where as using Google Guice for DI in Jersey based application

I am using Weblogic 12b as App server. My application uses Jersey 2.5.1 with Guice3 in my project. I have a class called Application derived from org.glassfish.jersey.server.ResourceConfig. On server startup I am getting error as below:
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408: Unsatisfied dependencies for type ServiceLocator with qualifiers #Default
at injection point [BackedAnnotatedParameter] Parameter 1 of [BackedAnnotatedConstructor] #Inject public Application(ServiceLocator)
at Application.<init>(Application.java:22)
at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:359)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:281)
at org.jboss.weld.bootstrap.Validator.validateProducer(Validator.java:417)
at org.jboss.weld.injection.producer.InjectionTargetService.validateProducer(InjectionTargetService.java:36)
at org.jboss.weld.manager.InjectionTargetFactoryImpl.validate(InjectionTargetFactoryImpl.java:135)
It seems it is taking WELD in place of google Guice for DI.
Same issue I am getting in business Tier where EJB classes are composed of Java Classes and they are injected using #Inject.
I have even tried to change he import #Inject to google inject but the exception changed but not resolved.
I tried to use beans.xml in web-inf
#ApplicationPath("/")
public class Application extends ResourceConfig {
#Inject
public Application(final ServiceLocator serviceLocator) {
}
}
You need to effectively disable CDI.
You can do this by adding a WEB-INF/beans.xml file to your application that contains:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_1_1.xsd"
bean-discovery-mode="none">
</beans>
Note the bean-discovery-mode="none".
If your project contains additional jars with classes that might look CDI beans then you will also need to add a similar META-INF/beans.xml file to those as well.
However, I suspect that this may lead to other unrelated issues. Normally application servers like to control the lifecycle of your classes and this includes those related to JAX-RS.

WebLogic 12.1.3 error WELD-001408 Unsatisfied dependencies

WebLogic 12.1.3 fails when deploying a web application with a simple CDI injection. The following exception is thrown:
weblogic.application.ModuleException: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Interface2] with qualifiers [#Default] at injection point [[field] #Inject public pruebas1.Clase1.clase2]
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:216)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:211)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:42)
Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Interface2] with qualifiers [#Default] at injection point [[field] #Inject public pruebas1.Clase1.clase2]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:315)
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:284)
at org.jboss.weld.bootstrap.Validator.validateInjectionTarget(Validator.java:342)
at org.jboss.weld.manager.InjectionTargetValidator.addInjectionTarget(InjectionTargetValidator.java:29)
at org.jboss.weld.manager.BeanManagerImpl.createInjectionTarget(BeanManagerImpl.java:943)
Truncated. see log file for complete stacktrace
>
When i deploy the war in WebLogic 12.1.3 (Zip Distribution and Installers for Developers) inside OEPE 12.1.3.2 i get the error described. But, whith WebLogic 12.1.1 (Zip Distribution and Installers for Developers) inside the same OEPE 12.1.3.2 there is no problem. Neither there isn't problem if i export thye war file and deploy with the web console without OEPE integration. Additionally, when i deploy the war in WebLogic 12.1.3. standalone ("full" release) there is no problem.
I encountered too, that the MANIFEST.MF file (inside wlserver/server/lib/api.jar) references "javax.inject_1.jar" that doesn't exist in wlserver/modules folder. Instead there is the file "javax.inject-1.jar". To make my project working (import the class javax.inject.Inject class) i copied a file named javax.inject_1.jar from the javax.inject-1.jar file in the same folder.
The war java source structure is:
src
pruebas1
Clase1.java
pruebas2
Clase2.java
Interface2.java
The war WebContent structure is:
WebContent
WEB-INF
beans.xml
weblogix.xml
Classes and interface:
#WebService
public class Clase1 {
#Inject
public Interface2 clase2;
#WebMethod
public String aMayusculas(#WebParam(name = "palabra") String palabra) {
long tm = System.currentTimeMillis();
System.out.println(tm + " - clase2: " + (clase2 == null ? "null" : clase2.toString()));
return palabra == null ? "null" : tm + " - " + palabra.toUpperCase();
}
}
public interface Interface2 {
void doIt(String a);
}
public class Clase2 implements Interface2 {
#Override
public void doIt(String a) {
System.out.println(a);
}
}
XML files:
beans.xml
<?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>
weblogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" 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/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:weblogic-version>12.1.3</wls:weblogic-version>
<wls:context-root>prueba05weblogic</wls:context-root>
</wls:weblogic-web-app>
Thanks in advance.
Efren V.
The problem was resolved.
I created a SR in Oracle support site. Oracle built an internal patch.
Efren.
After three days searching, we found that the project only worked if deployed through the weblogic console, if we deployed through oracle plugin in eclipse it wont work.
So, if you are using eclipse, in the "servers" view, right click weblogic server, click "Properties -> Weblogic -> Publishing", change the radio "Pubish as a virtual application" to "Publish as exploded archive"
you can replace #Inject annotation with #Produces as workaround

Deployment Error Weld-001408 with WLS12c and OEPE

I created the following projects in OEPE:
weld001408 (Java EE - Enterprise Application Project)
weld001408utility (Java EE - Uitility Project), belongs to the ear weld001408
weld001408web (Web - Dynamic Web Project), belongs to the ear weld001408
When I created the project, I didn't change the defaults (onley ear-membership) and the target-runtime is Oracle WebLogic Server 12.1.1. And the clean domain, created with the wizard, is added to the workspace.
The Code is the following:
utility-project
class 'weld001408utility/ValueProducer.java'
package weld001408utility;
import javax.enterprise.inject.Produces;
public class ValueProducer {
#Produces
public String stringValue() {
return "someStringValue";
}
}
META-INF/beans.xml
<?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>
web-project
weld001408web/ValueConsumerServlet.java
package weld001408web;
import java.io.IOException;
import java.io.PrintWriter;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
/**
* Servlet implementation class ValueConsumerServlet
*/
#WebServlet("/ValueConsumerServlet")
public class ValueConsumerServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
#Inject
private String injectedValue;
/**
* #see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter pw = response.getWriter();
pw.write("injectedValue: " + injectedValue);
pw.flush();
}
}
WEB-INF/beans.xml
<?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>
The issue
Now when I try to deploy the application in Eclipse, I get always a WELD-001408 error:
<01.03.2013 10:07 Uhr MEZ> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:239)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:158)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [String] with qualifiers [#Default] at injection point [[field] #Inject private weld001408web.ValueConsumerServlet.injectedValue]
at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:258)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:105)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:125)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:324)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:309)
Truncated. see log file for complete stacktrace
>
But when I export the ear from eclipse and deploy that file over the weblogic administration console, then everything's working fine and the value is correctly injected to the servlet. No problems on deployment, nothing.
There are some patches for weblogic around and I have the latest installed (I checked a lot bugs which could belongs to my problem, and they should all included with 12.1.1.0.2):
WebLogic Server 12.1.1.0.2 PSU Patch for BUG14331523 Thu Oct 11 15:08:09 IST 2012
WebLogic Server 12.1.1.0 Wed Dec 7 08:40:57 PST 2011 1445491 >
I tried the same application on Windows Vista and on a Linux based System with the latest OEPE Versions (all-in-one package), no success...
The question
Has somone the exact same issue? Is it possible for someone to reproduce the problem? And when not, on which configuration with what patches is it working?
I don't know if it's a Oracle Enterprise Pack for Eclipse or an WebLogic-Issue.
Thanks for helping!
I solved the problem as stated below. Added pictures to make it easier.
Goto Eclipse Servers (View), right click on the weblogic server 12.1.3 and click on properties.
In Weblogic --> Publishing, select 'Publish as an exploded archive'

JPA createEntityManagerFactory "Unknown Source" error (non-J2EE)

I can't find what's wrong: many people seem to have issues with creating a EntityManagerFactory using the PU name. But I've checked all the suggestions, and none helped so far.
I'm trying to build my first JavaFX2 app. It is a small dictionary application, originally built on the Netbeans Application framework (by extending the default "Master-Detail" generated classes). It uses a SQLite db.
I'm now porting it over from there to another (JavaFX2-enabled) project. I first set out to rebuild the JPA persistence stuff in the new app. As far as I can see, I have everything in place: META-INF/persistence.xml with all the necessary entity classes declarated, using the same DB connection as the original application.
I added eclipselink-2.3.0.jar; eclipselink-javax.persistence-2.0.jar and eclipselink-jpa-modelgen-2.3.0.jar to the project.
Instead of the Application Context I use a simple Properties class to hold the data (such as queries) that previously went in the .properties files.
This is the test class:
package ithildinfx;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.Group;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.stage.Stage;
import javafx.beans.property.StringProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
public class IthildinFX extends Application {
private void init(Stage primaryStage) {
entityManager = javax.persistence.Persistence.createEntityManagerFactory("IthildinFXPU").createEntityManager();
entryQuery = entityManager.createQuery(Properties.entryQuery).setParameter("gloss", "a%");
entryList = entryQuery.getResultList();
Group root = new Group();
primaryStage.setScene(new Scene(root));
(TableColumn definitions)
(TableView code)
root.getChildren().add(tableView);
}
#Override
public void start(Stage primaryStage) throws Exception {
init(primaryStage);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
private javax.persistence.EntityManager entityManager;
private java.util.List<ithildinfx.Entry> entryList;
private javax.persistence.Query entryQuery;
}
And this is the contents of persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="IthildinFXPU" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>ithildinfx.Dataclass</class>
<class>ithildinfx.Metadata</class>
<class>ithildinfx.Translation</class>
<class>ithildinfx.Entry</class>
<class>ithildinfx.TrMd</class>
<class>ithildinfx.Language</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:sqlite:lib/db/ithildin-13-11-11.db"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.driver" value="org.sqlite.JDBC"/>
<property name="javax.persistence.jdbc.user" value=""/>
</properties>
</persistence-unit>
</persistence>
One of the suggestions that I read here on StackOverflow was to add this line to manifest.mf:
Meta-Persistence: META-INF/persistence.xml
and, possibly:
JPA-PersistenceUnits: IthildinFXPU
But neither made any difference.
This is the output that I invariably get:
Building jar: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Copy libraries to /Users/luthien/NetBeansProjects/IthildinFX/dist/lib.
Building jar: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Detected JavaFX Ant API version 1.1
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/IthildinFX.jar
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/lib/IthildinFX.jar
Deleting: /Users/luthien/NetBeansProjects/IthildinFX/dist/README.TXT
Skip jar copy to itself: IthildinFX.jar
Skip jar copy to itself: lib/eclipselink-2.3.0.jar
Skip jar copy to itself: lib/eclipselink-javax.persistence-2.0.jar
Skip jar copy to itself: lib/eclipselink-jpa-modelgen-2.3.0.jar
Skip jar copy to itself: lib/sqlite-jdbc-3.7.2.jar
jfx-deployment:
jar:
run:
Exception in Application start method
java.lang.NullPointerException
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getProviderNames(Unknown Source)
at javax.persistence.spi.PersistenceProviderResolverHolder$DefaultPersistenceProviderResolver.getPersistenceProviders(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at javax.persistence.Persistence.createEntityManagerFactory(Unknown Source)
at ithildinfx.IthildinFX.init(IthildinFX.java:29)
at ithildinfx.IthildinFX.start(IthildinFX.java:109)
at com.sun.javafx.application.LauncherImpl$5.run(LauncherImpl.java:298)
at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:136)
at com.sun.javafx.application.PlatformImpl$3.run(PlatformImpl.java:108)
JavaFX application launcher: calling System.exit
jfxsa-run:
BUILD SUCCESSFUL (total time: 5 seconds)
The libraries seem to all be in the right place - in any case, they are in the same place as they are in the first application. It might be that the Netbeans Application framework does some scary voodoo under the bonnet, but I really don't know how to figure that out.
Does anyone know of a reason why it can't seem to find the PU?
Thanks in advance!
Luthien
There error is coming from the JPA library itself, it seems that JPA is not configured correctly. The issue dos not seem to have anything to do with the persistence unit, the JPA library seems to have issues, looks like it can't find its services file resource.
Maybe remove eclipselink-javax.persistence-2.0.jar, if you server already has JPA on its classpath, there could be a conflict.

EJB3 Annotation

I am using JBoss 5 GA, I created a test Session bean, and local interface. I have created a servlet client. I tried to inject the interface in the servlet using #EJB..
But when I call this servlet I got the requested resource is not available!!!! When I comment the //#EJB, the page run successfully, any help please????
Jotnarta
It would have been helpful to add some piece of code in your question, at least the annotations in your EJB, local interface (if you annotated it) and servlet...
Nevertheless, according to the Chapter 11. Introduction to EJB injection in Servlets of the JBoss EJB3 Tutorials, for an EJB module containing an EJB3 SLSB defined like this:
#Stateless(name="calculator")
#Remote(CalculatorRemote.class)
#Local(CalculatorLocal.class)
public class CalculatorBean implements CalculatorRemote, CalculatorLocal
{
...
The local interface can be injected in a Servlet of a web module this way:
private CalculatorLocal calculator;
/**
* Injecting the EJB
*/
#EJB(name = "calculator")
public void setCalculator(CalculatorLocal calculator)
{
this.calculator = calculator;
}
There is an important note in this tutorial that i'm pasting below:
For the injection to take place in a
web module, your web.xml should use
the 2.5 version of the web-app xsd:
<web-app version="2.5"
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/web-app_2_5.xsd">