Jump to content
Software FX Community

Getting servlet exception while setting XML file as a Datasource


User (Legacy)

Recommended Posts

Hi,

I am getting the following error while setting the

Datasource(chart1.setDataSource(sfxXml);) . I am using ChartFX for java.

Error:

javax.servlet.ServletException: javax.servlet.ServletException

at

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp

l.java:460)

Code:

ChartServer chart1 = new ChartServer(application,request,response );

XMLProvider sfxXml = new XMLProvider();

sfxXml.load(application.getRealPath("/ChartFX") + "/data/ChartData.xml");

chart1.setDataSource(sfxXml);

Thanks in advance,

Vaishali

Link to comment
Share on other sites

Dear Vaishali,

I get a very similar error when I rename the ChartFX directory to say

ChartFX1

When I do this I get the following error on the command line(stdout)

java.io.FileNotFoundException: C:\Program Files\Apache Group\Tomcat

4.1\webapps\

ROOT\ChartFX\data\ChartData.xml (The system cannot find the path specified)

That means it cannot find the xml file.

I tried this code:

//chart1.setDataSource(sfxXml);

out.println(application.getRealPath("/ChartFX") + "/data/ChartData.xml");

When I commented out the setDataSource and also read the stdout, which could

also be in your logfiles I realized that I had renamed the ChartFX directory

to ChartFX1.

Does this help your problem?

-CJS

"vaishali" <vnaik@retailexpert.com> wrote in message

news:XZ0eJaD5DHA.2468@webserver3.softwarefx.com...

> Hi,

> I am getting the following error while setting the

> Datasource(chart1.setDataSource(sfxXml);) . I am using ChartFX for java.

>

> Error:

>

> javax.servlet.ServletException: javax.servlet.ServletException

> at

>

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp

> l.java:460)

>

>

> Code:

>

> ChartServer chart1 = new ChartServer(application,request,response );

> XMLProvider sfxXml = new XMLProvider();

> sfxXml.load(application.getRealPath("/ChartFX") + "/data/ChartData.xml");

> chart1.setDataSource(sfxXml);

>

>

> Thanks in advance,

> Vaishali

>

>

>

>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...