cancel
Showing results for 
Search instead for 
Did you mean: 

Portal Standalone DC NoClassDefFoundError

Former Member
0 Kudos

Hello,

im running NWDI on SPS14.

I created a Portal Standalone Application DC using several external libraries (log4j, saxon, a.o.).

I can build and deploy the project without any error.

1. When i try to run the iView i get get a NoClassDefFoundError on a Class of the External library, but the JAR is included inside the PAR. The only different is, that in NWDI the external JARs are put under the folder "/private/lib", while in the origin project (bevor we moved to NWDI) the exteranl JARs where found in "/lib/".

2. For the External libraries mentioned above i created 2 PP`s, one for assembly and one for combilation. If i add the Public Part (purpose: assembly) with the option "Run Time" dependency "strong" the JAR is not deployed with the project. But i add the PP with "Build Time" AND "Run Time" it is deployed. Is this a feature or a bug?

regards Oliver

regards

Oliver

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Oliver,

1. You can set a build time qualifer "API" in the dependency. Sadly the IDE does not allow this, but you can edit the .dcdef file manually to something like:

<at-build-time qualifier="API"/>

Then the Jar file will be added to /lib instead of /private/lib. (take a look at the portalApplication.vm file if you like).

2. I'm not sure what you mean with "deployed". You cannot directly deploy a simple far file.

The logic is somewhat like:

  • If you want the Jar file to be assembled into the par this has to happen at build-time, thus you need a build-time dependency.

  • If the DC that provides the Jar at runtime of your portal application you would use a runtime dependency (except that runtime dependencies between DCs are not automatically added to the portalapp.xml).

The editor in the IDE is very generic here, usually runtime-dependencies only makes sense on runtime-object, i.e. DCs that produce something that can be deployed and run on the engine. If you really reference a public part that implies that it should be a build-time-dependency.

Regards,

Marc

Former Member
0 Kudos

Hey Marc,

that`s it, what i`m looking for

Thx a lot

Oliver

Answers (0)