[groovy-user] scriptom example shiped with 1.7.0 blows up

177 views
Skip to first unread message

j p

unread,
Feb 26, 2010, 3:46:32 PM2/26/10
to us...@groovy.codehaus.org
I downloaded Groovy and having many problems trying to get the
example1 of scriptom to work. Here is my windows, java and groovy
version info:

Microsoft Windows XP [Version 5.1.2600], java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM)
Client VM (build 10.0-b19, mixed mode, sharing), Groovy Version: 1.7.0
JVM: 1.6.0_05

Here is the error message from Groovy Console (top 3 lines of error
message),


java.lang.NoClassDefFoundError: Could not initialize class
com.jacob.com.ComThread

at org.codehaus.groovy.scriptom.Scriptom.initMTA(Scriptom.java:238)

at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:144)

Can anyone help?

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Tres Finocchiaro

unread,
Feb 26, 2010, 8:14:20 PM2/26/10
to us...@groovy.codehaus.org
From first glance, it looks like your jacob.dll is not recognized.  Did you copy it (or an older version of it) to System32?

I think the documentation says where it should reside.  Sometimes a search on the filesystem for jacob*.dll can help.

-Tres
--
- Tres.Fin...@gmail.com

j p

unread,
Feb 26, 2010, 8:31:23 PM2/26/10
to us...@groovy.codehaus.org
Thanks. The groovy 1.7.0 installer puts it in the groovy\bin
directory. But its name is jacob-1.14.3-x86.dll and jacob-1.14.3-
x64.dll. Funny you ask about that because upon first run of the
sample app I get this error (first few lines shown below) message...

java.lang.UnsatisfiedLinkError: C:\Program Files\Groovy
\Groovy-1.7.0\bin\jacob-1.14.3-x86.dll: This application has failed to
start because the application configuration is incorrect. Reinstalling
the application may fix this problem

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1753)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1678)

at java.lang.Runtime.loadLibrary0(Runtime.java:822)

at java.lang.System.loadLibrary(System.java:993)

Then if I just re-run it without making any changes I get this error
message (first few lines)...

java.lang.NoClassDefFoundError

at org.codehaus.groovy.scriptom.Scriptom.initMTA(Scriptom.java:238)

at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:144)

at org.codehaus.groovy.scriptom.Scriptom.inApartment(Scriptom.java:
197)

at org.codehaus.groovy.scriptom.Scriptom$inApartment.call(Unknown
Source)

at
org.codehaus.groovy.scriptom.util.office.ExcelHelper.create(ExcelHelper.groovy:
71)


I have reinstalled groovy three times and the same thing happens.


I'm running the sample that comes with groovy 1.7.0 -

C:\Program Files\Groovy\Groovy-1.7.0\Supplementary\Scriptom\examples
\excel\example1\ExcelReport.groovy

I have my paths and home directory defined. It's just strange that the
example out of the box throws an error.

>>> Tres Finocchiaro <tres.fin...@gmail.com> 2/26/2010 5:14 PM >>>

-Tres

at org.codehaus.groovy.scriptom.Scriptom.initMTA(Scriptom.java:238)

at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:144)

Can anyone help?

http://xircles.codehaus.org/manage_email


--
- Tres.Fin...@gmail.com


On Feb 26, 5:14 pm, Tres Finocchiaro <tres.finocchi...@gmail.com>
wrote:

> - Tres.Finocchi...@gmail.com

Tres Finocchiaro

unread,
Feb 26, 2010, 8:40:41 PM2/26/10
to us...@groovy.codehaus.org
I've had issues running Groovy out of the box too.

Are you running it by double clicking, or the command prompt?

The command prompt is tricky with PATH, as it gets it each time a new CMD window is opened.

Is C:\Program Files\Groovy \Groovy-1.7.0\bin\ in your PATH var?

I'm sorry as I'm shooting in the dark a little.  Just trying some of the basics until someone running your version chimes in.
--
- Tres.Fin...@gmail.com

Jason Smith

unread,
Feb 27, 2010, 12:13:29 AM2/27/10
to us...@groovy.codehaus.org
Are you doing this with the Windows Installer or with another installation of Groovy?  It looks like the whole Jacob JAR file is missing.
 

Jason Smith


From: Tres Finocchiaro [tres.fin...@gmail.com]
Sent: Friday, February 26, 2010 6:14 PM
To: us...@groovy.codehaus.org
Subject: Re: [groovy-user] scriptom example shiped with 1.7.0 blows up

