Link to home
Start Free TrialLog in
Avatar of Steve Sperber
Steve SperberFlag for United States of America

asked on

where can we see java system logs in SAP PI server hosted on AIX servers

I have a war file hosted on Netweaver application server on AIX box.

The JSP file imports Java class and in java class I want to trace exception by printing using

System.out.println("Hello World")

Open in new window


On what path would these statement get printed on SAP PI server.

Background - I have native method in the java class and that works fine on windows but not on AIX server so need to check logs.
Avatar of gheist
gheist
Flag of Belgium image

Do you have backing shared library for native method you use on AIX?
Avatar of Steve Sperber

ASKER

Yes. There is a native method call that needs to happen.

But even without it there is no console or log that gets printed with or without exception
ldd "that_shared_lib"
maybe something is missing.
Avatar of mrcoffee365
You're looking for standard out, called stdout for the jvm which is executing your java program.  We don't have an SAP system running on ... you don't say which operating system it's running on, so I can't tell you where to look for your specific configuration.  The default location of stdout tends to be OS-specific.

It's also possible that System.out (which writes to stdout) is writing to the console.  You could look for whatever is called the console for the servlet engine which is running your jsp page.

Be warned that some web servers have the console essentially turned off, so messages to the console go nowhere.  If the system with the error has System.out basically turned into a no-op, then you're out of luck.  In that case, you'll need to explicitly write your logging message to a file.  You can actually define a file in your jsp and write to it, in which case you'll know where it is.

For this and many other reasons, most people use a logging package, like log4j.  You can actually set up log4j in your jsp and use it to write logging messages.  When you configure log4j, you'll give it a directory and filename to use for the log, so you'll know where to find it.
ASKER CERTIFIED SOLUTION
Avatar of Steve Sperber
Steve Sperber
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
It's great that you posted the location.

Just FYI:  when someone helps, it's better to reward the help than to remove all the points.  The fact that you also had to look for the specific file in your specific configuration (which no one else on the expert panel had, by the way), does not mean that we didn't help.  We did, and it meant you knew how to look and what to look for.  That is expert help.
This was found after lots of search
Yes indeed.  You will always have to do work on your own system, and in your case, no one else had your configuration, so you would have been the person who had to search.  Now that I know you don't award points, it isn't a problem for me, but for other experts who help you, just bear in mind that the expert help you get should be rewarded if you want further help.