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 59117 - sun-ejb-jar.xml and sun-cmp-mappings.xml
Summary: sun-ejb-jar.xml and sun-cmp-mappings.xml
Status: RESOLVED WORKSFORME
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Sun Appserver 8 (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@serverplugins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-20 13:44 UTC by mirek_stohr
Modified: 2005-07-21 09:07 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 mirek_stohr 2005-05-20 13:44:43 UTC
GUI for editing the sun-ejb-jar.xml and sun-cmp-mappings.xml descriptors fails
to create CMR relationships, it regulary fails with the following exception.
Sometimes the descriptor files a corrupted. 

java.lang.NullPointerException
	at
org.netbeans.modules.java.ClassElementFinder.findSourceFile(ClassElementFinder.java:312)
	at
org.netbeans.modules.java.ClassElementFinder.searchFile(ClassElementFinder.java:256)
	at org.netbeans.modules.java.ClassElementFinder.find(ClassElementFinder.java:179)
	at org.openide.src.ClassElement.forName(ClassElement.java:926)
	at
com.sun.jdo.api.persistence.model.DevelopmentModel.getClass(DevelopmentModel.java:390)
	at
com.sun.jdo.modules.persistence.mapping.ejb.EJBDevelopmentModel.getClass(EJBDevelopmentModel.java:206)
	at com.sun.jdo.api.persistence.model.Model.getClass(Model.java:1089)
	at
com.sun.jdo.api.persistence.model.DevelopmentModel.getFields(DevelopmentModel.java:533)
	at
com.sun.jdo.modules.persistence.mapping.ejb.EJBDevelopmentModel.getFields(EJBDevelopmentModel.java:380)
	at com.sun.jdo.api.persistence.model.Model.getAllFields(Model.java:1076)
	at
com.sun.jdo.modules.persistence.mapping.ejb.EJBDevelopmentModel.getAllFields(EJBDevelopmentModel.java:400)
	at
com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentConversionHelper.getPKFields(DevelopmentConversionHelper.java:127)
	at
com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentConversionHelper.initMaps(DevelopmentConversionHelper.java:79)
	at
com.sun.jdo.modules.persistence.mapping.ejb.DevelopmentConversionHelper.<init>(DevelopmentConversionHelper.java:46)
	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:333)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	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:288)
	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:1078)
	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:1174)
	at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(BasicTreeUI.java:2246)
	at
javax.swing.plaf.basic.BasicTreeUI$Handler.handleSelection(BasicTreeUI.java:3432)
	at javax.swing.plaf.basic.BasicTreeUI$Handler.mousePressed(BasicTreeUI.java:3393)
	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:5485)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
	at java.awt.Component.processEvent(Component.java:5253)
	at java.awt.Container.processEvent(Container.java:1966)
	at java.awt.Component.dispatchEventImpl(Component.java:3955)
	at java.awt.Container.dispatchEventImpl(Container.java:2024)
	at java.awt.Component.dispatchEvent(Component.java:3803)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3889)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
	at java.awt.Container.dispatchEventImpl(Container.java:2010)
	at java.awt.Window.dispatchEventImpl(Window.java:1766)
	at java.awt.Component.dispatchEvent(Component.java:3803)
[catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Rochelle Raccah 2005-05-20 23:16:08 UTC
Can you describe more about what you are doing?  Are you using a user defined pk
class?
Comment 2 mirek_stohr 2005-05-23 09:12:38 UTC
Additional info (sorry for not providing it): 
1/ Four CMP EJB (say, Account, Task, Day, Month). Account has CMR field "tasks"
(collection of TaskLocal), Task has CMR "days" (collection of DayLocal) and
"months" (collection of MonthLocal), plus other simple string or numberic fields
(account has its name, address, amount, etc.)
2/ DayBean uses my own PK class DayPK (two fields, long "id", int "day"),
MonthBean analogic PK class MonthPK (two fields, long "id", int "month").
3/ Everything was generated by Netbeans GUI for ejb-jar.xml, sun-ejb-jar.xml
(plus sun-cmp-mappings.xml)
3/ as far as I can know, the noted exception is thrown regularly when I try to
do anything with the above mentioned EJB descriptors. Other EJBs descriptors can
be edited without any problems. 
4/ Project can be compiled, project "verify" says "passed", i.e. no problems
(maybe there are logical problems with these beans, but the compiler does not
know about it).
I use JDK 1.5.0, Netbeans 4.1, on Linux. 
Comment 3 Rochelle Raccah 2005-05-24 04:30:04 UTC
Can you make sure the fields in your pk classes are in your bean classes as 
well with the correct access modifiers, names, types, etc.?
Comment 4 mirek_stohr 2005-05-24 08:52:33 UTC
Yes, the primary key class DayPK has two fields (Long "id", Integer "day"), the
DayBean has abstract getter and setter methods for "id" (Long) and "day"
(Integer). The DayLocalBusiness interface contains getter methods for these
fields (I do not allow to change primary keys in business methods). The other
bean, Month, analogously. 
The Account and Task beans have simple primary keys of type Long. 
Comment 5 Rochelle Raccah 2005-05-24 18:46:37 UTC
Your previous comment said "long" and "int" and this one says "Long" and
"Integer".  Are they really different?  If not, would you be willing to attach
(or send me) your project?  I will take a look.
Comment 6 mirek_stohr 2005-05-30 13:18:29 UTC
Sorry, I could not, because I recreated the project (all mentioned EJB) and now
everything is OK ... probably some mistake between chair and monitor :-))
Comment 7 Rochelle Raccah 2005-05-31 22:12:37 UTC
Are you okay with closing it as WORKSFORME, then?
Comment 8 mirek_stohr 2005-06-01 07:19:47 UTC
Yes, sorry for reporting my stupidness :-))
Comment 9 Rochelle Raccah 2005-06-01 19:34:01 UTC
Not stupidness =) -- please let us know if you see a further problem.
Comment 10 Vince Kraemer 2005-07-21 00:22:44 UTC
new / WFM???