Jason Smith

unread,
Feb 27, 2010, 12:15:40 AM2/27/10
to us...@groovy.codehaus.org
The "Unsatisfied link error" is usually caused by a missing Visual Studio C++ 2005 Runtime.  This should be mentioned on the wiki.  The installer is supposed to take care of this, but you never know about these things...
 

Jason Smith
Software Engineer

InfoTrust Group, Inc.

500 Discovery Parkway, Suite 200
Superior, CO 80027
Office 303-627-6571
Fax 303-666-6711

Email jsm...@infotrustgroup.com

WEB www.infotrustgroup.com

This e-mail and all information included herein do not constitute a legal agreement accorded by INFOTRUST GROUP and its affiliates and subsidiaries.  All legal agreements must be formulated in writing by a legal representative of INFOTRUST GROUP. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed.  If you have received this e-mail by mistake, please inform us and destroy this e-mail and any documents it might contain.  Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the company. Finally, the recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email.  Thank you for your cooperation.


From: Tres Finocchiaro [tres.fin...@gmail.com]
Sent: Friday, February 26, 2010 6:40 PM
To: us...@groovy.codehaus.org
Subject: Re: [groovy-user] Re: scriptom example shiped with 1.7.0 blows up

j p

unread,
Mar 1, 2010, 12:32:35 PM3/1/10
to us...@groovy.codehaus.org
Thanks for your reply. Here are my answers.
I'm running Microsoft Windows XP [Version 5.1.2600]

I'm running groovy console from the run->programs->groovy console.

C:\Program Files\Groovy \Groovy-1.7.0\bin\ is on my path

My GROOVY_HOME and JAVA_HOME are also set

On Feb 26, 5:40 pm, Tres Finocchiaro <tres.finocchi...@gmail.com>
wrote:

> > >>> Tres Finocchiaro <tres.finocchi...@gmail.com> 2/26/2010 5:14 PM >>>


> > From first glance, it looks like your jacob.dll is not recognized. Did
> > you copy it (or an older version of it) to System32?
>
> > I think the documentation says where it should reside. Sometimes a
> > search on the filesystem for jacob*.dll can help.
>
> > -Tres
>

j p

unread,
Mar 1, 2010, 12:35:06 PM3/1/10
to us...@groovy.codehaus.org
I installed using the windows installer from this url
http://dist.codehaus.org/groovy/distributions/installers/windows/nsis/groovy-1.7.0-installer-1.exe

On Feb 26, 9:13 pm, Jason Smith <jsm...@infotrustgroup.com> wrote:
> Are you doing this with the Windows Installer or with another installation of Groovy?  It looks like the whole Jacob JAR file is missing.
>
> Jason Smith
> ________________________________

> From: Tres Finocchiaro [tres.finocchi...@gmail.com]


> Sent: Friday, February 26, 2010 6:14 PM

> To: u...@groovy.codehaus.org


> Subject: Re: [groovy-user] scriptom example shiped with 1.7.0 blows up
>
> From first glance, it looks like your jacob.dll is not recognized.  Did you copy it (or an older version of it) to System32?
>
> I think the documentation says where it should reside.  Sometimes a search on the filesystem for jacob*.dll can help.
>
> -Tres
>

> On Fri, Feb 26, 2010 at 3:46 PM, j p <jpr.90...@gmail.com<mailto:jpr.90...@gmail.com>> wrote:
>
> I downloaded Groovy and having many problems trying to get the
> example1 of scriptom to work.  Here is my windows, java and groovy
> version info:
>
> Microsoft Windows XP [Version 5.1.2600], java version "1.6.0_05"
> Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM)
> Client VM (build 10.0-b19, mixed mode, sharing), Groovy Version: 1.7.0
> JVM: 1.6.0_05
>
> Here is the error message from Groovy Console (top 3 lines of error
> message),
>
> java.lang.NoClassDefFoundError: Could not initialize class
> com.jacob.com.ComThread
>
>  at org.codehaus.groovy.scriptom.Scriptom.initMTA(Scriptom.java:238)
>
>  at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:144)
>
> Can anyone help?
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
> --

> - Tres.Finocchi...@gmail.com<mailto:Tres.Finocchi...@gmail.com>

Tres Finocchiaro

