Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 25646 - J2EE SDK & Integrated Tomcat 3.2 do not interoperate
J2EE SDK & Integrated Tomcat 3.2 do not interoperate
Product: serverplugins
Classification: Unclassified
Component: Tomcat
PC Windows ME/2000
: P1 (vote)
: 3.x
Assigned To: Milan Kuchtiak
Depends on:
  Show dependency treegraph
Reported: 2002-07-15 20:47 UTC by pcgoober
Modified: 2003-02-21 10:52 UTC (History)
0 users

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description 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 

If you need further info please do not hesitate to contact 
me via email.

Thank You,

Comment 1 _ 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.
Comment 2 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 

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.
Comment 3 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-
org.netbeans.modules.web.tomcat.WebAppMain "D:\netbeans_wor
k\system\tomcat\server.xml" "D:\netbeans_work\system\tomcat
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(
Starting tomcat. Check logs/tomcat.log for error messages 
        at org.apache.tomcat.core.ServletWrapper.init
        at org.apache.tomcat.core.ContextManager.init
        at org.apache.tomcat.startup.Tomcat.execute
        at org.apache.tomcat.startup.Tomcat.main
        at org.netbeans.modules.web.tomcat.WebAppMain.main
Exception in thread "main"
Comment 4 _ 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.
Comment 5 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.
Comment 6 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.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo