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 189706 - Change of processor path does not take affect
Summary: Change of processor path does not take affect
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-20 08:06 UTC by Petr Jiricka
Modified: 2010-08-25 03:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2010-08-20 08:06:38 UTC
1. Register WebLogic 10.3.3
2. In the WebLogic admin console, change default persistence provider to
TopLink
3. Create new Java EE 5 web application with WebLogic as the target server,
with JSF 2.0 framework included
4. Create a Entity classes from database. EclipseLink persistence provider will
be used and this will be a JPA 1.0 project.
5. In the project properties, remove EclipseLink from the processor path
6. Create JSF pages from these entities.
7. Run the application

You see that under build/web/WEB-INF/classes/mypackage, there are files generated by the EclipseLink annotation processor (e.g. Customer_.class), even though we removed the library in step 5. This processor is run by the deploy-on-save infrastructure; when you do Ant clean build, it is not run.
The presence of the AP-generated classes later causes error at runtime.

The workaround is to:
- Clean + Build the project
- Shut down the IDE
- Delete the Java editor cache in the userdir (<userdir>/var)
- Start the IDE and deploy the application again

So it looks like the processor path setting is changed in project metadata, but not in the Java infrastructure in memory.

See also bug 189626.
Comment 1 Tomas Zezula 2010-08-20 08:15:20 UTC
Is there a way how to reproduce it in J2SE without a need to install App server?
The change of AP path should trigger rescan of the project and update of metadata.
Comment 2 Petr Jiricka 2010-08-20 09:32:29 UTC
Steps to reproduce with Java SE:

1. Create a new Java SE application
2. Create a new Entity class, EclipseLink will be used as the default provider
3. In the project properties, remove EclipseLink from the compile classpath, add file java/modules/ext/eclipselink/eclipselink-javax.persistence-2.0.jar to the compile classpath, add EclipseLink to processor path (using Add Library...) and confirm the dialog.
4. In the project properties, remove EclipseLink from processor path, and confirm the dialog.
5. Run the project

File build/classes/mypackage/MyEntity_.class will be created, i.e. the EclipseLink processor was run, even though we removed it in step 4. In comparison, after Clean+Build, the MyEntity_.class file is (correctly) not present.

Lowering priority to P3.
Comment 3 Tomas Zezula 2010-08-23 16:20:38 UTC
OK, thanks.
Finally I am able to reproduce it.
Comment 4 Tomas Zezula 2010-08-23 17:14:20 UTC
In fact this issues is 2 issues co bundled together.
First introduced by SuperOnePassCompileWorker
Second introduced by FQN2Files cache

Each of them is fatal for APs. Increasing priority back to P2 as it's much bigger problem than it's appear.
And thanks Petre for reporting
Comment 5 Tomas Zezula 2010-08-24 08:33:09 UTC
The second problem (causing the problem is fixed).
jet-main 224f5e5cc149
The first problem is a big bigger. I've created a new issues #189799
Comment 6 Quality Engineering 2010-08-25 03:20:56 UTC
Integrated into 'main-golden', will be available in build *201008250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/224f5e5cc149
User: Tomas Zezula <tzezula@netbeans.org>
Log: #189706:Change of processor path does not take affect