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

Ask Your Question
0

Error handling read/take/change. multiple

I get this error when running one of my spaces, using Gigaspaces 10:

[com.gigaspaces.space.engine] - Error handling read/take/change. multiple; Caused by: java.lang.IllegalArgumentException: Unknown property name 'PtaOptimalCost' in type ...

The field PtaOptimalCost is in the java class file for the type. The field name starts with a lowercase 'p', but the getter and setter use an uppercase 'P'. Is the problem that the field name needs to start with an uppercase 'P'?

asked 2017-03-20 09:55:45 -0500

LexLuthor gravatar image
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

Your space class must follow the JavaBeans conventions.

Can you post the relevant sections of the space class ?

answered 2017-03-20 10:03:38 -0500

shay hassidim gravatar image
edit flag offensive delete link more
0

When you open your gs-ui, or webui and inspect the object definition, is the property listed as part of the class?

answered 2017-03-24 08:44:12 -0500

Dixson Huie gravatar image
edit flag offensive delete link more

Comments

Yes, the property is listed there.

One thing we found is that when making the query on the space from a certain process, we don't see this issue. But when we make the query from one space to a separate space, then we see the issue. Going from a regular Java process to the space doesn't seem to have any problems, but going from one space to another space does.

Another thing is that when the query is made, we build a SQLQuery object using this constructor:

SQLQuery<algobrokerpeerrow> query = new SQLQuery<algobrokerpeerrow>(AlgoBrokerPeerRow.class, filterClause);

I'm passing the class itself as an argument to the constructor. Maybe I should try using the SQLQuery constructor that takes a class name as a string, instead of the class itself, and see if that fixes the issue.

LexLuthor gravatar imageLexLuthor ( 2017-03-24 08:50:33 -0500 )edit

I don't think passing the class name as a string will help, because the constructor using the class is just calling getName(). Is the property listed as part of the class in the source and destination space?

Dixson Huie gravatar imageDixson Huie ( 2017-03-24 09:04:16 -0500 )edit

The source space doesn't know about the class that is having the missing property problem. It just makes a call into the destination space, the destination space internally uses that class, then returns results to the source space. Does the type of the property matter? This property is of type BigDecimal, and I don't know if that would cause any issues.

Also I notice someone in July 2016 posted a question about the same topic, where his class was supposed to be missing a property, but he said it had that property. That thread ended without any resolution, but I wonder if he was able to resolve the issue.

LexLuthor gravatar imageLexLuthor ( 2017-03-24 09:24:20 -0500 )edit

Please open a support case for this. We can take a closer look at this.

Dixson Huie gravatar imageDixson Huie ( 2017-03-24 09:43:21 -0500 )edit
0

@Entity
@Table(name= "AtTradeAlgoBrokerAggregate")
//@Inheritance(strategy=InheritanceTy...
@SpaceClass(persist=false)
public class AlgoBrokerPeerRow implements IAlgoBrokerAggregate < AlgoBrokerPeerRow > {

private static final long serialVersionUID = -7556230527697899912L;

...

private BigDecimal ptaOptimalCost;

...

public BigDecimal getPtaOptimalCost() {
    return ptaOptimalCost;
}

public void setPtaOptimalCost(BigDecimal ptaOptimalCost) {
    this.ptaOptimalCost = ptaOptimalCost;
}

...

}

answered 2017-03-20 10:35:58 -0500

LexLuthor gravatar image

updated 2017-03-20 10:39:30 -0500

edit flag offensive delete link more

Comments

