cancel
Showing results for 
Search instead for 
Did you mean: 

Null Pointer Exception in HWC when using Personalisation Key as Input for Load Argument for MBO

Former Member
0 Kudos

Hey there,

I have a very strange Error message. I programmed a "Funktionsbaustein" in my SAP Backend. It takes the Customer Number KUNNR and gives me back a transaktion history with some financial data. I can create, delyoy and test an MBO and I recieve values from the Backend. But when I call the findAll operation inside the HWC /Android Emulator) I get the follwoing Exception:

A Personalisation Key is Mapped to a Key that point to an Edit Box. The App did almost the same as the Flight List example from the Sybase Doku. I tried every solution that came to my mind like, set every possible default value, make the Personalisation Key nullable or not nullable, the same with the attribute mapping of the MBO, but nothing works.

Per Definition the KUNNR is nullable and I cannot change this. But I have no Idea if that is the reason for this Error.

That's the Error Dump from the SCC:

2012-11-01 14:18:21.996  Subsystem=Error  Application ID=HWC, Application Connection ID=Simulator92ee4434-97e6-4e6c-bfa7-8c40fc01e5eb__HWC, User=supAdmin@admin, Correlation ID=, Package=kundenstammdaten:1.0, MBO=Kundenfinanzdaten, Operation=, Thread ID=4187, Node ID=tdccecs1p, Error=java.lang.RuntimeException was thrown by transaction com.sybase.djc.transaction.TransactionContext.*AnonymousTransaction*\njava.lang.RuntimeException: Failed to execute JCA operation

          at com.sybase.vader.da.jca.JcaInteractionOperation.execute(JcaInteractionOperation.java:182)

          at com.sybase.vader.statistics.MonitoringOperation.execute(MonitoringOperation.java:72)

          at com.sybase.vader.service.interaction.BranchingInteractionOperation.getRootRecord(BranchingInteractionOperation.java:65)

          at com.sybase.vader.service.interaction.BranchingInteractionOperation.execute(BranchingInteractionOperation.java:41)

          at com.sybase.vader.core.vdb.interaction.InteractionQueryOperation.executeQuery(InteractionQueryOperation.java:53)

          at com.sybase.vader.cache.VTFindAllQueryOperation.executeQuery(VTFindAllQueryOperation.java:20)

          at com.sybase.vader.cache.PKMergeProcessor.executeCurrentQuery(PKMergeProcessor.java:308)

          at com.sybase.vader.cache.PKMergeProcessor.actualAccumulateDeltas(PKMergeProcessor.java:385)

          at com.sybase.vader.cache.PKMergeProcessor.accumulateDeltas(PKMergeProcessor.java:445)

          at com.sybase.vader.cache.PKMergeProcessor.accumulateDeltas(PKMergeProcessor.java:738)

          at com.sybase.vader.cache.MonitoringMergeProcessor.accumulateDeltas(MonitoringMergeProcessor.java:90)

          at com.sybase.vader.cache.SimpleRefreshManager.accumulateDeltas(SimpleRefreshManager.java:1114)

          at com.sybase.vader.cache.SimpleRefreshManager.refreshLoadGroup(SimpleRefreshManager.java:926)

          at com.sybase.vader.cache.SimpleRefreshManager.refreshLoadGroups(SimpleRefreshManager.java:894)

          at com.sybase.vader.cache.SimpleRefreshManager.access$600(SimpleRefreshManager.java:32)

          at com.sybase.vader.cache.SimpleRefreshManager$2.invoke(SimpleRefreshManager.java:454)

          at com.sybase.vader.djc.environment.MmsDjcTransactionManager.internalInvoke(MmsDjcTransactionManager.java:52)

          at com.sybase.vader.djc.environment.MmsDjcTransactionManager.access$000(MmsDjcTransactionManager.java:13)

          at com.sybase.vader.djc.environment.MmsDjcTransactionManager$1.invoke(MmsDjcTransactionManager.java:28)

          at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:845)

          at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:747)

          at com.sybase.vader.djc.environment.MmsDjcTransactionManager.invokeRequiresNew(MmsDjcTransactionManager.java:31)

          at com.sybase.vader.cache.SimpleRefreshManager.internalRefreshAsNeeded(SimpleRefreshManager.java:495)

          at sun.reflect.GeneratedMethodAccessor394.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at com.sybase.vader.cache.CacheUtil.invokeWithDeadlockRetry(CacheUtil.java:557)

          at com.sybase.vader.cache.SimpleRefreshManager.invokeWithDeadlockRetry(SimpleRefreshManager.java:1315)

          at com.sybase.vader.cache.SimpleRefreshManager.refreshAsNeeded(SimpleRefreshManager.java:378)

          at com.sybase.vader.cache.SimpleRefreshManager.refreshAsNeeded(SimpleRefreshManager.java:1242)

          at com.sybase.vader.cache.CacheStatisticsRefreshManager.refreshAsNeeded(CacheStatisticsRefreshManager.java:204)

          at com.sybase.vader.cache.CompositeRefreshManager.refreshAsNeeded(CompositeRefreshManager.java:138)

          at com.sybase.vader.mms.DataServiceImpl.beforeDownload(DataServiceImpl.java:523)

          at Kundenstammdaten.server.Kundenfinanzdaten.searchHandler(Kundenfinanzdaten.java:1593)

          at Kundenstammdaten.server.intrnl.Kundenfinanzdaten_ML.onMessage(Kundenfinanzdaten_ML.java:25)

          at Kundenstammdaten.server.KundenstammdatenDB.dispatchReceivedMessage(KundenstammdatenDB.java:176)

          at Kundenstammdaten.server.intrnl.KundenstammdatenDB_ML.onMessage(KundenstammdatenDB_ML.java:13)

          at com.sybase.sup.server.mbs.MessageReceiver.processMessage(MessageReceiver.java:633)

          at com.sybase.sup.server.mbs.MboRequestHandler.execute(MboRequestHandler.java:86)

          at com.sybase.sup.server.msgchannel.internal.MessageChannelInternal.dispatch(MessageChannelInternal.java:102)

          at com.sybase.sup.server.msgchannel.internal.MessageChannelInternal_DJC.access$001(MessageChannelInternal_DJC.java:4)

          at com.sybase.sup.server.msgchannel.internal.MessageChannelInternal_DJC$1.invoke(MessageChannelInternal_DJC.java:25)

          at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:845)

          at com.sybase.djc.transaction.TransactionManager.invokeRequiresNew(TransactionManager.java:747)

          at com.sybase.sup.server.msgchannel.internal.MessageChannelInternal_DJC.dispatch(MessageChannelInternal_DJC.java:39)

          at com.sybase.sup.server.msgchannel.internal.InboundMoIIOPTransportImpl.process(InboundMoIIOPTransportImpl.java:127)

          at com.sybase.sup.server.msgchannel.internal.InboundMoIIOPTransportImpl.execute(InboundMoIIOPTransportImpl.java:70)

          at com.sybase.sup.server.msgchannel.internal.InboundMoIIOPTransportImpl_DJC.$invoke(InboundMoIIOPTransportImpl_DJC.java:100)

          at com.sybase.djc.rmi.iiop.server.MessageHandler.processRequest(MessageHandler.java:798)

          at com.sybase.djc.rmi.iiop.server.MessageHandler.run(MessageHandler.java:310)

          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

          at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.NullPointerException

          at com.sybase.vader.jca.sap3.connector.cci.SapFunctionModuleDynamicMetadataMappedRecord.put(SapFunctionModuleDynamicMetadataMappedRecord.java:365)

          at com.sybase.vader.jca.sap3.connector.cci.SapRootInteraction.execute(SapRootInteraction.java:161)

          at com.sybase.vader.da.jca.JcaInteractionOperation.execute(JcaInteractionOperation.java:154)

          ... 52 more

