Jump to content
Software FX Community

Incorrect pathname after redeployment


User (Legacy)

Recommended Posts

The pathname used to generate temporary chart files does not match the one 

returned by the getHtmlTag() following redeployment of an application. This

means stopping and starting an application server for every deployment.

Regards - Colin

--

Colin McFarlane

Director

http://www.incito.com

Inspired Business Solutions

Tel: +44 (0) 131 556 4300

Mob: +44 (0) 795 070 9875

Link to comment
Share on other sites

Hi, we need some more information to try to figure out why it is 

happenening. The path is configured in the config file, and unless you are

making changes on it, is shouldn't bee necesary to re-start the server.

Regards,

GA

Software FX

"colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

> The pathname used to generate temporary chart files does not match the one

> returned by the getHtmlTag() following redeployment of an application.

> This means stopping and starting an application server for every

> deployment.

>

> Regards - Colin

> --

> Colin McFarlane

> Director

> http://www.incito.com

> Inspired Business Solutions

> Tel: +44 (0) 131 556 4300

> Mob: +44 (0) 795 070 9875

>

Link to comment
Share on other sites

Lets say we have jboss installed in the folder /usr/share/jboss/ and we 

deploy an app with path /app. Jboss unpacks the app into a working folder

called:

/usr/share/jboss/server/default/tmp/deploy/tmp23456app.ear-contents/app.war

so our charts are created in

/usr/share/jboss/server/default/tmp/deploy/tmp23456app.ear-contents/app.war/chartfx62/temp/

and the getHtmlTag() method generates a relative name that works. e.g.

"/app/chartfx62/temp/CFT0509_042134248E0.jpg". Everything is correct so far.

Now redeploy the application and it is unpacked by jboss into a different

folder, e.g. called:

/usr/share/jboss/server/default/tmp/deploy/tmp7890app.ear-contents/app.war

however chartfx continues to generate files in the old folder. getHtmlTag()

produces the correct path but since the chart is in the wrong place the file

is not found.

Regards - Colin

"SoftwareFX Support" <noreply> wrote in message

news:6KmAGg2cGHA.1536@webserver3.softwarefx.com...

> Hi, we need some more information to try to figure out why it is

> happenening. The path is configured in the config file, and unless you

> are making changes on it, is shouldn't bee necesary to re-start the

> server.

>

> Regards,

> GA

> Software FX

>

>

> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

> news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

>> The pathname used to generate temporary chart files does not match the

>> one returned by the getHtmlTag() following redeployment of an

>> application. This means stopping and starting an application server for

>> every deployment.

>>

>> Regards - Colin

>> --

>> Colin McFarlane

>> Director

>> http://www.incito.com

>> Inspired Business Solutions

>> Tel: +44 (0) 131 556 4300

>> Mob: +44 (0) 795 070 9875

>>

>

>

Link to comment
Share on other sites

  • 2 weeks later...

I created a simple web page called test.jsp with a copy of code from your 

support web site. I've copied it below for reference. Start jboss and deploy

the app, everything works as expected. Now redeploy the application without

restarting jboss. Run the same web page again and this time the image is not

displayed. Chartfx has created it in the wrong directory. The pathname used

by chartfx is not the one returned by a call to say

application.getRealPath("/chartfx62/temp");

The RequiredRoot element of the ChartFX.Internet.config file is set to .

which should work.

Regards - Colin

<%@page import="SoftwareFX.ChartFX.*"%>

<%

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

java.util.Random r = new java.util.Random(1);

chart1.setGallery(Gallery.BAR);

//Populating the chart1 with random data to get 3 series

chart1.openData(COD.VALUES, 3, 3);

for (int i=0;i<3;i++)

for (int j=0;j<3;j++)

chart1.setValue(i, j, r.nextDouble()* 100);

chart1.closeData(COD.VALUES);

//It looks better with Borders

chart1.setBorder(true);

chart1.setBorderEffect(BorderEffect.RAISED);

chart1.setAxesStyle(AxesStyle.MATH);

%>

<%=chart1.getHtmlTag("450","280")%>

"SoftwareFX Support" <noreply> wrote in message

news:6KmAGg2cGHA.1536@webserver3.softwarefx.com...

> Hi, we need some more information to try to figure out why it is

> happenening. The path is configured in the config file, and unless you

> are making changes on it, is shouldn't bee necesary to re-start the

> server.

>

> Regards,

> GA

> Software FX

>

>

> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

> news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

