Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
JacoVanebo
Explorer
1,398
I recently set out to figure out, why archiving of User-Defined Search was failing in our SAP Process Integration 7.5 (Java-only).

I originally setup message archiving and UDS back in 2014, when the system was running NW 7.4 (Java-only), which we migrated from a NW 7.31 (ABAP+Java).

Ever since the migration from dual-stack to single-stack, we have had no problems with archiving of 'normal' messages (xi_af_msg), but have continuously had problems with archiving of UDS messages (xi_af_uds_msg). Each and every-time our systems came to the step of archiving xi_af_uds_msg, it would fail. At the time I didn't think much of it and in the meantime I left the company.

A few months ago I rejoined the company and after introduction and getting up to speed with all the new integrations done over the past two years, I started looking into the health of the PI-system. And lo and behold - archiving of xi_af_uds_msg was still failing. 😞

I started my search for the root cause, by looking into Developer Traces and around the time archiving was running, I found a log entry:
com.sap.aii.af.service.search.api.SearchException: Error while executing UDS archive job
at com.sap.aii.af.search.core.archive.LMSArchiveExecutor.executeLMSArchiving(LMSArchiveExecutor.java:149)
at com.sap.aii.af.search.core.MessageIndexDataArchiver.onMessagesArchived(MessageIndexDataArchiver.java:49)
at sun.reflect.GeneratedMethodAccessor34972.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sap.engine.messaging.impl.core.event.EventExecutor.run(EventExecutor.java:72)
at java.lang.Thread.run(Thread.java:836)
Caused by: com.sap.aii.archive.TwoPhaseArchivingException: Executing Write Phase failed, due to: Archiving an Object in XMLDAS Archiving Store failed, due to: PUT command failed. Reason: 483:
at com.sap.aii.archive.TwoPhaseArchivingTemplate.executeWritePhase(TwoPhaseArchivingTemplate.java:234)
at com.sap.aii.archive.TwoPhaseArchivingTemplate.executeArchiveRunStopOnError(TwoPhaseArchivingTemplate.java:59)
at com.sap.aii.af.search.core.archive.LMSArchiveExecutor.executeLMSArchiving(LMSArchiveExecutor.java:125)
... 6 more
Caused by: com.sap.aii.archive.ArchiveServiceException: Archiving an Object in XMLDAS Archiving Store failed, due to: PUT command failed. Reason: 483:
at com.sap.aii.archive.impl.xmldas.XMLDASArchivingService.archiveObject(XMLDASArchivingService.java:295)
at com.sap.aii.archive.TwoPhaseArchivingTemplate.executeWritePhase(TwoPhaseArchivingTemplate.java:222)
... 8 more
Caused by: com.sap.archtech.archconn.exceptions.ArchServiceException: PUT command failed. Reason: 483:
at com.sap.aii.archive.impl.xmldas.XMLDASArchivingService.archiveObject(XMLDASArchivingService.java:581)
at com.sap.aii.archive.impl.xmldas.XMLDASArchivingService.archiveObject(XMLDASArchivingService.java:291)
... 9 more

Hmm, not much to go with, but better than nothing. And just after above log entry was this log entry:
com.sap.archtech.daservice.exceptions.InvalidNameException: Invalid Character   on position 62
at com.sap.archtech.daservice.commands.MasterMethod.isValidName(MasterMethod.java:255)
at com.sap.archtech.daservice.commands.PutMethod.execute(PutMethod.java:243)
at com.sap.archtech.daservice.DASmain.doPost(DASmain.java:631)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:152)
at com.sap.engine.services.servlets_jsp.server.security.PrivilegedActionImpl.run(PrivilegedActionImpl.java:103)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:58)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:466)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:210)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:441)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:430)
at com.sap.engine.services.servlets_jsp.filters.DSRWebContainerFilter.process(DSRWebContainerFilter.java:38)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:81)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:278)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:81)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.SessionSizeFilter.process(SessionSizeFilter.java:26)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.MemoryStatisticFilter.process(MemoryStatisticFilter.java:57)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.filters.DSRHttpFilter.process(DSRHttpFilter.java:43)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:78)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:468)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.process(Processor.java:262)
at com.sap.engine.services.httpserver.server.rcm.RequestProcessorThread.run(RequestProcessorThread.java:56)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:328)

So it would seem that XMLDAS was receiving an invalid character (space), but where is the character coming from and why is it invalid?

Time to pull out Luyten and start analyzing where the problem is. After reading a lot of code, I came across where the archiving key was generated for entries in table XI_AF_LMS_DATA. It seems like MSG_ID, DIRECTION, NAME and POS separated by underscore was part of the filename for each entry in XI_AF_LMS_DATA. The only value we have 'direct' control off of the four values is NAME (this is the name of the attribute in UDS).


Hmm, time to pull out another tool - DBA Cockpit. We are running on ASE database, so the following SQL should do the trick in identifying if any entries in XI_AF_LMS_DATA is having space in column NAME:
SELECT TOP 1 * FROM <SID>.SAPSR3DB.XI_AF_LMS_DATA WHERE NAME LIKE '% %';

And bingo! We had entries in XI_AF_LMS_DATA, which contained a space in column NAME. Now what?

Well the first thing I did was go in and change all the attribute names in UDS configuration e.g. I changed 'ORDER NUMBER' to 'OrderNumber'.

Secondly, we decided that all the entries in XI_AF_LMS_DATA having the invalid character was not crucial for us, so we got rid of them.

So why is space considered an invalid character? My guess is that some file systems might not like space in filenames and SAP has therefore decided to not allow this character.

This I guess SAP found out in retrospect and had to make changes UDS configuration to only allow [a-zA-Z0-9] for attribute names, because back in 2014, when I initially setup archiving and UDS, no restrictions existed for naming attributes in UDS.

 

Our system is now running archiving of UDS without any problems.
1 Comment
Labels in this area