Bug 209661 - Missing compiled classes
Missing compiled classes
Status: RESOLVED FIXED
Product: java
Classification: Unclassified
Component: Source
7.1.1
PC Windows 7
: P3 (vote)
: 7.2
Assigned To: Tomas Zezula
issues@java
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-16 13:24 UTC by js-java
Modified: 2012-05-29 14:42 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
Messages log (158.39 KB, text/plain)
2012-04-16 11:43 UTC, js-java
Details
verbose ant (150.46 KB, text/plain)
2012-04-16 11:43 UTC, js-java
Details
messages.log (5.12 MB, text/plain)
2012-04-23 10:24 UTC, js-java
Details
new log (6.13 MB, text/plain)
2012-05-07 11:35 UTC, js-java
Details
clean and build output (195.12 KB, text/plain)
2012-05-08 07:57 UTC, js-java
Details
debug file output (8.67 KB, text/plain)
2012-05-08 07:58 UTC, js-java
Details
messages.log (4.95 MB, text/plain)
2012-05-08 07:59 UTC, js-java
Details

Note You need to log in before you can comment on or make changes to this bug.
Description js-java 2012-03-16 13:24:36 UTC
While working with NetBeans for issue 209617 having NetBeans generating high load, several class files were not compiled:

I pressed the "Debug File" button on an applet. Project is in "compile on save" mode. So the program started but giving a "ClassNotFoundException". I took a look in the build directory, no class file there. But only the directory structure and the .form files.

Then did a "Clean and Build", all files in there. Again started "Debug File", again "Class Not Found". Build directory again with missing files!

Restarted NetBeans, pressed "Debug File" (with this empty build directory), working as expected: Files were compiled and app started w/o problems.
Comment 1 Tomas Zezula 2012-03-23 13:00:35 UTC
Can you attach log, ant verbose output or sample project to reproduce the problem?
Comment 2 Tomas Zezula 2012-03-23 13:02:09 UTC
The ant verbose output can be enabled in Tools/Options/Miscellaneous/Ant/Verbosity Level
Comment 3 js-java 2012-04-16 11:42:30 UTC
Occured again. This time with an Java EE Project:

Clean and Build created all files, Deloy created WAR file without some files. Those files were also deleted in build/web/WEB-INF after that.

Attaching messages.log and ant output.
Comment 4 js-java 2012-04-16 11:43:03 UTC
Created attachment 118325 [details]
Messages log
Comment 5 js-java 2012-04-16 11:43:54 UTC
Created attachment 118326 [details]
verbose ant
Comment 6 js-java 2012-04-16 12:16:26 UTC
Simply restarting NetBeans didn't help. Had to remove content of /var/cache/index. Now all files were added to WAR file again.
Comment 7 Tomas Zezula 2012-04-17 07:52:46 UTC
Thanks for log.
There is an exception thrown from VCS causing the files not being copied.

java.lang.Exception
	at org.netbeans.modules.subversion.FilesystemHandler.doCopy(FilesystemHandler.java:355)
	at org.netbeans.modules.versioning.FilesystemInterceptor$DelegatingInterceptor.doCopy(FilesystemInterceptor.java:543)
	at org.netbeans.modules.versioning.FilesystemInterceptor$DelegatingInterceptor$2.handle(FilesystemInterceptor.java:598)
	at org.netbeans.modules.masterfs.ProvidedExtensionsProxy$DelegatingIOHandler$1.run(ProvidedExtensionsProxy.java:498)
	at org.netbeans.modules.masterfs.ProvidedExtensionsProxy.runCheckCode(ProvidedExtensionsProxy.java:466)
	at org.netbeans.modules.masterfs.ProvidedExtensionsProxy.access$300(ProvidedExtensionsProxy.java:66)
	at org.netbeans.modules.masterfs.ProvidedExtensionsProxy$DelegatingIOHandler.handle(ProvidedExtensionsProxy.java:495)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.handleMoveCopy(BaseFileObj.java:314)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.copy(BaseFileObj.java:231)
	at org.netbeans.modules.java.api.common.project.BaseActionProvider.copyAppletHTML(BaseActionProvider.java:1704)
	at org.netbeans.modules.java.api.common.project.BaseActionProvider.getTargetNames(BaseActionProvider.java:827)
	at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(J2SEActionProvider.java:199)
Comment 8 Ondrej Vrabec 2012-04-17 08:44:44 UTC
js-java: is the build folder ignored? Look into the project folder and select Subversion -> Svn Properties. Is there the "svn:ignore" property and does it list the build folder?

tzezula: the exception is just a simple log of FS activity in AWT, it prevents nothing and has absolutely no impact on the behavior. If you want to liminate that log, simply do not call FS.copy in AWT
Comment 9 js-java 2012-04-17 08:49:07 UTC
It is a completely new project and has "build" and "dist" in the svn:ignore list.
Comment 10 Ondrej Vrabec 2012-04-17 09:08:52 UTC
Please run the IDE with enhanced logging: add the following switch into netbeans.conf
-J-Dorg.netbeans.modules.subversion.level=-1
and attach the messages log after the files are supposed to be copied. Also please let me know of the path to the missing file so i can identify it in the messages log. Thanks
Comment 11 Ondrej Vrabec 2012-04-19 13:21:01 UTC
js-java, please attach the log.
Comment 12 js-java 2012-04-23 10:24:18 UTC
Created attachment 118627 [details]
messages.log

