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.
I get the following error when I try to edit sun-cmp-mappings with netbeans 4.1 RC2. More exactly, the error occurs when trying to edit the settings of any entity bean in my project: java.lang.NullPointerException at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.getCMRField(DevelopmentNameMapper.java:292) at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.getRelationshipFieldsForEjb(DevelopmentNameMapper.java:274) at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.getFieldsForEjb(DevelopmentNameMapper.java:251) at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.hasField(DevelopmentNameMapper.java:138) at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.initGeneratedRelationshipMaps(DevelopmentNameMapper.java:119) at com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentNameMapper.<init>(DevelopmentNameMapper.java:46) at com.sun.jdo.modules.persistence.mapping.ejb.EJBDevelopmentInfoHelper.getNameMapperInternal(EJBDevelopmentInfoHelper.java:211) at com.sun.jdo.modules.persistence.mapping.ejb.EJBDevelopmentInfoHelper.createConversionHelper(EJBDevelopmentInfoHelper.java:217) at org.netbeans.modules.j2ee.sun.share.configBean.EjbJarRoot.getConversionHelper(EjbJarRoot.java:488) at org.netbeans.modules.j2ee.sun.share.configBean.EjbJarRoot.ensureCmpMappingExists(EjbJarRoot.java:532) at org.netbeans.modules.j2ee.sun.share.configBean.customizers.ejbmodule.CmpEntityEjbCustomizer.initializeTabbedBeanPanels(CmpEntityEjbCustomizer.java:200) at org.netbeans.modules.j2ee.sun.share.configBean.customizers.ejbmodule.EjbCustomizer.setComponentValues(EjbCustomizer.java:293) at org.netbeans.modules.j2ee.sun.share.configBean.customizers.ejbmodule.EjbCustomizer.setObject(EjbCustomizer.java:74) at org.netbeans.modules.j2ee.sun.share.configBean.customizers.ejbmodule.EntityEjbCustomizer.setObject(EntityEjbCustomizer.java:54) at org.netbeans.modules.j2ee.sun.share.configBean.customizers.ejbmodule.CmpEntityEjbCustomizer.setObject(CmpEntityEjbCustomizer.java:65) at org.netbeans.modules.j2ee.deployment.config.ui.ConfigBeanPanelView.getPanel(ConfigBeanPanelView.java:142) at org.netbeans.modules.j2ee.deployment.config.ui.ConfigBeanPanelView.showSelection(ConfigBeanPanelView.java:80) at com.sun.tools.j2ee.editor.PanelView$NodeSelectedListener.propertyChange(Unknown Source) at org.openide.util.WeakListener$PropertyChange.propertyChange(WeakListener.java:337) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:252) at org.openide.explorer.ExplorerManager$2.run(ExplorerManager.java:791) at org.openide.util.Mutex.doEvent(Mutex.java:1024) at org.openide.util.Mutex.readAccess(Mutex.java:239) at org.openide.explorer.ExplorerManager.fireInAWT(ExplorerManager.java:789) at org.openide.explorer.ExplorerManager.access$600 (ExplorerManager.java:49) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.updateSelection(ExplorerManager.java:208) at org.openide.explorer.ExplorerManager$1AtomicSetSelectedNodes.run(ExplorerManager.java:212) at org.openide.util.Mutex.readAccess(Mutex.java:246) at org.openide.explorer.ExplorerManager.setSelectedNodes(ExplorerManager.java:217) at org.openide.explorer.ExplorerManager$1SetExploredContextAndSelection.run(ExplorerManager.java:293) at org.openide.util.Mutex.readAccess(Mutex.java:246) at org.openide.explorer.ExplorerManager.setExploredContextAndSelection(ExplorerManager.java:305) at org.openide.explorer.view.BeanTreeView.selectionChanged(BeanTreeView.java:89) at org.openide.explorer.view.TreeView.callSelectionChanged(TreeView.java:655) at org.openide.explorer.view.TreeView$TreePropertyListener.run(TreeView.java:1011) at org.openide.util.Mutex.postRequest(Mutex.java:987) at org.openide.util.Mutex.postReadRequest(Mutex.java:421) at org.openide.explorer.view.TreeView$TreePropertyListener.valueChanged(TreeView.java:981) at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:629) at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1076) at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:287) at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:170) at javax.swing.JTree.setSelectionPath(JTree.java:1168) at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2192) at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(BasicTreeUI.java:2840) at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(BasicTreeUI.java:2801) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:222) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221) at java.awt.Component.processMouseEvent(Component.java:5097) at java.awt.Component.processEvent(Component.java:4897) at java.awt.Container.processEvent(Container.java:1569) at java.awt.Component.dispatchEventImpl(Component.java:3615) at java.awt.Container.dispatchEventImpl(Container.java:1627) at java.awt.Component.dispatchEvent(Component.java:3477) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3195) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128) at java.awt.Container.dispatchEventImpl(Container.java:1613) at java.awt.Window.dispatchEventImpl(Window.java:1606) at java.awt.Component.dispatchEvent(Component.java:3477) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:456) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Can you post some more info? Specifically: 1) Were you editing in xml or gui? 2) What kind of relationships do you have? 1:1, 1:n, n:m, one-way, two-way? 3) If possible, attach you dbschema file
I was trying to edit the file from the gui The file as such is not corrupt, i was able to edit it manually with a text editor and go on with deployment I also notice that deploytool seems to be sharing code with netbeans. The problem i mention only occurs with netbeans, deploytool is fine i have three relationships (for the moment, because 'cmp fields from database' wasn't working properly, but that's another issue). twoo of them are one-to-many, one is many-to-many. all three are two-way however the problem already occured with two one-to-many two-way relationships
Thanks for the info. It would still be best if you could attach your files here for debugging, but it appears the the relationship-role-source or ejb-name element inside the relationship-role-source might be missing. Can you check you ejb-jar.xml contents?
Are we (R&D) going to be able to get more information on how to reproducethis bug?
*** Issue 58805 has been marked as a duplicate of this issue. ***
We have received no further information on this bug. I will take a look at the persistence code and see if I can make any sense of this, but barring that, best I can do is put a NPE handler in EjbJarRoot to make sure the persistence wrapping code is well behaved.
I put in NPE traps in a number of CMP related entry points that will log any NPE's. I have received no further information from the reporter that would help us ascertain what the problem was here so I'm closing this bug. Please reopen with further information if this is still a problem. Changes: http://serverplugins.netbeans.org/source/browse/serverplugins/sun/sunddui/src/org/netbeans/modules/j2ee/sun/share/configbean/EjbJarRoot.java?r1=1.12&r2=1.13
It turns out that this bug is a duplicate of an exception that is covered in issue 70672.
*** This issue has been marked as a duplicate of 70672 ***