You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by "Singh, Arshi (Indsys)" <Ar...@ge.com> on 2003/10/18 15:00:45 UTC

how to schedule java application in cron

Hi,

    i want to schedule a java application using poi.hssf packages in cron. I have scheduled a script in crontab , where i set the path, classpath and execute application......               java Test

   But i am getting an error , which says that the imported class files (all hssf) are not found. I have included the path of .jar (imported file ) in the classpath, still im getting this problem. 

   Why is cron not able to locate those imported classes in .jar, when they are included in classpath. Can ne body please help me?

Thanks,
arshi.

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: how to schedule java application in cron

Posted by Danny Mui <da...@muibros.com>.
You have to specifically specify the jar in a class path.

export classpath=/poi/poi.jar;


Singh, Arshi (Indsys) wrote:

>Hi,
>
>    i want to schedule a java application using poi.hssf packages in cron. I have scheduled a script in crontab , where i set the path, classpath and execute application......               java Test
>
>   But i am getting an error , which says that the imported class files (all hssf) are not found. I have included the path of .jar (imported file ) in the classpath, still im getting this problem. 
>
>   Why is cron not able to locate those imported classes in .jar, when they are included in classpath. Can ne body please help me?
>
>Thanks,
>arshi.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Excel Crashes

Posted by Matt Biggin <ma...@yahoo.co.uk>.
This problem is now solved using the v2.0 RC1. This morning a file was processed which crashed Excel, upgrading to the latest version resulted in a spreadsheet which didn't crash Excel.
 
Many thanks for your help,
 
Matt

Avik Sengupta <av...@apache.org> wrote:
>Have you any idea how many unique strings this version
>(2.0-pre3-20030728) was limited to?

Nope, its also linked to the size of each string, i believe :(. I think
the best thing would be if you could try the latest build from CVS. We
could take it from there. It looks probable that this will solve your
problem. 

regards
-
Avik 

On Thu, 2003-10-23 at 12:39, Matt Biggin wrote:
> Avik,
> 
> Thanks for the info. I'm using 2.0-pre3-20030728 because I needed eventusermodel to work and that version seemed to work best.
> 
> The tool which uses POI is a data reconciliation utility which processes 3 millions rows a year for the bank I work for and saves a fortune in reconciliation costs.
> 
> POI is used to read from data spreadsheets (using eventusermodel) and also to write out the final reconciliation report. It's this second step which is causing the problem. In fact the data which is crashing is coming from a spreadsheet, then it gets reconciled and the spreadsheet which crashes Excel is the results report.
> 
> I've spent a while looking for what data causes the crash and it's not related to a particular bit of data. It looks like a boundary has been reached.
> 
> Have you any idea how many unique strings this version (2.0-pre3-20030728) was limited to? It wouldn't take much for me to throw everything that goes into the spreadsheet into a Set and find out how many I'm trying to add.
> 
> Many thanks,
> 
> Matt Biggin
> 
> Avik Sengupta wrote:
> Yeah sure, I appreciate the data could be confidential. 
> 
> The problem is, its quite impossible to debug a situation like this
> unless both the code and data are available .. so all we can do is
> provide pointers...
> 
> In many such bugs have been fixed recently, but its of course
> impossible to prove that all possible files written by POI are valid in
> Excel (as proven by Karl Popper :) .. 
> 
> So tell us which version you are using. Try to find out, by elimination,
> what kind of data is causing problems.See if you can find anything
> specific. One important file corruption bug has been fixed in CVS but is
> waiting for a new release is when there are many unique strings in the
> file, it fails to open in Excel... 
> 
> In general, the way these things are debugged is to, by trial and error,
> find out which element causes the problem. Then stare at two file in a
> hex editor :) (Actually, there is something called BiffViewer, that
> converts the file to a textual representation, so u can stare at it in a
> text editor!)
> 
> 
> On Tue, 2003-10-21 at 16:53, Matt Biggin wrote:
> > I'll have a go at providing some source but it's tricky because I use POI to write the output from a data reconciliation tool. It's not particular bits of data which cause the crash but also the amount. Also the data is reasonably confidential and I can't just send it out.
> > 
> > What's the best way to provide you with code?
> > 
> > Thanks in advance,
> > 
> > Matt
> > 
> > p.s. We use POI for all sorts of things here. Great tool.
> > 
> > Avik Sengupta wrote:
> > yeah, that happens if there is any error in writing out the xl file.
> > We've fixed some important one's recently....
> > 
> > To help debug your case, you must supply the minimum code required to
> > replicate your case, and the example xl file, otherwise its impossible
> > to figure out whats happening. Also, tell us which version you are
> > using?
> > 
> > 
> > On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> > > Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> > > 
> > > ---------------------------------
> > > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> > 
> > 
> > ---------------------------------
> > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

Re: Excel Crashes

Posted by Avik Sengupta <av...@apache.org>.
>Have you any idea how many unique strings this version
>(2.0-pre3-20030728) was limited to?

