Friday, 30 August 2013

SQLDeveloper Nifty Tricks

A Nifty little Trick for SQLDeveloper

using SQLDeveloper -Version

Using this, once you have connected, your worksheet will have a red border

The colors are Persistent to the connection
AND are not refreshed if connection is changed on worksheet

JDeveloper Basics - Extension Download

JDeveloper Basics - Extension Download from Oracle Website for Future use.

If you are like me, and like to have everything I download, or don't have a very fast internet connection, and your whole company needs a package, ie: SOA or Webcenter?

This is how to download the file from Oracle.
Go to About.
You can see how to do this here.
or {Help > About}

Once there click on the second tab,

Click on the row and copy it.

Oracle IDE
What you need is the
Then google for
jdeveloper download extensions {IDE Version}
You should get a result from oracle pages
or something to that extent.
If you dont find anything, decrease the versions.
As oracle uses min max values for their downloads.

Once there, search on the page for extension you want. ie: Extension SDK.
Once you have found that
Look for your version

Note: You might have to look between
oracle.jdeveloper (min= xxx , max= yyy ) 
X and Y


JDeveloper Basics - Getting Version

JDeveloper Basics- Getting the exact Version of JDeveloper you are using.

Firstly Open JDeveloper:

Click on Help and then About.

You will then see your JDeveloper Generic Version (Studio Version)

and your JDeveloper Build Version (Build JDEVADF)

Wednesday, 28 August 2013

JDeveloper + Weblogic Error PermGen space

When I was starting my Weblogic I got an Error:
The WebLogic Server encountered a critical failure
Reason: PermGen space
The solution can be found on the oracle Forums here:

or you can Follow this guide:
You must install JRockit onto your computer.
Here is a guide for linux:
JRockit Installation on Linux

Once JRocket has been installed

You should change the "setDomainEnv" file. Which can be found in
Windows under"
in Linux:
 cd ~/.jdeveloper/system11.

Note: the "system11." is variable and will change depending on what version of JDeveloper you are running.

Once inside there, you must find the lines where they are setting "JAVA_HOME"

There is a comment
"We need to reset the value of JAVA_HOME to get it shortened AND"
What you can do, is after that set JAVA_HOME to where you installed JRockit.
Mine was:
# We need to reset the value of JAVA_HOME to get it shortened AND
# we can not shorten it above because immediate variable expansion will blank it
This will set your Weblogic to use JRockit.

#bearMan out

JDeveloper MEMORY

Today my JDeveloper gave me an error, and said it had Low Memory.
This happens when there are many objects in memory.

To fix this error you have to edit JDevelopers "ide.conf" file. This can be found in
{Middleware Path}\jdeveloper\ide\bin
  Once in there you can find the command that says:
AddVMOption  -Xmx
and then change from the default value to
AddVMOption  -Xmx1024M
or Any value, the comments in the file says
something greater, like 1024M or 1250M
This should sort your problem out and if not, you can add more.

In Linux you can find the file by running
find ./ -iname ide.conf

sudo find ./ -iname ide.conf


Monday, 26 August 2013

Uninstalling JDeveloper 12c from my OpenSUSE.

Uninstalling JDeveloper 12c from my OpenSUSE.

What you can do to find the uninstall file is type this

cd /{path to Middleware}
find -iname deinstall
When I ran that command I found 3 results:

you want to run the""

This can be done using these commands

cd /

or you can cd to
cd /{path to Middleware}/Oracle_Home/oui/bin/
and then run

#bearMan out.

Saturday, 24 August 2013

Please install the GNU compiler.

I installed OpenSuse 12.3

When I wanted to install Oracle VBox I got the error
 Please install the GNU compiler
I used the command
zypper install make gcc  gcc-c++ kernel-source kernel-syms
It looks to be working 100%

bearMan out.

Thursday, 22 August 2013

ADF - JDeveloper Tuning - View Objects

In this post I will be Discussing the how to optimize your ADF View Objects,  using JDeveloper before project start. (I will only be discussing View Objects fetching rows in Batches of)
This is a general Tuning guide, specifically used for when creating a new Project.

The discussion will help you Tune your ADF application from the word go.

Firstly we need to go to JDevelopers preferences. This can be done by going to tools -> Preferences

The defaults for a view object are:
The Rows are fetched in batches of one, and only when needed.
Thus if there are many Rows that need to be collected, this will be heavy on both the network and the Framework. This is due to ADF fetching each new ROW, rather than fetching 5 or 10 at any time. Although, when setting 5 or 10 at a time, this could use to much, depending on the use case.
In my case I like to set 10 at a time as in most cases, this is the most appropriate, although I have had cases of needing more, and less. SO before just jumping to decisions, thing about what your client wants.

Below is a screen shot of my Default Settings.

When Tuning View Objects before you start your application, I would recommend understanding what your business needs are before setting the Values.

A use case of needing to fetch more than 10 in a batch:
I have a client that needs a user to view every row in the DB on load and I know there will always be more than 50 Rows to display, thus for that View Object I set 50 Rows.

Note: At a later stage I will be displaying the results on server side.

Monday, 19 August 2013

ADF - JDeveloper Tuning - Application Module

In this post I will be Discussing the difference between Application Modules Lazy Loading and Non-Lazy Loading,  using JDeveloper before project start. 
This is a general Tuning guide, specifically used for when creating a new Project.

The discussion will help you Tune your ADF application from the word go.

Firstly we need to go to JDevelopers preferences. This can be done by going to tools -> Preferences

Once that is completed you can choose two ADF Tuning tips.
Firstly Application Modules Tuning:
The default for Application Modules is Non-Lazy Loading. This means that when a Business Component is loaded, all child components are filtered as well, thus extra page load time.
This load time might only be a few milliseconds per Entity, but when you have a few more than one Entity, they add up, and users can quickly get despondent and or feel the page has broken and close the page. This is ultimately not what we want.

Thus in order to fix this we use the Lazy Loading which takes this initial Page load away.

ADF - Programmatically Show Popup

Just a quick bit of code:

Note there are 4 Message Types namely

  1. Error
  2. Fatal
  3. Info
  4. Warning

Friday, 16 August 2013

Unable to load descriptor

My Stacktrace
Warning: <May 26, 2013 7:47:48 AM CAT> <Error> <J2EE> <BEA-160197> <Unable to load descriptor {path}\ViewController\public_html/WEB-INF/weblogic.xml of module public_html. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor( at weblogic.descriptor.BasicDescriptorManager.createDescriptor( at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader( at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean( at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan( at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean( at weblogic.servlet.internal.WebAppDescriptor.getWeblogicWebAppBean( at weblogic.servlet.utils.WarUtils.getWlWebAppBean( at weblogic.application.compiler.WARModule.processLibraries( at weblogic.application.compiler.WARModule.compile( at weblogic.application.compiler.flow.SingleModuleCompileFlow.proecessModule( at weblogic.application.compiler.flow.SingleModuleFlow.compile( at weblogic.application.compiler.FlowDriver$ at weblogic.application.utils.StateMachineDriver.nextState( at weblogic.application.compiler.FlowDriver.nextState( at at weblogic.application.compiler.WARCompiler.compile( at weblogic.application.compiler.flow.AppCompilerFlow.compileInput( at weblogic.application.compiler.flow.AppCompilerFlow.compile( at weblogic.application.compiler.FlowDriver$ at weblogic.application.utils.StateMachineDriver.nextState( at weblogic.application.compiler.FlowDriver.nextState( at at weblogic.application.compiler.Appc.runBody( at at at weblogic.application.compiler.Appc.main( at weblogic.appc.main( by: com.bea.xml.XmlException: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.SecurityRoleAssignmentBeanImpl@563d3221(/SecurityRoleAssignments[valid-users])" at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod( at com.bea.staxb.runtime.internal.RuntimeBindingType$BeanRuntimeProperty.setValue( at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType$QNameRuntimeProperty.fillCollection( at com.bea.staxb.runtime.internal.MultiIntermediary.getFinalValue( at com.bea.staxb.runtime.internal.AttributeRuntimeBindingType.getFinalObjectFromIntermediary( at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalBindingType( at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument( at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal( at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor( ... 27 moreCaused by: weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.SecurityRoleAssignmentBeanImpl@563d3221(/SecurityRoleAssignments[valid-users])" at weblogic.descriptor.internal.ReferenceManager.registerBean( at weblogic.j2ee.descriptor.wl.WeblogicWebAppBeanImpl.setSecurityRoleAssignments( at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke( at sun.reflect.DelegatingMethodAccessorImpl.invoke( at java.lang.reflect.Method.invoke( at com.bea.staxb.runtime.internal.util.ReflectionUtils.invokeMethod( ... 35 more.>

In essence, the error was that I had two of the same library references in my weblogic-application.xml 

you can get there by going to your Application Resources in your resource pallet

Thursday, 15 August 2013

ADF - Train: Custom Train Button

ADF: Custom Train Button

OK so recently I have been working with trains and playing around with some of the basic functionality around them.

Long story short, I needed to invoke train button actions, next/previous using custom buttons.
In order for me to do this I used this code within my page:

<af:commandButton text="Train Next" id="cbN"

<af:commandButton text="Train Previous" id="cbP"

A college of mine helped me solve this namely, Stafford Wright