This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 178032 - Runtime error: build\lib not found
Summary: Runtime error: build\lib not found
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: EAR (show other bugs)
Version: 6.x
Hardware: PC Other
: P2 normal (vote)
Assignee: David Konecny
URL:
Keywords: REGRESSION
: 182983 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-12-02 16:24 UTC by bht
Modified: 2010-03-29 18:26 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
testcase (zip file) (28.12 KB, application/octet-stream)
2009-12-03 03:12 UTC, bht
Details

Note You need to log in before you can comment on or make changes to this bug.
Description bht 2009-12-02 16:24:38 UTC
On an attempt to debug a project, the following error is shown in the output:

connect-debugger:
...nbproject\build-impl.xml:369: The following error occurred while executing this line:
...nbproject\build-impl.xml:373: ...build\lib not found.
BUILD FAILED (total time: 4 seconds)

run works fine, so it appears to be limited to debug. I guess the error might be triggered by the fact that the libraries in this project are not packaged - instead they are in the serverr's lib directory.

It works fine in NetBEans 6.8 Beta.

I tried to make a test case from a Wicket example, but I am getting a different error:

Wicket Pizza Application
Server: GlassFish 2.1
Project Properties|Libraries|Compile-time Libraries
- Uncheck "Package" for all libraries
- Copy libraries to your GlassFish 2.1 directory/domains/domain1/lib
  - wicket-1.4.1.jar
- Clean and build
- Debug

javac: invalid target release: 1.7

So I tried another example

Java EE Lottery Annotation
Change server to GlassFIsh 2.1

Gets another error: 
LDR5010: All ejb(s) of [LotteryAnnotation] loaded successfully!
Error attempting to process extensions from the manifest of JAR file ...\LotteryAnnotation\dist\gfdeploy\LotteryAnnotation-ejb.jar; ignoring it and continuing
java.io.FileNotFoundException: ...\LotteryAnnotation\dist\gfdeploy\LotteryAnnotation-ejb.jar (The system cannot find the file specified)
        at java.util.zip.ZipFile.open(Native Method)

So I am having a hard time making a test case. Hopefully the original error is easy to fix!
Comment 1 bht 2009-12-03 03:12:38 UTC
Created attachment 92032 [details]
testcase (zip file)

This testcase reproduces easily on my computer.

How to reproduce:

Clean and build the enterprise project and debug it. In the output window, NetBeans complains that the lib directory is missing. If you create it manually, then the application runs ok.
Comment 2 Vince Kraemer 2009-12-11 12:46:27 UTC
I could not work with the sample that you attached, since I do not use wicket.

Can you try the following really quick...

exit out of the IDE
remove the nbproject\build-impl.xml file from the project(s) that appear to have this problem.
restart the IDE
do a clean
do a debug
Comment 3 bht 2009-12-12 13:22:39 UTC
Closed IDE, deleted Member\nbproject\build-impl.xml
This is the file that causes the error.

File gets re-created, error is reported exactly as before.

It is easy to install Wicket:

http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586
Comment 4 kurti 2010-01-20 02:36:20 UTC
Workaround:

remove slightly below the given line of build-impl.xml the one containing

      <fileset dir="${build.dir}/lib" includes="*.jar"/>


How to reproduce:

This bug happens for me in an ordinary freshly created JavaEE project:

Just create a new project and select:

   JavaEE - Enterprise Application

and use the defaults for everything else (Glassfish v3, JavaEE 6). Then simply click on "debug main project" which is the one with the blue triangle.
Comment 5 Petr Jiricka 2010-02-01 07:57:02 UTC
I can reproduce using the latest steps.
Comment 6 David Konecny 2010-02-01 19:58:17 UTC
This is regression caused by my fix of bug 52273. Ant is silly enough to complain that the lib directory is missing when classpath is defined as
   <fileset dir="${build.dir}/lib" includes="*.jar"/>
instead of silently returning empty set of files. Ant 1.7.1 introduces new fileset's attribute named erroronmissingdir which for backward compatibility is set by default to true and which could be used in this case with false value. In order to avoid dependency on Ant 1.7.1 I'm using alternative fix:
   <fileset dir="${build.dir}" includes="lib/*.jar"/>

This is a candidate for a patch of NB68.

8e4e436f838e
Comment 7 pgebauer 2010-02-18 03:42:53 UTC
The whiteboard changed to 68patch-candidate according to the NetBeans Patches Process (http://wiki.netbeans.org/NetBeansPatchesProcess)
Comment 8 David Konecny 2010-03-29 18:26:24 UTC
*** Bug 182983 has been marked as a duplicate of this bug. ***