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 233282 - The IDE fails to locate objects, which exist in the artificats that reside in the local Maven repository.
Summary: The IDE fails to locate objects, which exist in the artificats that reside in...
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 7.4
Hardware: PC All
: P3 normal with 2 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-24 06:12 UTC by shayzu
Modified: 2016-07-07 07:16 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (354.19 KB, text/plain)
2013-07-24 06:12 UTC, shayzu
Details
An example of the issue. (386.83 KB, image/jpeg)
2013-07-25 04:44 UTC, shayzu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shayzu 2013-07-24 06:12:27 UTC
Product Version = NetBeans IDE 7.4 Beta (Build 201307092200)
Operating System = Windows Server 2008 R2 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_25
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.25-b01

For a Maven based project, the IDE shows "Package NNNN does not exist" for packages, which do  exist in artifacts that reside in the local repository..
The issue was tested in the same Maven project under version 7.3 of Netbeans.
Comment 1 shayzu 2013-07-24 06:12:30 UTC
Created attachment 137663 [details]
IDE log
Comment 2 Milos Kleint 2013-07-24 14:47:42 UTC
do you have a screenshot or a sample project? I'm having trouble figuring what is the problem.. thanks.
Comment 3 shayzu 2013-07-25 03:58:33 UTC
Hi

I am afraid I cannot send any such thing outside of my organization, but I will try to detail:
1. A J2EE project, which is based on Maven was imported to Netbeans.
2. The Build completes successfully, and the local Maven repository is updated.
3. When looking at the Project tree, an error indicator is shown on multiple sub-projects.
4. When opening one of the Java source files, which is marked with an error, we can see the following:
Comment 4 shayzu 2013-07-25 04:42:53 UTC
Sorry for the partial comment - adding it again:

Hi

I am afraid I cannot send any such thing outside of my organization, but I will
try to to do my best -
1. A J2EE project, which is based on Maven was imported to Netbeans.
2. The Build completes successfully, and the local Maven repository is updated.
3. When looking at the Project tree, an error indicator is shown on multiple
sub-projects.
4. When opening one of the Java source files, which is marked with an error, we
   can see the following:

   import com.XXX.dbclassify.Enums.MappingType;
   import com.XXX.dbclassify.envManager.IMonitoredEnvList;
   import com.XXX.dbclassify.envManager.MonitoredEnv;
   import com.XX.dbclassify.interfaces.IDBConfig;
          ---
   The "---" indicates an red underline, marked under the "com" sub-package, and 
   when placing the mouse on the error indicator at the line, the pop up message 
   complains that "com.XX.dbclassify.interfaces" does not exist.
5. In the attached screenshot, you can see that the missing package does exist, 
   and the pom file of the sub project, which contains the error depends on the 
   artifact, which contains the "missing" package:
    <dependency>
      <groupId>com.XXX.dbclassify</groupId>
      <artifactId>dbc-common</artifactId>
      <version>1.7.0.0</version>
      <scope>provided</scope>
    </dependency>

6. Please note, that the same project does not produce the same errors on: 
   NetBeans IDE 7.3 (Build 201306052037).

I hope this clarifies the issue.

Thanks!!!

Shay
Comment 5 shayzu 2013-07-25 04:44:11 UTC
Created attachment 137751 [details]
An example of the issue.
Comment 6 shayzu 2013-07-25 04:48:32 UTC
Hi

You must accept my apologizes, but I was too reckless and did not wait enough.
I am sorry to update that after waiting couple of minutes, the same problem also occurs in version 7.3 too!

I must indicate that the IDE is using an external installation of Maven (version 3.0.3).

Thanks and sorry for confusing you.