unread,
Mar 1, 2010, 8:19:08 PM3/1/10
to us...@groovy.codehaus.org
Did you try manually installing the Visual Studio C++ 2005 Runtime. as Jason suggested?

-Tres
--
- Tres.Fin...@gmail.com

j p

unread,
Mar 1, 2010, 8:28:04 PM3/1/10
to us...@groovy.codehaus.org
Just finished the search on my machine for msvcr80.dll (a dependency
mentioned in /jacob-1.15-M3-ReleaseNotes-1.html) and it was not on it,
which is good. I've downloaded the vcredist_x86.exe from microsoft @
http://www.microsoft.com/Downloads/details.aspx?familyid=32BC1BEE-A3F9-4C13-9C99-220B62A191EE&displaylang=en.
I'll let you know the outcome tomorrow. Thanks.

On Mar 1, 5:19 pm, Tres Finocchiaro <tres.finocchi...@gmail.com>
wrote:

> - Tres.Finocchi...@gmail.com

j p

unread,
Mar 2, 2010, 12:26:10 PM3/2/10
to us...@groovy.codehaus.org
NO LUCK, same thing. The readme file shown after installing groovy
says that the msvcr80.dll is in the bin dir. It is not. I'm
suspecting there is something funny about the install package. Here
is the result of running the scriptom example 1 out of the box


CREATING A SPREADSHEET FROM A TEMPLATE:

Opening Excel template, inserting data, and creating a chart.
The output document is 'C:\Program Files\Groovy\Groovy-1.7.0\bin
\report.xls'.

Exception thrown

java.lang.UnsatisfiedLinkError: C:\Program Files\Groovy
\Groovy-1.7.0\bin\jacob-1.14.3-x86.dll: This application has failed to
start because the application configuration is incorrect. Reinstalling
the application may fix this problem

at java.lang.ClassLoader$NativeLibrary.load(Native Method)

at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1751)

at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1676)

at java.lang.Runtime.loadLibrary0(Runtime.java:823)

at java.lang.System.loadLibrary(System.java:1030)

at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:
184)

at com.jacob.com.JacobObject.<clinit>(JacobObject.java:108)

at com.jacob.com.LibraryLoader.loadJacobLibrary(LibraryLoader.java:
181)

at com.jacob.com.ComThread.<clinit>(ComThread.java:167)

at org.codehaus.groovy.scriptom.Scriptom.initMTA(Scriptom.java:238)

at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:144)

at org.codehaus.groovy.scriptom.Scriptom.inApartment(Scriptom.java:
197)

at org.codehaus.groovy.scriptom.Scriptom$inApartment.call(Unknown
Source)

at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
125)

at
org.codehaus.groovy.scriptom.util.office.ExcelHelper.create(ExcelHelper.groovy:
71)

at org.codehaus.groovy.scriptom.util.office.ExcelHelper
$create.call(Unknown Source)

at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
133)

at ExcelReport.run(ExcelReport.groovy:32)

at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:
263)

at groovy.lang.GroovyShell.run(GroovyShell.java:464)

at groovy.lang.GroovyShell.run(GroovyShell.java:169)

at groovy.lang.GroovyShell$run.call(Unknown Source)

at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
133)

at groovy.ui.Console$_runScriptImpl_closure14.doCall(Console.groovy:
802)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66)

at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:
44)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
143)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151)

at groovy.ui.Console$_runScriptImpl_closure14.doCall(Console.groovy)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at groovy.lang.Closure.call(Closure.java:276)

at groovy.lang.Closure.call(Closure.java:271)

at groovy.lang.Closure.run(Closure.java:354)

at java.lang.Thread.run(Thread.java:619)


On Mar 1, 5:28 pm, j p <jpr.90...@gmail.com> wrote:
> Just finished the search on my machine for msvcr80.dll (a dependency
> mentioned in /jacob-1.15-M3-ReleaseNotes-1.html) and it was not on it,

> which is good.  I've downloaded the vcredist_x86.exe from microsoft @http://www.microsoft.com/Downloads/details.aspx?familyid=32BC1BEE-A3F....

Jason Smith

unread,
Mar 3, 2010, 9:32:04 PM3/3/10
to us...@groovy.codehaus.org
Can you show the script you are running, along with the command-line? I suspect that either the java-library-path isn't set up right, or there is still something wrong with the Visual C++ 2005 Runtime install.

Are you using the Groovy Windows Installer, or running Groovy a different way?

