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 58710 - NullPointerException when editing sun-cmp-mappings
Summary: NullPointerException when editing sun-cmp-mappings
Status: RESOLVED DUPLICATE of bug 70672
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: PC All
: P3 blocker (vote)
Assignee: _ pcw
URL:
Keywords:
: 58805 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-09 16:39 UTC by mihnea
Modified: 2006-01-04 23:44 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 mihnea 2005-05-09 16:39:57 UTC
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)
Comment 1 Rochelle Raccah 2005-05-09 19:56:00 UTC
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
Comment 2 mihnea 2005-05-10 13:03:18 UTC
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 
 
 
Comment 3 Rochelle Raccah 2005-05-11 01:35:00 UTC
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?
Comment 4 _ pcw 2005-10-04 16:34:21 UTC
Are we (R&D) going to be able to get more information on how to reproducethis bug?
Comment 5 _ pcw 2005-11-09 09:59:44 UTC
*** Issue 58805 has been marked as a duplicate of this issue. ***
Comment 6 _ pcw 2005-11-09 10:01:21 UTC
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.
Comment 7 _ pcw 2005-12-06 23:21:13 UTC
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
Comment 8 _ pcw 2006-01-04 23:44:32 UTC
It turns out that this bug is a duplicate of an exception that is covered in
issue 70672.
Comment 9 _ pcw 2006-01-04 23:44:57 UTC

*** This issue has been marked as a duplicate of 70672 ***