>> The pathname used to generate temporary chart files does not match the

>> one returned by the getHtmlTag() following redeployment of an

>> application. This means stopping and starting an application server for

>> every deployment.

>>

>> Regards - Colin

>> --

>> Colin McFarlane

>> Director

>> http://www.incito.com

>> Inspired Business Solutions

>> Tel: +44 (0) 131 556 4300

>> Mob: +44 (0) 795 070 9875

>>

>

>

Link to comment
Share on other sites

Thanks, I'll use this sample and follow the steps to reproduce the issue.

Regards,

GA

"colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

news:sUhq5%23ceGHA.1536@webserver3.softwarefx.com...

>I created a simple web page called test.jsp with a copy of code from your

>support web site. I've copied it below for reference. Start jboss and

>deploy the app, everything works as expected. Now redeploy the application

>without restarting jboss. Run the same web page again and this time the

>image is not displayed. Chartfx has created it in the wrong directory. The

>pathname used by chartfx is not the one returned by a call to say

>application.getRealPath("/chartfx62/temp");

> The RequiredRoot element of the ChartFX.Internet.config file is set to .

> which should work.

>

> Regards - Colin

>

> <%@page import="SoftwareFX.ChartFX.*"%>

> <%

>

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

>

> java.util.Random r = new java.util.Random(1);

>

> chart1.setGallery(Gallery.BAR);

> //Populating the chart1 with random data to get 3 series

> chart1.openData(COD.VALUES, 3, 3);

> for (int i=0;i<3;i++)

> for (int j=0;j<3;j++)

> chart1.setValue(i, j, r.nextDouble()* 100);

> chart1.closeData(COD.VALUES);

> //It looks better with Borders

> chart1.setBorder(true);

> chart1.setBorderEffect(BorderEffect.RAISED);

> chart1.setAxesStyle(AxesStyle.MATH);

>

> %>

>

> <%=chart1.getHtmlTag("450","280")%>

> "SoftwareFX Support" <noreply> wrote in message

> news:6KmAGg2cGHA.1536@webserver3.softwarefx.com...

>> Hi, we need some more information to try to figure out why it is

>> happenening. The path is configured in the config file, and unless you

>> are making changes on it, is shouldn't bee necesary to re-start the

>> server.

>>

>> Regards,

>> GA

>> Software FX

>>

>>

>> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

>> news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

>>> The pathname used to generate temporary chart files does not match the

>>> one returned by the getHtmlTag() following redeployment of an

>>> application. This means stopping and starting an application server for

>>> every deployment.

>>>

>>> Regards - Colin

>>> --

>>> Colin McFarlane

>>> Director

>>> http://www.incito.com

>>> Inspired Business Solutions

>>> Tel: +44 (0) 131 556 4300

>>> Mob: +44 (0) 795 070 9875

>>>

>>

>>

>

>

Link to comment
Share on other sites

Hi, to be sure we are doing exaclty the same steps, please let us know how 

are you deploying and re-deploying the application.

Thanks,

GA

"SoftwareFX Support" <noreply> wrote in message

news:d2H89ZbfGHA.3988@webserver3.softwarefx.com...

> Thanks, I'll use this sample and follow the steps to reproduce the issue.

>

> Regards,

> GA

>

> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

> news:sUhq5%23ceGHA.1536@webserver3.softwarefx.com...

>>I created a simple web page called test.jsp with a copy of code from your

>>support web site. I've copied it below for reference. Start jboss and

>>deploy the app, everything works as expected. Now redeploy the application

>>without restarting jboss. Run the same web page again and this time the

>>image is not displayed. Chartfx has created it in the wrong directory. The

>>pathname used by chartfx is not the one returned by a call to say

>>application.getRealPath("/chartfx62/temp");

>> The RequiredRoot element of the ChartFX.Internet.config file is set to .

>> which should work.

>>

>> Regards - Colin

>>

>> <%@page import="SoftwareFX.ChartFX.*"%>

>> <%

>>

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

>>

>> java.util.Random r = new java.util.Random(1);

>>

>> chart1.setGallery(Gallery.BAR);

>> //Populating the chart1 with random data to get 3 series

>> chart1.openData(COD.VALUES, 3, 3);

>> for (int i=0;i<3;i++)

>> for (int j=0;j<3;j++)

>> chart1.setValue(i, j, r.nextDouble()* 100);

>> chart1.closeData(COD.VALUES);

>> //It looks better with Borders

>> chart1.setBorder(true);

>> chart1.setBorderEffect(BorderEffect.RAISED);

>> chart1.setAxesStyle(AxesStyle.MATH);

>>

>> %>

>>

>> <%=chart1.getHtmlTag("450","280")%>

>> "SoftwareFX Support" <noreply> wrote in message

>> news:6KmAGg2cGHA.1536@webserver3.softwarefx.com...

>>> Hi, we need some more information to try to figure out why it is

>>> happenening. The path is configured in the config file, and unless you

>>> are making changes on it, is shouldn't bee necesary to re-start the

>>> server.

>>>

>>> Regards,

>>> GA

>>> Software FX

>>>

>>>

>>> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

>>> news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

>>>> The pathname used to generate temporary chart files does not match the

>>>> one returned by the getHtmlTag() following redeployment of an

>>>> application. This means stopping and starting an application server for

>>>> every deployment.

>>>>

>>>> Regards - Colin

>>>> --

>>>> Colin McFarlane

>>>> Director

>>>> http://www.incito.com

>>>> Inspired Business Solutions

>>>> Tel: +44 (0) 131 556 4300

>>>> Mob: +44 (0) 795 070 9875

>>>>

>>>

>>>

>>

>>

>

>

Link to comment
Share on other sites

Copy the EAR file (or the war file) into the server/default/deploy folder to 

deploy it. Then either re-copy the file with an updated timestamp or use the

touch command if using unix.

Cheers - Colin

"SoftwareFX Support" <noreply> wrote in message

news:eeCQ%23unfGHA.1536@webserver3.softwarefx.com...

> Hi, to be sure we are doing exaclty the same steps, please let us know how

> are you deploying and re-deploying the application.

>

> Thanks,

> GA

>

>

> "SoftwareFX Support" <noreply> wrote in message

> news:d2H89ZbfGHA.3988@webserver3.softwarefx.com...

>> Thanks, I'll use this sample and follow the steps to reproduce the issue.

>>

>> Regards,

>> GA

>>

>> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

>> news:sUhq5%23ceGHA.1536@webserver3.softwarefx.com...

>>>I created a simple web page called test.jsp with a copy of code from your

>>>support web site. I've copied it below for reference. Start jboss and

>>>deploy the app, everything works as expected. Now redeploy the

>>>application without restarting jboss. Run the same web page again and

>>>this time the image is not displayed. Chartfx has created it in the wrong

>>>directory. The pathname used by chartfx is not the one returned by a call

>>>to say application.getRealPath("/chartfx62/temp");

>>> The RequiredRoot element of the ChartFX.Internet.config file is set to

>>> . which should work.

>>>

>>> Regards - Colin

>>>

>>> <%@page import="SoftwareFX.ChartFX.*"%>

>>> <%

>>>

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

>>>

>>> java.util.Random r = new java.util.Random(1);

>>>

>>> chart1.setGallery(Gallery.BAR);

>>> //Populating the chart1 with random data to get 3 series

>>> chart1.openData(COD.VALUES, 3, 3);

>>> for (int i=0;i<3;i++)

>>> for (int j=0;j<3;j++)

>>> chart1.setValue(i, j, r.nextDouble()* 100);

>>> chart1.closeData(COD.VALUES);

>>> //It looks better with Borders

>>> chart1.setBorder(true);

>>> chart1.setBorderEffect(BorderEffect.RAISED);

>>> chart1.setAxesStyle(AxesStyle.MATH);

>>>

>>> %>

>>>

>>> <%=chart1.getHtmlTag("450","280")%>

>>> "SoftwareFX Support" <noreply> wrote in message

>>> news:6KmAGg2cGHA.1536@webserver3.softwarefx.com...

>>>> Hi, we need some more information to try to figure out why it is

>>>> happenening. The path is configured in the config file, and unless you

>>>> are making changes on it, is shouldn't bee necesary to re-start the

>>>> server.

>>>>

>>>> Regards,

>>>> GA

>>>> Software FX

>>>>

>>>>

>>>> "colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

>>>> news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

>>>>> The pathname used to generate temporary chart files does not match the

>>>>> one returned by the getHtmlTag() following redeployment of an

>>>>> application. This means stopping and starting an application server

>>>>> for every deployment.

>>>>>

>>>>> Regards - Colin

>>>>> --

>>>>> Colin McFarlane

>>>>> Director

>>>>> http://www.incito.com

>>>>> Inspired Business Solutions

>>>>> Tel: +44 (0) 131 556 4300