Just to verify, which version of Windows are you on?

Jason Smith
________________________________________
From: j p [jpr....@gmail.com]
Sent: Tuesday, March 02, 2010 10:26 AM
To: us...@groovy.codehaus.org
Subject: [groovy-user] Re: scriptom example shiped with 1.7.0 blows up

j p

unread,
Mar 4, 2010, 9:39:52 PM3/4/10
to us...@groovy.codehaus.org
I'm using the groovy console.
I used the window installer for groovy.
My windows version is Microsoft Windows XP [Version 5.1.2600] (C)
Copyright 1985-2001 Microsoft Corp.
My groovy and jvm version is (from groovy --version) Groovy Version:
1.7.0 JVM: 1.6.0_05
My path and classpath relating to groovy and java look like this

CLASSPATH=.;C:\Program Files\Groovy\Groovy-1.7.0\lib\jacob-1.14.3.jar;

GROOVY_HOME=C:\Program Files\Groovy\Groovy-1.7.0

JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05

Path=C:\Program Files\Groovy\Groovy-1.7.0\bin;C:\Program Files\Groovy
\Groovy-1.7.0\b
in\jacob-1-14-3-x86.dll;C:\Program Files\Java\jdk1.6.0_05\bin;

On Mar 3, 6:32 pm, Jason Smith <jsm...@infotrustgroup.com> wrote:
> Can you show the script you are running, along with the command-line?  I suspect that either the java-library-path isn't set up right, or there is still something wrong with the Visual C++ 2005 Runtime install.  
>
> Are you using the Groovy Windows Installer, or running Groovy a different way?
>
> Just to verify, which version of Windows are you on?
>
> Jason Smith
> ________________________________________

> From: j p [jpr.90...@gmail.com]


> Sent: Tuesday, March 02, 2010 10:26 AM

> To: u...@groovy.codehaus.org

Tres Finocchiaro

unread,
Mar 4, 2010, 11:31:51 PM3/4/10
to us...@groovy.codehaus.org
jason,

Is path supposed to be:

C:\Program Files\Groovy\Groovy-1.7.0\bin\

Rather than:
C:\Program Files\Groovy\Groovy-1.7.0\bin\jacob-1-14-3-x86.dll

?

-Tres
--
- Tres.Fin...@gmail.com

Jason Smith

unread,
Mar 5, 2010, 2:40:51 AM3/5/10
to us...@groovy.codehaus.org
Yes, it might be as simple as modifying the path so that it correctly points to the folder with the DLLs.  Windows does not understand individual files specified on the path, only folders.
 

Jason Smith

 

From: Tres Finocchiaro [tres.fin...@gmail.com]
Sent: Thursday, March 04, 2010 9:31 PM
To: us...@groovy.codehaus.org
Subject: Re: [groovy-user] Re: scriptom example shiped with 1.7.0 blows up

Joachim Baumann

unread,
Mar 7, 2010, 9:46:04 AM3/7/10
to us...@groovy.codehaus.org
Hi,

I just checked the installer, and the Microsoft dll has somehow gone
missing. Please set the path correctly (to the bin dir) and add the dll
to this directory. Then it should work.

Cheers, Joachim

Am 05.03.2010 08:40, schrieb Jason Smith:
> Yes, it might be as simple as modifying the path so that it correctly
> points to the folder with the DLLs. Windows does not understand
> individual files specified on the path, only folders.
>
>

> *Jason Smith
> *
>
>
> ------------------------------------------------------------------------
> *From:* Tres Finocchiaro [tres.fin...@gmail.com]
> *Sent:* Thursday, March 04, 2010 9:31 PM
> *To:* us...@groovy.codehaus.org
> *Subject:* Re: [groovy-user] Re: scriptom example shiped with 1.7.0


> blows up
>
> jason,
>
> Is path supposed to be:
>
> C:\Program Files\Groovy\Groovy-1.7.0\bin\
>
>
> Rather than:
>

> C:\Program Files\Groovy\Groovy-1.7.0\bin\*jacob-1-14-3-x86.dll*


