Discussion:
[Ikvm-developers] IKVM.NET with Spring
P***@nomura.com
2016-11-18 16:58:16 UTC
Permalink
Hi folks,

I am looking for help on using IKVM with the spring framework. We are using the ‘one large DLL’ solution to compile a large number of our libraries. We recently added the spring framework to these.

Compiling everything together with ikvmc works but on initialization of the spring framework, the ikvm class loader behaves differently than the class loader of the standard JVM. The class loader of the standard JVM tolerates that some extensions of the spring framework are missing, whereas the ikvm class loader throws an exception:

"ClassNotFoundException: com.datastax.driver.core.Cluster$Builder\r\n at IKVM.Internal.ClassLoaderWrapper.LoadClass(String name, LoadMode mode)\r\n at IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String name)\r\n at IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n at IKVM.StubGen.StubGenerator.WriteClass(Stream stream, TypeWrapper tw, Boolean includeNonPublicInterfaces, Boolean includeNonPublicMembers, Boolean includeSerialVersionUID, Boolean includeParameterNames)\r\n at IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n at IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n at IKVM.Internal.VirtualFileSystem.Open(String name, FileMode fileMode, FileAccess fileAccess)\r\n at Java_java_io_FileDescriptor.open(String name, FileMode fileMode, FileAccess fileAccess)\r\n at java.io.FileDescriptor.open(String , FileMode , FileAccess )\r\n at java.io.FileDescriptor.open(String , Int32 , Int32 )\r\n at java.io.FileDescriptor.openReadOnly(String )\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name, FileDescriptor fd)\r\n at java.io.FileInputStream.open0(String )\r\n at java.io.FileInputStream.open(String )\r\n at java.io.FileInputStream..ctor(File file)\r\n at java.util.zip.ClassStubZipEntry.getInputStream()\r\n at java.util.zip.ZipFile.getInputStream(ZipEntry entry)\r\n at java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n at sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n at java.net.URLClassLoader.getResourceAsStream(String name)\r\n at org.springframework.core.io.ClassPathResource.getInputStream() in ClassPathResource.java:line 166\r\n at org.springframework.core.type.classreading.SimpleMetadataReader..ctor(Resource resource, ClassLoader classLoader) in SimpleMetadataReader.java:line 50\r\n at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(Resource resource) in SimpleMetadataReaderFactory.java:line 98\r\n at org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line 89\r\n at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line 76\r\n at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(String className) in SimpleMetadataReaderFactory.java:line 93\r\n at org.springframework.boot.autoconfigure.AutoConfigurationSorter.AutoConfigurationClasses..ctor(MetadataReaderFactory metadataReaderFactory, Collection classNames) in AutoConfigurationSorter.java:line 110\r\n at org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(Collection classNames) in AutoConfigurationSorter.java:line 54\r\n at org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(AnnotationMetadata metadata) in EnableAutoConfigurationImportSelector.java:line 89\r\n at org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors() in ConfigurationClassParser.java:line 481"


Here are the detail of our setup:
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4

We are using the statement “ikvm.runtime.Startup.addBootClassPathAssembly(Assembly.Load("OurLargeAssembly"));”. We are not using any –classloader argument in the args of ikvmc.

We tried downloading the datastax driver and adding it to our large assembly. It worked, but right after we faced the same problem with ‘elasticsearch’. But this time, adding this package caused an ikvmc crash:

warning IKVMC0100: Class "org.jboss.netty.bootstrap.ServerBootstrap" not found
warning IKVMC0100: Class "org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory" not found
warning IKVMC0100: Class "org.jboss.netty.channel.group.ChannelGroup" not found
warning IKVMC0100: Class "org.jboss.netty.channel.group.ChannelGroupFuture" not found

*** INTERNAL COMPILER ERROR ***

PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE

ikvmc, Version=8.1.5717.0, Culture=neutral, PublicKeyToken=13235d27fcbfff58
C:\Windows\Microsoft.NET\Framework64\v2.0.50727\
2.0.50727.5485 64-bit

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()
at IKVM.Reflection.Impl.PdbWriter.Close()
at IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream stream)
at IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream stream)
at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String assemblyFileName, Stream streamOrNull, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
at IKVM.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName, PortableExecutableKinds portableExecutableKind, ImageFileMachine imageFileMachine)
at IKVM.Internal.CompilerClassLoader.Save()
at IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly, List`1 optionsList)
at IkvmcCompiler.Compile(String[] args)
at IkvmcCompiler.Main(String[] args)


Any help would be appreciated.


_________________________________
Pascal Dufresne
Associate - Securitized Products Technology
Nomura Securities International
309 West 49th Street
New York, New York 10019-7316
Phone: +1 212 667 1381 Mobile: +1 646 920 9617
Email: ***@nomura.com<mailto:***@nomura.com>

Connecting Markets East & West
www.nomura.com<http://www.nomura.com/>



PLEASE READ: This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please delete it and all copies from your system, destroy any hard copies and notify the sender. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. Nomura Holding America Inc., Nomura Securities International, Inc, and their respective subsidiaries each reserve the right to monitor all e-mail communications through its networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorized to state the views of such entity. Unless otherwise stated, any pricing information in this message is indicative only, is subject to change and does not constitute an offer to deal at any price quoted. Any reference to the terms of executed transactions should be treated as preliminary only and subject to our formal written confirmation.
Volker Berlin
2016-11-21 12:06:49 UTC
Permalink
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class resources
are not available IKVM that it try to generate a stub of the stream
which is failing. If this is the case then it look like a bug in IKVM.

Which version of IKVM do you use?

Volker
Post by P***@nomura.com
Hi folks,
I am looking for help on using IKVM with the spring framework. We are
using the ‘one large DLL’ solution to compile a large number of our
libraries. We recently added the spring framework to these.
Compiling everything together with ikvmc works but on initialization
of the spring framework, the ikvm class loader behaves differently
than the class loader of the standard JVM. The class loader of the
standard JVM tolerates that some extensions of the spring framework
com.datastax.driver.core.Cluster$Builder\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClass(String name, LoadMode
mode)\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String
name)\r\n at
IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n at
IKVM.StubGen.StubGenerator.WriteClass(Stream stream, TypeWrapper tw,
Boolean includeNonPublicInterfaces, Boolean includeNonPublicMembers,
Boolean includeSerialVersionUID, Boolean includeParameterNames)\r\n
at IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n
at IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n at
IKVM.Internal.VirtualFileSystem.Open(String name, FileMode fileMode,
FileAccess fileAccess)\r\n at
Java_java_io_FileDescriptor.open(String name, FileMode fileMode,
FileAccess fileAccess)\r\n at java.io.FileDescriptor.open(String ,
FileMode , FileAccess )\r\n at java.io.FileDescriptor.open(String ,
Int32 , Int32 )\r\n at java.io.FileDescriptor.openReadOnly(String
)\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name,
FileDescriptor fd)\r\n at java.io.FileInputStream.open0(String
)\r\n at java.io.FileInputStream.open(String )\r\n at
java.io.FileInputStream..ctor(File file)\r\n at
java.util.zip.ClassStubZipEntry.getInputStream()\r\n at
java.util.zip.ZipFile.getInputStream(ZipEntry entry)\r\n at
java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n at
sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n at
java.net.URLClassLoader.getResourceAsStream(String name)\r\n at
org.springframework.core.io.ClassPathResource.getInputStream() in
ClassPathResource.java:line 166\r\n at
org.springframework.core.type.classreading.SimpleMetadataReader..ctor(Resource
resource, ClassLoader classLoader) in SimpleMetadataReader.java:line
50\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(Resource
resource) in SimpleMetadataReaderFactory.java:line 98\r\n at
org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource
resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line
89\r\n at
org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource
resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line
76\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(String
className) in SimpleMetadataReaderFactory.java:line 93\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.AutoConfigurationClasses..ctor(MetadataReaderFactory
metadataReaderFactory, Collection classNames) in
AutoConfigurationSorter.java:line 110\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(Collection
classNames) in AutoConfigurationSorter.java:line 54\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List
configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(AnnotationMetadata
metadata) in EnableAutoConfigurationImportSelector.java:line 89\r\n
at
org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors()
in ConfigurationClassParser.java:line 481"
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4
We are using the statement
“ikvm.runtime.Startup.addBootClassPathAssembly(Assembly.Load("OurLargeAssembly"));”.
We are not using any –classloader argument in the args of ikvmc.
We tried downloading the datastax driver and adding it to our large
assembly. It worked, but right after we faced the same problem with
/warning IKVMC0100: Class "org.jboss.netty.bootstrap.ServerBootstrap"
not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory" not
found/
/warning IKVMC0100: Class "org.jboss.netty.channel.group.ChannelGroup"
not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroupFuture" not found/
/ /
/*** INTERNAL COMPILER ERROR ***/
/ /
/PLEASE FILE A BUG REPORT FOR IKVM.NET WHEN YOU SEE THIS MESSAGE/
/ /
/ikvmc, Version=8.1.5717.0, Culture=neutral,
PublicKeyToken=13235d27fcbfff58/
/C:\Windows\Microsoft.NET\Framework64\v2.0.50727\/
/2.0.50727.5485 64-bit/
/ /
/System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt./
/ at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()/
/ at IKVM.Reflection.Impl.PdbWriter.Close()/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind,
ImageFileMachine imageFileMachine, ResourceSection resources, Int32
entryPointToken, Stream stream)/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind,
ImageFileMachine imageFileMachine, ResourceSection resources, Int32
entryPointToken, Stream stream)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String
assemblyFileName, Stream streamOrNull, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.Save(String
assemblyFileName, PortableExecutableKinds portableExecutableKind,
ImageFileMachine imageFileMachine)/
/ at IKVM.Internal.CompilerClassLoader.Save()/
/ at IKVM.Internal.CompilerClassLoader.Compile(String
runtimeAssembly, List`1 optionsList)/
/ at IkvmcCompiler.Compile(String[] args)/
/ at IkvmcCompiler.Main(String[] args)/
Any help would be appreciated.
*_________________________________*
*Pascal Dufresne*
Associate - Securitized Products Technology
Nomura Securities International
309 West 49th Street
New York, New York 10019-7316
Phone: +1 212 667 1381 Mobile: +1 646 920 9617
*/Connecting Markets East & West/*
www.nomura.com <http://www.nomura.com/>
PLEASE READ: This message is for the named person's use only. It may
contain confidential, proprietary or legally privileged information.
No confidentiality or privilege is waived or lost by any
mistransmission. If you receive this message in error, please delete
it and all copies from your system, destroy any hard copies and notify
the sender. You must not, directly or indirectly, use, disclose,
distribute, print, or copy any part of this message if you are not the
intended recipient. Nomura Holding America Inc., Nomura Securities
International, Inc, and their respective subsidiaries each reserve the
right to monitor all e-mail communications through its networks. Any
views expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is authorized
to state the views of such entity. Unless otherwise stated, any
pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted.
Any reference to the terms of executed transactions should be treated
as preliminary only and subject to our formal written confirmation.
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
Paul Chambre
2016-11-21 17:25:32 UTC
Permalink
Hi Volker,

This sounds similar to something I am seeing. In our app, we sometimes push
updated classes to a server. This does not work from the ikvmc DLL. I had
thought it might be another pathing issue, but it sounds more like what
you're mentioning here.

This is how we are loading class definitions for packaging and push:

InputStream inStream = classLoader.getResourceAsStream(path);


Am I correct in understanding that we'll need to use a more generic file
stream, instead, to load the classes under IKVM?

Thanks,
Paul
Post by Volker Berlin
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class resources
are not available IKVM that it try to generate a stub of the stream which
is failing. If this is the case then it look like a bug in IKVM.
Which version of IKVM do you use?
Volker
Hi folks,
I am looking for help on using IKVM with the spring framework. We are
using the ‘one large DLL’ solution to compile a large number of our
libraries. We recently added the spring framework to these.
Compiling everything together with ikvmc works but on initialization of
the spring framework, the ikvm class loader behaves differently than the
class loader of the standard JVM. The class loader of the standard JVM
tolerates that some extensions of the spring framework are missing, whereas
"ClassNotFoundException: com.datastax.driver.core.Cluster$Builder\r\n
at IKVM.Internal.ClassLoaderWrapper.LoadClass(String name, LoadMode
mode)\r\n at IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String
name)\r\n at IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n
at IKVM.StubGen.StubGenerator.WriteClass(Stream stream, TypeWrapper tw,
Boolean includeNonPublicInterfaces, Boolean includeNonPublicMembers,
Boolean includeSerialVersionUID, Boolean includeParameterNames)\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n at
IKVM.Internal.VirtualFileSystem.Open(String name, FileMode fileMode,
FileAccess fileAccess)\r\n at Java_java_io_FileDescriptor.open(String
name, FileMode fileMode, FileAccess fileAccess)\r\n at
java.io.FileDescriptor.open(String , FileMode , FileAccess )\r\n at
java.io.FileDescriptor.open(String , Int32 , Int32 )\r\n at
java.io.FileDescriptor.openReadOnly(String )\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name,
FileDescriptor fd)\r\n at java.io.FileInputStream.open0(String )\r\n
at java.io.FileInputStream.open(String )\r\n at
java.io.FileInputStream..ctor(File file)\r\n at java.util.zip.
ClassStubZipEntry.getInputStream()\r\n at java.util.zip.ZipFile.getInputStream(ZipEntry
entry)\r\n at java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n
at sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n at
java.net.URLClassLoader.getResourceAsStream(String name)\r\n at
org.springframework.core.io.ClassPathResource.getInputStream() in
ClassPathResource.java:line 166\r\n at org.springframework.core.type.
classreading.SimpleMetadataReader..ctor(Resource resource, ClassLoader
classLoader) in SimpleMetadataReader.java:line 50\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(Resource
resource) in SimpleMetadataReaderFactory.java:line 98\r\n at
org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource
resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line
89\r\n at org.springframework.boot.type.classreading.
ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource
resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line
76\r\n at org.springframework.core.type.classreading.
SimpleMetadataReaderFactory.getMetadataReader(String className) in
SimpleMetadataReaderFactory.java:line 93\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.
AutoConfigurationClasses..ctor(MetadataReaderFactory
metadataReaderFactory, Collection classNames) in
AutoConfigurationSorter.java:line 110\r\n at org.springframework.boot.
autoconfigure.AutoConfigurationSorter.getInPriorityOrder(Collection
classNames) in AutoConfigurationSorter.java:line 54\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List
configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at org.springframework.boot.autoconfigure.
EnableAutoConfigurationImportSelector.selectImports(AnnotationMetadata
metadata) in EnableAutoConfigurationImportSelector.java:line 89\r\n at
org.springframework.context.annotation.ConfigurationClassParser.
processDeferredImportSelectors() in ConfigurationClassParser.java:line
481"
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4
We are using the statement “ikvm.runtime.Startup.addBootClassPathAssembly(
Assembly.Load("OurLargeAssembly"));”. We are not using any –classloader
argument in the args of ikvmc.
We tried downloading the datastax driver and adding it to our large
assembly. It worked, but right after we faced the same problem with
*warning IKVMC0100: Class "org.jboss.netty.bootstrap.ServerBootstrap" not
found*
*warning IKVMC0100: Class
"org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory" not
found*
*warning IKVMC0100: Class "org.jboss.netty.channel.group.ChannelGroup" not
found*
*warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroupFuture" not found*
**** INTERNAL COMPILER ERROR ****
*PLEASE FILE A BUG REPORT FOR IKVM.NET <http://IKVM.NET> WHEN YOU SEE THIS
MESSAGE*
*ikvmc, Version=8.1.5717.0, Culture=neutral,
PublicKeyToken=13235d27fcbfff58*
*C:\Windows\Microsoft.NET\Framework64\v2.0.50727\*
*2.0.50727.5485 64-bit*
*System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.*
* at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()*
* at IKVM.Reflection.Impl.PdbWriter.Close()*
* at
IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream
stream)*
* at IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream
stream)*
* at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String
assemblyFileName, Stream streamOrNull, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine)*
* at IKVM.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName,
PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine)*
* at IKVM.Internal.CompilerClassLoader.Save()*
* at IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly,
List`1 optionsList)*
* at IkvmcCompiler.Compile(String[] args)*
* at IkvmcCompiler.Main(String[] args)*
Any help would be appreciated.
*_________________________________*
*Pascal Dufresne*
Associate - Securitized Products Technology
Nomura Securities International
309 West 49th Street
New York, New York 10019-7316
Phone: +1 212 667 1381 Mobile: +1 646 920 9617
*Connecting Markets East & West*
www.nomura.com
PLEASE READ: This message is for the named person's use only. It may
contain confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from
your system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
------------------------------------------------------------------------------
_______________________________________________
------------------------------------------------------------
------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
--
Paul Chambre

Senior Solutions Architect
(719) 465-6097

Illumon - Big Value From Big Data
Volker Berlin
2016-11-22 09:25:12 UTC
Permalink
Hi Paul,

What do you want do? There does not exists Java classes in the .NET
world. Your Java classes was compiled to .NET IL code.

Volker
Post by Paul Chambre
Hi Volker,
This sounds similar to something I am seeing. In our app, we sometimes
push updated classes to a server. This does not work from the ikvmc
DLL. I had thought it might be another pathing issue, but it sounds
more like what you're mentioning here.
InputStream inStream = classLoader.getResourceAsStream(path);
Am I correct in understanding that we'll need to use a more generic
file stream, instead, to load the classes under IKVM?
Thanks,
Paul
On Mon, Nov 21, 2016 at 5:06 AM, Volker Berlin
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class
resources are not available IKVM that it try to generate a stub of
the stream which is failing. If this is the case then it look like
a bug in IKVM.
Which version of IKVM do you use?
Volker
Post by P***@nomura.com
Hi folks,
I am looking for help on using IKVM with the spring framework. We
are using the ‘one large DLL’ solution to compile a large number
of our libraries. We recently added the spring framework to these.
Compiling everything together with ikvmc works but on
initialization of the spring framework, the ikvm class loader
behaves differently than the class loader of the standard JVM.
The class loader of the standard JVM tolerates that some
extensions of the spring framework are missing, whereas the ikvm
com.datastax.driver.core.Cluster$Builder\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClass(String name, LoadMode
mode)\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String
name)\r\n at
IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n at
IKVM.StubGen.StubGenerator.WriteClass(Stream stream, TypeWrapper
tw, Boolean includeNonPublicInterfaces, Boolean
includeNonPublicMembers, Boolean includeSerialVersionUID, Boolean
includeParameterNames)\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n
at IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n
at IKVM.Internal.VirtualFileSystem.Open(String name, FileMode
fileMode, FileAccess fileAccess)\r\n at
Java_java_io_FileDescriptor.open(String name, FileMode fileMode,
FileAccess fileAccess)\r\n at
java.io.FileDescriptor.open(String , FileMode , FileAccess
)\r\n at java.io.FileDescriptor.open(String , Int32 , Int32
)\r\n at java.io.FileDescriptor.openReadOnly(String )\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name,
FileDescriptor fd)\r\n at java.io.FileInputStream.open0(String
)\r\n at java.io.FileInputStream.open(String )\r\n at
java.io.FileInputStream..ctor(File file)\r\n at
java.util.zip.ClassStubZipEntry.getInputStream()\r\n at
java.util.zip.ZipFile.getInputStream(ZipEntry entry)\r\n at
java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n at
sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n
at java.net.URLClassLoader.getResourceAsStream(String name)\r\n
at org.springframework.core.io
<http://org.springframework.core.io>.ClassPathResource.getInputStream()
in ClassPathResource.java:line 166\r\n at
org.springframework.core.type.classreading.SimpleMetadataReader..ctor(Resource
resource, ClassLoader classLoader) in
SimpleMetadataReader.java:line 50\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(Resource
resource) in SimpleMetadataReaderFactory.java:line 98\r\n at
org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource
resource) in
ConcurrentReferenceCachingMetadataReaderFactory.java:line
89\r\n at
org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource
resource) in
ConcurrentReferenceCachingMetadataReaderFactory.java:line
76\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(String
className) in SimpleMetadataReaderFactory.java:line 93\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.AutoConfigurationClasses..ctor(MetadataReaderFactory
metadataReaderFactory, Collection classNames) in
AutoConfigurationSorter.java:line 110\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(Collection
classNames) in AutoConfigurationSorter.java:line 54\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List
configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(AnnotationMetadata
metadata) in EnableAutoConfigurationImportSelector.java:line 89\r\n at
org.springframework.context.annotation.ConfigurationClassParser.processDeferredImportSelectors()
in ConfigurationClassParser.java:line 481"
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4
We are using the statement
“ikvm.runtime.Startup.addBootClassPathAssembly(Assembly.Load("OurLargeAssembly"));”.
We are not using any –classloader argument in the args of ikvmc.
We tried downloading the datastax driver and adding it to our
large assembly. It worked, but right after we faced the same
problem with ‘elasticsearch’. But this time, adding this package
/warning IKVMC0100: Class
"org.jboss.netty.bootstrap.ServerBootstrap" not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory"
not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroup" not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroupFuture" not found/
/ /
/*** INTERNAL COMPILER ERROR ***/
/ /
/PLEASE FILE A BUG REPORT FOR IKVM.NET <http://IKVM.NET> WHEN YOU
SEE THIS MESSAGE/
/ /
/ikvmc, Version=8.1.5717.0, Culture=neutral,
PublicKeyToken=13235d27fcbfff58/
/C:\Windows\Microsoft.NET\Framework64\v2.0.50727\/
/2.0.50727.5485 64-bit/
/ /
/System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other memory
is corrupt./
/ at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()/
/ at IKVM.Reflection.Impl.PdbWriter.Close()/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder,
PEFileKinds fileKind, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine,
ResourceSection resources, Int32 entryPointToken, Stream stream)/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder,
PEFileKinds fileKind, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine,
ResourceSection resources, Int32 entryPointToken, Stream stream)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String
assemblyFileName, Stream streamOrNull, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.Save(String
assemblyFileName, PortableExecutableKinds portableExecutableKind,
ImageFileMachine imageFileMachine)/
/ at IKVM.Internal.CompilerClassLoader.Save()/
/ at IKVM.Internal.CompilerClassLoader.Compile(String
runtimeAssembly, List`1 optionsList)/
/ at IkvmcCompiler.Compile(String[] args)/
/ at IkvmcCompiler.Main(String[] args)/
Any help would be appreciated.
*_________________________________*
*Pascal Dufresne*
Associate - Securitized Products Technology
Nomura Securities International
309 West 49th Street
New York, New York 10019-7316
Phone: +1 212 667 1381 <tel:%2B1%20212%20667%201381> Mobile: +1
646 920 9617 <tel:%2B1%20646%20920%209617>
*/Connecting Markets East & West/*
www.nomura.com <http://www.nomura.com/>
PLEASE READ: This message is for the named person's use only. It
may contain confidential, proprietary or legally privileged
information. No confidentiality or privilege is waived or lost by
any mistransmission. If you receive this message in error, please
delete it and all copies from your system, destroy any hard
copies and notify the sender. You must not, directly or
indirectly, use, disclose, distribute, print, or copy any part of
this message if you are not the intended recipient. Nomura
Holding America Inc., Nomura Securities International, Inc, and
their respective subsidiaries each reserve the right to monitor
all e-mail communications through its networks. Any views
expressed in this message are those of the individual sender,
except where the message states otherwise and the sender is
authorized to state the views of such entity. Unless otherwise
stated, any pricing information in this message is indicative
only, is subject to change and does not constitute an offer to
deal at any price quoted. Any reference to the terms of executed
transactions should be treated as preliminary only and subject to
our formal written confirmation.
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
<https://lists.sourceforge.net/lists/listinfo/ikvm-developers>
------------------------------------------------------------------------------
_______________________________________________ Ikvm-developers
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
<https://lists.sourceforge.net/lists/listinfo/ikvm-developers>
--
Paul Chambre
Senior Solutions Architect
(719) 465-6097
Illumon - Big Value From Big Data
Paul Chambre
2016-11-22 13:43:53 UTC
Permalink
This isn't for use at the client side. This is to upload classes from the
client to the server to use at the server side... The server is, and will
always be, a Java process.
Post by Volker Berlin
Hi Paul,
What do you want do? There does not exists Java classes in the .NET world.
Your Java classes was compiled to .NET IL code.
Volker
Hi Volker,
This sounds similar to something I am seeing. In our app, we sometimes
push updated classes to a server. This does not work from the ikvmc DLL. I
had thought it might be another pathing issue, but it sounds more like what
you're mentioning here.
InputStream inStream = classLoader.getResourceAsStream(path);
Am I correct in understanding that we'll need to use a more generic file
stream, instead, to load the classes under IKVM?
Thanks,
Paul
Post by Volker Berlin
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class resources
are not available IKVM that it try to generate a stub of the stream which
is failing. If this is the case then it look like a bug in IKVM.
Which version of IKVM do you use?
Volker
Hi folks,
I am looking for help on using IKVM with the spring framework. We are
using the ‘one large DLL’ solution to compile a large number of our
libraries. We recently added the spring framework to these.
Compiling everything together with ikvmc works but on initialization of
the spring framework, the ikvm class loader behaves differently than the
class loader of the standard JVM. The class loader of the standard JVM
tolerates that some extensions of the spring framework are missing, whereas
"ClassNotFoundException: com.datastax.driver.core.Cluster$Builder\r\n
at IKVM.Internal.ClassLoaderWrapper.LoadClass(String name, LoadMode
mode)\r\n at IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String
name)\r\n at IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n
at IKVM.StubGen.StubGenerator.WriteClass(Stream stream, TypeWrapper tw,
Boolean includeNonPublicInterfaces, Boolean includeNonPublicMembers,
Boolean includeSerialVersionUID, Boolean includeParameterNames)\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n at
IKVM.Internal.VirtualFileSystem.Open(String name, FileMode fileMode,
FileAccess fileAccess)\r\n at Java_java_io_FileDescriptor.open(String
name, FileMode fileMode, FileAccess fileAccess)\r\n at
java.io.FileDescriptor.open(String , FileMode , FileAccess )\r\n at
java.io.FileDescriptor.open(String , Int32 , Int32 )\r\n at
java.io.FileDescriptor.openReadOnly(String )\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name,
FileDescriptor fd)\r\n at java.io.FileInputStream.open0(String )\r\n
at java.io.FileInputStream.open(String )\r\n at
java.io.FileInputStream..ctor(File file)\r\n at
java.util.zip.ClassStubZipEntry.getInputStream()\r\n at
java.util.zip.ZipFile.getInputStream(ZipEntry entry)\r\n at
java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n at
sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n at
java.net.URLClassLoader.getResourceAsStream(String name)\r\n at
org.springframework.core.io.ClassPathResource.getInputStream() in
ClassPathResource.java:line 166\r\n at org.springframework.core.type.
classreading.SimpleMetadataReader..ctor(Resource resource, ClassLoader
classLoader) in SimpleMetadataReader.java:line 50\r\n at
org.springframework.core.type.classreading.SimpleMetadataRea
derFactory.getMetadataReader(Resource resource) in
SimpleMetadataReaderFactory.java:line 98\r\n at
org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource
resource) in ConcurrentReferenceCachingMetadataReaderFactory.java:line
89\r\n at org.springframework.boot.type.classreading.ConcurrentReferen
ceCachingMetadataReaderFactory.getMetadataReader(Resource resource) in
ConcurrentReferenceCachingMetadataReaderFactory.java:line 76\r\n at
org.springframework.core.type.classreading.SimpleMetadataRea
derFactory.getMetadataReader(String className) in
SimpleMetadataReaderFactory.java:line 93\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSort
er.AutoConfigurationClasses..ctor(MetadataReaderFactory
metadataReaderFactory, Collection classNames) in
AutoConfigurationSorter.java:line 110\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSort
er.getInPriorityOrder(Collection classNames) in
AutoConfigurationSorter.java:line 54\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List
configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at org.springframework.boot.autoc
onfigure.EnableAutoConfigurationImportSelector.
selectImports(AnnotationMetadata metadata) in
EnableAutoConfigurationImportSelector.java:line 89\r\n at
org.springframework.context.annotation.ConfigurationClassPar
ser.processDeferredImportSelectors() in ConfigurationClassParser.java:line
481"
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4
We are using the statement “ikvm.runtime.Startup.addBootC
lassPathAssembly(Assembly.Load("OurLargeAssembly"));”. We are not using
any –classloader argument in the args of ikvmc.
We tried downloading the datastax driver and adding it to our large
assembly. It worked, but right after we faced the same problem with
*warning IKVMC0100: Class "org.jboss.netty.bootstrap.ServerBootstrap" not
found*
*warning IKVMC0100: Class
"org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory" not
found*
*warning IKVMC0100: Class "org.jboss.netty.channel.group.ChannelGroup"
not found*
*warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroupFuture" not found*
**** INTERNAL COMPILER ERROR ****
*PLEASE FILE A BUG REPORT FOR IKVM.NET <http://IKVM.NET> WHEN YOU SEE
THIS MESSAGE*
*ikvmc, Version=8.1.5717.0, Culture=neutral,
PublicKeyToken=13235d27fcbfff58*
*C:\Windows\Microsoft.NET\Framework64\v2.0.50727\*
*2.0.50727.5485 64-bit*
*System.AccessViolationException: Attempted to read or write protected
memory. This is often an indication that other memory is corrupt.*
* at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()*
* at IKVM.Reflection.Impl.PdbWriter.Close()*
* at
IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream
stream)*
* at IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder, PEFileKinds
fileKind, PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine, ResourceSection resources, Int32 entryPointToken, Stream
stream)*
* at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String
assemblyFileName, Stream streamOrNull, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine)*
* at IKVM.Reflection.Emit.AssemblyBuilder.Save(String assemblyFileName,
PortableExecutableKinds portableExecutableKind, ImageFileMachine
imageFileMachine)*
* at IKVM.Internal.CompilerClassLoader.Save()*
* at IKVM.Internal.CompilerClassLoader.Compile(String runtimeAssembly,
List`1 optionsList)*
* at IkvmcCompiler.Compile(String[] args)*
* at IkvmcCompiler.Main(String[] args)*
Any help would be appreciated.
*_________________________________*
*Pascal Dufresne*
Associate - Securitized Products Technology
Nomura Securities International
309 West 49th Street
New York, New York 10019-7316
Phone: +1 212 667 1381 <%2B1%20212%20667%201381> Mobile: +1 646 920 9617
<%2B1%20646%20920%209617>
*Connecting Markets East & West*
www.nomura.com
PLEASE READ: This message is for the named person's use only. It may
contain confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission. If
you receive this message in error, please delete it and all copies from
your system, destroy any hard copies and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any part
of this message if you are not the intended recipient. Nomura Holding
America Inc., Nomura Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail communications
through its networks. Any views expressed in this message are those of the
individual sender, except where the message states otherwise and the sender
is authorized to state the views of such entity. Unless otherwise stated,
any pricing information in this message is indicative only, is subject to
change and does not constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
------------------------------------------------------------------------------
_______________________________________________
------------------------------------------------------------------------------
_______________________________________________ Ikvm-developers mailing
lists/listinfo/ikvm-developers
--
Paul Chambre
Senior Solutions Architect
(719) 465-6097
Illumon - Big Value From Big Data
------------------------------------------------------------
------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
--
Paul Chambre

