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

Ask Your Question
0

MongoDB recovery error with JMS message metadata

I am using open source XAP 12.2. I want to use MongoDB for persistency. In my client application, I set up a JMS connection to the space via Camel:

GSJMSAdmin admin = GSJMSAdmin.getInstance();
connectionFactory = admin.getConnectionFactory(spaceURL);
camelContext.addComponent("space-jms", JmsComponent.jmsComponentAutoAcknowledge(connectionFactory));

This causes database recovery to fail with a null pointer exception. The error happens at line 200 of com.gigaspaces.internal.sync.SynchronizationStorageAdapter:

199 final ITypeDesc typeDescriptor = (ITypeDesc) metadataIterator.next();
200 final String[] superClassesNames = typeDescriptor.getRestrictSuperClassesNames();

The problem is that typeDescriptor is null.

The problem is with this metadata record (note that the first element is null):

[null, TypeDesc[typeName=com.j_spaces.jms.GSMessageImpl, checksum=955179855, codebase=null, superTypesNames=[com.j_spaces.jms.GSMessageImpl, com.j_spaces.core.client.MetaDataEntry, java.lang.Object], supportsDynamicProperties=false, supportsOptimisticLocking=false, systemType=false, replicatable=true, blobstoreEnabled=true, storageType=OBJECT, fifoSupport=OPERATION, idPropertyName=null, idAutoGenerate=false, routingPropertyName=DestinationName, fifoGroupingPropertyName=null, sequenceNumberPropertyName=null, objectClass=, documentWrapperClass=com.gigaspaces.document.SpaceDocument, fixedProperties=[Property[name=Body, type=java.lang.Object], Property[name=DestinationName, type=java.lang.String], Property[name=JMSCorrelationID, type=java.lang.Object], Property[name=JMSDeliveryMode, type=java.lang.Integer], Property[name=JMSDestination, type=javax.jms.Destination], Property[name=JMSExpiration, type=java.lang.Long], Property[name=JMSMessageID, type=java.lang.String], Property[name=JMSPriority, type=java.lang.Integer], Property[name=JMSRedelivered, type=java.lang.Boolean], Property[name=JMSReplyTo, type=javax.jms.Destination], Property[name=JMSTimestamp, type=java.lang.Long], Property[name=JMSType, type=java.lang.String], Property[name=Properties, type=java.util.Map]], indexes=[SpaceIndex[name=DestinationName, type=BASIC, unique=false]], fifoGroupingIndexes=[]], TypeDesc[typeName=Loan, checksum=1972800475, codebase=null, superTypesNames=[Loan, java.lang.Object], supportsDynamicProperties=true, supportsOptimisticLocking=false, systemType=false, replicatable=true, blobstoreEnabled=true, storageType=OBJECT, fifoSupport=OFF, idPropertyName=LoanId, idAutoGenerate=false, routingPropertyName=LoanId, fifoGroupingPropertyName=null, sequenceNumberPropertyName=null, objectClass=, documentWrapperClass=com.gigaspaces.document.SpaceDocument, fixedProperties=[Property[name=LoanId, type=java.lang.Object]], indexes=[SpaceIndex[name=LoanId, type=BASIC, unique=true]], fifoGroupingIndexes=[]]]

There is no issue when I don't set up the JMS connection. How can I get around this? Thank you.

asked 2018-05-24 15:24:14 -0500

jsalvati gravatar image

updated 2018-05-25 10:32:26 -0500

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

Hi, Please use the GigaSpaces support portal in order to issue a case and discuss this problem.

Regards, Ester

answered 2018-05-28 05:46:42 -0500

Ester gravatar image
edit flag offensive delete link more

Comments

Ester, thanks for the reply. The problem seems to be caused by missing super-type descriptors. Database recovery started working fine after I added these lines to my client application:

space.getTypeManager().registerTypeDescriptor(MetaDataEntry.class); space.getTypeManager().registerTypeDescriptor(GSMessageImpl.class); space.getTypeManager().registerTypeDescriptor(GSMapMessageImpl.class);

However, this is not a perfect solution because MetaDataEntry is marked as deprecated. Also, is it possible to register super-type descriptors in XML?

jsalvati gravatar imagejsalvati ( 2018-05-29 08:02:35 -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: 2018-05-24 15:24:14 -0500

Seen: 152 times

Last updated: May 28