>
>
> ?
>
> -Tres
>
> On Thu, Mar 4, 2010 at 9:39 PM, j p <jpr....@gmail.com
> <mailto:jpr....@gmail.com>> wrote:
>
> I'm using the groovy console.
> I used the window installer for groovy.
> My windows version is Microsoft Windows XP [Version 5.1.2600] (C)
> Copyright 1985-2001 Microsoft Corp.
> My groovy and jvm version is (from groovy --version) Groovy Version:
> 1.7.0 JVM: 1.6.0_05
> My path and classpath relating to groovy and java look like this
>
> CLASSPATH=.;C:\Program Files\Groovy\Groovy-1.7.0\lib\jacob-1.14.3.jar;
>
> GROOVY_HOME=C:\Program Files\Groovy\Groovy-1.7.0
>
> JAVA_HOME=C:\Program Files\Java\jdk1.6.0_05
>
> Path=C:\Program Files\Groovy\Groovy-1.7.0\bin;C:\Program Files\Groovy
> \Groovy-1.7.0\b
> in\jacob-1-14-3-x86.dll;C:\Program Files\Java\jdk1.6.0_05\bin;
>
> On Mar 3, 6:32 pm, Jason Smith <jsm...@infotrustgroup.com

> <mailto:jsm...@infotrustgroup.com>> wrote:
> > Can you show the script you are running, along with the
> command-line? I suspect that either the java-library-path isn't
> set up right, or there is still something wrong with the Visual
> C++ 2005 Runtime install.
> >
> > Are you using the Groovy Windows Installer, or running Groovy a
> different way?
> >
> > Just to verify, which version of Windows are you on?
> >
> > Jason Smith
> > ________________________________________

> > From: j p [jpr.90...@gmail.com <mailto:jpr.90...@gmail.com>]


> > Sent: Tuesday, March 02, 2010 10:26 AM

> > To: u...@groovy.codehaus.org <mailto:u...@groovy.codehaus.org>

> <mailto:jpr.90...@gmail.com>> wrote:
> >
> >
> >
> > > Just finished the search on my machine for msvcr80.dll (a
> dependency
> > > mentioned in /jacob-1.15-M3-ReleaseNotes-1.html) and it was
> not on it,
> > > which is good. I've downloaded the vcredist_x86.exe from
> microsoft
> @http://www.microsoft.com/Downloads/details.aspx?familyid=32BC1BEE-A3F....
> > > I'll let you know the outcome tomorrow. Thanks.
> >
> > > On Mar 1, 5:19 pm, Tres Finocchiaro

> <tres.finocchi...@gmail.com <mailto:tres.finocchi...@gmail.com>>

> > > > - Tres.Finocchi...@gmail.com <mailto:Tres.Finocchi...@gmail.com>


> >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe from this list, please visit:
> >
> > > http://xircles.codehaus.org/manage_email
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
>
>
> --

> - Tres.Fin...@gmail.com <mailto:Tres.Fin...@gmail.com>

j p

unread,
Mar 10, 2010, 2:10:09 PM3/10/10
to us...@groovy.codehaus.org
Thank you. I will try that. But this is what happened in the
meantime. I downloaded the windows installer for 1.7.1. Ran excel
example 1 as-is.
Got:

"java.lang.UnsatisfiedLinkError: C:\Program Files\Groovy
\Groovy-1.7.0\bin\jacob-1.14.3-x86.dll: This application has failed
tostart because the application configuration is incorrect.
Reinstalling the application may fix this problem."

Searched the internet for this error and there were a lot of
references to the MS .Net Framework not being installed. I installed
MS .Net Framework 3.5 and ran excel example 1. I'm still having
problems but I'm beyond the installation and Jacob stuff which is a
lot better than before. This is what I got. I will still try your
solution. Thanks again.

CREATING A SPREADSHEET FROM A TEMPLATE:

Opening Excel template, inserting data, and creating a chart.

The output document is '.\report.xls'.

Exception thrown

java.io.FileNotFoundException: .\reporttemplate.xls (The system cannot
find the file specified)

at java.io.FileInputStream.open(Native Method)

at java.io.FileInputStream.<init>(FileInputStream.java:106)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)

at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:
39)

at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

at
org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:
77)

at org.codehaus.groovy.runtime.callsite.ConstructorSite
$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:
107)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:
200)

at
org.codehaus.groovy.scriptom.util.office.ExcelHelper.copy(ExcelHelper.groovy:
139)

at org.codehaus.groovy.scriptom.util.office.ExcelHelper.this
$2$copy(ExcelHelper.groovy)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
361)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
155)

at org.codehaus.groovy.scriptom.util.office.ExcelHelper
$_create_closure1.doCall(ExcelHelper.groovy:98)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151)

