cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NoClassDefFoundError: com/sapportals/wcm/crt/CrtClassLoaderRegist

Former Member
0 Kudos

Hi I am trying to use KM API in servlet .

I am not sure what library to mention in references in

application-j2ee-engine.xml in EAR.

Code is as follows .

Code is printing out.print(ume4User.getFirstName());

if remaining section of code is not there . Otherwise its throwing ....

Application error occurred during request processing.

Details: java.lang.NoClassDefFoundError: com/sapportals/wcm/crt/CrtClassLoaderRegistry The ID of this error is

Exception id: [000C29882910004F0000000C000013E800040A8E05AA8CB7].

PrintWriter out = response.getWriter();

out.print("Lakshmi");

com.sap.security.api.IUserFactory iFactory=UMFactory.getUserFactory();

com.sap.security.api.IUser ume4User = null;

try {

ume4User = iFactory.getUserByLogonID("administrator");

out.print(ume4User.getFirstName());

} catch (Exception e) {

// TODO Auto-generated catch block

out.print(e.getMessage());

}

com.sapportals.portal.security.usermanagement.IUser ep5User = null;

try {

ep5User = WPUMFactory.getUserFactory().getUser("administrator");

} catch (Exception e1) {

// TODO Auto-generated catch block

out.print(e1.getMessage());

}

IResourceContext resourceContext = new ResourceContext(ep5User);

RID rid = RID.getRID("/documents");

IResource resource = null;

try {

resource =

ResourceFactory.getInstance().getResource(

rid,

resourceContext);

response.getWriter().println(resource.getName());

} catch (Exception e2) {

// TODO Auto-generated catch block

out.print(e2.getMessage());

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

hello kaushik,

what's your EP version as well as SP level?

regards

jo

Former Member
0 Kudos

EP Version is 6

SP pack is 14.

Please tell me what to do for eliminating this problem..

Former Member
0 Kudos

hello kaushik,

please refer to this page for your references in the

application descriptor.

http://help.sap.com/saphelp_nw04s/helpdata/en/42/beba2f734921e3e10000000a114cbd/content.htm

regards

jo

Former Member
0 Kudos

Hi Link says about sharing references for a portal application portalapp.xml ... i am doing a J2ee application ... so i am worried what to specify run time references to avoid my problem.

Former Member
0 Kudos

TRy this with application-j2ee-engine.xml

<?xml version='1.0' encoding='UTF-8'?>

<!DOCTYPE application-j2ee-engine SYSTEM 'application-j2ee-engine.dtd'>

<application-j2ee-engine>

<reference reference-type="weak">

<reference-target provider-name="sap.com" target-type="library">oracle</reference-target>

</reference>

<classpath>c:/lib/XYZ.jar</classpath>

<fail-over-enable mode="disable"/>

</application-j2ee-engine>

Here I have given two example one is direct ref to a jar file called XYZ.jar

another if you have created a libarary using Visual Admin Tool & u wanted to establish a relationship between the ur application and this library called "oracle"

I guess you can do the first approach, In such case you don't need to bundle XYZ jar as part ur ear file, This will do the trick.

One more thing please remove the application manually using Visual Admin tool before deploying using this descriptor

Former Member
0 Kudos

It works by this .

To Talk to KM we need

<application-j2ee-engine>

<reference

reference-type="weak">

<reference-target

provider-name="sap.com"

target-type="application">com.sap.km.application</reference-target>

</reference>

<provider-name>sap.com</provider-name>

<fail-over-enable

mode="disable"/>

</application-j2ee-engine>

Answers (0)