Ashutosh
unread,May 26, 2012, 12:55:59 PM5/26/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to jni4net
Hi,
I have a requirement of printing letters as a background service.
these letters are MS Word document. Since my application is a java
application, i am not able to print letters by keeping word format
intact from java. I decided to write a .NET dll which will do this
task for me and planned to call this DLL using JNI4net (I am a java
developer and writing .net program first time). but when i generate
DLL and try to register this in my java program i am getting error. I
thought this is happening bcoz i am using office.dll and other MSword
dlll. but the same error message came when my .net program just has
console.writeline("haha"). Please help me because i already have
wasted lot of my time trying to print word doc from java.. Many
thanks....
Error message while registering DLL is :
System.IO.FileNotFoundException: Could not load file or assembly
'ClassLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'
or one of its dependencies. The system cannot find the file specified.
File name: 'ClassLibrary1, Version=1.0.0.0, Culture=neutral,
PublicKeyToken=null'
at System.Reflection.CustomAttribute._CreateCaObject(Void* pModule,
Void* pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
at System.Reflection.CustomAttribute.CreateCaObject(Module module,
RuntimeMethodHandle ctor, IntPtr& blob, IntPtr blobEnd, Int32&
namedArgs)
at System.Reflection.CustomAttribute.GetCustomAttributes(Module
decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount,
RuntimeType attributeFilterType, Boolean mustBeInheritable, IList
derivedAttributes)
at
System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType
type, RuntimeType caType, Boolean inherit)
at System.RuntimeType.GetCustomAttributes(Type attributeType,
Boolean inherit)
at net.sf.jni4net.utils.Registry.GetClrWrapperAttribute(Type type)
at net.sf.jni4net.utils.Registry.RegisterWrapper(Type wrapperType,
RegistryRecord& record)
at net.sf.jni4net.utils.Registry.RegisterType(Type type, Boolean
bindJVM, JNIEnv env, ClassLoader classLoader)
at net.sf.jni4net.utils.Registry.RegisterAssembly(Assembly
assembly, Boolean bindJVM, ClassLoader classLoader)
at net.sf.jni4net.Bridge.RegisterAssembly(Assembly assembly,
ClassLoader classLoader)
at
net.sf.jni4net.Bridge.LoadAndRegisterAssemblyFromClassLoader(File
assemblyFile, ClassLoader classLoader)
at net.sf.jni4net.Bridge.LoadAndRegisterAssemblyFrom(File
assemblyFile)
at net.sf.jni4net.__Bridge.LoadAndRegisterAssemblyFrom3(IntPtr
__envp, JniLocalHandle __class, JniLocalHandle assemblyFile)
WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM
\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind
failure logging.
To turn this feature off, remove the registry value [HKLM\Software
\Microsoft\Fusion!EnableLog].
Thanks
Ashu