at org.codehaus.groovy.scriptom.util.office.ExcelHelper
$_create_closure1.doCall(ExcelHelper.groovy)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at groovy.lang.Closure.call(Closure.java:276)

at groovy.lang.Closure.call(Closure.java:271)

at org.codehaus.groovy.scriptom.Scriptom.withMTA(Scriptom.java:147)

at org.codehaus.groovy.scriptom.Scriptom.inApartment(Scriptom.java:
197)

at org.codehaus.groovy.scriptom.Scriptom$inApartment.call(Unknown
Source)

at
org.codehaus.groovy.scriptom.util.office.ExcelHelper.create(ExcelHelper.groovy:
71)

at org.codehaus.groovy.scriptom.util.office.ExcelHelper
$create.call(Unknown Source)

at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:
40)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
117)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:
133)

at ExcelReport.run(ExcelReport.groovy:30)

at
groovy.lang.GroovyShell.runScriptOrMainOrTestOrRunnable(GroovyShell.java:
264)

at groovy.lang.GroovyShell.run(GroovyShell.java:513)

at groovy.lang.GroovyShell.run(GroovyShell.java:170)

at groovy.lang.GroovyShell$run.call(Unknown Source)

at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy:
857)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:
66)

at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:
151)

at groovy.ui.Console$_runScriptImpl_closure16.doCall(Console.groovy)

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.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:
88)

at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)

at
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:
272)

at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:886)

at groovy.lang.Closure.call(Closure.java:276)

at groovy.lang.Closure.call(Closure.java:271)

at groovy.lang.Closure.run(Closure.java:354)

at java.lang.Thread.run(Thread.java:619)


On Mar 7, 6:46 am, Joachim Baumann <joachim.baum...@xinaris.de> wrote:
> Hi,
>
> I just checked the installer, and the Microsoft dll has somehow gone
> missing. Please set the path correctly (to the bin dir) and add the dll
> to this directory. Then it should work.
>
> Cheers, Joachim
>
> Am 05.03.2010 08:40, schrieb Jason Smith:
>
> > Yes, it might be as simple as modifying the path so that it correctly
> > points to the folder with the DLLs.  Windows does not understand
> > individual files specified on the path, only folders.
>
> > *Jason Smith
> > *
>
> > ------------------------------------------------------------------------

> > *From:* Tres Finocchiaro [tres.finocchi...@gmail.com]


> > *Sent:* Thursday, March 04, 2010 9:31 PM

> > *To:* u...@groovy.codehaus.org


> > *Subject:* Re: [groovy-user] Re: scriptom example shiped with 1.7.0
> > blows up
>
> > jason,
>
> > Is path supposed to be:
>
> >     C:\Program Files\Groovy\Groovy-1.7.0\bin\
>
> > Rather than:
>
> >     C:\Program Files\Groovy\Groovy-1.7.0\bin\*jacob-1-14-3-x86.dll*
>
> > ?
>
> > -Tres
>

> ...
>
> read more »

Tres Finocchiaro

unread,
Mar 10, 2010, 7:50:21 PM3/10/10
to us...@groovy.codehaus.org
That simply means the path to the excel file is wrong.

Try editing the script with a hard-link to the full path for now.  Example:
"c:\folder\reporttemplate.xls" or "c:\\folder\\reporttemplate.xls" or "c:/folder/reporttemplate.xls"

".\reporttemplate.xls" is relative (the dot is the "working" directory) and will only work (in theory) if the excel file is side-by side your program.

-Tres

j p

unread,
Mar 23, 2010, 3:49:15 PM3/23/10
to us...@groovy.codehaus.org
I was working on a hot project at work and did not have time to do
more testing regarding this problem. I have made the path changes to
'c://xxxxxx.xls' for both files in the example1 folder and the vm blew
up. Here is the log of that:

#
# An unexpected error has been detected by Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0f852509, pid=3264,
tid=3932
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing
windows-x86)
# Problematic frame:
# C [jacob-1.14.3-x86.dll+0x2509]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

--------------- T H R E A D ---------------