Here is the stack trace, if that helps:

    at com.gigaspaces.internal.server.storage.AbstractEntryData.getPropertyValue(AbstractEntryData.java:114)
    at com.gigaspaces.internal.server.storage.AbstractEntryData.getPathValue(AbstractEntryData.java:254)
    at com.gigaspaces.internal.query.EntryHolderAggregatorContext.getPathValueImpl(EntryHolderAggregatorContext.java:62)
    at com.gigaspaces.query.aggregators.SpaceEntriesAggregatorContext.getPathValue(SpaceEntriesAggregatorContext.java:33)
    at com.gigaspaces.query.aggregators.OrderByKey.initialize(OrderByKey.java:47)
    at com.gigaspaces.query.aggregators.OrderByAggregator.aggregate(OrderByAggregator.java:79)
    at com.gigaspaces.query.aggregators.SpaceEntriesAggregatorContext.aggregate(SpaceEntriesAggregatorContext.java:62)
    at com.gigaspaces.internal.query.EntryHolderAggregatorContext.scan(EntryHolderAggregatorContext.java:32)
    at com.gigaspaces.internal.server.space.SpaceEngine.performReadTemplateOnEntryCoreSA(SpaceEngine.java:5142)
    at com.gigaspaces.internal.server.space.SpaceEngine.performTemplateOnEntryCoreSA_impl(SpaceEngine.java:5080)
    at com.gigaspaces.internal.server.space.SpaceEngine.performTemplateOnEntryCoreSA(SpaceEngine.java:4935)
    at com.gigaspaces.internal.server.space.SpaceEngine.performTemplateOnEntryXtnAwareSA(SpaceEngine.java:4865)
    at com.gigaspaces.internal.server.space.SpaceEngine.performTemplateOnEntrySA(SpaceEngine.java:4608)
    at com.gigaspaces.internal.server.space.SpaceEngine.performTemplate(SpaceEngine.java:4446)
    at com.gigaspaces.internal.server.space.SpaceEngine.getMatchedEntriesAndOperateSA_Entry(SpaceEngine.java:4378)
    at com.gigaspaces.internal.server.space.SpaceEngine.getMatchedEntriesAndOperateSA_Scan(SpaceEngine.java:4298)
    at com.gigaspaces.internal.server.space.SpaceEngine.getMatchedEntriesAndOperateSA_Type(SpaceEngine.java:4428)
    at com.gigaspaces.internal.server.space.SpaceEngine.executeOnMatchingEntries(SpaceEngine.java:4257)
    at com.j_spaces.core.server.processor.Processor.executeBatchSearchAndProcessing(Processor.java:2848)
    at com.j_spaces.core.server.processor.Processor.handleDirectMultipleReadTakeSA(Processor.java:2621)
    at com.gigaspaces.internal.server.space.SpaceEngine.readMultiple(SpaceEngine.java:2126)
    at com.gigaspaces.internal.server.space.SpaceEngine.aggregate(SpaceEngine.java:6875)
    at com.gigaspaces.internal.server.space.operations.AggregateEntriesSpaceOperation.execute(AggregateEntriesSpaceOperation.java:26)
    at com.gigaspaces.internal.server.space.operations.AggregateEntriesSpaceOperation.execute(AggregateEntriesSpaceOperation.java:13)
    at com.gigaspaces.internal.server.space.operations.SpaceOperationsExecutor.executeOperation(SpaceOperationsExecutor.java:78)
    at com.gigaspaces.internal.server.space.SpaceImpl.executeOperation(SpaceImpl.java:1826)
    at com.gigaspaces.internal.lrmi.stubs.LRMISpaceImpl.executeOperation(LRMISpaceImpl.java:850)
    at com.gigaspaces.internal.remoting.routing.embedded.EmbeddedRemoteOperationRouter.executeImpl(EmbeddedRemoteOperationRouter.java:75)
    at com.gigaspaces.internal.remoting.routing.embedded.EmbeddedRemoteOperationRouter.execute(EmbeddedRemoteOperationRouter.java:60)
    at com.gigaspaces.internal.client.spaceproxy.router.SpaceProxyRouter.execute(SpaceProxyRouter.java:232)
    at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplAggregateAction.aggregate(SpaceProxyImplAggregateAction.java:43)

@ at com.j_spaces.jdbc.executor.AbstractQueryExecutor.executeTemplate(AbstractQueryExecutor.java:215) at com.j_spaces.jdbc.executor.QueryExecutor.execute(QueryExecutor.java:116) at com.j_spaces.jdbc.parser.AndNode.accept(AndNode.java:76) at com.j_spaces.jdbc.executor.AbstractQueryExecutor.traverseExpressionTree(AbstractQueryExecutor.java:182) at com.j_spaces.jdbc.executor.QueryExecutor.execute(QueryExecutor.java:252) at com.j_spaces.jdbc.SelectQuery.executeQuery(SelectQuery.java:365) at com.j_spaces.jdbc.SelectQuery.executeOnSpace(SelectQuery.java:228) at com.j_spaces.core.client.sql.QueryManager.readTake(QueryManager.java:181) at com.j_spaces.core.client.sql.QueryManager.readTakeMultiple(QueryManager.java:148) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeMultipleAction.newReadTakeMultiple(SpaceProxyImplReadTakeMultipleAction.java:85) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeMultipleAction.readMultiple(SpaceProxyImplReadTakeMultipleAction.java:36) at com.gigaspaces.internal.client.spaceproxy.actions.SpaceProxyImplReadTakeMultipleAction.readMultiple(SpaceProxyImplReadTakeMultipleAction.java:26) at com.gigaspaces.internal.client.spaceproxy.actions.AbstractSpaceProxyActionManager.readMultiple(AbstractSpaceProxyActionManager.java:230) at com.gigaspaces.internal.client.spaceproxy.AbstractSpaceProxy.readMultiple(AbstractSpaceProxy.java:282) at ...(more)

LexLuthor gravatar imageLexLuthor ( 2017-03-23 15:57:11 -0500 )edit
0

It looks like it's a case sensitivity issue. The private field is named ptaOptimalCost, the getter and setter are named getPtaOptimalCost and setPtaOptimalCost. When I changed the code to access ptaOptimalCost instead of PtaOptimalCost, the problem went away. This problem happens in Gigaspaces 10, but didn't happen in Gigaspaces 9.

answered 2017-03-24 16:02:38 -0500

LexLuthor 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: 2017-03-20 09:55:45 -0500

Seen: 57 times

Last updated: Mar 24