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 102313 - JavaPersistenceGeneratorTest failures
Summary: JavaPersistenceGeneratorTest failures
Status: RESOLVED FIXED
Alias: None
Product: javaee
Classification: Unclassified
Component: Persistence (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Erno Mononen
URL:
Keywords: TEST
Depends on:
Blocks:
 
Reported: 2007-04-24 11:36 UTC by Erno Mononen
Modified: 2007-07-27 17:54 UTC (History)
0 users

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 Erno Mononen 2007-04-24 11:36:45 UTC
The tests in the JavaPersistenceGeneratorTest test case fail since the a JPA 
library can't be found in the classpath. There is actually a JPA library in the 
cp, but it doesn't get recognized correctly. Probably should somehow provide a 
URLMapper that would handle the jar protocol.
Comment 1 Erno Mononen 2007-06-29 19:07:07 UTC
The described issue has been fixed (needed the org.netbeans.core.startup module, see http://wiki.netbeans.org/wiki/view/
UsingFileSystemsMasterfs), but the tests still fail due to differences in formatting. Likely an issue in the formatting 
engine, the failures are caused by the following badly formatted equals methods:
    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof Product)) {
..   
Comment 2 Erno Mononen 2007-07-27 17:54:20 UTC
Fixed in trunk. In addition to the formatting differences there was yet another (new) cause for the failures, namely a 
problem with the class path used in the test.

Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateTwoUnrelated/User.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/User.pass,v  <--  User.pass
new revision: 1.5; previous revision: 1.4
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateTwoUnrelated/Product.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateTwoUnrelated/Product.pass,v  <--  Product.pass
new revision: 1.5; previous revision: 1.4
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateOneEntity/User.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateOneEntity/User.pass,v  <--  User.pass
new revision: 1.3; previous revision: 1.2
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateEntityFromSampleSchema/Customer.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateEntityFromSampleSchema/Customer.pass,v  <--  Customer.pass
new revision: 1.3; previous revision: 1.2
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/ProductCode.pass,v  <--  ProductCode.pass
new revision: 1.3; previous revision: 1.2
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Manufacturer.pass,v  <--  Manufacturer.pass
new revision: 1.3; previous revision: 1.2
done
Checking in data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGeneratorTest/
testGenerateRelatedEntitiesFromSampleSchema/Product.pass;
/cvs/j2ee/persistence/test/unit/data/goldenfiles/org/netbeans/modules/j2ee/persistence/wizard/fromdb/
JavaPersistenceGeneratorTest/testGenerateRelatedEntitiesFromSampleSchema/Product.pass,v  <--  Product.pass
new revision: 1.3; previous revision: 1.2
done
Checking in src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/ClassPathProviderImpl.java;
/cvs/j2ee/persistence/test/unit/src/org/netbeans/modules/j2ee/persistence/sourcetestsupport/
ClassPathProviderImpl.java,v  <--  ClassPathProviderImpl.java
new revision: 1.5; previous revision: 1.4
done