cancel
Showing results for 
Search instead for 
Did you mean: 

MDM 7.1 SP03 Java API - setRetrieveResultCounts & taxonomy aliases = error

Former Member
0 Kudos

We just upgraded our test MDM system to 7.1 SP03 so we could use the new methods in the Java API to get result counts. However, we've run into a problem with the result counts when taxonomy aliases are being used.

The following code works when there are no taxonomy aliases defined in our MDM system, but as soon as we add any aliases, it fails:


        RetrieveLimitedRecordsCompoundCommand command = new RetrieveLimitedRecordsCompoundCommand(sessionContext);

        command.setPageIndex(pageIndex);
        command.setPageSize(pageSize);
        
        ResultDefinition resultDefinition = new ResultDefinition(PRODUCTS_TABLE);
        resultDefinition.addSelectField(CATALOG_NUMBER_FIELD);
        resultDefinition.addSelectField(LIST_PRICE);
        resultDefinition.addSelectField(PRODUCT_CATEGORY);
        resultDefinition.addSelectField(PRIMARY_IMAGE);
        
        command.setResultDefinitions(new ResultDefinition[] { resultDefinition });
        
        command.setRetrieveResultCounts(true);

        RecordId category = new RecordId(categoryId);

        // Set category search constraint
        if (categoryId > 0) {
			search.addSearchItem(new FieldSearchDimension(PRODUCT_CATEGORY),
        						 new PickListSearchConstraint(new MdmValue[] { new LookupValue(category) }));
        }

        command.setSearch(search);

        command.execute();

Here is there error we get:


com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Win32 structured exception occurred
	at com.sap.mdm.data.commands.RetrieveLimitedRecordsCompoundCommand.execute(RetrieveLimitedRecordsCompoundCommand.java:187)
	at com.baldor.mdm.Mdm.SearchProducts(Mdm.java:276)
	at com.baldor.beans.ProductSearch.search(ProductSearch.java:110)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.apache.el.parser.AstValue.invoke(AstValue.java:172)
	at org.apache.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
	at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:112)
	at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2327)
	at javax.faces.event.SystemEvent.processListener(SystemEvent.java:102)
	at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:1993)
	at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:1941)
	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:285)
	at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:243)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:114)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:311)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
	at java.lang.Thread.run(Unknown Source)
Caused by: com.sap.mdm.internal.protocol.manual.ServerException: Win32 structured exception occurred
	at com.sap.mdm.internal.protocol.manual.AbstractProtocolCommand.execute(AbstractProtocolCommand.java:126)
	at com.sap.mdm.data.commands.RetrieveLimitedRecordsCompoundCommand.execute(RetrieveLimitedRecordsCompoundCommand.java:183)
	... 32 more
Exception in thread "com.sap.mdm.internal.net.ConnectionPoolBase" java.lang.NullPointerException
	at com.sap.mdm.internal.net.ConnectionPoolBase.reserveConnection(ConnectionPoolBase.java:150)
	at com.sap.mdm.internal.net.ConnectionPoolBase.reserveConnection(ConnectionPoolBase.java:130)
	at com.sap.mdm.internal.net.ConnectionPoolBase.checkAndDiscardConnections(ConnectionPoolBase.java:494)
	at com.sap.mdm.internal.net.ConnectionPoolBase.run(ConnectionPoolBase.java:556)
	at java.lang.Thread.run(Unknown Source)

Also, if I monitor the MDM system I can see the memory usage goes up more than 200MB and the CPU is pegged for 5-10 seconds before getting the error on the client.

Is there something we can do to fix this?

Thanks,

Jonathan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Sorry about the formatting of the above message - for some reason the forum pulled out all the line breaks and ignored the tags...