>>>>> Mob: +44 (0) 795 070 9875

>>>>>

>>>>

>>>>

>>>

>>>

>>

>>

>

>

Link to comment
Share on other sites

  • 4 weeks later...

Hi,

i'm just adding a "me too" here. We got the exact same problem with JBoss

4.0.2 and ChartFX 6.2 for Java.

Somehow the temp file path is preserved during redeploy and every chart is

written to the old temporary directory created by JBoss, not the current

one. Workaround is to restart the application server, which is highly

annoying.

Regards,

Maik Amelmann.

Link to comment
Share on other sites

  • 2 weeks later...

We have been able to reproduce the issue.  It seems like when JBoss is 

un-deploying and re-deploying the application, chartfx is not being unloaded

from the server memory, so it keeps the configuration from the previous

application (For performance reasons, the config is read when the jar is

loaded and then after a random number of charts). This does not happen in

Tomcat for example, chartfx is being unloaded and reloaded again. We wonder

is there is a way to configure JBoss to do that as well, we are not JBoss

experts but we wanted to explain what it is going on so may be you have an

idea how to work around it.

We are testing some changes in the configuration that may solve this issue,

which we will post here as soon as we can.

Regards,

GA

Software FX, Inc.

"colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

news:HMm%234k2bGHA.1536@webserver3.softwarefx.com...

> The pathname used to generate temporary chart files does not match the one

> returned by the getHtmlTag() following redeployment of an application.

> This means stopping and starting an application server for every

> deployment.

>

> Regards - Colin

> --

> Colin McFarlane

> Director

> http://www.incito.com

> Inspired Business Solutions

> Tel: +44 (0) 131 556 4300

> Mob: +44 (0) 795 070 9875

>

Link to comment
Share on other sites

I don't believe this is a simple deployment/redeployment issue.

If you deploy 2 applications that both use chartfx, and chartfx is set up in

a common i.e. shared folder, then one of the applications will break. The

test app that I sent before will demonstrate the problem. If you create a

copy of the application with a different name and deploy both applications

then the second one that you use will fail to find its chart for the same

reason as the redeployment bug.

Link to comment
Share on other sites

You are right, I forgot about ChartFX being in a common location.

We have figure out a solution for this issue. You need to set up a central

location for temporary files, for all applications and redeployment to use.

So no matter what JBoss does when it redeploys the app, the temp folder will

be always the same.

The easiest way to do this is to deploy a chartfx62 application that

contains just the temp folder inside (war attached), and then change the

"common" ChartFX.Internet.config, removing the "." from the RequiredRoot

tag. (<RequiredRoot></RequiredRoot>). Leaving the RequiredRoot blank will

cause Chart FX for Java to search the web server root for the Chart FX temp

directories (/chartfx62/temp).

Regards,

GA

"colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

news:3CDe1W0nGHA.304@webserver3.softwarefx.com...

>I don't believe this is a simple deployment/redeployment issue.

>

> If you deploy 2 applications that both use chartfx, and chartfx is set up

> in

> a common i.e. shared folder, then one of the applications will break. The

> test app that I sent before will demonstrate the problem. If you create a

> copy of the application with a different name and deploy both applications

> then the second one that you use will fail to find its chart for the same

> reason as the redeployment bug.

>

>

>

Link to comment
Share on other sites

You are right, I forgot about ChartFX being in a common location.

We have figure out a solution for this issue. You need to set up a central

location for temporary files, for all applications and redeployment to use.

So no matter what JBoss does when it redeploys the app, the temp folder will

be always the same.

The easiest way to do this is to deploy a chartfx62 application that

contains just the temp folder inside (war attached), and then change the

"common" ChartFX.Internet.config, removing the "." from the RequiredRoot

tag. (<RequiredRoot></RequiredRoot>). Leaving the RequiredRoot blank will

cause Chart FX for Java to search the web server root for the Chart FX temp

directories (/chartfx62/temp).

Regards,

GA

"colin-mcfarlane" <colin-mcfarlane@supanet.com> wrote in message

news:3CDe1W0nGHA.304@webserver3.softwarefx.com...

>I don't believe this is a simple deployment/redeployment issue.

>

> If you deploy 2 applications that both use chartfx, and chartfx is set up

> in

> a common i.e. shared folder, then one of the applications will break. The

> test app that I sent before will demonstrate the problem. If you create a

> copy of the application with a different name and deploy both applications

> then the second one that you use will fail to find its chart for the same

> reason as the redeployment bug.

>

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...