dll not registered error

303 views
Skip to first unread message

tomgeo...@gmail.com

unread,
Apr 3, 2013, 4:50:57 PM4/3/13
to jniwrapp...@teamdev.com
All, 

 I am running jniwrap on a 64 bit JVM ver 1.7.

I have winparck 3.8.4 installed and comfyj 2.10. My OS is Win 2008 Server. 

I have jniwrap.dll on the classpath wherer the app can see it. 

I am getting this error however. 

com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040154; REGDB_E_CLASSNOTREG (Class not registered)
at com.jniwrapper.win32.com.ComException.checkResult(SourceFile:172)


this appears to be a problem with the dll not registered to the OS. I have tried all the regsvr32 options to register this and they all fail. (says no entry point.)

So I have placed the jniwrap.dll in multiple places trying to get the code to see it (c:\windows\system32; c:\windows\syswow64) etc. etc. and still nothing. 

Anyone have a possible solution for this?

Thanks
Tom

Sergei Piletsky

unread,
Apr 4, 2013, 7:01:54 AM4/4/13
to tomgeo...@gmail.com, jniwrapp...@teamdev.com
Hi,

Such COM exception (REGDB_E_CLASSNOTREG) actually has nothing to do with a location of the native JNIWrapper library (jniwrap.dll) file.

The fact that you got such message means that your Java application found JNIWrapper library and it was able to invoke the CoCreateInstance COM function and that function returned the REGDB_E_CLASSNOTREG error. This error code (according to MSDN documentation) means that the requested COM object is not registered in a system. So you need to make sure that the required COM object is installed in the system.

Given that you are running your application on a 64-bit JVM, another possible explanation of the issue is that the COM component is still installed on the system, but it is 32-bit INPROC_SERVER library. This a known system restriction that 64-bit applications cannot use 32-bit libraries and vice versa. So, if the required COM component is 32-bit INPROC_SERVER library then you can only use in in your Java application if you start it with a 32-bit JVM.

Sincerely,
Serge


--
You received this message because you are subscribed to the Google Groups "JNIWrapper Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jniwrapper-for...@teamdev.com.
To post to this group, send email to jniwrapp...@teamdev.com.
Visit this group at http://groups.google.com/a/teamdev.com/group/jniwrapper-forum/?hl=en.
For more options, visit https://groups.google.com/a/teamdev.com/groups/opt_out.
 
 

Tom George

unread,
Apr 5, 2013, 10:15:35 AM4/5/13
to Sergei Piletsky, jniwrapp...@teamdev.com
Sergi,

Thanks for the feedback. You sent me on the right path in that it was not jniwrap but another component. I found a separate dll that had to be registered for the app to function correctly. All is well now. 

Thanks!
Tom

denni...@gmail.com

unread,
Nov 2, 2015, 9:34:28 AM11/2/15
to JNIWrapper Forum, sergei....@teamdev.com, tomgeo...@gmail.com
Guys,

What was the solution here? Because I have the same problem... I'm using Java7 & jniwrap64.dll.

I tried to register the dll but I had no luck. (The module "jniwrap64.dll" was loaded but the entry-point DllRegisterServer was not found)


Error:
ERROR ComBridgeAdapter - InitError: COM object method returns error code: 0x80040154; REGDB_E_CLASSNOTREG (Class not registered)
com.jniwrapper.win32.com.ComException: COM object method returns error code: 0x80040154; REGDB_E_CLASSNOTREG (Class not registered)


Kind Regards.

tomgeo...@gmail.com

unread,
Nov 2, 2015, 10:20:15 AM11/2/15
to JNIWrapper Forum, sergei....@teamdev.com, tomgeo...@gmail.com, denni...@gmail.com
I can tell you what I did to resolve the error, although I can't tell you the specific dll that was the culprit.

First, I make sure the path to the jniwrap64.dll was on the OS PATH and also the application path (i am running weblogic as a windows service. There is a Path parameter in the registry, for that service).
This did not help but I still think it is good practice.

I tried and tried to register that jniwrap64.dll, like you are doing, to no avail. So I noticed I had several otehr dll;s in the same directory as the jniwrap64.dll. 
I piped a listing of these to a text file (dir*.dll >dir.txt) and then edited the file so that it would register every one of these dll's and saved it as a batch file and ran it. 
You will get the messages about no entry point, etc. Dont worry about these as one of these dll's is registering did the trick. Sorry I cannot tell you the specific dll that it was. I know that some of mine were application specific and prob not the culprits. Looking in my directlory, Here are some that might be prime suspects (these are the register commands out of my batch file)

regsvr32 globlib.dll
regsvr32 jawin.dll
regsvr32 jcom.dll
regsvr32 WordWrapper.dll
regsvr32 wrapper.dll
regsvr32 jniwrap.dll:


Hope this helps keep me updated!
Reply all
Reply to author
Forward
0 new messages