RE: How to use swing classes without X-server
Serge A. Redchuk [mailto:[EMAIL PROTECTED]] wrote: Hello All ! I want to use some of Swing classes like import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; by tomcat in environment where no X-server running. And I see in catalina.out: java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at ... at javax.swing.TimerQueue.run(TimerQueue.java:231) at java.lang.Thread.run(Thread.java:484) You can use the _model_ classes from Swing without any problem as long as you _never_ call any real GUI-classes. What you see here is Swing starting its backgroud notification Thread. Look in your code what classes you actually use. (JTree would be fatal DefaultMutableTreeNode would be ok.) In case you abosultely _must_ use Graphics (like awt.image.) You can use your existsing X-Server for testing. In a live system you should use an Offscreen X-Server (such a thing comes with Linux for such purposes). | Business Operation Systems GmbH | _ / | / \ \ Klaus Halfmann, Dipl. Inform. | |/ / | | \_/ | Tel. +49(0)69-24779-0 Fax +49(0)69-24779-444 \ / [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: 2nd try: Custom tag fails to load class file
The class file (it extends TagSupport class) is located in WEB-INF/class/basic/Hello.class. Why does it fail to load the class? I thouhg all classes under WEB-INF/class are automtically loaded by the container. Mhh, when I look at the examples folder I see WEB-INF\classes. So I think you should rename class to classes and everything should be fine. | Business Operation Systems GmbH | _ / | / \ \ Klaus Halfmann, Dipl. Inform. | |/ / | | \_/ | Tel. +49(0)69-24779-0 Fax +49(0)69-24779-444 \ / [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: runaway process in java while using tomcat
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] wrote : I am hoping someone can help me with this problem I am having. I am using tomcat 4.0.1 to run a web site with jsps. This site uses alot of database connecting with Informix. For some reason, usually within 2 hours of starting up tomcat, a process will start to take up 100% of the CPU. The time it takes for this to happen varies. With Linux every JavaThread looks like a process of its own (other as with e.g. Solaris). So your runaway task should normally be a Java Thread. To Monitor your application you could try to periodically dump the names and Status of all Threads. Threads created by your code should have reasonable names. Another Problem might be the Informix driver. Eventually due to some bad SQL you might receive an infinite amount of Data or the Driver may produce an infinite loop. Try logging all sql statements and have a look at them. How is the memory consumption of you application when it runs away ? It may be that the Server is trashing and wasting its time with GCs. You might wish to reduce the number of Threads in your server.xml in this case. Try writing HTTPUnit Testcases to stress your pages. ( http://sourceforge.net/project/showfiles.php?group_id=6550) You might want to create something like a crawler that follows every link and presses every button. As a last resort you could use a debugger (jdb should do) and try to find out about your Application this way. I Hope you have some more Ideas now. | Business Operation Systems GmbH | _ / | / \ \ Klaus Halfmann, Dipl. Inform. | |/ / | | \_/ | Tel. +49(0)69-24779-0 Fax +49(0)69-24779-444 \ / [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
RE: How to log shutting down of tomcat
Keith Ng [mailto:[EMAIL PROTECTED]] wrote: is there anyway to log the shutting down of tomcat? My tomcat server tend to auto shutdown for unknown reasons. I have been trying to trace to no avail. Currently using 1.3.1 and tomcat 4.0.2. it shuts down like after 4-5 hours and i wasnt able to track why did it shutdown. I have changed my ODBC-JDBC bridge(type 1) to type 4 drivers. It could also be my tomcat crashing... i do not know. I could think about the following reasons: a) a hard crash of the Java VM (may happen when using native code) b) Some code calls System.exit() c) You get to many OutOfMemory Exceptions eventually killing the VM In case of a) there should be either a core dump or at least some System log. Try starting Tomcat in a console of its own and look what happens. b) Can be fighted by Starting Tomcat with a Security Manager prohibiting a call to System.exit(). Eventually you can trace the culprit then by looking for the SecurityException c) Monitor the Resource Usage of the Application and the logs In General setting the Debug level in the server.xml may give you some hints (For a proper shutdown the destroy() methods of Servlets) should be called. Hope you have enough space on your devices to log away 4-5 hours ... | Business Operation Systems GmbH | _ / | / \ \ Klaus Halfmann, Dipl. Inform. | |/ / | | \_/ | Tel. +49(0)69-24779-0 Fax +49(0)69-24779-444 \ / [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]
WebDAV as _part_ of Web-Application
We use WebDav to show parts of the internal structures of our application as a file system. To do so we are currently forced to move all our classes into tomcat/commnon/lib resp. /classes. So our WebDav Servlet and the Applciation can share theire data. This ruins the Classloadaer ideas of tomcat (4.0.1) so that we eventually cannot deploy other applications To allow normal deployment of our application again I think about the following approach. * patch the tomcat DefaultServlet so that a subdirectory of an application can be a WebDav Servlet. I.E. part of global web.xml: servlet servlet-namedefault/servlet-name servlet-classPatchedDefaultServlet/servlet-class init-param param-nameforwardWebDAV/param-name param-valuetrue/param-value /init-param * Our Application could than map its (interal) WebDAV Servlet to a path inside the Application. So accessing http://host/app/index.html works as usual but http://host/app/webdav can be used as WebDAV area. Application and WebDAV Servlet can share data but other applications are not involved at all. We are looking for a common standard to hook into _any_ (Java based) WebDAV Server, but I think there is no such thing. Thanks for any help. | Business Operation Systems GmbH | _ / | / \ \ Klaus Halfmann, Dipl. Inform. | |/ / | | \_/ | Tel. +49(0)69-24779-0 Fax +49(0)69-24779-444 \ / [EMAIL PROTECTED] -- To unsubscribe: mailto:[EMAIL PROTECTED] For additional commands: mailto:[EMAIL PROTECTED] Troubles with the list: mailto:[EMAIL PROTECTED]