aug 9th
Harry van Oosten, ADF 11G, JDeveloper, Java, Oracle, Oracle Fusion Middleware, UCM, Webcenter, Weblogic
|
Tags: ADF11G,
emas_fwk_config_ConfigTemplateViewBean.applyAction,
Java,
JDeveloper,
Oracle Universal Content Management,
UCM,
Webcenter,
Weblogic In our application we’re using WebCenter services to present documents from the Oracle Universal Content Management (UCM). We’ve set this up in JDeveloper and it works fine. But we also want to use it in the stand alone weblogic.
In Weblogic choose your application open Application Deployment –> WebCenter –> Service Configuration:

Choose content repository and press add.
Now when trying to save a content repository connection for the webcenter services in our application we’re getting the following error:
Configuration options currently unavailable. The application might be down, did not start properly, or is incorrectly packaged. Check the log files for further details.
These mbeans encountered exceptions and may not have been saved
ddd – JCR — Could not do this operation, the backing store for this context is read only.
#{emas_fwk_config_ConfigTemplateViewBean.applyAction}: oracle.sysman.emSDK.app.exception.EMSystemException
Thats kind of strange because:
- The application is up and accessible
- The connection to the content server is valid, we use it in Jdeveloper
After some searching with no result we contacted Oracle Support. They pointed out a specific tag was needed in the ADF-CONFIG.xml
<doclibC:adf-doclib-config xmlns="http://xmlns.oracle.com/webcenter/doclib/config" primaryConnectionName="KlantRapportenRepository"/>
Normally this tag will be inserted on creation of the connection in JDeveloper. For some reason this doesn’t happens always. No the Mbeans can find the property and create a connection in Weblogic.
If you deploy your connections.xml file in the same ear and the following tag is present in the ADF-CONFIG.XML:
<jndiC:adf-jndi-config>
<jndiC:ConnectionsJndiContext initialContextFactoryClass="oracle.adf.share.jndi.InitialContextFactoryImpl" backingStoreURL="META-INF/connections.xml" backingStoreClass="oracle.adf.share.jndi.MDSBackingStore">
<jndiC:contextEnv value="true" name="cache_application_scope"/>
</jndiC:ConnectionsJndiContext>
</jndiC:adf-jndi-config>
Your connection will be pre-configured in your Weblogic and you only have to change your server and credentials.
jul 28th
Harry van Oosten, ADF 11G, Faces, JDeveloper, JSF, Java, JavaScript, Oracle, Oracle Fusion Middleware
|
Tags: ADF 11g,
Drag and Drop,
Faces,
JDeveloper,
JSF,
Oralce Earlier I posted about the fact that Drag and Drop functionality was broken with FireFox 3.
There’s a bug fix to address this issue. You can find it on Metalink under the number 9538640.
jul 12th
Harry van Oosten, ADF 11G, Faces, JDeveloper, JSF, Java, MDS, Maven, Oracle, Oracle Fusion Middleware, Webcenter, Weblogic
|
Tags: ADF 11g,
Customization,
Faces,
Java,
JDeveloper,
JSF,
Maven,
MDS,
Oracle,
Webcenter,
Weblogic One of the benefits for using the Webcenter technology is customization. This feature can be used to personalize the application for different end users.
Based on the standard application, smaller or larger changes (deltas) can be applied by the runtime system. The adjustments can be created both at design time (seeded customization) and specified at run-time (via the Change Persistence Framework).
We were struggling to get this to work in our application. In the end we got it and I want to share how.
We only concentrated on the design time customization.
There are a few steps that need to be done to get it to work:
- Configure application and Weblogic server
- Configure JDeveloper
- Doing the design time customization
- Deployment of customizations
Read the rest of this entry »
apr 8th
Harry van Oosten, ADF 11G, Faces, JDeveloper, JSF, Java, Oracle, Oracle Fusion Middleware, Webcenter, Weblogic
|
Tags: ADF 11g,
Composer Catalog,
JDeveloper,
MDS-00013,
Oracle,
Webcenter,
Weblogic For a while we had the problem of an empty WebCenter Composer Catalog (MDS-00013, failure to load the catalog definition) in our integrated Weblogic in JDeveloper 11.1.1.2.0.
Caused by: oracle.adf.rc.model.exception.InvalidCatalogException: De cataloguscontext met catalogus [default-catalog] kan niet worden geïnitialiseerd.
at oracle.adfinternal.rc.model.service.CatalogService.getCatalogContext(CatalogService.java:1720)
at oracle.adfinternal.rc.model.service.CatalogService.getItem(CatalogService.java:1033)
… 89 more
Caused by: oracle.adf.rc.exception.DefinitionNotFoundException: Kan resourcecatalogus [default-catalog] niet vinden met MDS-pad=[/oracle/adf/rc/metadata/default-catalog.xml]. Root Cause=[MDS-00013: Geen metagegevens gevonden voor metagegevensobject "/oracle/adf/rc/metadata/default-catalog.xml"] [Root exception is oracle.mds.core.MetadataNotFoundException: MDS-00013: Geen metagegevens gevonden voor metagegevensobject "/oracle/adf/rc/metadata/default-catalog.xml"]
at oracle.adfinternal.rc.catalog.CatalogImpl.openCatalog(CatalogImpl.java:150)
at oracle.adfinternal.rc.catalog.CatalogImpl.openCatalog(CatalogImpl.java:108)
… 90 more
Caused by: oracle.mds.core.MetadataNotFoundException: MDS-00013: Geen metagegevens gevonden voor metagegevensobject “/oracle/adf/rc/metadata/default-catalog.xml”
After some days of frustration and communication with Oracle we got a solution.
Read the rest of this entry »
mrt 26th
Harry van Oosten, ADF 11G, JDeveloper, Java, Oracle, Oracle Fusion Middleware, Webcenter, Weblogic
|
Tags: ADF 11g,
Webcenter,
_afrLoop After the migration our application to 11.1.1.2.0 and enabled webcenter features we got an endless redirect/refresh wich keep changing
_afrLoop parameter (url looks like ?_afrLoop=7028613940399&_afrWindowMode=0&_afrWindowId=null)
To solve this remove the trinidad filter and filter mapping from the web.xml
Only downside to this is the fact that you can’t use the fileUpload validation correctly like:
<context-param>
<description>Maximum disk space per request (in bytes).</description>
<param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>
<param-value>51200000</param-value>
</context-param>
This won’t generate a validation error message.
mrt 26th
Harry van Oosten, JDeveloper, Oracle, Oracle Fusion Middleware, Weblogic
|
Tags: JDeveloper,
Oracle,
Weblogic Think your internal weblogic server is slow with starting and running applications?
This could be a solution.
Copy the <Middleware_home>\wlserver_10.3\server\native\win\32 to your windows system32 folder.
This gives you a performance boost.
mrt 26th
Harry van Oosten, JDeveloper, Oracle, Oracle Fusion Middleware, Weblogic
|
Tags: adrci,
DFW-40116,
JDeveloper,
Oracle,
Weblogic After migrating we got the following error:
Action: Ensure that command line tool “adrci” can be executed from the command line.
at oracle.dfw.impl.incident.ADRHelper.invoke(ADRHelper.java:1052)
at oracle.dfw.impl.incident.ADRHelper.createIncident(ADRHelper.java:786)
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:688)
… 19 more
This can be solved by
1. Modify $DOMAIN_HOME/config/fmwconfig/servers/<server_name>/dfw_config.xml, setting the “logDetectionEnabled” attribute to false. This will disable log incident detection.
2. Disable the “Module-FMWDFW” WLDF Diagnostics Module using the WebLogic Server Administration Console.
This can be found at:
DefaultDomain
–>Diagnostics
–>Diagnostic Modules
–>Module-FMWDFW
–>Targets
Uncheck your server instance.
A migration to a higher version isn’t so easy.
feb 21st
Harry van Oosten, ADF 11G, Oracle, Oracle Fusion Middleware, Security
|
Tags: ADF 11g,
Faces,
JSF,
Oracle,
Security,
Wachtwoord Bij ADF 11G is het mogelijk een wachtwoord veld te creëren middels het setten van het secret attribuut.
<af:inputText label=”Wachtwoord” id=”password” clientComponent=”true” required=”true” secret=”true” requiredMessageDetail=”Wachtwoord verplicht” value=”#{myBean.wachtwoord}”>
Nu willen we natuurlijk kunnen valideren of dit wachtwoord bijvoorbeeld tussen de 8 en 12 lang is.. In ADF 11G is het mogelijk hiervoor een clientside validator toe toevoegen aan de inputText middels het volgende:
<af:inputText …..>
<af:validateLength minimum=”8″ maximum=”12″ hintMinimum=”mininmaal 8″ hintMaximum=”maximaal 12″ messageDetailNotInRange=”niet tussen 8 en 12″>
</af:inputText …..>
Als men nu een wachtwoord invult en uit het veld tabt wordt het password gevalideerd en indien niet correct wordt een melding getoond.
So far so good… Maar nu komt het..
Indien er elders op de pagina een PPR (partial page rendering) af gaat wordt de waarde van het wachtwoord veld gezet naar ******. Letterlijk 6 sterretjes dus.. (ook aan de server kant)
Als je nu opslaat gaat de validatie niet nogmaals af (aan de clientside) en gaat het fout aan de server kant omdat je wachtwoord nu ineens gewoon 6 kan zijn en iedereen het zelfde wachtwoord heeft…
De oplossing voor dit probleem is als volgt.
Meteen na het tabben het veld submitten (naar de server posten) middels autoSubmit en het toevoegen van een eigen geschreven validator voor de serverkant. De tag komt er dan als volgt uit te zien:
<af:inputText label=”Wachtwoord” id=”password” autoSubmit=”true” clientComponent=”true” required=”true” requiredMessageDetail=”Wachtwoord verplicht” value=”#{myBean.wachtwoord}”/>
<myTag:validatePassword message=”Wachtwoord ongeldig”/>
In de validator staat dan de logica die normaal gedaan zou worden door bijvoorbeeld af:validateLength van adf.
public class PasswordValidator implements Validator, /* ClientValidator, */ StateHolder {
private ValueExpression message;
/**
* Zet de foutmelding die getoond moet worden als het veld niet valide is.
* @param message foutmelding
*/
public void setMessage(final ValueExpression message) {
this.message = message;
}
/**
* Foutmelding die getoond moet worden als het veld niet valide is.
* @return foutmelding
*/
public String getMessage() {
String result = null;
if(message != null) {
if(message.isLiteralText()) {
result = message.getExpressionString();
} else {
ELContext elContext = FacesContext.getCurrentInstance().getELContext();
result = (String)message.getValue(elContext);
}
}
return result; }
/* ******************** VALIDATOR ******************** */
/**
* Voer de validatie uit.
*
* @param facesContext faces context
* @param component component wat gevalideerd moet worden
* @param value waarde die gevalideerd moet worden
*/
@Override
public void validate(final FacesContext facesContext, final UIComponent component, final Object value) {
if(value != null) {
final String password = (String)value;
// Moet tussen 8 en 64 lengte zijn
if(password.length() < 8 || password.length() > 64) {
throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, getMessage(), getMessage()));
}
}
}
/* ******************** STATE HOLDER ******************** */
/**
* {@inheritDoc}
*/
@Override
public Object saveState(final FacesContext facesContext) {
return new Object[] { message } ;
}
/**
* {@inheritDoc}
*/
@Override
public void restoreState(final FacesContext facesContext, final Object object) {
final Object[] values = (Object[])object;
message = (ValueExpression)values[0];
}
/**
* {@inheritDoc}
*/
@Override
public boolean isTransient() {
return false;
}
/**
* {@inheritDoc}
*/
@Overridev public void setTransient(final boolean isTransient) {
// Niets
}
}
Vervolgen nog een klasse aan maken die extends van ValidatorELTag je die kan includen in je tag-library zodat je deze kan gebruiken in je jspx pagina.
public final class PasswordValidatorTag extends ValidatorELTag {
private static final long serialVersionUID = 1L;
private ValueExpression message;/**
* Zet de foutmelding die getoond moet worden als het veld niet valide is.
* @param message foutmelding
*/
public void setMessage(final ValueExpression message) {
this.message = message;
}/**
* Create validator.
* @return password confirmed validator
*/
@Override
protected Validator createValidator() {
final PasswordValidator validator = new PasswordValidator();
validator.setMessage(message);
return validator;
}
}
dec 26th
Harry van Oosten, ADF 11G, Java, Oracle, Oracle Fusion Middleware
|
Tags: ADF 11g,
Faces,
JSF,
Oracle,
Table Voor een webapplicatie was het nodig afhankelijke selecteerbare tabellen te kunnen maken lijkend op het volgende:
| Maak uw keuze: |
| Standaard keuze: |
| |
Naam |
Omschrijving |
Locatie |
| 0 |
Keuze 1 |
dit is keuze 1 |
locatie1 |
| alternatieve keuze: |
| 0 |
Keuze 2 |
dit is keuze 2 |
locatie2 |
| 0 |
Keuze 3 |
dit is keuze 3 |
locatie3 |
| 0 |
Keuze 4 |
dit is keuze 4 |
locatie4 |
Hierbij moet standaard de mogelijkheid “keuze 1” geselecteerd worden.
Indien de gebruiker toch voor een alternatieve keuze gaat moet “keuze 1 “ uit gezet worden en één van de alternatieven keuzes aangezet worden. Je zou zeggen dat dit op te lossen is met een standaard radioButtongroup met daarin SelectItems. Echter, dit is niet mogelijk omdat selectItems alleen een value label en description kunnen bevatten. Indien het label gezet wordt zal de waarde niet getoond worden op het scherm en vice versa.
Het is dus niet mogelijk 3 kolomen met tekst: Keuze 2 (de value), dit is keuze 2 (het label) en locatie 2 (de description) te tonen op het scherm.
Ook is een work around met bijvoorbeeld een <af:foreach> tag niet mogelijk omdat output texten binnen radio button groups niet mogen en dus niet getoond worden. Een alternatief is twee tabellen en deze zo te stylen via CSS dat deze op een radiobutton Group lijkt. Om dit te bereiken maken we twee tabellen; een voor de standaard keuze met een keuze regel en een tabel met maximaal drie alternatieven keuzes:
<af:outputText value=”Maak uw keuze” id=”keuze” />
<br />
<af:outputText value=”Standaard keuze:” id=”stdKeuze” />
<af:table value=”#{myBean.listDefault}” var=”row” rowBandingInterval=”0″
id=” standaardTable” rowSelection=”single” rows=”1″
contentDelivery=”immediate” autoHeightRows=”1″
selectionListener=”#{myBean.maakKeuze}”
partialTriggers=”::alternatiefTable” disableColumnReordering=”true”
binding=”#{myBean.standaardTable}” horizontalGridVisible=”false”
verticalGridVisible=”false” emptyText=”Nog geen resultaten.”>
<af:column sortable=”false” id=”c7″ width=”20″>
<af:selectBooleanRadio id=”sbr1″
binding=”#{myBean.selectedStandaard }” />
</af:column>
<af:column sortable=”false” headerText=”Naam” id=”c3″
width=”200″>
<af:outputText value=”#{row.naam}” id=”ot2″ />
</af:column>
<af:column sortable=”false” headerText=”Omschrijving”
id=”c2″ width=”60″>
<af:outputText value=”#{row.omschrijving} ” id=”ot1″ />
</af:column>
<af:column sortable=”false” headerText=”Locatie” id=”c1″>
<af:outputText value=”#{row.locatie}” id=”ot3″ />
</af:column>
</af:table>
<af:outputText value=”Alternatieve keuze:”
id=”andereVestigingen” />
<af:table value=”#{myBean.listOptions}” var=”row”
rowBandingInterval=”0″ id=”alternatiefTable”
rowSelection=”single” rows=”3″
contentDelivery=”immediate” autoHeightRows=”4″
selectionListener=”#{myBean.maakKeuze}”
partialTriggers=”::standaardTable”
binding=”#{myBean.alternatiefTable}”
horizontalGridVisible=”false”
verticalGridVisible=”false”
emptyText=”Nog geen resultaten”>
<af:column sortable=”false” id=”c8″ width=”20″>
<af:selectBooleanRadio id=”sbr2″
binding=”#{myBean.selectedAlternatief}” />
</af:column>
<af:column sortable=”false” id=”c6″ width=”200″>
<af:outputText value=”#{row.naam}” id=”ot4″ />
</af:column>
<af:column sortable=”false” id=”c5″ width=”60″>
<af:outputText value=”#{row.omschrijving}” id=”ot5″ />
</af:column>
<af:column sortable=”false” id=”c4″>
<af:outputText value=”#{row.locatie}” id=”ot6″ />
</af:column>
</af:table>
De UI componenten tabellen en radio buttons in deze tabellen zijn gebonden aan de backing bean (myBean) om bijvoorbeeld de selectie van de tabellen te wissen en de visuele selectie mogelijk te maken doormiddel van de radioButton:
private RichTable standaardTable;
private RichTable alternatiefTable;
private RichSelectBooleanRadio selectedStandaard;
private RichSelectBooleanRadio selectedAlternatief;
Deze worden opgehaald en geset via getters en setters.
De tabellen zijn verder uiteraard gekoppeld aan 2 lijsten met daarin de objecten die de keuzes representeren.
Om de selectie mogelijk te maken dient de tabel te tag selection=”single” te bevatten en een selectionListener te hebben.
De selectieListener in de backingbean ziet er als volgt uit:
public void maakKeuze(final SelectionEvent selectionEvent) {
final RowKeySet rks = selectionEvent.getAddedSet();
final String componentID = selectionEvent.getComponent().getId();
if (componentID.equalsIgnoreCase(standaardTable.getId())) {
//Visuele resetten (radio button in de tabel)
selectedAlternatief.setValue(null);
//Selected rows op de tabel resetten.
alternatiefTable.getSelectedRowKeys().clear();
} else if (componentID.equalsIgnoreCase(alternatiefTable.getId())) {
selectedStandaard.setValue(null);
standaardTable.getSelectedRowKeys().clear();
}
if (rks != null) {
final RichTable fowTree = (RichTable)selectionEvent.getComponent();
final Iterator iter = rks.iterator();
while (iter.hasNext()) {
fowTree.setRowKey(iter.next());
selectedKeuze = (Keuze)fowTree.getRowData();
//Radiobutton aanzetten.
if (componentID.equalsIgnoreCase(standaardTable.getId())) {
selectedStandaard.setValue(true);
} else {
selectedAlternatief.setValue(true);
}
}
}
}
Middels bovenstaande constructie is het mogelijk om 2 selecteerbare tabellen afhankelijk van elkaar te maken. Ook is het dus mogelijk dit component dusdanig te stijlen dat het toch op een radio buttongroup lijkt en ook zo funtioneert. Vergeet niet de partialTriggers aan te zetten zodat de componenten elkaar triggeren.