30 June 2011

TROUBLESHOOTING: Compilation error - XML-20108: (Fatal Error) Start of root element expected. in rdf files.

If during compilation you get

Project: E:\JDeveloper\mywork\DEVELOPMENT\App\App\Model.jpr
        Error(1,1): file:/E:\JDeveloper\mywork\DEVELOPMENT\App\src\model
           \lovqueries\mdssys\mdx\MyLov.xml.rdf<Line 1, Column 1>: 
           XML-20108: (Fatal Error) Start of root element expected.

Then JDeveloper just created an empty rdf file.

Open rdf
<?xml version="1.0" encoding="UTF-8" ?>

You might want to check: Utility to remove once and for all the *.rdf file error.

Src: http://forums.oracle.com/forums/thread.jspa?threadID=1134014&tstart=44

28 June 2011

TROUBLESHOOTING: JDeveloper closes unexpectedly with no error message

Sometime JDeveloper might start acting funny and in worst case might crashes or closes unexpectedly.

The good thing is that all JDeveloper's setting are stored under its system directory. More regarding this directory in Change JDeveloper's system directory (system11.1.1.x.x.xx.xx).

Close JDeveloper  (if you are running it)

Go where the system dir is located, typically under
C:\Documents and Settings\username\Application Data\JDeveloper\
and remove it

Start JDeveloper. JDeveloper will recreate a fresh system dir automatically.

All you JDeveloper Preferences, SVN settings, embedded WLS configuration will be lost!!

22 June 2011

TROUBLESHOOTING: "java.lang.ClassNotFoundException: javax.faces.context.FacesContextFactory" while deploying ADF Application

Last update: 4/7/2011
The error log is

[11:59:10 AM] Deploying Application...
<22 ???? 2011 11:59:20 pµ EEST> <Error> <Deployer> <BEA-149265> 
       <Failure occurred in the execution of deployment request with 
       ID '1308733152059' for task '0'. Error is: 
       'java.lang.ClassNotFoundException: javax.faces.context.
java.lang.ClassNotFoundException: javax.faces.context.FacesContextFactory
 at weblogic.utils.classloaders.GenericClassLoader.findLocalClass
 at weblogic.utils.classloaders.GenericClassLoader.findClass
 at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 Truncated. see log file for complete stacktrace
Caused By: java.lang.ClassNotFoundException: javax.faces.context.
 at weblogic.utils.classloaders.GenericClassLoader.findLocalClass
 at weblogic.utils.classloaders.GenericClassLoader.findClass
 at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass
 at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 Truncated. see log file for complete stacktrace

In the Model project JDeveloper has created files related to ViewController (Web Content/WEB_INF folder with faces-config.xml, trinidad-config.xml  and web.xml). If you use a SubVersioning System, it is easy to check because they ll newly created and not added to SVN.

Remove this files/folders.

Maybe you might need to remove the contents of drs folder, too.
That is the folder that JDeveloper delpoys the application in order to run it in the embedded WLS.
It is located under %JDEV_SYSTEM_ROOT%/\o.j2ee
C:\Documents and Settings\user\Application Data\JDeveloper\system11.\o.j2ee\drs  

21 June 2011

How to change default User directory in JDeveloper

Because your code is somewhere else than C:\JDeveloper\mywork

1st way: Environment variables
Set env var JDEV_USER_DIR in Windows Properties

Thanx Eric!

Good and easy approach, but does not work  if you have more than 1 JDeveloper installations and want to work in different src with each one.
If this is your case check the following

2nd way: Boot configuration file
Check Eric's post:

3rd way: pass a -D switch (Java property)
Check Eric's posts again:

09 June 2011

How to enable JDeveloper's Memory Monitor

The Memory Monitor shows the memory consumption of the JDeveloper and is located in the right bottom of the IDE

To enable it perform the following steps:

Close JDeveloper (if it is running )

Got to C:\JDeveloper\system11.\o.jdeveloper    (chck note below)
Open ide.properties

Change the value of the followint property to MainWindow.MemoryMonitorOn=true

Start JDeveloper

