Showing posts with label jdev. Show all posts
Showing posts with label jdev. Show all posts

2019-01-10

JDeveloper: JboConfigUtil Exception

So you were tinkering with JDeveloper (any version), and while trying to use an online database for your new entity / whatever, you instead got this:

SEVERE: null at oracle.jbo.dt.objects.config.JboConfigUtil.getConfigurationNameList(JboConfigUtil.java:235)
java.lang.NullPointerException
 at oracle.jbo.dt.objects.config.JboConfigUtil.getConfigurationNameList(JboConfigUtil.java:235)
 at oracle.jbo.dt.objects.config.JboConfigUtil.getConfigurationNameList(JboConfigUtil.java:225)
 at oracle.jbo.dt.jdevx.ui.pkg.XPKConnectPanel.updateConfigurations(XPKConnectPanel.java:703)
 at oracle.jbo.dt.jdevx.ui.pkg.XPKConnectPanel.onFinish(XPKConnectPanel.java:684)
 at oracle.jbo.dt.ui.main.dlg.DtuWizardPanelDialog.okAction(DtuWizardPanelDialog.java:362)
 at oracle.jbo.dt.ui.main.dlg.DtjDialog.dismissDialog(DtjDialog.java:221)
 (...)

You've already created the data source, set it in Project Properties [on the model project] / ADF Business Components, reported the feedback, saw it will be fixed in JDeveloper 13... but until then:

Go to the .jpx file of your model project (the file with the two cogwheels icon), General / Connection, select the connection.

2017-11-13

JDeveloper: bindingContext.findDataControl deprecated

You get a warning, that says:
Warning: findDataControl(java.lang.String) in oracle.adf.model.BindingContext has been deprecated.
So you need another, up-to-date way to get your data control.
Try this:

private static ApplicationModuleImpl getAppModuleImpl(final String dataControlName) {
    final FacesContext fc = FacesContext.getCurrentInstance();
    final ELContext elContext = fc.getELContext();
    final ExpressionFactory elFactory = fc.getApplication().getExpressionFactory();
    final ValueExpression valueExp = elFactory.createValueExpression(elContext, "#{data." + dataControlName + ".dataProvider}", ApplicationModuleImpl.class);
    return (ApplicationModuleImpl) valueExp.getValue(elContext);
}

Usually, the data control name is like {Application Module name} + "DataControl".
Hard to find? Look into DataBindings.cpx and look for BC4JDataControl elements id attribute.

What's that data literal there? That's oracle.adf.model.BindingContext.CONTEXT_ID hardcoded.

2017-10-25

JDeveloper: Build Does Not Find File That Dont Even Exist


Your build fails, as JDev cannot copy a file that does not even exist? The JDeveloper's IDE Performance Cache is playing you.

Simple solution:

  1. Exit JDeveloper
  2. Delete the .data folder inside your app folder.
  3. Profit!
If it's not there, see the source for detailed info.

Source (Thanks, Andrejus!)