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.
in src/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/wizard/fromdb/JavaPersistenceGenerator.java line 392 you have : CMPMappingModel.JoinTableColumnMapping joinColumnMap = dbMappings.getJoinTableColumnMppings().get(role.getFieldName()); however this call is returning null for joinColumnMap and hence an NPE is raised in the following code. Part of the reason is that in debug i can see that role.getFieldName() is returning fieldName but with an indice of 1 like "fiedName1". This is caused (i think) by the fact that : 1) in buildCMPSet() of DbSchemaEjbGenerator addJoinTable was called *before* the call to makeBeansUnique. so addJoinTable innocently adds the old mapping by calling roleAHelper.getCMPMapping().getJoinTableColumnMppings().put(role{A,B}Cmr, joinColMap{A,B}) 2) makeBeansUnique adds indices to all the beans. But the mapping (getJoinTableColumnMppings()) still contains the old names of the beans before they were made unique. So obviously dbMappings.getJoinTableColumnMppings().get(role.getFieldName()) returns null. This should be fairly simple to fix for someone who is familiar with the code.
Looks like a P3.
Should be fixed now. Thanks for the report. Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/DbSchemaEjbGenerator.java,v <-- DbSchemaEjbGenerator.java new revision: 1.7; previous revision: 1.6 done Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/EntityClass.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/EntityClass.java,v <-- EntityClass.java new revision: 1.3; previous revision: 1.2 done Checking in src/org/netbeans/modules/j2ee/persistence/entitygenerator/EntityMember.java; /cvs/j2ee/persistence/src/org/netbeans/modules/j2ee/persistence/entitygenerator/EntityMember.java,v <-- EntityMember.java new revision: 1.3; previous revision: 1.2 done