Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

need help debugging j2ee login module issue

tim_alsop
Active Contributor
0 Kudos

We have a customer who is using a j2ee login module, and it was working ok, but suddenly it stopped working and we are now having difficulty finding out why. From the browser http sniffer trace, and the j2ee engine default trace, we can see that the login module sets a 401 response code, which the browser receives and responds to with the request containing the required Authorization header, but we see no record of NetWeaver receiving the request with the Authorization header, e.g. the HTTPGetterCallback() is unable to find the Authorization header in the request received. Is there a way we can enable some sort of debug to find why the response is not seen in the logs ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Tim,

If you have the source code of that login module, you can simply set the server node in debug mode and attach a remote debugging session via SAP NetWeaver Developer Studio. If you are not familiar with the debugging, you can put traces in the LM source code (i.e. just printing to the standard output or standard error streams) that issue some info you are interested. Of course, you'll definitely need to know what how that LM is expected to work.

Kind regards,

Tsvetomir

5 REPLIES 5

Former Member
0 Kudos

Hello Tim,

If you have the source code of that login module, you can simply set the server node in debug mode and attach a remote debugging session via SAP NetWeaver Developer Studio. If you are not familiar with the debugging, you can put traces in the LM source code (i.e. just printing to the standard output or standard error streams) that issue some info you are interested. Of course, you'll definitely need to know what how that LM is expected to work.

Kind regards,

Tsvetomir

0 Kudos

Tsvetomir,

Yes, we have source code for the login module, and we already have code to write our own debug messages in this code. The code is working, so we just need to find a way to make NetWeaver show us the HTTP headers in a SAP trace/log file. Is this possible ?

The problem with using Dev Studio, is that we are a software vendor, and the customer who has our product installed has the problem, not us. If we had a problem whilst developing our own login module then we could of course use Dev Studio to debug it. We have many customers using the same code and running it in production systems and they are all working well, and this customer was also working well, but suddenly something changes and it stopped working. They told me that a DNS change was made at about same time as it stopped working, but so far we cannot see any link between changes to DNS and the HTTP header issue, and this is why we are trying to debug the issue to find what might be causing the problem.

Regards,

Tim

0 Kudos

Hello Tim,

You can enable the HTTP headers via Visual Admin -> Dispatcher -> HTTP provider -> property HttpTrace=enableHeaders

You have see all possible property values from HTTP Provider Service page.

<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/52/46f6a089754e3a964a5d932eb9db8b/frameset.htm">HTTP Provider Service</a> page. Save the changes. No need for restart, this is a runtime configuration.

The trace file with the HTTP traffic is created at j2eehome/j2ee/cluster/dispatcher/log/services/http/req_resp.0.trc

Kind regards,

Tsvetomir

0 Kudos

Tsvetomir,

Thankyou. This looks like it is just what we need. We will try it and let you know if it helps us solve the problem.

Regards,

Tim

0 Kudos

Yes, it looks like this trace did what we wanted and gives us the http headers.

Thankyou again,

Tim