I'm thankful for every help with this.

Greetings David

Accepted Solutions (1)

Accepted Solutions (1)

david_brandow
Contributor
0 Kudos

Its possible someone from the SUP server team, specifically the DS team, will recognize this error, but unfortunately I don't. Based on the way that is manifesting, I don't imagine we'll be able to diagnose it without substantially more information, such as the logs and so forth. Your best bet, frankly, is to open up an OSS message, or something similar, and have us help you through that mechanism.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hey David,

I only have the log output. I guess that something went wrong at the creation of the Fuba. Solution sounds strange, but it worked. I wonder because erverything in the Preview MBO View worked fine, also the Fuba inside SAP worked. Only inside the HWC an error appeard. I can send you my coding if you like.

david_brandow
Contributor
0 Kudos

I won't go into the detailed explanation to avoid boring you, but the code that runs the preview in the tooling is not entirely identical to the code that runs in the server at runtime. Its obviously very, very close, but there are subtle differences that sometimes show themselves at times like these. It can also depend on how the request is being sent, whether via a native Object API-based application or as a workflow/hybrid app application, there are different paths to the same core code that can occasionally make a difference as well.

Probably the most helpful part would be the MBO definition and generated deployment artifacts in the project folder. We shouldn't need the underlying SAP part of the equation, I don't think, since the issue here is that its never actually getting to it.

I've asked a colleague to check in on this thread as well, but he won't be able to do so until Monday at the earliest, unfortunately.

Former Member
0 Kudos

Hey David, thanks for your responding.

So it finally worked.

I copied my coding from my Fuba to a new created Fuba, then it worked like it should work. Thats all.

Greetings

David

Former Member
0 Kudos

So here's an update.

Perhaps it is some sort of caching error or whatever. If you restart the SUP Server you do not have to rebuild your Fuba and MBO, after restart the Error disapers.

Former Member
0 Kudos

So here is the Solution:

I created a new RFC Fuba, copied 1 to 1 my coding from the existing one. And it works.

Hmm...

david_brandow
Contributor
0 Kudos

Hmm...well, I'm certainly glad you've gotten it working, but we're obviously left with a mystery. Again, if its possible for you to log an issue with us so that we can investigate, that would be ideal.

Former Member
0 Kudos

So the error stays the same. I switched to Tabels for im and exporting the data in the Fuba. Everytime the same. In the Preview in the Sybase Workspace it is working, in the HWC the Exception is thrown.

When I set an "external Breakpoint" in my Fuba I noticed that it is not called before the Exception is thrown, so it has to be some sort of Internal HWC Error.

If I delete the Personalisation key from my projekt, the error stays.

If I use my Fuba without any selected  input parameters there is no error.

So there has to be something wrong with the mapping inside the HWC because when the error appears the Fuba is not called. How to figure that out, debugging the HWC running inside the android emulator is no fun at all.

david_brandow
Contributor
0 Kudos
When I set an "external Breakpoint" in my Fuba I noticed that it is not called before the Exception is thrown, so it has to be some sort of Internal HWC Error.

Actually, no, that's not what it means. What's happening, based on the logs you've shown, is that it makes it to the SUP server, but it throws an exception while attempting to formulate the call to the RFC. That's why the RFC call is never made.

Former Member
0 Kudos

I switched the Input Parameter of the Funktionsbaustein to the follwing

so I was able to make the Load Parameters not nullable with no effekt. Previously the "Bezugstyp" was "KUNNR".

But with no effect.Same error again.

I setup an example project where a stored procedure from the sampledb take a value and return its result. Everything works fine in that case. Now I have completly no Idea what the error could be.