Senior Solutions Architect
(719) 465-6097

Illumon - Big Value From Big Data
Volker Berlin
2016-11-22 14:35:40 UTC
Permalink
Hi Paul,

Do you have a .NET client which contains Java class resources on the
classpath?

The problem is that the IKVM compiler will remove all class files. The
compiler can not detect that you want not execute this classes and want
send it to a server. My suggestion is to pack the classes for the server
in a zip file and add this zip file to your jar. Or simple rename the
extension of the class file. Then the IKVM compiler will handle it as
resources.

On the way to send executable code from the client to the server is a
very bad practice. This sounds like a very large security hole.

Volker
Post by Paul Chambre
This isn't for use at the client side. This is to upload classes from
the client to the server to use at the server side... The server is,
and will always be, a Java process.
On Tue, Nov 22, 2016 at 2:25 AM, Volker Berlin
Hi Paul,
What do you want do? There does not exists Java classes in the
.NET world. Your Java classes was compiled to .NET IL code.
Volker
Post by Paul Chambre
Hi Volker,
This sounds similar to something I am seeing. In our app, we
sometimes push updated classes to a server. This does not work
from the ikvmc DLL. I had thought it might be another pathing
issue, but it sounds more like what you're mentioning here.
InputStream inStream = classLoader.getResourceAsStream(path);
Am I correct in understanding that we'll need to use a more
generic file stream, instead, to load the classes under IKVM?
Thanks, Paul
On Mon, Nov 21, 2016 at 5:06 AM, Volker Berlin
It look like that your framework try to access the stream of
com.datastax.driver.core.Cluster$Builder.class. Because class
resources are not available IKVM that it try to generate a
stub of the stream which is failing. If this is the case then
it look like a bug in IKVM.
Which version of IKVM do you use?
Volker
Post by P***@nomura.com
Hi folks,
I am looking for help on using IKVM with the spring
framework. We are using the ‘one large DLL’ solution to
compile a large number of our libraries. We recently added
the spring framework to these.
Compiling everything together with ikvmc works but on
initialization of the spring framework, the ikvm class
loader behaves differently than the class loader of the
standard JVM. The class loader of the standard JVM tolerates
that some extensions of the spring framework are missing,
com.datastax.driver.core.Cluster$Builder\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClass(String name,
LoadMode mode)\r\n at
IKVM.Internal.ClassLoaderWrapper.LoadClassByDottedName(String
name)\r\n at
IKVM.Internal.CompiledTypeWrapper.get_InnerClasses()\r\n
at IKVM.StubGen.StubGenerator.WriteClass(Stream stream,
TypeWrapper tw, Boolean includeNonPublicInterfaces, Boolean
includeNonPublicMembers, Boolean includeSerialVersionUID,
Boolean includeParameterNames)\r\n at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Populate()\r\n
at
IKVM.Internal.VirtualFileSystem.VfsAssemblyClass.Open()\r\n
at IKVM.Internal.VirtualFileSystem.Open(String name,
FileMode fileMode, FileAccess fileAccess)\r\n at
Java_java_io_FileDescriptor.open(String name, FileMode
fileMode, FileAccess fileAccess)\r\n at
java.io.FileDescriptor.open(String , FileMode , FileAccess
)\r\n at java.io.FileDescriptor.open(String , Int32 ,
Int32 )\r\n at java.io.FileDescriptor.openReadOnly(String
)\r\n at Ja
va_java_io_FileInputStream.open0(Object _this, String name,
FileDescriptor fd)\r\n at
java.io.FileInputStream.open0(String )\r\n at
java.io.FileInputStream.open(String )\r\n at
java.io.FileInputStream..ctor(File file)\r\n at
java.util.zip.ClassStubZipEntry.getInputStream()\r\n at
java.util.zip.ZipFile.getInputStream(ZipEntry entry)\r\n
at java.util.jar.JarFile.getInputStream(ZipEntry ze)\r\n
at
sun.net.www.protocol.jar.JarURLConnection.getInputStream()\r\n
at java.net.URLClassLoader.getResourceAsStream(String
name)\r\n at org.springframework.core.io
<http://org.springframework.core.io>.ClassPathResource.getInputStream()
in ClassPathResource.java:line 166\r\n at
org.springframework.core.type.classreading.SimpleMetadataReader..ctor(Resource
resource, ClassLoader classLoader) in
SimpleMetadataReader.java:line 50\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(Resource
resource) in SimpleMetadataReaderFactory.java:line 98\r\n
at org.springframework.boot.type.classreading.Concurre
ntReferenceCachingMetadataReaderFactory.createMetadataReader(Resource
resource) in
ConcurrentReferenceCachingMetadataReaderFactory.java:line
89\r\n at
org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(Resource
resource) in
ConcurrentReferenceCachingMetadataReaderFactory.java:line 76\r\n at
org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(String
className) in SimpleMetadataReaderFactory.java:line 93\r\n
at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.AutoConfigurationClasses..ctor(MetadataReaderFactory
metadataReaderFactory, Collection classNames) in
AutoConfigurationSorter.java:line 110\r\n at
org.springframework.boot.autoconfigure.AutoConfigurationSorter.getInPriorityOrder(Collection
classNames) in AutoConfigurationSorter.java:line 54\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.sort(List
configurations) in EnableAutoConfigurationImportSelector.j
ava:line 193\r\n at
org.springframework.boot.autoconfigure.EnableAutoConfigurationImportSelector.selectImports(AnnotationMetadata
metadata) in EnableAutoConfigurationImportSelector.java:line
89\r\n at org.springframework.context.an
<http://org.springframework.context.an>notation.ConfigurationClassParser.processDeferredImportSelectors()
in ConfigurationClassParser.java:line 481"
IKVM 8.1
Spring 4.3.2.RELEASE
Spring boot 1.4.0.RELEASE
Target .NET 4
We are using the statement
“ikvm.runtime.Startup.addBootClassPathAssembly(Assembly.Load("OurLargeAssembly"));”.
We are not using any –classloader argument in the args of ikvmc.
We tried downloading the datastax driver and adding it to
our large assembly. It worked, but right after we faced the
same problem with ‘elasticsearch’. But this time, adding
/warning IKVMC0100: Class
"org.jboss.netty.bootstrap.ServerBootstrap" not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory"
not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroup" not found/
/warning IKVMC0100: Class
"org.jboss.netty.channel.group.ChannelGroupFuture" not found/
/ /
/*** INTERNAL COMPILER ERROR ***/
/ /
/PLEASE FILE A BUG REPORT FOR IKVM.NET <http://IKVM.NET>
WHEN YOU SEE THIS MESSAGE/
/ /
/ikvmc, Version=8.1.5717.0, Culture=neutral,
PublicKeyToken=13235d27fcbfff58/
/C:\Windows\Microsoft.NET\Framework64\v2.0.50727\/
/2.0.50727.5485 64-bit/
/ /
/System.AccessViolationException: Attempted to read or write
protected memory. This is often an indication that other
memory is corrupt./
/ at IKVM.Reflection.Impl.ISymUnmanagedWriter2.CloseMethod()/
/ at IKVM.Reflection.Impl.PdbWriter.Close()/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModuleImpl(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder,
PEFileKinds fileKind, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine,
ResourceSection resources, Int32 entryPointToken, Stream stream)/
/ at
IKVM.Reflection.Writer.ModuleWriter.WriteModule(StrongNameKeyPair
keyPair, Byte[] publicKey, ModuleBuilder moduleBuilder,
PEFileKinds fileKind, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine,
ResourceSection resources, Int32 entryPointToken, Stream stream)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.SaveImpl(String
assemblyFileName, Stream streamOrNull,
PortableExecutableKinds portableExecutableKind,
ImageFileMachine imageFileMachine)/
/ at IKVM.Reflection.Emit.AssemblyBuilder.Save(String
assemblyFileName, PortableExecutableKinds
portableExecutableKind, ImageFileMachine imageFileMachine)/
/ at IKVM.Internal.CompilerClassLoader.Save()/
/ at IKVM.Internal.CompilerClassLoader.Compile(String
runtimeAssembly, List`1 optionsList)/
/ at IkvmcCompiler.Compile(String[] args)/
/ at IkvmcCompiler.Main(String[] args)/
Any help would be appreciated.
*_________________________________*
*Pascal Dufresne*
Associate - Securitized Products Technology Nomura
Securities International 309 West 49th Street New York, New
York 10019-7316 Phone: +1 212 667 1381
<tel:%2B1%20212%20667%201381> Mobile: +1 646 920 9617
<tel:%2B1%20646%20920%209617>
*/Connecting Markets East & West/*
www.nomura.com <http://www.nomura.com/>
PLEASE READ: This message is for the named person's use
only. It may contain confidential, proprietary or legally
privileged information. No confidentiality or privilege is
waived or lost by any mistransmission. If you receive this
message in error, please delete it and all copies from your
system, destroy any hard copies and notify the sender. You
must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the
intended recipient. Nomura Holding America Inc., Nomura
Securities International, Inc, and their respective
subsidiaries each reserve the right to monitor all e-mail
communications through its networks. Any views expressed in
this message are those of the individual sender, except
where the message states otherwise and the sender is
authorized to state the views of such entity. Unless
otherwise stated, any pricing information in this message is
indicative only, is subject to change and does not
constitute an offer to deal at any price quoted. Any
reference to the terms of executed transactions should be
treated as preliminary only and subject to our formal
written confirmation.
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
<https://lists.sourceforge.net/lists/listinfo/ikvm-developers>
------------------------------------------------------------------------------
_______________________________________________
Ikvm-developers mailing list
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
<https://lists.sourceforge.net/lists/listinfo/ikvm-developers>
--
Paul Chambre
Senior Solutions Architect
(719) 465-6097 <tel:%28719%29%20465-6097>
Illumon - Big Value From Big Data
------------------------------------------------------------------------------
_______________________________________________ Ikvm-developers
https://lists.sourceforge.net/lists/listinfo/ikvm-developers
<https://lists.sourceforge.net/lists/listinfo/ikvm-developers>
--
Paul Chambre
Senior Solutions Architect
(719) 465-6097
Illumon - Big Value From Big Data
Loading...