This time the problem looks different:

Exception in thread "AWT-EventQueue-1" java.lang.RuntimeException: Uncompilable source code
	at de.bmw.scmviewer.scene.sCategory.compareTo(sCategory.java)

I did several clean and build without problems but when running program comes to this place I get this exception. None of those files in the package were changed.

After clearing var/cache/index and simply starting the program again without any compilation it worked.
Comment 13 Ondrej Vrabec 2012-04-23 11:53:00 UTC
again, the exception is just a log, all copies run without problem - beforeCopy, doCopy and afterCopy - (i inspected the attached messages.log).
> After clearing var/cache/index and simply starting the program again without
> any compilation it worked.
It must be something with the indexing then.
Comment 14 js-java 2012-05-07 11:35:35 UTC
Created attachment 119145 [details]
new log

New occurance!

I added a function to a web service, did a refresh on the client site. Clean and build worked. Then I modified my code 

to use this new function. NetBeans reported it cannot find the symbol! However, I added it and did a build. No error!

NetBeans still complaints that it cannot find the symbol. 

Next I started the application. NetBeans gave a warning that I want to start a faulty application. 

Later on the app crashed because of missing classes!

I repeated the clean and build procedure, all went well, all files were created. Then I started the app.
NetBeans still reports the missing symbol and gave a warning. I watched the folder of the classes. And
during start all class files inside the folder were deleted!!

So no wonder why this failes.

I stopped NetBeans, deleted var/cache/index/*, and started again. All fine!


Cut from messages.log, those files were deleted:

  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\FullTestSet.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\package-info.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\package-info.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\ObjectFactory.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\ObjectFactory.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\QueryResult.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\QueryResult.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\TestCase.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\TestCase.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\TestRun.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\TestRun.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\TestRunDates.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\TestRunDates.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\TestSet.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\TestSet.java : java.io.File
FINER [org.netbeans.modules.subversion.FileLabelsCache]: No item in cache for : C:\Users\js\Documents\NetBeansProjects

\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager\services\shared\tests\TestVersionEntry.java
~~~ SVN: invoking 'getInfoFromWorkingCopy' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\generated-sources\jax-ws\de\bmw\scenemanager

\services\shared\tests\TestVersionEntry.java : java.io.File
FINE [org.netbeans.modules.subversion]: afterDelete C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build

\classes\.netbeans_automatic_build
~~~ SVN: invoking 'getSingleStatus' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\.netbeans_automatic_build : java.io.File
FINE [org.netbeans.modules.subversion]:  shallRemove: skipping delete due to correct metadata
~~~ SVN: invoking 'getSingleStatus' with 

....

FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\ObjectFactory.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\FullTestSet.class
~~~ SVN: invoking 'getSingleStatus' with 
  C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\ObjectFactory.class : java.io.File
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\TestCase.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\QueryResult.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\TestRunDates.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\TestRun.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\TestSet.class
FINE [org.netbeans.modules.subversion]: afterCreate C:\Users\js\Documents\NetBeansProjects\BMW\ScmClientTools\build\classes\de\bmw\scenemanager\services\shared\tests\TestVersionEntry.class
Comment 15 js-java 2012-05-08 07:57:40 UTC
Created attachment 119153 [details]
clean and build output
Comment 16 js-java 2012-05-08 07:58:08 UTC
Created attachment 119154 [details]
debug file output
Comment 17 js-java 2012-05-08 07:59:17 UTC
Created attachment 119155 [details]
messages.log

Twice a day!

clean and build:
(see log)


All files there, Then starting with "debug file":

java.lang.ClassNotFoundException: de.bmw.scmviewer.startMenuIntegratedMain
	at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:219)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
	at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:152)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
	at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:633)
	at sun.applet.AppletPanel.createApplet(AppletPanel.java:795)
	at sun.applet.AppletPanel.runLoader(AppletPanel.java:724)
	at sun.applet.AppletPanel.run(AppletPanel.java:378)
	at java.lang.Thread.run(Thread.java:722)

(see log)

File was deleted in build directory!


I restarted NetBeans and did clean&build, still fails. Removing content of var/cache/index helps- again.
Comment 18 Jan Lahoda 2012-05-24 11:15:44 UTC
Tomas, this is what we talked about a week ago - there was not enough memory to compile a source root. What needs to be done:
1. we need to check that the not-compiled source root really has the dirty flag.
2. we need to make sure the CoS run action won't run anything based on a dirty source root
3. there might be some UI warning to the user about the OOME-like situation. Surely for CoS Run (were a dialog may appear saying that some source roots were not compiled fully, possibly suggesting to increase the heap size), but possibly also some notification in the status bar when this happens even without the CoS.

Not sure if you want to do that - if not, please reassign back to me, I will.
Comment 19 Tomas Zezula 2012-05-29 14:42:23 UTC
>1. we need to check that the not-compiled source root really has the dirty flag.
Done
>2. we need to make sure the CoS run action won't run anything based on a dirty source root.
Done
>3. there might be some UI warning to the user about the OOME-like situation.
Done

Fixed jet-main d981b9b5f5db


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo