Andrus Adamchik closed CAY-785.
-------------------------------
Resolution: Fixed
Fix Version/s: 3.0
> Cayenne Modeler Fails to Open Project
> --------------------------------------
>
> Key: CAY-785
> URL: https://issues.apache.org/cayenne/browse/CAY-785
> Project: Cayenne
> Issue Type: Bug
> Components: CayenneModeler GUI
> Affects Versions: 2.0 [STABLE]
> Environment: Ubuntu 7.04, JDK 1.5.0_11
> Reporter: Gary Jarrel
> Assignee: Andrus Adamchik
> Priority: Minor
> Fix For: 3.0
>
> Attachments: files.tar.gz
>
>
> If cayenne.xml contains an entry:
> <node name="katya"
> datasource="katya.driver.properties"
> factory="org.apache.cayenne.conf.DBCPDataSourceFactory">
> <map-ref name="katya"/>
> </node>
> Noting the datasource: katya.driver.properties
> The following exception occurs:
> org.apache.cayenne.project.ProjectException: [v.2.0.2 January 14 2007] Error initializaing project configuration.
> at org.apache.cayenne.project.ApplicationProject.loadProject(ApplicationProject.java:130)
> at org.apache.cayenne.project.ApplicationProject.postInitialize(ApplicationProject.java:106)
> at org.apache.cayenne.project.ApplicationProject.<init>(ApplicationProject.java:90)
> at org.apache.cayenne.modeler.action.OpenProjectAction.openProject(OpenProjectAction.java:111)
> at org.apache.cayenne.modeler.action.OpenProjectAction.performAction(OpenProjectAction.java:99)
> at org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:163)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
> at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
> at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
> at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
> at java.awt.Component.processMouseEvent(Component.java:5501)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
> at java.awt.Component.processEvent(Component.java:5266)
> at java.awt.Container.processEvent(Container.java:1966)
> at java.awt.Component.dispatchEventImpl(Component.java:3968)
> 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:3892)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
> at java.awt.Container.dispatchEventImpl(Container.java:2010)
> at java.awt.Window.dispatchEventImpl(Window.java:1778)
> at java.awt.Component.dispatchEvent(Component.java:3803)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
> 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)
> Caused by: org.apache.cayenne.CayenneRuntimeException: [v.2.0.2 January 14 2007] Null dataSource
> at org.apache.cayenne.dba.AutoAdapter.<init>(AutoAdapter.java:105)
> at org.apache.cayenne.dba.AutoAdapter.<init>(AutoAdapter.java:95)
> at org.apache.cayenne.modeler.util.ModelerDbAdapter.<init>(ModelerDbAdapter.java:50)
> at org.apache.cayenne.modeler.action.ModelerProjectLoadDelegate.initAdapter(ModelerProjectLoadDelegate.java:48)
> at org.apache.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataNode(RuntimeLoadDelegate.java:315)
> at org.apache.cayenne.conf.ConfigLoader$NodeHandler.init(ConfigLoader.java:330)
> at org.apache.cayenne.conf.ConfigLoader$DomainHandler.startElement(ConfigLoader.java:219)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
> at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
> at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78)
> at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:161)
> at org.apache.cayenne.project.ApplicationProject.loadProject(ApplicationProject.java:127)
> ... 31 more
> org.apache.cayenne.project.ProjectException: [v.2.0.2 January 14 2007] Error initializaing project configuration.
> at org.apache.cayenne.project.ApplicationProject.loadProject(ApplicationProject.java:130)
> at org.apache.cayenne.project.ApplicationProject.postInitialize(ApplicationProject.java:106)
> at org.apache.cayenne.project.ApplicationProject.<init>(ApplicationProject.java:90)
> at org.apache.cayenne.modeler.action.OpenProjectAction.openProject(OpenProjectAction.java:111)
> at org.apache.cayenne.modeler.action.OpenProjectAction.performAction(OpenProjectAction.java:99)
> at org.apache.cayenne.modeler.util.CayenneAction.actionPerformed(CayenneAction.java:163)
> at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
> at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
> at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
> at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
> at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
> at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
> at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
> at java.awt.Component.processMouseEvent(Component.java:5501)
> at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
> at java.awt.Component.processEvent(Component.java:5266)
> at java.awt.Container.processEvent(Container.java:1966)
> at java.awt.Component.dispatchEventImpl(Component.java:3968)
> 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:3892)
> at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
> at java.awt.Container.dispatchEventImpl(Container.java:2010)
> at java.awt.Window.dispatchEventImpl(Window.java:1778)
> at java.awt.Component.dispatchEvent(Component.java:3803)
> at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
> at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
> 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)
> Caused by: org.apache.cayenne.CayenneRuntimeException: [v.2.0.2 January 14 2007] Null dataSource
> at org.apache.cayenne.dba.AutoAdapter.<init>(AutoAdapter.java:105)
> at org.apache.cayenne.dba.AutoAdapter.<init>(AutoAdapter.java:95)
> at org.apache.cayenne.modeler.util.ModelerDbAdapter.<init>(ModelerDbAdapter.java:50)
> at org.apache.cayenne.modeler.action.ModelerProjectLoadDelegate.initAdapter(ModelerProjectLoadDelegate.java:48)
> at org.apache.cayenne.conf.RuntimeLoadDelegate.shouldLoadDataNode(RuntimeLoadDelegate.java:315)
> at org.apache.cayenne.conf.ConfigLoader$NodeHandler.init(ConfigLoader.java:330)
> at org.apache.cayenne.conf.ConfigLoader$DomainHandler.startElement(ConfigLoader.java:219)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
> at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
> at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
> at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
> at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
> at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
> at org.apache.cayenne.conf.ConfigLoader.loadDomains(ConfigLoader.java:78)
> at org.apache.cayenne.conf.DefaultConfiguration.initialize(DefaultConfiguration.java:161)
> at org.apache.cayenne.project.ApplicationProject.loadProject(ApplicationProject.java:127)
> ... 31 more
> If the datasource is changed as follows:
> <node name="katya"
> datasource="katya.driver"
> factory="org.apache.cayenne.conf.DBCPDataSourceFactory">
> <map-ref name="katya"/>
> </node>
> Noting: katya.driver
> The project opens file in the modeler.
> The DBCP properties file is: katya.driver.properties
-- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.
This archive was generated by hypermail 2.0.0 : Tue Apr 22 2008 - 10:10:20 EDT