Spreadsheet extension - java.lang.NoClassDefFoundError

Best to use an application mapping:

coldfusion - Components mapping in Railo - Stack Overflow 15 February 2015 at 13:58, Michael Vornkahl <@Michael_Vornkahl> wrote:

Could you give me a hint how I can call the spreadsheet.cfc if it’s not in
the same directory?

Hi Julian,
:wink: don’t worry.

Now it works!!!
I could read my file. Thank you for your help and your development.
Actually lucee only runs on my development servers, but the only missing
thing for me are the spreadsheet-functions.
So I will follow your work and test it so offen I can. If it is ready (for
me, I know, for the developer it is never ready …), I can switch on my
production server to lucee.

Thank you again and have a nice sunday!!!

Michael (alias Martin :slight_smile: )Am Samstag, 14. Februar 2015 23:21:49 UTC+1 schrieb Julian Halliwell:

Sorry, I meant Michael. For the avoidance of confusion.

On 14 February 2015 at 21:40, Julian Halliwell <julianh...@gmail.com <javascript:>> wrote:

Hi Martin

Glad to hear it’s working, Michael.

The library is neither complete nor stable at the moment so it’s
important you test thoroughly. However I’ve been using it in
production for the limited set of functions I regularly need
(generating reports, mainly) and it’s been fine so far.

Please do report any more problems you come across. Probably best to
do so using the Github issue tracker:

Julian.On 15 February 2015 at 09:31, Michael Vornkahl <@Michael_Vornkahl> wrote:

So I will follow your work and test it so offen I can. If it is ready (for
me, I know, for the developer it is never ready …), I can switch on my
production server to lucee.

Thank you!!!
Next time, I’m in London, I will bring you a nice bottle of wine.

MichaelAm Sonntag, 15. Februar 2015 15:21:20 UTC+1 schrieb Julian Halliwell:

Best to use an application mapping:

coldfusion - Components mapping in Railo - Stack Overflow

On 15 February 2015 at 13:58, Michael Vornkahl <michael.v...@gmail.com <javascript:>> wrote:

Could you give me a hint how I can call the spreadsheet.cfc if it’s not
in
the same directory?

I use git (I make my kids do schoolwork with it!) but never before
GitHub… give this a go:

As for the geronimo-stax-api_1.0_spec-1.0.jar, Lucee does have this
installed by default: stax-api.jar – I am uncertain if this is the
same/newer/older but I have had no problems running any of the spreadsheet
functions or any of the example tests with those 3 jars removed.

However, I imagine as Lucee pulls more out of its core, this will likely
change.

As for the class files… couldn’t find the java anywhere and all of the
old repos seem to be defunct and/or redirect to the teamcfadvance, so
modding them was a bit of a hack, but at least it gets them working for now
on the new platform.

AndrewOn Monday, February 16, 2015 at 2:15:31 AM UTC-8, Julian Halliwell wrote:

Good work, Andrew. Didn’t know you could change.jar/.class files
without the source (my java knowledge is very limited). How did you do
it?

I just tried with Java Class File Editor download | SourceForge.net but
couldn’t get it to save changes consistently: sometimes it would,
sometimes not.

I can see that dom4j and xmlbeans are in the core Lucee lib/ext
folder, but not seeing Geronimo-stax-api? The 4 apache-poi jars are
also there so really the export utility may be the only additional jar
needed - assuming the versions are compatible.

Anyway, would it be possible for your modified install package and
instructions to be hosted somewhere? Perhaps on GitHub if you have an
account?

On 16 February 2015 at 01:45, ADK <and...@leftbower.com <javascript:>> wrote:

I was able to get the origonal extension up and running on a fresh
install
of Lucee. Steps to reproduce:

Download both ExtensionProvider.cfc and cfpoi.zip from this link:
GitHub - teamcfadvance/cfspreadsheet-railo: My Railo Extension provider including CFPOI (<cfspreadsheet>)
Change all references from “railo” to “lucee” (be sure to make
case-sensitive changes)
Install via the ‘Semi-Automatic “Spoofed Provider” Installation via
Railo
Admin GUI’ method using the modified file from above and of course use
“luceeExtensionProvider” rather than “RailoExtensionProvider”

That’s it. It installs perfectly and can run all of the tests from the
“cfspreadsheet-examples.zip” as well as all of my applications.

The tricky part is modifying the .class files inside
“poi-export-utility.jar” from all instances of the string “railo” to
“lucee”. These are the class files that need modifying:

WorkbookExport.class (1 instance of “railo”)
XLSToQuery.class (21)
XLSXCSVHandler.class (1)
XLSXHandler.class (1)
XLSXQueryHandler.class (21)
XLSXSimpleHTMLHandler.class (1)

Also of note: it appears that the 3 jars that come in the ooxml-lib
folder
are unnecessary as they are already loaded in Lucee (for the time being
anyways):

dom4j-1.6.1.jar
geronimo-stax-api_1.0_spec-1.0.jar
xmlbeans-2.3.0.jar

So I further modified the install to exclude those as well and all is
well.

HTH anyone having issues getting this installed ib Lucee.

Sure (test it out first though). By the way, I just uploaded the “proper”
zip a few seconds ago so if you already downloaded/cloned the first upload
it will fail.On Monday, February 16, 2015 at 11:43:32 AM UTC-8, Julian Halliwell wrote:

Great. Is it ok to point people to your fork from the Lucee wiki?

Meanwhile I’m pressing on with my standalone library so folks have a
choice of how to do spreadsheets in Lucee. An upcoming release will
fix various bugs, provide a test suite and upgrade to the current
version of POI.

On 16 February 2015 at 18:45, ADK <and...@leftbower.com <javascript:>> wrote:

give this a go:

GitHub - Leftbower/cfspreadsheet-lucee: Lucee Extension provider including CFPOI (<cfspreadsheet>)

On Monday, February 16, 2015 at 2:15:31 AM UTC-8, Julian Halliwell wrote:

Anyway, would it be possible for your modified install package and
instructions to be hosted somewhere? Perhaps on GitHub if you have an
account?

Good work, Andrew. Didn’t know you could change.jar/.class files
without the source (my java knowledge is very limited). How did you do
it?

I just tried with Java Class File Editor download | SourceForge.net but
couldn’t get it to save changes consistently: sometimes it would,
sometimes not.

I can see that dom4j and xmlbeans are in the core Lucee lib/ext
folder, but not seeing Geronimo-stax-api? The 4 apache-poi jars are
also there so really the export utility may be the only additional jar
needed - assuming the versions are compatible.

Anyway, would it be possible for your modified install package and
instructions to be hosted somewhere? Perhaps on GitHub if you have an
account?On 16 February 2015 at 01:45, ADK <@ADK> wrote:

I was able to get the origonal extension up and running on a fresh install
of Lucee. Steps to reproduce:

Download both ExtensionProvider.cfc and cfpoi.zip from this link:
GitHub - teamcfadvance/cfspreadsheet-railo: My Railo Extension provider including CFPOI (<cfspreadsheet>)
Change all references from “railo” to “lucee” (be sure to make
case-sensitive changes)
Install via the ‘Semi-Automatic “Spoofed Provider” Installation via Railo
Admin GUI’ method using the modified file from above and of course use
“luceeExtensionProvider” rather than “RailoExtensionProvider”

That’s it. It installs perfectly and can run all of the tests from the
“cfspreadsheet-examples.zip” as well as all of my applications.

The tricky part is modifying the .class files inside
“poi-export-utility.jar” from all instances of the string “railo” to
“lucee”. These are the class files that need modifying:

WorkbookExport.class (1 instance of “railo”)
XLSToQuery.class (21)
XLSXCSVHandler.class (1)
XLSXHandler.class (1)
XLSXQueryHandler.class (21)
XLSXSimpleHTMLHandler.class (1)

Also of note: it appears that the 3 jars that come in the ooxml-lib folder
are unnecessary as they are already loaded in Lucee (for the time being
anyways):

dom4j-1.6.1.jar
geronimo-stax-api_1.0_spec-1.0.jar
xmlbeans-2.3.0.jar

So I further modified the install to exclude those as well and all is well.

HTH anyone having issues getting this installed ib Lucee.

Great. Is it ok to point people to your fork from the Lucee wiki?

Meanwhile I’m pressing on with my standalone library so folks have a
choice of how to do spreadsheets in Lucee. An upcoming release will
fix various bugs, provide a test suite and upgrade to the current
version of POI.On 16 February 2015 at 18:45, ADK <@ADK> wrote:

give this a go:

GitHub - Leftbower/cfspreadsheet-lucee: Lucee Extension provider including CFPOI (<cfspreadsheet>)

On Monday, February 16, 2015 at 2:15:31 AM UTC-8, Julian Halliwell wrote:

Anyway, would it be possible for your modified install package and
instructions to be hosted somewhere? Perhaps on GitHub if you have an
account?

Tried it on my Lucee Express and it worked well.

Pointer added to
https://bitbucket.org/lucee/lucee/wiki/Migrate%20from%20Railo (under
Extensions).

Thanks for your efforts, Andrew.On 16 February 2015 at 19:51, ADK <@ADK> wrote:

Sure (test it out first though). By the way, I just uploaded the “proper”
zip a few seconds ago so if you already downloaded/cloned the first upload
it will fail.

On Monday, February 16, 2015 at 11:43:32 AM UTC-8, Julian Halliwell wrote:

Great. Is it ok to point people to your fork from the Lucee wiki?

Julian,

