on 04-06-2005 2:24 PM
Hello,
I developped a J2EE application that works fine on SP9.
It uses authentication to be able to call KM api.
My code looks like
This way I get an authenticated user.
Now my pb is to make this application work on SP2.
If I deploy the ear file in a SP2 Portal server and then try to use it I get the following message :
java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
at com.sap.security.api.UMFactory.(UMFactory.java:51)
If tried to add the logging.jar containing Location class to my archive but then I obtained this :
java.lang.NoClassDefFoundError:
com/sap/engine/lib/logging/LoggingHelper
at com.sap.security.api.UMFactory.(UMFactory.java:52)
Does anyone knows what I must modify in my code or libs to make the logging work ?
Thanks
Sylvain
Hi Sylvain,
> java.lang.NoClassDefFoundError:
> com/sap/tc/logging/Location
> at com.sap.security.api.UMFactory.(UMFactory.java:51)
If <i>UMFactory.java:51</i> calls <i>com.sap.tc.logging.Location</i>, you must have deployed UMFactory from SP9 on SP2 (which you must not, nor on SP9, for it's part of the server).
Hope it helps
Detlev
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Detlev,
The problem is may be that i use NW DS to create my ear archive. I've added to my project several jar files such as "com.sap.security.api.jar".
If I remove this external jar and use the "Add/Remove additionnal libraries" from context menu on my project insead, I'm able to compile and deploy but the execution give me another noClassDefFound with "com/sap/security/api/UMFactory".
How can I compile and deploy my application on SP2 without adding UMFactory and some others class to my ear ?
Do you mean that UMFactory from SP2 do not use Location class ? I tried to add a jar file comming from SP2 (I believe) libs but have the same result.
Do I have to use another IDE instead of NWDS ?
Thanks a lot for your help
Sylvain
Hi Sylvain,
> I've added to my project several jar files such
> as "com.sap.security.api.jar".
Yeah, I thaught this, and you must not. The UME is part of the server, and you only have to use it. On SP2, you can find the stuff under ...clusterserveradditional-libcomsapsecurity...
I'M mainly developing EP stuff, and for the irj application the references to com.sap.security are already set. See https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webas620/adm... manual for sap j2ee engine 6.20.pdf - chapter "Configuration of Additional Libraries".
> Do you mean that UMFactory from SP2
> do not use Location class ?
Right.
> Do I have to use another IDE instead of NWDS ?
It's definitely not officially supported to use NWDS for SP2 deployment, but maybe it works... Never tried this...
Hope it helps
Detlev
Hi Detlev,
Thanks for this usefull reading.
I'm now using the right UMFactory class. But It seems that the SP2 one is working a different way.
I'm now getting a exception that many developper here seem to have encountered
"Could not initialize UMFactory! Please set property 'ume.cfg.path' or call UMFactory.initialize() first "
After reading topics on the subject I do not find an answer to fix this problem.
Do you know what should be modified to use UMFactory in SP2 ?
Regards,
Sylvain
Hi Sylvain,
sorry, as said, I never tried this. But after checking other messages about it, I would advise to open an OSS message with references to this and other threads around this topic (Oliver Stiefbold also told to do so in one thread).
If you get a solution, I would be very nice to get back and post it in here, so that this struggle maybe comes to an end. It definitely <i>should</i> work, this is what the UME is for...
Hope it helps & good luck
Detlev
Hi Detlev,
According to other posts on the subject, it seems that the initialization of UMFactory works only if the application is deployed in the irj context.
It is not a perfect solution but it may be a good starting point. My question is : how to deploy an ear in the irj context ?
Because if I try to set the context root of my servlet to "/irj/..." it does not work. (of course it not a good solution !)
How can I deploy the ear, or eventually the war in the irj context ?
Best regards,
Sylvain
Hi Sylvain,
> It is not a perfect solution but
> it may be a good starting point.
I read this, too, but I disagree.
The IRJ context is a servlet/jsp application. The proposal was made for a servlet, that would work, but does not make sense. If you deploy a servlet within the irj context, the UME access works, that's all, using UME by API is not really hard, ok, you at least could test it.
> how to deploy an ear in the irj context ?
You cannot. As said, irj is a servlet application.
Once again, definitely it the UME should be accessible by other applications, too. The way this can be done on 6.20 seems not to be documented, or if, nobody in the public knows where. I really would advise to open an OSS message as described.
Hope it helps
Detlev
Hi Sylvain,
> deploying only my servlet (WAR file)
> into the irj context
You cannot really deploy the WAR (Web Archive!) into another web application. You can put the servlets into this existing web application (and extend the web.xml of the irj app). As said, this is a quite dirty workaround just to test what should work in your own, irj independent app.
Hope it helps
Detlev
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.