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.
build 200605220200 -create new J2EE 1.4 Enterprise Application -create CMP beans from Database -ERROR some of created beans has invalid implements clause: public abstract class ProductBean implements javax.ejb.EntityBean { pr, test.ProductLocalBusinessivate javax.ejb.EntityContext context;
I cannot reproduce. Marking as RANDOM.
*** Issue 72387 has been marked as a duplicate of this issue. ***
this is also valid for normal CMPs (not from DB)
Dane, can you please check also this one?
I am not able to reproduce this issue in the latest builds. In fact, I have never managed to reproduce it on my machine (Windows XP). There were made several bugfixes in the javacore module and also in the related CMP beans generator, it is possible that the problem has been already fixed. Honzo, can you still reproduce it? If so, is it reproducible manually or in tests only?
Dane, I'm not able to reproduce this in the latest daily build
I can still see this randomly in automated tests. Last time I saw this was in build around September 7th-8th (note that I've been on vacation last week).
I've just went through the history of our test results and I've found that this is reproducible also in build: ------------------------------------------------------------------------------- >Log Session: Monday, September 18, 2006 7:22:21 PM CEST >System Info: Product Version = NetBeans 5.5 Dev (Build 200609181130) Operating System = Windows 2003 version 5.2 running on amd64 Java; VM; Vendor; Home = 1.6.0-rc; Java HotSpot(TM) 64-Bit Server VM 1.6.0-rc-b95; Sun Microsystems Inc.; E:\space\jdks\jdk1.6.0\jre System Locale; Encoding = en_US (nb); Cp1252 steps done by the test case which failed: -create new ejb module with J2EE 1.4 spec version -create local session bean -create remote session bean -create session bean w/ local and remote interfaces => LocalAndRemoteSessionLocal interface is: public interface LocalAndRemoteSessionLocal extends EJBLocalObject { , ejbs.LocalAndRemoteSessionLocalBusiness }
this is now reproducible only in automated tests, decreasing priority to P3
The problem seems to be reproducible on a dual processor machine only. To reproduce it, it requires to make several attempts, about ten, and it does not always result in an incompilable source code, it is also possible to obtain an assertion reporting that there is a resource without classes while a class was expected there. In the case of assertion, the sources are compilable, but one interface is missing in the 'implemets' section. By inspecting the code, the critical part of CMP generating process could be in EjbGenerationUtil.generateClass(). The following actions take place there: - create a file object with 'java' extension - fill the content of the file with output of transformation performed on a xml template - indent the content of the file by indentation engine, write output to string writer - retrieve document, remove its content and set the string from string writer as the new content It is possible that this sequence of steps leads to some race conditions, temporal inconsistencies between jmi data and sources, but I have not found the exact cause. On the other hand, it seems the problem disappers when reparse is forced on the generated source file. I have not manage to reproduce the problem after adding this. I will commit related fix into release55_dev, if it is confirmed by QE that this helps, we can merge the fix into release55.
Created attachment 34310 [details] assertion stack trace
Fixed in release55_dev: /cvs/j2ee/ejbcore/src/org/netbeans/modules/j2ee/ejbcore/api/codegeneration/EjbGenerationUtil.java new revision: 1.1.2.4.2.4.2.1; previous revision: 1.1.2.4.2.4
Created attachment 34314 [details] patch for release55
The proposed fix did not help. Reproduced again in tests... :(
The whole EJB generation functionality has been rewritten to Retouche, so I assume this issue is no longer relevant. Please reopen if the issue is still reproducible in your tests.