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 210793 - The build works fine all classes get generated fine, then after deploy some (random) classes get deleted and I get class not found on runtime
Summary: The build works fine all classes get generated fine, then after deploy some (...
Status: RESOLVED INCOMPLETE
Alias: None
Product: javaee
Classification: Unclassified
Component: Web Project (show other bugs)
Version: 7.1
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2012-04-06 05:59 UTC by mircea273
Modified: 2012-04-12 07:58 UTC (History)
5 users (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 mircea273 2012-04-06 05:59:34 UTC
Product Version = NetBeans IDE 7.1 (Build 201112071828)
Operating System = Linux version 2.6.31-22-generic running on amd64
Java; VM; Vendor = 1.7.0_02
Runtime = Java HotSpot(TM) 64-Bit Server VM 22.0-b10

I see it is an old problem, but since it is intermitent you didn't fix it apparenty. Check out this link: http://forums.netbeans.org/topic19798.html
The build works fine all classes get generated fine, then after deploy some (random) classes get deleted and I get class not found on runtime.
Comment 1 Martin Fousek 2012-04-06 13:19:17 UTC
In the thread they speak about Spring MVC, Struts2 and that the final solution which helped (mentioned in the external thread) was disabling of DoS. Looks to me that it isn't framework specific but rather related to deploy or probably really to DoS - I think that there were troubles like this, David will know more.
Comment 2 mircea273 2012-04-07 19:54:59 UTC
I am using Spring to build a webapp. The IDE works fine until this happens occasionally. It happened twice in about 2 months. 

I am pretty sure it is not about the "deploy on save" because i have unchecked that from the beginning of the project. The thread I mentioned has a workaround that works: "changing any project property and rebuild". But of course that is just an ugly workaround and the problem is pretty annoying.
Comment 3 Martin Fousek 2012-04-08 15:47:42 UTC
Thanks mircea273 for additional information.

It just looks strange to me that it would be framework related - but of course, it's possible. Let's see if there wasn't any deploy related troubles. Anyway we need any loggin information to be able to detect issue. Could you reproduce that with more detailed logging - IDE options -> Java -> Verbosity -> Verbose or Debug. Please try to reproduce that, attach your server output and IDE log and reopen the issue then. Thanks...
Comment 4 mircea273 2012-04-08 16:45:43 UTC
i am sorry but i have no idea what triggers this behavior and thus i cannot reproduce it at will. I will try to have more verbosity enabled and wait for the problem to resurface...
Comment 5 mircea273 2012-04-09 09:38:01 UTC
Since i am using Spring on my project it may be the case that this issue is a bug to be reported to the Spring MVC plugin team if the only people complaining are Spring developers...
Comment 6 David Konecny 2012-04-09 22:52:57 UTC
Very strange issue. First I thought it is a duplicate of issue 210053 but this issue is different - some class files seems to be deleted during deployment?? Any idea PetrH?
Comment 7 Petr Hejl 2012-04-11 12:11:16 UTC
This may be really hard to track and I'm really not sure where to start. Reporter can you provide your app for testing. Alternatively, can you provide (or describe) an application with similar structure and technologies used?

Do you use pure deploy on save or do you combine it with Run action?
Comment 8 Petr Hejl 2012-04-11 12:12:43 UTC
Another question: Is the pattern of deleted classes really random? Can you give us names of those deleted classes?
Comment 9 Petr Hejl 2012-04-11 12:15:07 UTC
Honzo, any idea about this statement from the forum?

"This problem has bitten me a couple of times. Apparently, the "solution" is just to change a project property and rebuild. I don't think it matters much which property you change. The first time I changed the source binary format from JDK5 to JDK6 and that worked. This time I had to change back to JDK5."
Comment 10 mircea273 2012-04-11 17:54:37 UTC
The application is built on top of Spring MVC. I always do a "Clean and Build" followed by "Deploy"(Deploy on save is disabled since project inception). Tomcat is running from inside Netbeans. I don't usually  restart Tomcat. We use SVN. There is another developer working on the project and he is using Idea IDE.

 I cannot provide the project files unfortunately, but I wasn't able to see any pattern in the problem. Anyway, the problem surfaces only once every X weeks or so. I cannot tell what triggers it. Maybe I'll be able to see some pattern next time.

Don't know if this is relevant or not: Cannot remember about the first time, but on the last time it happened I have just updated from SVN and there were several files modified and several new. One of the files that was deleted on deploy was one of the new files from SVN. As I said, the classes were correctly generated in the build folder, but after the deploy command a few files were deleted with no apparent logic. Some names of files deleted: CaseDAO and CaseDAOImpl.
Comment 11 David Konecny 2012-04-11 21:55:20 UTC
Mention of subversion reminded me of this issue 209619. This one might be likely duplicate.
Comment 12 Petr Jiricka 2012-04-12 07:58:29 UTC
You are right, that may be it. Cc'ing Tomas.