JODConverter to batch convert Quattro Pro to Excel

I've got a few thousand files in WB2 and WB3 format, and I need to convert them to something a little less useless. I've been banging my head against the wall trying to come up with some way to convert them as a batch process. That one link to the MSDN site about the Quattro Pro Converter isn't going to help me here.
It looks like JODConverter with Open Office will be useful, but I can't get it to work, and I can't seem to find anything dealing with my problem. I've tried both Open Office 3 and 2.2, with JODConverter 2.2. I get back this huge error stack, reproduced below, that ultimately seems to point to this line:
SocketOpenOfficeConnection connection = new SocketOpenOfficeConnection(8100);

I have already input soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;" -nofirststartwizard  and nestat -a does show (MyComputer):8100 listening. soffice.exe is running too.

I haven't been able to come across anything that even remotely implies that SocketOpenOfficeConnection connection = new SocketOpenOfficeConnection(8100) would ever fail, and it's driving me crazy. Please somebody tell me they've run into something like this before.

Exception in thread "AWT-EventQueue-0" java.lang.Error: java.lang.reflect.InvocationTargetException
        at org.jdesktop.application.ApplicationAction.actionFailed(ApplicationAction.java:859)
        at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:665)
        at org.jdesktop.application.ApplicationAction.actionPerformed(ApplicationAction.java:698)
        at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
        at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
        at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
        at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
        at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
        at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
        at java.awt.Component.processMouseEvent(Component.java:6134)
        at javax.swing.JComponent.processMouseEvent(JComponent.java:3265)
        at java.awt.Component.processEvent(Component.java:5899)
        at java.awt.Container.processEvent(Container.java:2023)
        at java.awt.Component.dispatchEventImpl(Component.java:4501)
        at java.awt.Container.dispatchEventImpl(Container.java:2081)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4301)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3965)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3895)
        at java.awt.Container.dispatchEventImpl(Container.java:2067)
        at java.awt.Window.dispatchEventImpl(Window.java:2458)
        at java.awt.Component.dispatchEvent(Component.java:4331)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.jdesktop.application.ApplicationAction.noProxyActionPerformed(ApplicationAction.java:662)
        ... 27 more
Caused by: java.lang.NoClassDefFoundError: com/sun/star/lang/XEventListener
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
       ----->>> at ooconverter.Converter.convert(Converter.java:29)                SocketOpenOfficeConnection line. 
        at ooconverter.FolderTraversal.recursiveTraversal(FolderTraversal.java:42)
        at ooconverter.FolderTraversal.recursiveTraversal(FolderTraversal.java:37)
        at ooconverter.FolderTraversal.recursiveTraversal(FolderTraversal.java:37)
        at ooconverter.FolderTraversal.traverse(FolderTraversal.java:27)
        at ooconverter.Converter.getFiles(Converter.java:23)
        at ooconverter.OOConverterView.runConversion(OOConverterView.java:205)
        ... 32 more
Caused by: java.lang.ClassNotFoundException: com.sun.star.lang.XEventListener
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
        ... 63 more

Open in new window

LVL 2
lhjuniusAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick BarryJava DeveloperCommented:
looks like you are missing a jar, one that contains com.sun.star.lang.XEventListener

0
Mick BarryJava DeveloperCommented:
It is in ridl.jar, part of the OO api

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lhjuniusAuthor Commented:
Yep, this is what I was doing wrong. Pretty new to Java, so I haven't been using libraries right. You get the points.

I'm stuck on another thing now, if someone happens to know the answer right off the top of their head, it would be pretty helpful. JODConverter doesn't support wb2 or wb3 files on it's own, but OpenOffice does. My understanding is that I should be able to write a custom DocumentFormat that will be used to pass whatever data to Open Office, even though JODConverter doesn't recognize the format by default. I've been trying this:

final DocumentFormat wb3 = new DocumentFormat("Corel Quattro Pro",DocumentFamily.SPREADSHEET,"application/x-quattropro" , "wb3");
DocumentConverter converter = new OpenOfficeDocumentConverter(connection);
converter.convert(f, new File(fName), wb3);

Mime Type is from some post I found on the internet. "Corel Quattro Pro" is just a guess.
I saw a big table yesterday that detailed all this information for the different file types, but I can't seem to find it today.

This gets thrown back:
 java.lang.IllegalArgumentException: unknown document format for file: C:\Cost\1996\96-03jc.wb3

Any ideas?

If I get this working, I'll post my code here, in case it can help somebody else dealing with the same problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.