users@glassfish.java.net

Backward compatibility issue?

From: Wouter van Reeven <wouter_at_van.reeven.nl>
Date: Mon, 5 Nov 2007 10:45:58 +0100

Hi all,


Last week I have been trying to create and deploy an Enterprise Application
containing an EJB jar and a WAR to GlassFish using Maven2. See

http://technology.amis.nl/blog/?p=2489

and

http://technology.amis.nl/blog/?p=2495

Maven2 by default creates a web.xml file looking like this:

----------------------------------------------
<!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>
  <display-name>Archetype Created Web Application</display-name>
</web-app>
----------------------------------------------

Please note that the version used here is 2.3. For some reason, after deploying
the ear to GlassFish v2, I cannot connect to local session beans from within the
web module Java classes. I can connect to remote session beans. And if I modify
the web.xml like this

-----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<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">
  <display-name>Archetype Created Web Application</display-name>
</web-app>
-----------------------------------------------------------

I suddenly can connect to the local session beans. The modifications are based
on the web.xml files generated by Netbeans 6.0.

Would anyone know why I cannot connect to the local session beans with the
web.xml generated by Maven2?


Thanks in advance,

Wouter van Reeven

-- 
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"