How to modify the web.xml in JFreeServlet

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Artemis

Re: How to modify the web.xml in JFreeServlet

Post by Artemis » Wed Aug 21, 2002 3:59 pm

Hi Bryan,

Even I've correctly used the corresponding parameters,
there are exceptions as follows: (I cannot capture all the exceptions as the window size of the command prompt is restricted.)


ava:170)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
468)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:564)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:174)
at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline
.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:472)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)

at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1027)
at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1125)
at java.lang.Thread.run(Thread.java:536)


Artemis

Guido Laures

Re: How to modify the web.xml in JFreeServlet

Post by Guido Laures » Thu Aug 22, 2002 8:42 am

Is there a problem with the JdbcXYDataset? I saw an equal stacktrace from somebody posted to the cewolf help forums. It ended up in an OutOfMemoryError.

Bryan

Re: How to modify the web.xml in JFreeServlet

Post by Bryan » Thu Aug 22, 2002 5:00 pm

Guido

Who knows? JdbcXYDataset was written to do a task I had at work. It does that task still. As I have become aware of issues I have corrected them. So, yes there might be errors but I am not aware of them at this stage. Once I do become aware of them, I will try and correct as soon as possible.

Artemis
When Tomcat generates a stack trace as you have posted it does so in two parts.
1. The part you have submitted above which tracks the stack trace in tomcat. and
2. The stack trace that comes generally from non tomcate code which generated the stack trace.

The important part is number 2 which should follow after what you have posted.


Also if you watch the tomcat screen when you request your servlet for the first time it should give you feedback on a number of items eg confirmation on parameters being used. I would be interested in seeing this output as well.

Bryan

Artemis

Re: How to modify the web.xml in JFreeServlet

Post by Artemis » Sun Sep 01, 2002 8:46 am

Hi Bryan,

I am very exited that I am able to load the example 2 of the JFreeServlet.
However, the chart content is blank.

And there displays the following messages on the command prompt window of Tomcat:

Servlet ImageSelectSQL - Driver : org.gjt.mm.mysql.Driver
Servlet ImageSelectSQL - Database : jdbc:mysql://localhost/try1
Servlet ImageSelectSQL - Schema :
Servlet ImageSelectSQL - User : root
Servlet ImageSelectSQL - Password : #######
Servlet ImageSelectSQL - Shared Connection Established
Servlet ImageSelectSQL - select timestamp, record_count as Track from summary_track where set_code = 200102040

Is it usual ? But why the chart content is blank ?

Thanks for telling me.

:)
Artemis

Bryan

Re: How to modify the web.xml in JFreeServlet

Post by Bryan » Sun Sep 01, 2002 1:20 pm

Artemis

This is great. All that tomcat output means you have established a connection. (NB you can turn most of it off by putting DEBUG in web.xml to false) But for now leave it on as it will help you follow the path of what is happening.

The first part tells you the connection parameters and that a connection has been established.

The last line tells you the sql issued. (if you reload the page it will appear again).


So where to from here. can you verify that the sql does indead return rows. (maybe I should put that in the debug output?)

Bryan

Artemis

Re: How to modify the web.xml in JFreeServlet

Post by Artemis » Tue Sep 10, 2002 4:00 pm

Hi Bryan,

Can you show me how to verify the sql does return rows ?

I just don't know how to start with to find out the problem.

:P

Artemis

Bryan

Re: How to modify the web.xml in JFreeServlet

Post by Bryan » Wed Sep 11, 2002 1:10 am

Artemis

www.Mysql.com provide an intro to entering queries :

http://www.mysql.com/doc/en/Connecting- ... cting.html
http://www.mysql.com/doc/en/Entering_queries.html

I was asking if you could enter
select timestamp, record_count as Track from summary_track where set_code = 200102040
as the query.

Bryan

Carl

Re: How to modify the web.xml in JFreeServlet

Post by Carl » Wed Sep 11, 2002 5:38 pm

I've been using mysql to connect as my datasource, and I've had to put the port number on the DBurl, like jdbc:mysql://localhost:3207/dbname for it to work. I believe mysql defaults the port to 3207. Have you tried this?

Carl

Re: How to modify the web.xml in JFreeServlet

Post by Carl » Wed Sep 11, 2002 5:43 pm

Sorry about that, the default connection port on mysql is 3306...

Locked