Nope, its also linked to the size of each string, i believe :(. I think
the best thing would be if you could try the latest build from CVS. We
could take it from there.  It looks probable that this will solve your
problem. 

regards
-
Avik 

On Thu, 2003-10-23 at 12:39, Matt Biggin wrote:
> Avik,
>  
> Thanks for the info. I'm using 2.0-pre3-20030728 because I needed eventusermodel to work and that version seemed to work best.
>  
> The tool which uses POI is a data reconciliation utility which processes 3 millions rows a year for the  bank I work for and saves a fortune in reconciliation costs.
>  
> POI is used to read from data spreadsheets (using eventusermodel) and also to write out the final reconciliation report. It's this second step which is causing the problem. In fact the data which is crashing is coming from a spreadsheet, then it gets reconciled and the spreadsheet which crashes Excel is the results report.
>  
> I've spent a while looking for what data causes the crash and it's not related to a particular bit of data. It looks like a boundary has been reached.
>  
> Have you any idea how many unique strings this version (2.0-pre3-20030728) was limited to? It wouldn't take much for me to throw everything that goes into the spreadsheet into a Set and find out how many I'm trying to add.
>  
> Many thanks,
>  
> Matt Biggin
> 
> Avik Sengupta <av...@apache.org> wrote:
> Yeah sure, I appreciate the data could be confidential. 
> 
> The problem is, its quite impossible to debug a situation like this
> unless both the code and data are available .. so all we can do is
> provide pointers...
> 
> In many such bugs have been fixed recently, but its of course
> impossible to prove that all possible files written by POI are valid in
> Excel (as proven by Karl Popper :) .. 
> 
> So tell us which version you are using. Try to find out, by elimination,
> what kind of data is causing problems.See if you can find anything
> specific. One important file corruption bug has been fixed in CVS but is
> waiting for a new release is when there are many unique strings in the
> file, it fails to open in Excel... 
> 
> In general, the way these things are debugged is to, by trial and error,
> find out which element causes the problem. Then stare at two file in a
> hex editor :) (Actually, there is something called BiffViewer, that
> converts the file to a textual representation, so u can stare at it in a
> text editor!)
> 
> 
> On Tue, 2003-10-21 at 16:53, Matt Biggin wrote:
> > I'll have a go at providing some source but it's tricky because I use POI to write the output from a data reconciliation tool. It's not particular bits of data which cause the crash but also the amount. Also the data is reasonably confidential and I can't just send it out.
> > 
> > What's the best way to provide you with code?
> > 
> > Thanks in advance,
> > 
> > Matt
> > 
> > p.s. We use POI for all sorts of things here. Great tool.
> > 
> > Avik Sengupta wrote:
> > yeah, that happens if there is any error in writing out the xl file.
> > We've fixed some important one's recently....
> > 
> > To help debug your case, you must supply the minimum code required to
> > replicate your case, and the example xl file, otherwise its impossible
> > to figure out whats happening. Also, tell us which version you are
> > using?
> > 
> > 
> > On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> > > Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> > > 
> > > ---------------------------------
> > > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: poi-user-help@jakarta.apache.org
> > 
> > 
> > ---------------------------------
> > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Excel Crashes

Posted by Matt Biggin <ma...@yahoo.co.uk>.
Avik,
 
Thanks for the info. I'm using 2.0-pre3-20030728 because I needed eventusermodel to work and that version seemed to work best.
 
The tool which uses POI is a data reconciliation utility which processes 3 millions rows a year for the  bank I work for and saves a fortune in reconciliation costs.
 
POI is used to read from data spreadsheets (using eventusermodel) and also to write out the final reconciliation report. It's this second step which is causing the problem. In fact the data which is crashing is coming from a spreadsheet, then it gets reconciled and the spreadsheet which crashes Excel is the results report.
 
I've spent a while looking for what data causes the crash and it's not related to a particular bit of data. It looks like a boundary has been reached.
 
Have you any idea how many unique strings this version (2.0-pre3-20030728) was limited to? It wouldn't take much for me to throw everything that goes into the spreadsheet into a Set and find out how many I'm trying to add.
 
Many thanks,
 
Matt Biggin

Avik Sengupta <av...@apache.org> wrote:
Yeah sure, I appreciate the data could be confidential. 

The problem is, its quite impossible to debug a situation like this
unless both the code and data are available .. so all we can do is
provide pointers...

In many such bugs have been fixed recently, but its of course
impossible to prove that all possible files written by POI are valid in
Excel (as proven by Karl Popper :) .. 

So tell us which version you are using. Try to find out, by elimination,
what kind of data is causing problems.See if you can find anything
specific. One important file corruption bug has been fixed in CVS but is
waiting for a new release is when there are many unique strings in the
file, it fails to open in Excel... 

In general, the way these things are debugged is to, by trial and error,
find out which element causes the problem. Then stare at two file in a
hex editor :) (Actually, there is something called BiffViewer, that
converts the file to a textual representation, so u can stare at it in a
text editor!)


