Bugs item #648308, was opened at 2002-12-04 11:14 Message generated for change (Comment added) made by letiemble You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=648308&group_id=22866
Category: JBossWeb Group: None >Status: Closed >Resolution: Duplicate Priority: 5 Submitted By: Jens Schumann (french_c) >Assigned to: Laurent Etiemble (letiemble) 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: Laurent Etiemble (letiemble) Date: 2003-09-15 16:18 Message: Logged In: YES user_id=437455 Already fixed. Same as bug #669731. ---------------------------------------------------------------------- Comment By: Jens Schumann (french_c) Date: 2002-12-10 20:13 Message: Logged In: YES user_id=661964 Looking at the log statements I see a deployment exception - without any details. I deploy an .ear containing a few ejb-jar and one .war archives. 19:37:11,174 INFO [EjbModule] Started 19:37:11,410 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException 19:37:11,607 INFO [jbossweb] Registered jboss.web:Jetty=0,JBossWebApplicationContext=4,context=/portal 19:37:11,710 INFO [jbossweb] Extract jar:file:/opt/projects/projects/binaries/jboss/jboss-3.0.4/server/autoportal/tmp/deploy/server/autoportal/deploy/autoportal.ear/56.autoportal.ear-contents/portal-web.war!/ to /tmp/Jetty_0_0_0_0_8080__portal/webapp 19:37:12,365 INFO [jbossweb] Started WebApplicationContext[/portal,jar:file:/opt/projects/projects/binaries/jboss/jboss-3.0.4/server/autoportal/tmp/deploy/server/autoportal/deploy/autoportal.ear/56.autoportal.ear-contents/portal-web.war!/] I do get this warning with or without the issue mentioned below (so there might be other issues too). I just looked at the sources and believe the warning hides the actual problem. The DeploymentException thrown by ResourceRefMetaData gets rethrown from AbstractWebContainer.#parseMetaData. Also, if you write a patch for this - please take a look at local ejb refs. There is no need to provide a EJB-LINK in case the regular reference mapping allows the access. Thanks, Jens ---------------------------------------------------------------------- Comment By: Christian Riege (lqd) Date: 2002-12-10 13:06 Message: Logged In: YES user_id=176671 jens, what do you mean by "No Error Message"? The DeploymentException w/ the appropriate message *should* appear in the console and in the server log file unless you configured your logging to just swallow this. ---------------------------------------------------------------------- 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:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-Development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
