I moved from 32 bit Vista to 64 bit Windows 7 because the PC was broken. I use Java JDK 7, Groovy 1.8.4 + Scriptom. Scriptom uses Jacob. I tried three Jacob versions, including the newest one. I does not work anymore. With my Vista PC there were no problems.
I copied both dll files to c:\windows\system32. Rebooting Windows 7 didn't help.
This is my Groovy test script. This is a Scriptom example.
Caught: org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: 'ScriptControl'; Can't co-create object
org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: 'ScriptControl'; Can't co-create object
at TestWindow2$_run_closure1.doCall(TestWindow2.groovy:5)
at TestWindow2$_run_closure1.doCall(TestWindow2.groovy)
at TestWindow2.run(TestWindow2.groovy:3)
Caused by: com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
… 3 more
Same error with my Groovy code. (My .NET COM-capable DLL was registered by me using REGASM). There's nothing to register with REGSVR32.
I've found no solution for this problem in the web. Help!
Regardz
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you running a 64 bit JDK on your new machine? The DLLs are 32 bit, so you'll need to run a 32 bit JDK. You might also want to try turning off User Account Control ( http://en.wikipedia.org/wiki/User_Account_Control ) in case it is interfering with the process.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Using JRE6 32 bit and copying the jacob dll from windows\system32 to the Java project folder makes the Groovy script work again. Thank you. :-)
But my program does not work. I change everything (even Eclipse) to 32 bit and Java 6.
I wonder why Jacob does not work with 64 bit because there is a jacob x64 dll available.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Oh no, installing Eclipse 32 bit with all plugins again is too much work.
Now I looking for a solution for the "Unsupported major.minor version 51.0" problem…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now there is only JRE 7 64 bit installed. No other Java JRE or JDK. Eclipse works. A simple Java class can be started. But Scriptom (Jacob) based Code does not work.
Is there a way to use Jacob with Java 7 64 bit?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry, I haven't yet tried the 64 bit solution. One thing to verify is that you do in fact have the 64 bit dll in the classpath, and that you do not also have the 32 bit version in the classpath (at an earlier discovery location).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now I have only jacob-1.16-M2-x64.dll in the Java project folder and no Jacob file in windows\system32. It doesn't work:
Exception in thread "main" org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: '…….'; Can't co-create object
at org.codehaus.groovy.scriptom.ActiveXObject.<init>(ActiveXObject.java:147)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
Caused by: com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
at org.codehaus.groovy.scriptom.ActiveXObject.<init>(ActiveXObject.java:142)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Make sure you're using the 64 bit scriptom DLL. And, if you're in an application server environment, you need to put the DLLs in the common classloader area so that only a single instance is used across all applications (at least, that's the case for jacob dll).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You shouldn't have to copy DLLs. I'd think you should search to make sure it's not picking up the wrong versions.
You actually changed a couple things, OS, possibly security setup and maybe moved your app from 32 bit to 64 bit. I had a problem where I'd moved from 32bit to 64bit windows install and my demo broke because I'd installed 64 bit Office instead of 32 bit.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hi
I moved from 32 bit Vista to 64 bit Windows 7 because the PC was broken. I use Java JDK 7, Groovy 1.8.4 + Scriptom. Scriptom uses Jacob. I tried three Jacob versions, including the newest one. I does not work anymore. With my Vista PC there were no problems.
I copied both dll files to c:\windows\system32. Rebooting Windows 7 didn't help.
This is my Groovy test script. This is a Scriptom example.
import org.codehaus.groovy.scriptom.*
Scriptom.inApartment
{
def scriptControl = new ActiveXObject("ScriptControl")
scriptControl.Language = "JScript"
println scriptControl.Eval('2.0 + 2.0;')
}
I started it in Eclipse Indigo and got:
Caught: org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: 'ScriptControl'; Can't co-create object
org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: 'ScriptControl'; Can't co-create object
at TestWindow2$_run_closure1.doCall(TestWindow2.groovy:5)
at TestWindow2$_run_closure1.doCall(TestWindow2.groovy)
at TestWindow2.run(TestWindow2.groovy:3)
Caused by: com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
… 3 more
Same error with my Groovy code. (My .NET COM-capable DLL was registered by me using REGASM). There's nothing to register with REGSVR32.
I've found no solution for this problem in the web. Help!
Regardz
Are you running a 64 bit JDK on your new machine? The DLLs are 32 bit, so you'll need to run a 32 bit JDK. You might also want to try turning off User Account Control ( http://en.wikipedia.org/wiki/User_Account_Control ) in case it is interfering with the process.
Using JRE6 32 bit and copying the jacob dll from windows\system32 to the Java project folder makes the Groovy script work again. Thank you. :-)
But my program does not work. I change everything (even Eclipse) to 32 bit and Java 6.
I wonder why Jacob does not work with 64 bit because there is a jacob x64 dll available.
Oh no, installing Eclipse 32 bit with all plugins again is too much work.
Now I looking for a solution for the "Unsupported major.minor version 51.0" problem…
Now there is only JRE 7 64 bit installed. No other Java JRE or JDK. Eclipse works. A simple Java class can be started. But Scriptom (Jacob) based Code does not work.
Is there a way to use Jacob with Java 7 64 bit?
Sorry, I haven't yet tried the 64 bit solution. One thing to verify is that you do in fact have the 64 bit dll in the classpath, and that you do not also have the 32 bit version in the classpath (at an earlier discovery location).
Now I have only jacob-1.16-M2-x64.dll in the Java project folder and no Jacob file in windows\system32. It doesn't work:
Exception in thread "main" org.codehaus.groovy.scriptom.ActiveXObject$CreationException: Could not create ActiveX object: '…….'; Can't co-create object
at org.codehaus.groovy.scriptom.ActiveXObject.<init>(ActiveXObject.java:147)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:102)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:54)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
Caused by: com.jacob.com.ComFailException: Can't co-create object
at com.jacob.com.Dispatch.createInstanceNative(Native Method)
at com.jacob.com.Dispatch.<init>(Dispatch.java:99)
at com.jacob.activeX.ActiveXComponent.<init>(ActiveXComponent.java:58)
at org.codehaus.groovy.scriptom.ActiveXObject.<init>(ActiveXObject.java:142)
Make sure you're using the 64 bit scriptom DLL. And, if you're in an application server environment, you need to put the DLLs in the common classloader area so that only a single instance is used across all applications (at least, that's the case for jacob dll).
There are no Scriptom 1.6.0 DLLs - only JARs. And there is only one Scriptom. No difference is made between 32 and 64 bit.
I use Scriptom on client side.
Hey guys
I have a similar problem: JACOB works with Java 6, but fails with Java 7.
I posted it here: http://stackoverflow.com/questions/10547969/java-7-com-api-does-not-work-with-quality-center-otaclient-dll-but-works-wit
Did someone find a solution yet?
Can you submit a change request with your Dispatch.cpp change in stackoverflow? I'd like to add that extra debug output to the next release.
You shouldn't have to copy DLLs. I'd think you should search to make sure it's not picking up the wrong versions.
You actually changed a couple things, OS, possibly security setup and maybe moved your app from 32 bit to 64 bit. I had a problem where I'd moved from 32bit to 64bit windows install and my demo broke because I'd installed 64 bit Office instead of 32 bit.
hi r3
my status hasn't changed. I still got the problem. My software is built with 32 bit JDK. But I use 64 bit Eclipse.
greetz
… and it works with 32 bit.