• Post Reply Bookmark Topic Watch Topic
  • New Topic

ADF Java Desktop Application Jar  RSS feed

 
Marusia Nuf
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made an ADF Java desktop app, and put all the swing classes in the model. It runs correctly from Jdevloper. I access the application module using this way:

    private static String amDef = "model.AppModule";
    private static String config = "AppModuleLocal";
    appModule =   (AppModuleImpl)Configuration.createRootApplicationModule (amDef,config);

But, when i deploy it as a jar file and run it, it first runs well, but as soon as it accesses the application module it gives the following exception:

oracle.jbo.ConfigException: JBO-33003: Connection name MyConnection is not defined.
  at oracle.jbo.client.Configuration.initializeFromConnectionName(Configuration.java:1199)
  at oracle.jbo.client.Configuration.getConfiguration(Configuration.java:648)
  at oracle.jbo.common.ampool.PoolMgr.loadConfiguration(PoolMgr.java:605)
  at oracle.jbo.common.ampool.PoolMgr.findPool(PoolMgr.java:526)
  at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1505)
  at oracle.jbo.client.Configuration.createRootApplicationModule(Configuration.java:1482)
  at classes.ImageCaptureAndPrint.actionPerformed(ImageCaptureAndPrint.java:888)
  at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
  at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
  at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
  at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
  at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
  at javax.swing.plaf.basic.BasicRootPaneUI$Actions.actionPerformed(BasicRootPaneUI.java:208)
  at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1663)
  at javax.swing.JComponent.processKeyBinding(JComponent.java:2882)
  at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:307)
  at javax.swing.KeyboardManager.fireKeyboardAction(KeyboardManager.java:250)
  at javax.swing.JComponent.processKeyBindingsForAllComponents(JComponent.java:2974)
  at javax.swing.JComponent.processKeyBindings(JComponent.java:2966)
  at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
  at java.awt.Component.processEvent(Component.java:6310)
  at java.awt.Container.processEvent(Container.java:2236)
  at java.awt.Component.dispatchEventImpl(Component.java:4889)
  at java.awt.Container.dispatchEventImpl(Container.java:2294)
  at java.awt.Component.dispatchEvent(Component.java:4711)
  at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1954)
  at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:806)
  at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1074)
  at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:945)
  at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:771)
  at java.awt.Component.dispatchEventImpl(Component.java:4760)
  at java.awt.Container.dispatchEventImpl(Container.java:2294)
  at java.awt.Window.dispatchEventImpl(Window.java:2746)
  at java.awt.Component.dispatchEvent(Component.java:4711)
  at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
  at java.awt.EventQueue.access$500(EventQueue.java:97)
  at java.awt.EventQueue$3.run(EventQueue.java:709)
  at java.awt.EventQueue$3.run(EventQueue.java:703)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
  at java.awt.EventQueue$4.run(EventQueue.java:731)
  at java.awt.EventQueue$4.run(EventQueue.java:729)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
  at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
  at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
  at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
  at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
  at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
  at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 
Tim Moores
Saloon Keeper
Posts: 4024
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where, and how, is "MyConnection" defined?
 
Marusia Nuf
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the connection is a normal ADF JDBC URL connection defined in Model.jpx.
it all runs fine when in jdeveloper, the problem only arises in deployment
 
Tim Moores
Saloon Keeper
Posts: 4024
94
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you checked that a) that file is in the jar file, and b) that the file otherwise works correctly (meaning other settings in it are being used)?
 
Norm Radder
Rancher
Posts: 2240
28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How is the Model.jpx file accessed?  If it is to be read from a jar file, it must be treated as a resource, not as a disk file.
 
Campbell Ritchie
Marshal
Posts: 56536
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and welcome to the Ranch
 
Marusia Nuf
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks

i found the solution

it was to create an ADF Library Jar File in the deployment in the model, it had the database connection by default.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!