Shay
Comment 7 Milos Kleint 2013-07-25 06:07:28 UTC
(In reply to comment #6)
> I must indicate that the IDE is using an external installation of Maven
> (version 3.0.3).

version of external maven should be irrelevant here. What is however relevant is how the IDE loads the project. when in projects view, can you right click on BaseAction and see in Properties if the compilation classpath contains the dbc-commons jar or maybe the dbc-commons project's output directory?

does right clicking on the project with error and triggering "Reload POM" action do something? Does doing a fake edit in the BaseAction class do something?
Comment 8 shayzu 2013-08-01 11:35:59 UTC
Hi

First of all, sorry for the late answer!
Regarding to your requests/questions:
"can you right click on BaseAction and see in Properties if the compilation  
classpath contains the dbc-commons jar or maybe the dbc-commons project's 
output directory?" -
1. Unlike regular Java project, the "Properties" dialog of Netbeans for a Maven project, does not display the Classpath. I assume that's because the Classpath is based on the artifacts of the projects.

2. The structure of the prject I am compiling is:
   DB Classify Aggregator - a "Pom" artifcat.
     |
     +- DB Classify Application EJBs - an "EJB" artifcat.
     |
     + dbc-common/listener/... - Jar files.
     |
     + - WAR packager
     |
     +- EAR packager - "EAR" artifcat.
    
My guess is that the source of the issue is that JAr files (dbc-common/listener), which the EJB packager depends on are built of the same level of it and not sub-children of it.
Am I right??

Thanks again for your assistance!
Shay
Comment 9 Milos Kleint 2013-08-19 11:23:29 UTC
>1. Unlike regular Java project, the "Properties" dialog of Netbeans for a Maven 
> project, does not display the Classpath. I assume that's because the Classpath 
>is based on the artifacts of the projects.

actually I didn't mean the PROJECT's properties but properties for the java file in the project. That one contains "Compilation classpath", "Runtime classpath" entries that are relevant for the given file.
Comment 10 shayzu 2013-08-19 12:30:44 UTC
Hi

Looking at the "Compilation Classpath" of one of the Java files, which has the errors, we can find the jar file - I intentionally separated the jar file and placed it within two "====" separators.
Please note that the file is also included in the "Rubtime Classpath":

C:\Users\shay\.m2\repository\com\XXX\dbclassify\listener\1.7.0.0\listener-1.7.0.0.jar;C:\Users\shay\.m2\repository\org\antlr\antlr\3.1.3\antlr-3.1.3.jar;C:\Users\shay\.m2\repository\org\antlr\antlr-runtime\3.1.3\antlr-runtime-3.1.3.jar;C:\Users\shay\.m2\repository\org\antlr\stringtemplate\3.2\stringtemplate-3.2.jar;C:\Users\shay\.m2\repository\com\XXX\dbclassify\collector\1.7.0.0\collector-1.7.0.0.jar;

==============================================================================
C:\Users\shay\.m2\repository\com\XXX\dbclassify\dbc-common\1.7.0.0\dbc-common-1.7.0.0.jar;
==============================================================================
C:\Users\shay\.m2\repository\commons-net\commons-net\1.4.1\commons-net-1.4.1.jar;C:\Users\shay\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Users\shay\.m2\repository\postgresql\postgresql\9.1-901.jdbc4\postgresql-9.1-901.jdbc4.jar;C:\Users\shay\.m2\repository\org\hibernate\hibernate\3.2.6.ga\hibernate-3.2.6.ga.jar;C:\Users\shay\.m2\repository\net\sf\ehcache\ehcache\1.2.3\ehcache-1.2.3.jar;C:\Users\shay\.m2\repository\javax\transaction\jta\1.0.1B\jta-1.0.1B.jar;C:\Users\shay\.m2\repository\commons-logging\commons-logging\1.0.4\commons-logging-1.0.4.jar;C:\Users\shay\.m2\repository\asm\asm-attrs\1.5.3\asm-attrs-1.5.3.jar;C:\Users\shay\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\shay\.m2\repository\antlr\antlr\2.7.6\antlr-2.7.6.jar;C:\Users\shay\.m2\repository\cglib\cglib\2.1_3\cglib-2.1_3.jar;C:\Users\shay\.m2\repository\asm\asm\1.5.3\asm-1.5.3.jar;C:\Users\shay\.m2\repository\commons-collections\commons-collections\2.1.1\commons-collections-2.1.1.jar;C:\Users\shay\.m2\repository\org\hibernate\hibernate-annotations\3.3.1.GA\hibernate-annotations-3.3.1.GA.jar;C:\Users\shay\.m2\repository\org\hibernate\hibernate-commons-annotations\3.0.0.ga\hibernate-commons-annotations-3.0.0.ga.jar;C:\Users\shay\.m2\repository\org\hibernate\ejb3-persistence\1.0.1.GA\ejb3-persistence-1.0.1.GA.jar;C:\Users\shay\.m2\repository\com\XXX\em\spa\spaejb\X8.0.0.111\spaejb-X8.0.0.111.jar;C:\Users\shay\.m2\repository\net\sourceforge\jtds\jtds\1.2.5\jtds-1.2.5.jar;C:\Users\shay\.m2\repository\junit\junit\4.11\junit-4.11.jar;C:\Users\shay\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;C:\Users\shay\.m2\repository\com\oracle\ojdbc14\10.2.0.4.0\ojdbc14-10.2.0.4.0.jar;C:\Users\shay\.m2\repository\log4j\log4j\1.2.15\log4j-1.2.15.jar;C:\Users\shay\.m2\repository\javax\mail\mail\1.4\mail-1.4.jar;C:\Users\shay\.m2\repository\javax\activation\activation\1.1\activation-1.1.jar;C:\Users\shay\.m2\repository\org\jboss\spec\javax\ejb\jboss-ejb-api_3.1_spec\1.0.1.Final\jboss-ejb-api_3.1_spec-1.0.1.Final.jar;C:\Users\shay\.m2\repository\com\XXX\em\backpack\common-em-ejb\T1.6.0.128\common-em-ejb-T1.6.0.128.jar;C:\Users\shay\.m2\repository\javax\ejb\ejb-api\3.0\ejb-api-3.0.jar;C:\Users\shay\.m2\repository\org\jboss\ejb3\jboss-ejb3-ext-api\1.0.0\jboss-ejb3-ext-api-1.0.0.jar;C:\Users\shay\.m2\repository\org\jboss\javaee\jboss-ejb-api\3.0.0.CR1\jboss-ejb-api-3.0.0.CR1.jar;C:\Users\shay\.m2\repository\org\jboss\javaee\jboss-transaction-api\1.0.1.CR1\jboss-transaction-api-1.0.1.CR1.jar;C:\Users\shay\.m2\repository\jboss\jbossws\jboss-jaxrpc\1.0.4.GA\jboss-jaxrpc-1.0.4.GA.jar;C:\Users\shay\.m2\repository\org\jboss\metadata\jboss-metadata\1.0.0.CR16\jboss-metadata-1.0.0.CR16.jar;C:\Users\shay\.m2\repository\org\jboss\logging\jboss-logging-spi\2.0.5.GA\jboss-logging-spi-2.0.5.GA.jar;C:\Users\shay\.m2\repository\org\jboss\jboss-common-core\2.2.8.GA\jboss-common-core-2.2.8.GA.jar;C:\Users\shay\.m2\repository\org\jboss\javaee\jboss-jms-api\1.1.0.GA\jboss-jms-api-1.1.0.GA.jar;C:\Users\shay\.m2\repository\org\jboss\ws\jbossws-spi\1.0.6.GA\jbossws-spi-1.0.6.GA.jar;C:\Users\shay\.m2\repository\org\apache\ant\ant\1.7.0\ant-1.7.0.jar;C:\Users\shay\.m2\repository\org\apache\ant\ant-launcher\1.7.0\ant-launcher-1.7.0.jar;C:\Users\shay\.m2\repository\gnu-getopt\getopt\1.0.13\getopt-1.0.13.jar;C:\Users\shay\.m2\repository\jboss\jbossws\jboss-jaxws\3.0.1-native-2.0.4.GA\jboss-jaxws-3.0.1-native-2.0.4.GA.jar;C:\Users\shay\.m2\repository\org\jboss\jbossxb\2.0.0.GA\jbossxb-2.0.0.GA.jar;C:\Users\shay\.m2\repository\org\jboss\jboss-reflect\2.0.0.GA\jboss-reflect-2.0.0.GA.jar;C:\Users\shay\.m2\repository\apache-xerces\xercesImpl\2.9.1\xercesImpl-2.9.1.jar;C:\Users\shay\.m2\repository\wutka-dtdparser\dtdparser121\1.2.1\dtdparser121-1.2.1.jar;C:\Users\shay\.m2\repository\org\jboss\jboss-vfs\2.0.0.CR1\jboss-vfs-2.0.0.CR1.jar;C:\Users\shay\.m2\repository\org\jboss\jboss-mdr\2.0.0.GA\jboss-mdr-2.0.0.GA.jar;C:\Users\shay\.m2\repository\sun-jaxb\jaxb-api\2.1.4\jaxb-api-2.1.4.jar;C:\Users\shay\.m2\repository\apache-xerces\xml-apis\2.9.1\xml-apis-2.9.1.jar;

Thanks!!

Shay
Comment 11 Milos Kleint 2013-08-19 12:36:02 UTC
thanks, since the jar appears on project's classpath, I assume the project side of things is working correctly (constructs the correct cp), reassigning to java for evaluation
Comment 12 Svata Dedic 2015-07-24 08:12:02 UTC
Reporter - is it still valid for either 8.0x or dev version ?
Comment 13 shayzu 2015-07-24 08:16:18 UTC
Hi,

I have to worked on the Maven project for over 2 years, so I am afraid I no longer can assist on that.

Thanks
Shay
Comment 14 Martin Balin 2016-07-07 07:16:52 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss