cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using SAP Logging API

former_member208581
Participant
0 Kudos

Hi,

I've currently some trouble to use the logging api as described in help or manual.

Currently I've included reference com.sap.tc.Logging to my web project. Obviously this reference is pointing to

loggingStandard.jar. This jar file is for JDK compatible logging.

So far the import

import com.sap.tc.logging.Location;

couln't resolved.

Could anybody assist me?

Accepted Solutions (0)

Answers (1)

Answers (1)

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Axel,

Try adding c:/usr/sap/<sid>/JC<instance>/j2ee/cluster/server0/bin/system/logging.jar to your eclipse project.

Hope this helps,

Marty

former_member208581
Participant
0 Kudos

Hi Marty,

of course this should solve the problem, but not in a way I expected. I suppose there is something wrong with my installation (a bug?). Currently I'm using J2EE Netweaver Developer Studion 6.40 Patch 12.

Also one colleague has the same problem.

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Axel,

Sorry if I'm misunderstanding, but this is at compile time that the issue is occurring, correct?

I just created a web project, then after selcting my web project in J2EE explorer went to Project>Properties>Java Build Path.

Add External JARs then selected the jar mentioned above. After clicking OK, the red line stayed for a few seconds, but once I saved and tried to do a build it went away.

Also, there is no other logging.jar that may be conflicting in the classpath, correct?

Am I way off base or your problem is that you do the above and still cant get rid of the red error?

Thanks,

Marty

former_member208581
Participant
0 Kudos

Hi Marty,

yes, it is a compile-time issue.

No, there is no further logging.jar.

From the understanding that logging.jar is a core component of SAP's J2EE Engine and according all docu and tutorials about SAP Logging I read, I expected to do the following:

1.) Select Add additional library on web project

2.) Choose com.sap.tc.Logging

3.) Confirm and wait until compiling is done.

--> Import could be resolved to use package com.sap.tc.logging.* components.

From my investigations the reason is, that this library refers to loggingStandard.jar instead of logging.jar.

Perhaps you can check DevStudio Reference. It also loggingStandard or it's logging.jar?

Regards,

Axel

MartyMcCormick
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Axel,

I now see your problem and was able to replicate it. Unfortunately I dont know why it is using the LoggingStandard.jar file and don't typically work with web projects. That being said, if you add the external jar like I mention above, will the project compile and run correctly? Or is that a no-no for web projects?

Marty