On Tue, 2003-10-21 at 16:53, Matt Biggin wrote:
> I'll have a go at providing some source but it's tricky because I use POI to write the output from a data reconciliation tool. It's not particular bits of data which cause the crash but also the amount. Also the data is reasonably confidential and I can't just send it out.
> 
> What's the best way to provide you with code?
> 
> Thanks in advance,
> 
> Matt
> 
> p.s. We use POI for all sorts of things here. Great tool.
> 
> Avik Sengupta wrote:
> yeah, that happens if there is any error in writing out the xl file.
> We've fixed some important one's recently....
> 
> To help debug your case, you must supply the minimum code required to
> replicate your case, and the example xl file, otherwise its impossible
> to figure out whats happening. Also, tell us which version you are
> using?
> 
> 
> On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> > Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> > 
> > ---------------------------------
> > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

Re: Excel Crashes

Posted by Avik Sengupta <av...@apache.org>.
Yeah sure, I appreciate the data could be confidential. 

The problem is, its quite impossible to debug a situation like this
unless both the code and data are available .. so all we can do is
provide pointers...

In  many such bugs have been fixed recently, but its of course
impossible to prove that all possible files written by POI are valid in
Excel (as proven by Karl Popper :) .. 

So tell us which version you are using. Try to find out, by elimination,
what kind of data is causing problems.See if you can find anything
specific. One important file corruption bug has been fixed in CVS but is
waiting for a new release is when there are many unique strings in the
file, it fails to open in Excel... 

In general, the way these things are debugged is to, by trial and error,
find out which element causes the problem. Then stare at two file in a
hex editor :) (Actually, there is something called BiffViewer, that
converts the file to a textual representation, so u can stare at it in a
text editor!)


On Tue, 2003-10-21 at 16:53, Matt Biggin wrote:
> I'll have a go at providing some source but it's tricky because I use POI to write the output from a data reconciliation tool. It's not particular bits of data which cause the crash but also the amount. Also the data is reasonably confidential and I can't just send it out.
>  
> What's the best way to provide you with code?
> 
> Thanks in advance,
>  
> Matt
>  
> p.s. We use POI for all sorts of things here. Great tool.
> 
> Avik Sengupta <av...@apache.org> wrote:
> yeah, that happens if there is any error in writing out the xl file.
> We've fixed some important one's recently....
> 
> To help debug your case, you must supply the minimum code required to
> replicate your case, and the example xl file, otherwise its impossible
> to figure out whats happening. Also, tell us which version you are
> using?
> 
> 
> On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> > Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> > 
> > ---------------------------------
> > Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: poi-user-help@jakarta.apache.org
> 
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Re: Excel Crashes

Posted by Matt Biggin <ma...@yahoo.co.uk>.
I'll have a go at providing some source but it's tricky because I use POI to write the output from a data reconciliation tool. It's not particular bits of data which cause the crash but also the amount. Also the data is reasonably confidential and I can't just send it out.
 
What's the best way to provide you with code?

Thanks in advance,
 
Matt
 
p.s. We use POI for all sorts of things here. Great tool.

Avik Sengupta <av...@apache.org> wrote:
yeah, that happens if there is any error in writing out the xl file.
We've fixed some important one's recently....

To help debug your case, you must supply the minimum code required to
replicate your case, and the example xl file, otherwise its impossible
to figure out whats happening. Also, tell us which version you are
using?


On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

Re: Excel Crashes

Posted by Avik Sengupta <av...@apache.org>.
yeah, that happens if there is any error in writing out the xl file.
We've fixed some important one's recently....

To help debug your case, you must supply the minimum code required to
replicate your case, and the example xl file, otherwise its impossible
to figure out whats happening. Also, tell us which version you are
using?


On Tue, 2003-10-21 at 12:55, Matt Biggin wrote:
> Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.
> 
> ---------------------------------
> Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org


Excel Crashes

Posted by Matt Biggin <ma...@yahoo.co.uk>.
Has anyone got any experience of POI writing a XLS file which cannot be opened in Excel? In fact I have an application which creates a spreadsheet and if you give it certain kinds of data then when you try to open the resulting spreadsheet, Excel throws a Dr. Watson.

---------------------------------
Want to chat instantly with your online friends? Get the FREE Yahoo!Messenger

Re: how to schedule java application in cron

Posted by Chris Cheshire <cc...@bigredwire.com>.
For my cron driven java apps, I have a small shell script that sets the 
appropriate classpath and spawns the jvm. It keeps the cron table 
cleaner and makes it easy to test. If your script works from a shell, it 
will work from cron.

Singh, Arshi (Indsys) wrote:

>Hi,
>
>    i want to schedule a java application using poi.hssf packages in cron. I have scheduled a script in crontab , where i set the path, classpath and execute application......               java Test
>
>   But i am getting an error , which says that the imported class files (all hssf) are not found. I have included the path of .jar (imported file ) in the classpath, still im getting this problem. 
>
>   Why is cron not able to locate those imported classes in .jar, when they are included in classpath. Can ne body please help me?
>
>Thanks,
>arshi.
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: poi-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-user-help@jakarta.apache.org