cancel
Showing results for 
Search instead for 
Did you mean: 

Using System.err.println() from within the classes of WAS ?

Former Member
0 Kudos

hi,

I am using admin.jar,a jar file which is being used by Web Application Server in my own class.

I am referencing some of the classes from admin.jar from my class.

I tried to print some trace statements,using System.err.println() from within the classes in admin.jar but they did not reflect in defaulttrace0.trc.

I made these changes in the admin.jar being used by WAS.

I restarted the server and even restarted the machine but without success.

I want to know how to print System.out.println() statements from within the classes in admin.jar.

Also, am i looking for these statements in the right file for eg. defaulttrace0.trc. or is it some other file that i need to look into.

I need urgent help on this.

Reward points assured.

thanks a lot.

Saurav

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Welcome to SAP's wacky concept of "developer-friendly" logging. By default, they turn off everything that's useful to a developer. Then, you must play the SAP note hunter game to re-enable useful information. Go figure.

You can try this:

- run the config tool

- select the server instance

- select the Log Configuration tab

- for ROOT CATEGORY, change the severity to All.

- save your changes

- restart the app server

I don't guarantee it will work.

P.S. I could care less about SAP's silly point reward lunacy.

Former Member
0 Kudos

thanks craig,

ur answer has helped me a lot.but it didnt quite help me.

nevertheless i am trying to set different levels of severity.

Is there anything else that i can do.

Also,i commented out a line of code today in one of the class DataSourceManagerImpl.java in sapj2eenginedeploy.jar

for eg. temp.delete in it deploy method.Buth that line still executed.

I m totally lost as to wht to do.

I m trying to create a datasource from my application in WAS.For that i m using the WAS APIs.But its not working completely.

I am using the above jar and its method createdatasource.

I am callin it from my application's class.

It creates a datasource and i can see it in JDBC Connector list in Visual Administrator.But it appears with red sign meaning its not started.When i start it from the tool then it starts.

But in defaulttrace.trc file it shows an error "FileNotFindException". This happens,and i am very much sure, in the deploy() of DataSourceManagerImpl.java class of sapj2eenginedeploy.jar.

i want to apply println inside this method so i may know where exactly i ma getting the error and get so more info so i may solve my problem.

pls help me.

its really urgent.

thanks again

saurav

Former Member
0 Kudos

Rather than using the APIs, have you tried creating a datasource in a data-sources.xml that is placed into the META-INF folder of your EAR? I haven't tried it myself (yet), it's only what I've read in the NWDS help.

Thus far, the only application I've deployed to the J2EE engine that uses a datasource was with the deploy tool. The deploy tool allows you to define data sources to be deployed with the EAR. This application was developed in another build environment (non-NetWeaver) and then deployed to the J2EE engine using the deploy tool.

Former Member
0 Kudos

hi,

well, the functionality in my application calls for creating datasources by the user at run time so i need to do it from with in my code.I cant use the datasource.xml file as u have mentioned. I have also gone thru that documnet that u refered to and its not wht i need to do.

i am just doing hit and trial.

Could u guide me any further on this.

Thanks

saurav

Former Member
0 Kudos

I have not tried what you are attempting to do so I don't think I can help you any further. I have only been using NetWeaver for a couple of months and the first project with it was just a port of an existing web/EJB application.