cancel
Showing results for 
Search instead for 
Did you mean: 

com.sap.security.api.UMException: Namespaces, attributes and values must not contain leading or trailing spaces

Former Member
0 Kudos

Hi All

Any pointer over this would be helpful

I have scenario , where i need to create a User in Portal UME Database.

I have SAP CRM-ISA application. - From ISA  I'm calling WSDL (webservice ) to create / update the User in UME Database.

The Problem i'm facing currently is working perfectly fine. But sometime in random it error out. - when i look over the portal log files..

I find below error message -which doesnt give me any good clue.

[EXCEPTION]

java.lang.RuntimeException: com.sap.security.api.UMException: Namespaces, attributes and values must not contain leading or trailing spaces.

at com.tamko.PortalUMEAPI.createUser(PortalUMEAPI.java:87)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

Looking over the log message , it says some kind of leading / trailing space. so i validate all my input parameter with .trim() . but no big deal.

Is there something i need to do with the Portal Configuration. ( I am in Portal 7.3 sp16. ) . Could any one .. any pointer.

Thanks

Kumar T

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Kumar,

I would say, default trace file is somewhat more helpful in getting to know the problem better. May be you would get some more details in that.

The error message says space issue which you ruled out. Can you check newly created users? Just verify if those users are somehow added to UME with a trailing space, which would inform you that your program somehow behaved unexpectedly...

Regards,
Atul

Former Member
0 Kudos

Hi Atul

Firstly , Thanks for the quick response.

Regarding to your point  , the error message i post is from Default trace , if you interested to see the complete message. i pasted it below for your glance.

EntryPoint: [/wsPortalUMEAPI/PortalUMEAPIService]. Implementation exception occurs for application sap.com/wsPortalUMEAPI_EAR. Check implementation container(e.g. EJB) logs for additional information

[EXCEPTION]

java.lang.RuntimeException: com.sap.security.api.UMException: Namespaces, attributes and values must not contain leading or trailing spaces.

at com.tamko.PortalUMEAPI.createUser(PortalUMEAPI.java:87)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

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

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

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)

Caused by: com.sap.security.api.UMException: Namespaces, attributes and values must not contain leading or trailing spaces.

at com.sap.security.core.imp.UserMaint.beforeCommit(UserMaint.java:335)

at com.sap.security.core.imp.UserMaint.commit(UserMaint.java:309)

at com.tamko.PortalUMEAPI.createUser(PortalUMEAPI.java:61)

... 54 more

On Looking over the Log , its actually throw the runtime error , while executing the  newUser.commit();

Thats the line number it refers to my code , PortalUMEAPI.java:61 ==  newUser.commit();

Attached my Source code for your glance.......

Any Pointer ?????

Answers (1)

Answers (1)

Former Member
0 Kudos

Any Body?????????????

Former Member
0 Kudos

Try also trimming the password:

userAcc.setPassword(pass.trim());

Former Member
0 Kudos

Hi Kumar,

The best I would do in this scenario is- take one step at a time to dig into the problem and find out the exact cause by replicating the problem.

1) Hard code the values of fname, lname etc and then try to replicate the problem. Then undo each field one by one to pin point the exact field if its only one...

2) Try using alert more intelligently- alert ("fname is - "+ "'" + fname + "'"). Try using this before and after the trim so that you can compare if the trim is actually doing its work. I basically added single quotes at the output of fname just to chk what is the exact value.

First you really need to find out which exact field is problematic. Unless you are confident enough to pin point the particular problematic attribute, you would be wasting time trying different approaches for the unknown problem- this is what I think.

Regards,

Atul