cancel
Showing results for 
Search instead for 
Did you mean: 

Classpath reset after building

Former Member
0 Kudos

Hello,

I am facing a problem while building entreprise portal.

The file .classpath is well defined before the build. After building, many lines are removed from the file!

Of course, the build failed because it miss .jar files....

Could you help me or explain me why ?

I really need to build this application.

Thank you in advance.

Nick

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Nick,

Can you try adding the ext jars via a library dc ??

Just give it a try.

Hope it helps,

Sattam.

Former Member
0 Kudos

Hello Sattam,

Thank you, it's working now.

I needed to create a library DC containing all my jars and then added this as used DC in the DC project.

Nick

Answers (2)

Answers (2)

Former Member
0 Kudos

Are you creating a Development Component (DC) for the portal component? If you are you can't mess with the classpath, as this is taken care of by dc-to-dc dependencies. Jars placed in the correct folders will be found by the portal component anyways, so you shouldn't need to alter the classpath.

If you're creating a plain Portal project, then unfortunately I've got nothing to add.

Qualiture
Active Contributor
0 Kudos

Hi Nick,

Are you modifying the .classpath file directly? You should add entries to your classpath via your projects Properties > Java Build Path. Here you can reference to projects, (external) jar files, etc.

Hope this helps!

Robin

Former Member
0 Kudos

Hey Robin,

Thank you for the answer.

Of course, I also tried to add the libraries via the project properties, but the result is the same.

Nick

Edited by: P. Nicolas on May 10, 2011 2:11 PM

Qualiture
Active Contributor
0 Kudos

Hi Nick,

What type of project are you working on? A Portal Application, Web Dynpro, etc?

Former Member
0 Kudos

It's a portal application.

Thank you.

Qualiture
Active Contributor
0 Kudos

BTW, in your Java Build Path > Libraries tab, do you have an entry 'JRE_LIB'?

Former Member
0 Kudos

Yes, the JRE_LIB isn't missing.

Qualiture
Active Contributor
0 Kudos

That is strange...

What entries are you missing from your classpath after a rebuild? Are these standard libraries, or custom added entries (added via Java Build Path)?

Former Member
0 Kudos

This is custom librairies that are stored in the following folder "dist/PORTAL-INF/lib/"

Qualiture
Active Contributor
0 Kudos

This is very strange... let me get this straight:

- You have added a custom JAR file in dist/PORTAL-INF/lib/ directory

- You have right-clicked your portal project, and from the context menu chose 'Properties > Java Build Path > Libraries', clicked 'Add Jars' and navigated to your Jar file

I'm wondering,

- Before building, are you able to reference the classes in your project via the 'import' statement?

- When exporting to a PAR file, that's when your references are lost?

Former Member
0 Kudos

I think it's very strange too, but I am an expert ABAP, not JAVA!

Well, here the steps what I have done :

I imported the project via a .PAR file.

I built the project and noticed many errors.

I checked the classpath file and saw that many libraries were missing. And that's true because when I am going .java files, I can see that import are not recognised (red underline). If I add the missing libraries in Properties>Java Build path, it's okay....

Then I build the project again.... and it's failed, I can see that libraries added are missing now in the classpath...

I am using NWDS 7.0.

I am actually downloading the version 2.0. Maybe it's a compatible issue?

Many thanks.

Nick

Qualiture
Active Contributor
0 Kudos

Hi Nick,

From what I can tell, your procedure seems right, so I'm running out of options as well...

My wild guess would also be a compatibility issue, however, since I currently don't have NWDS version 7.0 at hand, I can't tell for sure.

Please let me know if you problem is solved or not with the older NWDS version

Cheers,

Robin

Former Member
0 Kudos

Hello Robin,

This is the same behavior with NWDS 2.0....

I really don't know why my .classpath is totaly edited... Do you know if a special customizing in NWDS could do that ? (a default classpath for example).

EDIT:

The error is talking about a variant ? What's this ?

ERROR: xxxx: Build failed for xxxx.com/xxxx(MyComponents) in variant "default":

Nick

Edited by: P. Nicolas on May 10, 2011 6:56 PM