RSS

Category Archives: JDeverloper

JDeveloper and the lost trigger when clause

Once upon a time when creating a lot of tables, types and triggers we ran into a weird “thingie” with Oracle JDeveloper PS6 where the WHEN statement of the trigger “disappered” in the code view.

The script (for one of our many, many, many triggers):

</pre>
--------------------------------------------------------
 -- DDL for Trigger ZMS_DMT_BRI
 --------------------------------------------------------

CREATE OR REPLACE TRIGGER "ZMS"."ZMS_DMT_BRI" BEFORE INSERT ON ZMS.ZMS_DOCUMENTEN
 REFERENCING OLD AS old NEW AS new
 FOR EACH ROW
 WHEN (new.ID IS NULL) BEGIN
 SELECT ZMS.ZMS_DMT_ID_SEQ.NEXTVAL
 INTO :new.ID
 FROM dual;
 END;
 /
 ALTER TRIGGER "ZMS"."ZMS_DMT_BRI" ENABLE;
<pre>

After compilation and testing our project we discovered the trigger was not working correctly. So we checked out our code and discovered this:

Result

The WHEN statements were suddenly gone from all our triggers. However when inspecting the triggers closely with the EDIT view we could see they were still there:

trigger2

However 1 trigger was (probably) accidentally recompiled from the source view, and JDeveloper then makes the WHEN statement disappear. By manually returning the WHEN clause (in EDIT view or in code and recompile)  the issue was fixed.

Still it’s “strange” in our opinion that the statement is not viewable from normal source code view of the artefact. We are not sure if this is a bug, a hidden feature, or we expecting something stupid ;-)

 
Leave a comment

Posted by on 24-06-2013 in JDeverloper, Oracle

 

Tags: ,

JDeveloper crashing while using BPM plugin

We have this really annoying bug in JDeveloper 11.1.1.6 while using the Oracle BPM plugin.
The application crashes approximately every hour with this nice feedback:

error

and this logging:


oracle.adf.share.ADFContext:Feb 8, 2013 9:49:35 AM oracle.adf.share.ADFContext getCurrent
WARNING: Automatically initializing a DefaultContext for getCurrent.
Caller should ensure that a DefaultContext is proper for this use.
Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
This message may be avoided by performing initADFContext before using getCurrent().
For more information please enable logging for oracle.adf.share.ADFContext at FINEST level.

oracle.adf.share.jndi.ReferenceStoreHelper:Feb 8, 2013 9:49:35 AM oracle.adf.share.jndi.ReferenceStoreHelper getReferencesMapEx
WARNING: Incomplete connection reference object for connection:STUB

oracle.jps.common:Feb 8, 2013 9:49:36 AM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
WARNING: Failed to validate the xml content. SchemaLocation: schemaLocation value = 'http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd' must have even number of URI's. Location: unavailable.

oracle.jps.common:Feb 8, 2013 9:49:36 AM oracle.security.jps.internal.common.util.StrictValidationEventHandler handleEvent
WARNING: Failed to validate the xml content. cvc-complex-type.2.4.b: The content of element 'propertySets' is not complete. One of '{"http://xmlns.oracle.com/oracleas/schema/11/jps-config-11_1.xsd":propertySet}' is expected. Location: unavailable.

oracle.adf.share.jndi.ReferenceStoreHelper:Feb 8, 2013 9:49:36 AM oracle.adf.share.jndi.ReferenceStoreHelper getReferencesMapEx
WARNING: Incomplete connection reference object for connection:SOA_MDS

Invoking command: Changes in myProcess
Invoking command:
Invoking command:
Invoking command:
Invoking command:
Performing action Save[ from oracle.bpm.fusion.studio.editor.ProcessEditor ]
Invoking command: [ from oracle.bpm.fusion.studio.editor.ProcessEditor ]
Performing action Save All[ from oracle.bpm.fusion.studio.editor.ProcessEditor ]
Invoking command: [ from oracle.bpm.fusion.studio.editor.ProcessEditor ]
Invoking command: [ from oracle.ide.navigator.ProjectNavigatorWindow ]
Invoking command: modify adf-config for soa
Invoking command: [ from oracle.ide.runner.RunLogPage ]
Invoking command:
Invoking command:
Invoking command:
Invoking command:
Uncaught exception
java.lang.NullPointerException
 net.miginfocom.layout.Grid.addLinkIDs()
 net.miginfocom.layout.Grid.<init>()
 net.miginfocom.swing.MigLayout.checkCache()
 net.miginfocom.swing.MigLayout.getSizeImpl()
 net.miginfocom.swing.MigLayout.preferredLayoutSize()
 o.bpm.ui.layout.MigLayout.preferredLayoutSize(MigLayout.java:114)
 j.a.Container.preferredSize(Container.java:1599)
 j.a.Container.getPreferredSize(Container.java:1584)
 jx.s.JComponent.getPreferredSize(JComponent.java:1636)
 o.ii.editor.SplitPane.doLayoutBottomTabs(SplitPane.java:537)
 o.ii.editor.SplitPane.doLayout(SplitPane.java:523)
 j.a.Container.validateTree(Container.java:1507)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validate(Container.java:1480)
 jx.s.RepaintManager.validateInvalidComponents(RepaintManager.java:669)
 jx.s.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
 j.a.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 j.a.EventQueue.dispatchEventImpl(EventQueue.java:642)
 j.a.EventQueue.access$000(EventQueue.java:85)
 j.a.EventQueue$1.run(EventQueue.java:603)
 j.a.EventQueue$1.run(EventQueue.java:601)
 j.security.AccessController.doPrivileged(Native Method)
 j.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 j.a.EventQueue.dispatchEvent(EventQueue.java:612)
 j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 j.a.EventDispatchThread.run(EventDispatchThread.java:122)
Uncaught exception
java.lang.NullPointerException
 net.miginfocom.layout.Grid.addLinkIDs()
 net.miginfocom.layout.Grid.<init>()
 net.miginfocom.swing.MigLayout.checkCache()
 net.miginfocom.swing.MigLayout.getSizeImpl()
 net.miginfocom.swing.MigLayout.preferredLayoutSize()
 o.bpm.ui.layout.MigLayout.preferredLayoutSize(MigLayout.java:114)
 j.a.Container.preferredSize(Container.java:1599)
 j.a.Container.getPreferredSize(Container.java:1584)
 jx.s.JComponent.getPreferredSize(JComponent.java:1636)
 o.ii.editor.SplitPane.doLayoutBottomTabs(SplitPane.java:537)
 o.ii.editor.SplitPane.doLayout(SplitPane.java:523)
 j.a.Container.validateTree(Container.java:1507)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validateTree(Container.java:1513)
 j.a.Container.validate(Container.java:1480)
 jx.s.RepaintManager.validateInvalidComponents(RepaintManager.java:669)
 jx.s.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:124)
 j.a.event.InvocationEvent.dispatch(InvocationEvent.java:209)
 j.a.EventQueue.dispatchEventImpl(EventQueue.java:642)
 j.a.EventQueue.access$000(EventQueue.java:85)
 j.a.EventQueue$1.run(EventQueue.java:603)
 j.a.EventQueue$1.run(EventQueue.java:601)
 j.security.AccessController.doPrivileged(Native Method)
 j.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 j.a.EventQueue.dispatchEvent(EventQueue.java:612)
 j.a.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 j.a.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 j.a.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 j.a.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 j.a.EventDispatchThread.run(EventDispatchThread.java:122)

Marc Nelson mentions this in his blogpost but Oracle Support seemed more confused then us about this error. So in the end we discovered a quick fix solution on the Oracle forums here.

Solution:

The bug is in one of the third party librararies which is named: MigLayout from Mig Infocom AB.

According to their support forum this bug is fixed with Version 3.6.3:
You can download the fix in version 3.6.3 here
and replace the Library 3.6 which is shipped with Jdeveloper in directory:
%JDEV_HOME%\jdeveloper\ide\lib\miglayout-3.6-swing.jar

Dont forget to rename the downloaded 3.6.3 version and overwrite the old file, JDev will be looking for the exact 3.6 name.

