Bug 25646 - J2EE SDK & Integrated Tomcat 3.2 do not interoperate
 Summary: J2EE SDK & Integrated Tomcat 3.2 do not interoperate
 Status: CLOSED INVALID serverplugins Unclassified Tomcat 3.x PC Windows ME/2000 P1 (vote) 3.x Milan Kuchtiak issues@serverplugins Show dependency tree / graph

 Reported: 2002-07-15 20:47 UTC by pcgoober 2003-02-21 10:52 UTC (History) 0 users DEFECT Exception Report :

Attachments

 Note You need to log in before you can comment on or make changes to this bug.
 pcgoober 2002-07-15 20:47:17 UTC When packages (javax.mail package to be specific) from the J2EE SDK are used in a webapp project the Tomcat server does not find those libraries when Executed/Ran from IDE. The jar files *are* added to all compiler classpaths in the IDE Options area. Have manually copied J2EE jar files into lib/ext which causes port conflict for HTTP Server at IDE startup. Have manually copied J2EE jar files into modules/ext which causes port conflict for HTTP Server at IDE startup. A webapp project which does not use the J2EE SDK libs runs fine. If you need further info please do not hesitate to contact me via email. Thank You, Kevin kevin.wilson@comtrol.com _ rkubacki 2002-07-16 14:36:34 UTC According JSP & Servlet specs you should add your packages to as a jar into WEB-INF/lib or unpacked into WEB-INF/classes. Then they will be available for your webapp. Note that with NetBeans3.3 it is even enough to mount them as a filesystem (this will not hold for newer NetBeans releases). Moreover adding j2ee jar to lib/ext may cause clashes between library versions. Putting jar into modules/ext doesn't help as they are not loaded or used for compilation or execution. pcgoober 2002-07-18 16:37:45 UTC The individual assigned to this issue did not fully investigate the issue. Their resolution was to dismiss the bug report without fully understanding what was taking place. The issue is that: The Integrated Tomcat 3.2 server does not recognize jar files from the enterprise sdk that have already been added to the IDE, compiler and java source classpath areas thus causing the Integrated Tomcat IDE server to not find certain libraries (such as javax.mail) contained in the enterprise sdk at execution time from the IDE. pcgoober 2002-07-18 16:49:54 UTC Addition Info: (full iTomcat 3.2 error listed at bottom) A standalone Tomcat 4.x server installation has the mail.jar that contains the "javax/mail/internet/AddressException" class in "C:\ApacheTomcat40\common\lib". This package, or proper version of, is not found and/or included in the IDE Tomcat 3.2 version. Either a method of how to replace the IDE 3.2 version of tomcat with the standalone 4.x version is needed or a workaround of how to include the proper version of the SDKs are needed. *********************************************************** C:\jdk1.3.1_01\jre\bin\java -cp "C:\netbeans\modules\jsp- tomcat.jar;C:\netbeans\modules\jsp.jar;C:\netbeans\modules\ ext\jasper.jar;C:\netbeans\modules\ext\webserver.jar;;C:\ne tbeans\lib\ext\xerces.jar;;D:\java_src\webapps\bugrat\WEB- INF\classes;D:\java_src\webapps\bugrat\WEB- INF\lib\mysql.jar;D:\java_src\webapps\bugrat;C:\netbeans\be ans\TimerBean.jar;C:\netbeans\lib\openide.jar;C:\netbeans\m odules\ext\AbsoluteLayout.jar;C:\netbeans\modules\ext\servl et- 2.2.jar;C:\netbeans\system;D:\java_src\webapps\bugrat\WEB- INF\classes;D:\java_src\webapps\bugrat\WEB- INF\lib\mysql.jar;D:\netbeans_work\system" org.netbeans.modules.web.tomcat.WebAppMain "D:\netbeans_wor k\system\tomcat\server.xml" "D:\netbeans_work\system\tomcat " java.lang.NoClassDefFoundError: javax/mail/internet/AddressException at java.lang.Class.newInstance0(Native Method) at java.lang.Class.newInstance(Class.java:237) at org.apache.tomcat.core.ServletWrapper.loadServlet (ServletWrapper.java:268) Starting tomcat. Check logs/tomcat.log for error messages at org.apache.tomcat.core.ServletWrapper.init (ServletWrapper.java:289) at org.apache.tomcat.context.LoadOnStartupInterceptor.contextI nit(LoadOnStartupInterceptor.java:130) at org.apache.tomcat.core.ContextManager.initContext (ContextManager.java:491) at org.apache.tomcat.core.ContextManager.init (ContextManager.java:453) at org.apache.tomcat.startup.Tomcat.execute (Tomcat.java:195) at org.apache.tomcat.startup.Tomcat.main (Tomcat.java:235) at org.netbeans.modules.web.tomcat.WebAppMain.main (WebAppMain.java:37) Exception in thread "main" _ rkubacki 2002-07-18 17:20:11 UTC Looks that now I understand better. The answer is there is a special execution type defined for executing web apps that adds classes from webserver to classpath so it differs from default one. This should be modified to contain these jars. If you want to run your app on Tomcat 4 use newer version of NetBeans (NB3.4Beta3 is already available) that bundles with Tomcat 4.0.4 and also allows to use standalone instalation of Tomcat 4.0. Milan Kuchtiak 2002-07-18 17:52:33 UTC I still don't completely understand this issue. Please create a war file and send it as an attachement. I thing it should be working keeping this stereotype : mount mail.jar as a jar filesystem use some classes of that jar in your servlet execute that servlet(web module) Tomcat should add that jar file to its classpath. Jason Rush 2003-02-21 10:52:08 UTC This issue is related to Tomcat 3.2. Tomcat 4.0.x is the supported version in the latest versions of NetBeans. JAR files mounted in the IDE are properly added to the Tomcat 4.0's classpath. Compilation and execution work fine. Since this is no longer an issue with Tomcat 4.0, we are closing this as invalid. If you still see problems with Tomcat 4.0, please feel free to file a new issue.