Note: in the example above the system folder of JDeveloper (system11. is moved. Usually it is located under C:\Documents and Settings\spiros\Application Data\JDeveloper.

08 June 2011

Certification and Support Matrix of has wrong links

First of all, new release seems very interesting and a lot of improvements have been performed.

I 've just happened to find out that Support matrix of has wrong links.
If you click for example on DB, instead of moving you to the DB section in the same page, it opens the support matrix of the previous version and moves you to DB.

Also I ve posted it on OTN

Some note on  new release.

Various blog posts by 
Also Mike found the first bug

07 June 2011

DCDataControl::isTransactionModified() vs DCDataControl::isTransactionDirty()

Explained by Jobinesh in his one more of his excellent posts (Checking for dirty data).
Quoting him:

SomeDC::isTransactionDirty() works well with those DataControls which have implemented oracle.adf.model.TransactionalDataControl. Apparently it works with ADF BC. However this may not work (as of now) with Bean DC as it lacks the specific transactional context implementation. DCDataControl::isTransactionModified() does not consult underlying model for checking the modified status, rather it keeps track of 'TxnModified' flag and marks it as dirty whenever UI pushes updated data to the binding layer.

Dig more:

How to create your custom oracle.adf.view.rich.context.ExceptionHandler

In a very helpful post by Frank Nimphious, it is explain how to create and declare a custom ADF Controller Exception Handler. Quoting some part below:

  • Create a Java class that extends oracle.adf.view.rich.context.ExceptionHandler
  • Create a textfile with the name "oracle.adf.view.rich.context.Exceptionhandler" (without the quotes) and store it in .adf\META-INF\services (you need to create the “services” folder)
  • In the file, add the absolute name of your custom exception handler class (package name and class name without the “.class” extension)
For any exception you don't handle in your custom exception handler, just re-throw it for the default handler to give it a try
import oracle.adf.view.rich.context.ExceptionHandler;
public class MyCustomExceptionHandler extends ExceptionHandler {

public MyCustomExceptionHandler() {
public void handleException(FacesContext facesContext, 
                            Throwable throwable, PhaseId phaseId) 
                            throws Throwable{
   String error_message;
   error_message = throwable.getMessage();
   //check error message and handle it if you can
   if( … ){  
       //handle exception
      //delegate to the default ADFc exception handler
       throw throwable;}

Note however, that it is recommended to first try and handle exceptions with the ADF Controller default exception handling mechanism.

06 June 2011

Understanding ADF Error Codes

Last updated: 5/9/2012
ADF Error Codes is another very helpful page when troubleshooting located in Oracle Wiki.  Just mentioning some error codes that the page is dealing with:

JBO Errors
  •  "46 JBO-24000 to JBO-80008
  • CSMessageBundle in ADF 10.1.3 : Defines the error codes and default error messages for operations on business objects.
  • JBO-25002: 
  • JBO-25005: 
  • JBO-25014
  • JBO-25030: 
  • JBO-25058:
  • JBO-26001: 
  • JBO-26041: 
  • JBO-26061: 
  • JBO-27014: 
  • JBO-27122: 
  • JBO-28006:
  • JBO-28200: 
  • JBO-29000
  • JBO-30003: 
  • JBO-35007
ORA Errors
  • ORA-22816
Errors not catagorized by error codes

Many thanx to Chris Muir for helping me tracking the page relocations :)

01 June 2011

Monitoring Weblogic (embedded or standalone) with JRockit's Mission Control

By embedded we mean the WLS shipped with JDeveloper.
To monitor embedded you must first start WLS with JRockit. To do this check Running embedded Weblogic with JRockit.

Locate setDomainEnv.cmd under %DOMAIN_HOME%/bin directory

Edit it by adding the following line after the initial comments:
set JAVA_OPTIONS=-Djava.rmi.server.hostname= 
                                   -Xmanagement:ssl=false,authenticate=false,port=7091 %JAVA_OPTIONS%(all the aboe is 1 line)
Give java.rmi.server.hostname with the IP of the server you want to monitor.

Open Oracle JRockit Mission Control 4.0.1

Right click on the running WLS and Start Console

Where you can check various aspects of your running WLS

The more interesting things can be distilled with a recording.
Right click again and Click Start Fight Recording

Choose Template depending on what you want to record, set name and path and finally recording time.
Click ok to start
In the bottom of the Mission control is the Flight Recorder Control were you can see the progress.
When completed the recording will be something like

 Check Events. There you ll find the more info (more in a future post).

Dig more:  

You might also like:

Related Posts Plugin for WordPress, Blogger...
There was an error in this gadget