Bugs item #648308, was opened at 2002-12-04 11:14 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=648308&group_id=22866
Category: JBossWeb Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jens Schumann (french_c) Assigned to: Nobody/Anonymous (nobody) Summary: web.xml <-> jboss-web.xml mappings Initial Comment: As already stated in http://www.jboss.org/forums/thread.jsp? forum=50&thread=22026&message=3744132&q=web.xm l+mapping#3744132 it seems all web.xml -> jboss-web.xml mappings do not work. To my knowledge the idea behind java:comp/env entries is to map requested resources (such as EJBs, Datasources) to physical available ones. Without changing code I am able to map JNDI lookups to a different (or so to say the correct) resource. For instance I need to lookup a datasource and always use in my code java:comp/env/jdbc/someDS. In my web.xml I do have an entry for jdbc/someDS and in the application server specific descriptor I map it to the physical name - for JBoss java:/jdbc/someDS. I have tested several 3.0.x JBoss versions with both tomcat and jetty. Just no go. I can lookup from my JSP/Servlet container java:/jdbc/someDS, but I am unable retrieve the mapped resource java:comp/env/jdbc/someDS. The issue is even more important if you want to use local EJB's from the servlet container. JBoss adds a "local/" to all local EJB JNDI names. Which is nice, but different to other application servers. If you write an application which should run on several application servers you want to use the application server specific deployment descriptors to take care of those issues. Which - just does not work. A first look at the sources seem to prove what I stated above, but I need to dig a little bit deeper... So ... if someone could fix it please, since this is a really important J2EE feature to develop applications with multi app server support. Thanks, Jens ---------------------------------------------------------------------- >Comment By: Jens Schumann (french_c) Date: 2002-12-04 22:45 Message: Logged In: YES user_id=661964 So here a few more details: I did check whether my web.xml was valid or not, but my validator did not complain about a misspelled res-auth. Instead of Container I did have CONTAINER - don't ask me why. Because of this parsing of the web.xml stopped and the jboss-web.xml was ignored. Because of NO error message I was pretty sure the resource and env mapping did not work. But the reason is that the following stacktrace will never show up - I added an printStackTrace() in the source. 22:05:39,882 ERROR [STDERR] org.jboss.deployment.DeploymentException: res-auth tag should be 'Container' or 'Application' 22:05:39,897 ERROR [STDERR] at org.jboss.metadata.ResourceRefMetaData.importEjbJarXml (ResourceRefMetaData.java:112) 22:05:39,898 ERROR [STDERR] at org.jboss.metadata.WebMetaData.importWebXml (WebMetaData.java:153) 22:05:39,899 ERROR [STDERR] at org.jboss.metadata.WebMetaData.importXml (WebMetaData.java:135) 22:05:39,900 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.parseMetaData (AbstractWebContainer.java:883) 22:05:39,901 ERROR [STDERR] at org.jboss.web.AbstractWebContainer.start (AbstractWebContainer.java:298) 22:05:39,902 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start (MainDeployer.java:807) 22:05:39,903 ERROR [STDERR] at org.jboss.deployment.MainDeployer.start (MainDeployer.java:799) 22:05:39,905 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:621) 22:05:39,906 ERROR [STDERR] at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:585) 22:05:39,907 ERROR [STDERR] at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) It would be good to see those error messages because it really saves time ;) Maybe I will propose a patch ... Jens ---------------------------------------------------------------------- Comment By: Jens Schumann (french_c) Date: 2002-12-04 22:08 Message: Logged In: YES user_id=661964 OK - I did take some time and checked the sources and realized the issue is an invalid tag in my web.xml. In this case JBoss just stops parsing without any error message. I will post a few more details shortly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=648308&group_id=22866 ------------------------------------------------------- This SF.net email is sponsored by: Microsoft Visual Studio.NET comprehensive development tool, built to increase your productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
