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

Ask Your Question
0

Deploying Space - Grid Service Manager not found-Exception

Hey everyone,

I have been trying to deploy a Space from a Java application using the Admin-API. For that I used the following code, which I found in the documentation:

Admin admin = new AdminFactory().addGroup("gs_lookupgroup").createAdmin(); ProcessingUnit processingUnit = admin.getGridServiceManagers().deploy(new SpaceDeployment("mySpace").numberOfInstances(2).numberOfBackups(1));

Unfortunately it doesn't find any GSMs (the same with agents). Is it not enough to execute the gs-agent.bat to get the Manager started? I hope someone can help me out, since I am quite new to Gigaspaces.

Best wishes, Pia h4. Attachments

[mirror-config.xml|/upfiles/13759704541892845.xml]

[pu-config.xml|/upfiles/13759704545534346.xml]

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

asked 2011-03-09 08:20:59 -0500

morty gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0
  1. Use the waitForAtLeasetOne api
  2. Make sure you set the java.rmi.server.hostname system property at the client JVM to use one of the IP the client machine have.

Shay h4. Attachments

[mirror-config.xml|/upfiles/13759704547538367.xml]

[pu-config.xml|/upfiles/1375970454904867.xml]

answered 2011-03-09 09:33:43 -0500

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Thanks very much, that did the trick.

Best wishes,
Pia

Attachments

  1. mirror-config.xml
  2. pu-config.xml
morty gravatar imagemorty ( 2011-03-09 10:22:03 -0500 )edit

I have tried to add an external datasource to my spacecluster, but have been facing some problems. Currently I am running one pu (partitioned, 1 instance, 1 backup) with a mirror saving the data into my database via hibernate-mappings. It has been working just fine for a simple POJO (Bar.java) mapped to a single database table. Now I tried to add a second POJO (Foo.java) containing a List of Bar-Objects, which should be mapped to a foo-table and a foobar-table containing the relationship. Inserting the foo is working properly, but the foobar-table stays empty (no insert-command is triggered by hibernate).

I have tried to run this without gigaspaces (just hibernate) and it works, so the mapping-files seem ok. Any ideas on this? I have attached both pu.xml files.

Regards, Pia h4. Attachments

[mirror-config.xml|/upfiles/13759704554882905.xml]

[pu-config.xml|/upfiles/13759704554292205.xml]

morty gravatar imagemorty ( 2011-03-25 09:09:55 -0500 )edit

When mapping a Collection Data types or any other variable size field make sure the relevant database table column has a sufficient size that can accommodate the largest collection/variable size field you may have within your space object.

When fetching collections use the @Fetch(FetchMode.SELECT) annotation. This is a result of hibernate bug HHH-1751. The default @Fetch(FetchMode.JOIN) mode won't fetch all members.

Shay

shay hassidim gravatar imageshay hassidim ( 2011-03-25 10:50:07 -0500 )edit

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: 2011-03-09 08:20:59 -0500

Seen: 130 times

Last updated: Mar 09 '11