Current thread (0x03d1bc00): JavaThread
"Thread-5" [_thread_in_native, id=3932, stack(0x04cb0000,0x04eb0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x00000000

Registers:
EAX=0x04ead754, EBX=0x04ead690, ECX=0x04ead740, EDX=0x04ead74c
ESP=0x04ead638, EBP=0x04ead768, ESI=0x04ead690, EDI=0x00000000
EIP=0x0f852509, EFLAGS=0x00010202

Top of Stack: (sp=0x04ead638)
0x04ead638: 03d1bcf4 04ead690 04ead690 00000032
0x04ead648: 04ead634 00000000 0f852749 04ead754
0x04ead658: 04ead74c 04ead740 04ead744 04ead690
0x04ead668: 00000000 00000000 00000000 0f852d78
0x04ead678: 04ead6b0 04ead754 04ead74c 04ead740
0x04ead688: 04ead744 04ead690 00780045 00650063
0x04ead698: 002e006c 00680053 00650065 00000074
0x04ead6a8: 7c80bdf6 0f852ca0 003a0043 0050005c

Instructions: (pc=0x0f852509)
0x0f8524f9: cc cc cc cc cc cc cc 83 ec 10 53 57 8b 7c 24 30
0x0f852509: 8b 07 8b 50 0c 8d 4c 24 08 51 57 ff d2 85 c0 8b


Stack: [0x04cb0000,0x04eb0000], sp=0x04ead638, free space=2037k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code,
C=native code)
C [jacob-1.14.3-x86.dll+0x2509]
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
J org.codehaus.groovy.runtime.InvokerHelper.setProperty(Ljava/lang/
Object;Ljava/lang/String;Ljava/lang/Object;)V
J org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(Ljava/
lang/Object;Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/String;)V
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
J org.codehaus.groovy.runtime.InvokerHelper.setProperty(Ljava/lang/
Object;Ljava/lang/String;Ljava/lang/Object;)V
J org.codehaus.groovy.runtime.ScriptBytecodeAdapter.setProperty(Ljava/
lang/Object;Ljava/lang/Class;Ljava/lang/Object;Ljava/lang/String;)V
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/
Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/
Object;)Ljava/lang/Object;
J org.codehaus.groovy.reflection.CachedMethod.invoke(Ljava/lang/
Object;[Ljava/lang/Object;)Ljava/lang/Object;
J groovy.lang.MetaMethod.doMethodInvoke(Ljava/lang/Object;[Ljava/lang/
Object;)Ljava/lang/Object;
J
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(Ljava/
lang/Class;Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/
Object;ZZ)Ljava/lang/Object;
J groovy.lang.MetaClassImpl.invokeMethod(Ljava/lang/Object;Ljava/lang/
String;[Ljava/lang/Object;)Ljava/lang/Object;
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
J org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(Ljava/
lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/
Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/
Object;)Ljava/lang/Object;
J org.codehaus.groovy.reflection.CachedMethod.invoke(Ljava/lang/
Object;[Ljava/lang/Object;)Ljava/lang/Object;
J groovy.lang.MetaMethod.doMethodInvoke(Ljava/lang/Object;[Ljava/lang/
Object;)Ljava/lang/Object;
J
org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(Ljava/
lang/Class;Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/
Object;ZZ)Ljava/lang/Object;
J groovy.lang.MetaClassImpl.invokeMethod(Ljava/lang/Object;Ljava/lang/
String;[Ljava/lang/Object;)Ljava/lang/Object;
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::Interpreter
v ~BufferBlob::StubRoutines (1)
J sun.reflect.NativeMethodAccessorImpl.invoke0(Ljava/lang/reflect/
Method;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.NativeMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J sun.reflect.DelegatingMethodAccessorImpl.invoke(Ljava/lang/Object;
[Ljava/lang/Object;)Ljava/lang/Object;
J java.lang.reflect.Method.invoke(Ljava/lang/Object;[Ljava/lang/
Object;)Ljava/lang/Object;
J org.codehaus.groovy.reflection.CachedMethod.invoke(Ljava/lang/
Object;[Ljava/lang/Object;)Ljava/lang/Object;

On Mar 10, 5:50 pm, Tres Finocchiaro <tres.finocchi...@gmail.com>
wrote:


> That simply means the path to the excel file is wrong.
>
> Try editing the script with a hard-link to the full path for now.  Example:
> "c:\folder\reporttemplate.xls" or "c:\\folder\\reporttemplate.xls" or
> "c:/folder/reporttemplate.xls"
>
> ".\reporttemplate.xls" is relative (the dot is the "working" directory) and
> will only work (in theory) if the excel file is side-by side your program.
>
> -Tres
>

Reply all
Reply to author
Forward
0 new messages