I was able to get the origonal extension up and running on a fresh install
of Lucee. Steps to reproduce:

  1. Download both ExtensionProvider.cfc and cfpoi.zip from this link:
    GitHub - teamcfadvance/cfspreadsheet-railo: My Railo Extension provider including CFPOI (<cfspreadsheet>)
  2. Change all references from “railo” to “lucee” (be sure to make
    case-sensitive changes)
  3. Install via the ‘Semi-Automatic “Spoofed Provider” Installation via
    Railo Admin GUI’ method using the modified file from above and of course
    use “luceeExtensionProvider” rather than “RailoExtensionProvider”

That’s it. It installs perfectly and can run all of the tests from the
“cfspreadsheet-examples.zip” as well as all of my applications.

The tricky part is modifying the .class files inside
“poi-export-utility.jar” from all instances of the string “railo” to
“lucee”. These are the class files that need modifying:

WorkbookExport.class (1 instance of “railo”)
XLSToQuery.class (21)
XLSXCSVHandler.class (1)
XLSXHandler.class (1)
XLSXQueryHandler.class (21)
XLSXSimpleHTMLHandler.class (1)

Also of note: it appears that the 3 jars that come in the ooxml-lib folder
are unnecessary as they are already loaded in Lucee (for the time being
anyways):
dom4j-1.6.1.jar
geronimo-stax-api_1.0_spec-1.0.jar
xmlbeans-2.3.0.jar

So I further modified the install to exclude those as well and all is well.

HTH anyone having issues getting this installed ib Lucee.On Friday, February 13, 2015 at 12:22:03 PM UTC-8, Julian Halliwell wrote:

Andrew, it seems that Micha intended to implement ACF’s spreadsheet
functionality in the core 3 years ago and made a small start:

https://issues.jboss.org/browse/RAILO-1749

But that was abandoned, presumably because it was deemed not
appropriate for the core after all. SpreadsheetNew() does seem to work
without the extension, but I couldn’t get SpreadsheetWrite() to do
anything. Clearly not reliable and likely to be removed in 5.0.

I’ve been working on my standalone library today and have managed to
get “read” functionality partially working in Lucee. Basically it will
read an xls file into a query object, but not CSV or HTML at present.
Also specifying column/row ranges and column names other than the
header row isn’t there yet, neither is reading a named sheet (reading
by sheet number is, however).

It needs more work and some tests (on the way), but I do plan to match
as much of the old extension functionality as I can.

I realise though that unlike the extension, it would involve folks
changing application code, so my aim is also to fork the Railo
extension and replace the faulty “read” elements with what I’ve come
up with.

It would be great if you and others could test the library in Lucee to
iron out any issues before I back-port it to the extension.

GitHub - cfsimplicity/spreadsheet-cfml: Standalone library for working with spreadsheets in CFML

Cheers
Julian.

On 13 February 2015 at 19:12, ADK <and...@leftbower.com <javascript:>> wrote:

Julian - yes, “reading” spreadsheets is all I actually need to do. It
appears that spreadsheet writing is already part of Lucee core:

Bitbucket

So there appears to be some duplication going on?

Excellent - glad to help.On Monday, February 16, 2015 at 12:38:38 PM UTC-8, Julian Halliwell wrote:

Tried it on my Lucee Express and it worked well.

Pointer added to
https://bitbucket.org/lucee/lucee/wiki/Migrate%20from%20Railo (under
Extensions).

Thanks for your efforts, Andrew.

On 16 February 2015 at 19:51, ADK <and...@leftbower.com <javascript:>> wrote:

Sure (test it out first though). By the way, I just uploaded the
“proper”
zip a few seconds ago so if you already downloaded/cloned the first
upload
it will fail.

On Monday, February 16, 2015 at 11:43:32 AM UTC-8, Julian Halliwell wrote:

Great. Is it ok to point people to your fork from the Lucee wiki?

Andrew - thanks from me as well. I use spreadsheet functionality quite
heavily so this saved me a lot of hassleOn Monday, February 16, 2015 at 9:50:10 PM UTC+1, ADK wrote:

Excellent - glad to help.

On Monday, February 16, 2015 at 12:38:38 PM UTC-8, Julian Halliwell wrote:

Tried it on my Lucee Express and it worked well.

Pointer added to
https://bitbucket.org/lucee/lucee/wiki/Migrate%20from%20Railo (under
Extensions).

Thanks for your efforts, Andrew.

On 16 February 2015 at 19:51, ADK and...@leftbower.com wrote:

Sure (test it out first though). By the way, I just uploaded the
“proper”
zip a few seconds ago so if you already downloaded/cloned the first
upload
it will fail.

On Monday, February 16, 2015 at 11:43:32 AM UTC-8, Julian Halliwell wrote:

Great. Is it ok to point people to your fork from the Lucee wiki?