References:

 
5 Comments

Posted by on 07-02-2013 in BPM, JDeverloper, Oracle

 

Tags: , ,

Increasing memory of JDeveloper

Last week I had the pleasure of re-installing my Dell laptop from an original (to empty) image. And this week I’ve been irritated a few times to much by a out-of-memory crashing Oracle JDeveloper in combination with the BPM plugin.

So quick reminder for myself (no rocket science, i know):

Memory settings are located in: %JDEV_HOME%\jdeveloper\ide\bin\ide.conf
Default is apparantly 640MB (at least my 11.1.1.6 install) and can be found at the line:

AddVMOption  -Xmx640M

increase to 1024 for instance:

AddVMOption  -Xmx1024M

 
Leave a comment

Posted by on 08-01-2013 in JDeverloper, Oracle

 

Tags: ,

JDeveloper startup error

Since we’re running Windows 7 on our office laptops we’re having these error messages when starting JDeveloper 11.1.1.6. The error is:

</pre>
oracle.adf.share.config.ADFConfigFactory:Sep 19, 2012 8:29:07 AM oracle.adf.share.config.ADFConfigFactory findOrCreateADFConfig
WARNING:
java.lang.reflect.InvocationTargetException
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
...
Caused by: java.lang.RuntimeException: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
 at oracle.adf.share.config.ADFConfigImpl.readConfig(ADFConfigImpl.java:247)
 at oracle.adf.share.config.ADFConfigImpl.<init>(ADFConfigImpl.java:150)
 ... 39 more
Caused by: oracle.xml.parser.v2.XMLParseException: Start of root element expected.
 at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
 at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:414)
 at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:355)
 at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:319)
 ... 40 more

Sep 19, 2012 8:29:07 AM oracle.adfinternal.rc.config.AdfCatalogConfig constructor
SEVERE:
oracle.adf.rc.config.ConfigurationException: an ADFContext has not been registered for name [oracle.jdeveloper.rescat2.ResourcePalette]. Root Cause=[] [Root exception is java.lang.NullPointerException]
 at oracle.adfinternal.rc.config.AdfCatalogConfig.getConfiguration(AdfCatalogConfig.java:200)
 at oracle.adf.rc.core.RCInstance.createInstance(RCInstance.java:121)
 at oracle.adf.rc.config.ConfigHelper.createRCInstance(ConfigHelper.java:102)
...
Caused by: java.lang.NullPointerException
 at oracle.adfinternal.rc.config.AdfCatalogConfig.getConfigurationInternal(AdfCatalogConfig.java:228)
 at oracle.adfinternal.rc.config.AdfCatalogConfig.getConfiguration(AdfCatalogConfig.java:181)
 ... 30 more

oracle.adf.rc.config.ConfigurationException: an ADFContext has not been registered for name [oracle.jdeveloper.rescat2.ResourcePalette]. Root Cause=[] [Root exception is java.lang.NullPointerException]
 o.adfinternal.rc.config.AdfCatalogConfig.getConfiguration(AdfCatalogConfig.java:200)
 o.adf.rc.core.RCInstance.createInstance(RCInstance.java:121)
 o.adf.rc.config.ConfigHelper.createRCInstance(ConfigHelper.java:102)
...
Caused by:
java.lang.NullPointerException
 o.adfinternal.rc.config.AdfCatalogConfig.getConfigurationInternal(AdfCatalogConfig.java:228)
 o.adfinternal.rc.config.AdfCatalogConfig.getConfiguration(AdfCatalogConfig.java:181)
 o.adf.rc.core.RCInstance.createInstance(RCInstance.java:121)
 o.adf.rc.config.ConfigHelper.createRCInstance(ConfigHelper.java:102)
... 

The problem seems to occur due to the fact JDeveloper can not access the default system dir location it did create during installation (the folder is there). The default location is: %userhome%\AppData\JDeveloper

You can fix this by setting your own JDEV_USER_DIR system variable:

References:

 
4 Comments

Posted by on 19-09-2012 in JDeverloper, Oracle

 

Tags: ,