Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

Gigaspaces with MS Excel - InitJvm Exception

Hi

Getting "not able init JVM exception" while connecting to space from MS Excel Addin. Tryed on 5.2, 6.5, 6.6.2 versions and were getting similar exception. I feel we are missing some thing important. Would be great if some one can shed some light. Thanks in advance.

6.6.2

"GigaSpaces.NetToJava.NetToJavaException: Attempted to execute command when no Jvm exists, InitJVM must be called to create a Jvm at GigaSpaces.NetToJava.JVMBridge.TraceAndThrowNetToJavaException(String exceptionMessage) at GigaSpaces.NetToJava.JVMBridge.ExecuteCommand(Byte[] command) at GigaSpaces.Core.Internal.Pbs.Commands.PbsDispatcher.Execute(PbsMemoryStream output, DispatcherObjectProxy proxy) at GigaSpaces.Core.Internal.Pbs.Commands.ISpaceProxy.PbsISpaceProxyFindSpace.Execute(String spaceUrl, CmdSpaceProxy injectedSpace, IDictionary2 properties, View[] views, SecurityContext securityContext, SpaceConfig spaceConfig) at GigaSpaces.Core.Internal.Providers.Cmd.CmdSpaceProxyFactory.FindSpaceInternal(String url, Dictionary2 properties, ISpaceProxy proxy, View[] views, SecurityContext securityContext, SpaceConfig spaceConfig) at GigaSpaces.Core.Internal.SpaceProxyFactory.FindSpaceMacroReplace(String spaceUrl, Dictionary`2 properties, ISpaceProxy proxy, View[] views, SecurityContext securityContext, SpaceConfig spaceConfig) at GigaSpaces.Core.SpaceProxyProviderFactory.FindSpace(String url) at GSUDFSample.GSUDFSample.ConnectToSpace() in C:\VSProjects\GS_UDF_Sample\GSUDFSample\GSUDFSample.cs:line 48"

-Venkat

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2791]{quote}

asked 2009-01-07 16:55:38 -0500

venkatg gravatar image

updated 2013-08-08 09:52:00 -0500

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Which example exactly are you trying to run? Do you get this exception when you run the example as if without any modifications?

Increase the logging level to verbose of the JVMBridge component by editing the app.config and put:

<configuration> <configsections> <section name="GigaSpaces" type="GigaSpaces.Core.Configuration.GigaSpacesCoreConfiguration, GigaSpaces.Core"/> </configsections> <gigaspaces> <provider type="Jet"> <jetprovidersettings logginglevel="Verbose"/> </provider> </gigaspaces> </configuration>

You'll need to use some kind of a trace viewer to see the output, I recommend debug view. I don't think the JVMBridge logs will appear in windoes event viewer since its a dll which is part native but you can have a look. Please note that this is for debug information purposes only, it creates a lot of output and should not be used in general.

Edited by: Eitan Yanovsky on Jan 8, 2009 1:01 AM

answered 2009-01-08 00:37:52 -0500

eitany gravatar image
edit flag offensive delete link more

Comments

I am trying to write an Excel Addin to populate data from Space.

Changing the JVM mem size to 2 and 8 solved my problem. I donno why its not taking more then that size. Need to check how much it can scale with that low memory. Any inputs or suggestions would be great.

Thanks
Venkat

venkatg gravatar imagevenkatg ( 2009-01-09 09:07:07 -0500 )edit

I am trying to write an Excel Addin to populate data from Space.

Changing the JVM mem size to 2 and 8 solved my problem. I donno why its not taking more then that size. Need to check how much it can scale with that low memory. Any inputs or suggestions would be great.

Thanks Venkat

venkatg gravatar imagevenkatg ( 2009-01-09 09:08:07 -0500 )edit

Since the excel is only a client and the data is stored in a remote space in a different machine or a process, the memory consumption is not affected by the number of objects in the space.

eitany gravatar imageeitany ( 2009-01-09 10:15:11 -0500 )edit

Thanks for the reply Eitan. yaa you are right but actually we are trying for huge data from different space. Any how thanks for the suggestions will try and see how it goes and one more question is there a way or workaround for not putting Gigaspaces dll's in Excel folder?

Thanks venkat

venkatg gravatar imagevenkatg ( 2009-01-09 12:21:39 -0500 )edit

Even though you have a limited Jvm heap size, once the objects are read and rebuilt as .NET objects, they are no longer sustained in the Jvm heap and they are being hosted by the CLR, which is not limited by the Jvm Heapsize, in fact there's no correlation between the Jvm heap and the CLR heap. Therefore you can locally store objects that exceeds much more than 8MB. Try not to read the objects in one huge batch, but in small batches or using SpaceIterator, that will make sure you will not need to allocate too much memory inside the Jvm heap.

I am not sure about the placement of the dll, my first hunch says that you must have it in the same directory because this is how .NET framework works, all the dependencies need to be placed locally at the same directory. However, there might be some tricks to overcome this limitation but I am not too familiar with such. Another thing is that you don't have to install XAP.NET on the machine locally, though it is recommended, you can configure the runtime directory and if needed, the location of the jvm dll, in the relevant app.config, in your case the excel.config file. for more information see: http://www.gigaspaces.com/wiki/displa... (RuntimeDir) http://www.gigaspaces.com/wiki/displa... (Jvm dll location)

The runtime directory is either a XAP installation directory or XAP.NET installation pointing to its undelying Runtime directory. Make sure you do not mix versions if you take this approach.

Eitan

Edited by: Eitan Yanovsky on Jan 9, 2009 1:46 PM

Edited by: Eitan Yanovsky on Jan 9, 2009 1:47 PM

eitany gravatar imageeitany ( 2009-01-09 13:39:55 -0500 )edit
0

Do you have JVM dll in your PATH?

Shay

answered 2009-01-07 17:00:20 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2009-01-07 16:55:38 -0500

Seen: 65 times

Last updated: Jan 08 '09