JDeveloper Debugging Tips (Watchpoints & Beep)

In a previous blog post I talked about scoping breakpoints for debugging purposes, next to scoping breakpoints JDeveloper has more interesting debugging features to offer.

I created a simple example to show both the watchpoint as well as the beep functionality. To illustrate this, I created a page with an inputText and a button, both bound to a backingBean. 

This  is the jsf code:
 



The code from the bean is also pretty straight forward:
    (more...)

MAF 2.0 : Loading Images in a Background Process – Part I

Images are heavily used in Mobile apps. For instance a list that contains employees usually shows the images of these employees. This works well when you have a WIFI connection, but what if you are using slower connections ? If you look at a mobile twitter app you will see that, depending on connectivity, images are loaded instantaneously or delayed. In this post I explain how you can load the images of a List in a (more...)

But that’s impossible, or finding out that the JIT has broken your code.

Every now and then you look at some code and think that it cannot be possibly be wrong. Once you have ruled out a simple programmer screw up / enemy action in code (Make sure you read Java Puzzlers or similar) or a concurrency issue (Read Java Concurrency or go on Dr Heniz excellent course) you should sit back and take a few days and then starting thinking about whether the JDK is indeed (more...)

Using Maven to assemble and release artifacts to Nexus

An important part of a release process is storing artifacts in an artifact repository. Many customers use custom implementations of artifact repositories (such as file shares in combination with custom scripts) but there are also products which offer many functions of such a repository (and probably many more) out of the box so that custom implementations are not necessary any more. Nexus is an example of a popular artifact repository. An added benefit of using (more...)

Oracle Event Processing 12c: java errors when deploying a new OEP project

Sometimes when you create a new OEP project in JDeveloper 12c and you deploy it for the first time, you might get a list of java errors. They might look a bit like this:


Exception in thread "SpringOsgiExtenderThread-118" org.springframework.beans.Fat
alBeanException: Error in context lifecycle initialization; nested exception is
com.bea.wlevs.ede.api.ConfigurationException:
Invalid statement: "select S.properties as properties,
>>cast<<@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getOrde
rNumber() as orderNumber,
cast@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getEmail()
as email,
cast@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getTotalAmo
unt() as totalAmount
from ednInputChannel as S"
Description: Invalid call to function or constructor: cast
Cause: Probable causes are: Probable causes are: There is no symbol named com, o
r Attribute name com is invalid for STREAM or RELATION or VIEW., or Types com.or
acle.oep.FraudCheckRequest.class and com.oracle.oep.FraudCheckRequest not found
when referencing constructor or static method.., or Error while handling member
access to complex type. Constructor cast of type cast not found. or Probable cau
ses are: Probable causes are: There is no symbol named com, or Attribute name co
m is invalid for STREAM or RELATION or VIEW., or Types com.oracle.oep.FraudCheck
Request.class and com.oracle.oep.FraudCheckRequest not found when referencing co
nstructor or static method.., or Error while handling member access to complex t
ype. Constructor cast of type cast not found...
Action: Verify function or constructor for complex type exists, is not ambiguous
, and has the correct number of parameters.
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(A
pplicationContextLifecycle.java:146)
at org.springframework.context.event.SimpleApplicationEventMulticaster.m
ulticastEvent(SimpleApplicationEventMulticaster.java:97)
at org.springframework.context.support.AbstractApplicationContext.publis
hEvent(AbstractApplicationContext.java:324)
at org.springframework.context.support.AbstractApplicationContext.finish
Refresh(AbstractApplicationContext.java:929)
at org.springframework.osgi.context.support.AbstractOsgiBundleApplicatio
nContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp
plicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCus
tomTCCL(PrivilegedUtils.java:85)
at org.springframework.osgi.context.support.AbstractDelegatedExecutionAp
plicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.ja
va:320)
at org.springframework.osgi.extender.internal.dependencies.startup.Depen
dencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterAp
plicationContextExecutor.java:136)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.bea.wlevs.ede.api.ConfigurationException:
Invalid statement: "select S.properties as properties,
>>cast<<@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getOrde
rNumber() as orderNumber,
cast@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getEmail()
as email,
cast@java(S.javaContent, com.oracle.oep.FraudCheckRequest.class).getTotalAmo
unt() as totalAmount
from ednInputChannel as S"
Description: Invalid call to function or constructor: cast
Cause: Probable causes are: Probable causes are: There is no symbol named com, o
r Attribute name com is invalid for STREAM or RELATION or VIEW., or Types com.or
acle.oep.FraudCheckRequest.class and com.oracle.oep.FraudCheckRequest not found
when referencing constructor or static method.., or Error while handling member
access to complex type. Constructor cast of type cast not found. or Probable cau
ses are: Probable causes are: There is no symbol named com, or Attribute name co
m is invalid for STREAM or RELATION or VIEW., or Types com.oracle.oep.FraudCheck
Request.class and com.oracle.oep.FraudCheckRequest not found when referencing co
nstructor or static method.., or Error while handling member access to complex t
ype. Constructor cast of type cast not found...
Action: Verify function or constructor for complex type exists, is not ambiguous
, and has the correct number of parameters.
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.prepare(CQLProcess
orImpl.java:1141)
at com.oracle.cep.processor.cql.impl.CQLProcessorImpl.afterConfiguration
Active(CQLProcessorImpl.java:2788)
at com.bea.wlevs.spring.ActivationBeanPostProcessor.postProcessAfterCont
extInitialization(ActivationBeanPostProcessor.java:20)
at com.bea.wlevs.spring.DeferredBeanPostProcessor.afterConfigurationActi
ve(DeferredBeanPostProcessor.java:27)
at com.bea.wlevs.spring.ApplicationContextLifecycle.onApplicationEvent(A
pplicationContextLifecycle.java:113)
... 9 more

The solution to this is very simple.
Go back to JDeveloper, right-click on the project name and select Rebuild. Afterwards deploy again and the errors will be gone.

This has something to do with the java files not registering correctly in the project. Rebuilding the project will force those java files to be included correctly.

New: Oracle Cloud Adapter SDK

A cool thing I heard at Open World 2014: we all know in SOA there are all these adapters you can use in your SCA components. In Oracle Integration Cloud Services (ICS) there are a lot of new SaaS adapters to integrate with SaaS applications like SalesForce for example. These adapters are build using a Cloud Adapter SDK and written in Java.

This exact SDK will be available for users as well, so we all (more...)

Exciting things happening in Coherence…

I hope everyone is attending/watching JavaOne 2014 tomorrow.   There’s a sneak preview of some cool next generation Coherence with Java 8 in the Java One Technical Keynote

Follow @JavaOneConf and @pinocchiocode to find out more…


Tchotchkes, Smchotchkes: Oracle Wearable Tech Meetup #OOW14

If you’ve got an Oracle OpenWorld or JavaOne pass of any sort, then drop into the OTN Lounge on Tuesday, September 30, for the Dress Code 2.0 - Wearables Meetup . Here’s more about it: 

Come along in your wearables best and share your wearables experiences, meet the UX team and friends, see some cool innovation, and find out how to do more with wearables using Oracle technology. You can also your hands on some (more...)

New in Java 8 : Consumers and Predicates : a simple introduction

The java.util.function package is new in Java 8 and contains interfaces that are used for lambda expressions and functional references. In this blog, I give a brief introductionn of  2 interfaces of this package :

  • Consumer
  • Predicate

For the examples in this blog, we have a list of invoice’s with name, amount and category :

public class Invoice {
   private String name,amount,category;
   public Invoice(String name,String amount,String category) {
     super;
     this.name=name;
     this.amount=amount;
     this. (more...)

Oracle SOA Suite 12c tips – Tuning the SOA infrastructure thread pool

One of the new capabilities of Oracle SOA Suite 12c is the ability to control the SOA infrastructure thread pools, except the resource pools for EDN and the adapters, with Oracle WebLogic Server work managers. Each partition will has its own work managers defined. This allows you to separate services in partitions and, to some extent, tune them separately based on for example specific SLA requirements.

Well, this blog posting is not about explaining the (more...)

Open Source as religion – when the Bazaar becomes a Cathedral

The seminal book on Open Source development "Cathedral and the Bazaar" talks eloquently about the difference between commercial software development and open source development.  In the past few years however there has been another shift, a shift where companies are actively releasing their technology into Open Source as a competitive differentiation.  A claim of 'we are open' because the source

Message Correlation using JMS

Last year I created a few OSB services with the asynchronous request response message exchange pattern. OSB does not support this out of the box, since OSB is in fact synchronous in nature. Although OSB supports the WS-Addressing namespaces, you need to set the WS-Addressing elements programmatically.

Since OSB is synchronous the request and response flows in the Asynchronous Request/Response pattern are completely seperated implemented from eachother. That means that in the response flow you (more...)

Share your source between projects

Normally we pack functionality into libraries and use this library to share the functionality. However, during development of several JDeveloper Extensions our goal was to have one shared java source between our JDeveloper 11g and JDeveloper 12c extension.
Off course we wanted the ability to easily develop, test, debug and run the extension, but we also want to share the java code to introduce reusability.

We accomplished this, by creating a separated ‘coresrc’ folder and (more...)

Java Cookbook 3rd Edition

Java is a programming language and computing platform. There are lots of applications and websites have used it. About latest Java version, Java 8. Oracle announced Java 8 on March 25, 2014. I mention a book title - Java CookbookJava Cookbook by  Ian F. Darwin and this book covers Java 8.
 It isn't a book for someone who is new (Readers should know a bit about syntax to write Java) in Java, but It is (more...)

The next big wave of IT is Software Development

I can smell a change coming, the last few years have seen cloud and SaaS on the rise and seen a fragmentation in application development (thanks in a large part to the appalling stewardship of Java) and a real focus of budgets around BI and 'vanilla' package approaches.  Now this is a good thing, both because I jumped out of the Java boat onto the BI boat a few years ago but also because its

Software Development Wave 4: back to the package

The end of the next Software Development wave will be when Software development against 'eats itself' as it did with with technologies like Hadoop showing a new value in information, with platforms like SFDC showing new pre-build services, where people like GoodData have turned BI into SaaS.  So we will see the same evolution again and a new generation of commoditisation which drives

Software Development Wave 3: the enterprise developer

This is the stage at which software development begins to commoditise itself, its no surprise that underneath all that Salesforce.com scripting lurked rather a lot of Java code.  This wave sees the rise of the libraries, the utilities and above all the commoditisation of software in a way that enables the majority of developers to be useful in the enterprise.  This was the goal of Spring, JEE

Software Development Wave 2 – the team developer

The problem with Wave 1 was that it didn't scale, I mean sure lots of the personal developers claimed it did scale, often laughing at large scale developments and going 'Me and four mates could do that in a couple of weeks' often they attempted to do that and suddenly realised that when you get a few people together it gets a bit more complicated and when that few gets over 20 it begins to (more...)

Software Development Wave 1: The Personal Developer

This is the wave we are in at the moment and its the wave that we last saw in the late 90s, this is where technologies enabled single people to build small specific things really quickly.  Java and its applets really were the peak of this first wave back then but now we are seeing people use technologies such as R, Python and others to create small solutions that offer really good point value.

Java and Analytics the next frontier

I've been pretty verbal about Java going down the wrong path and my view that what Java should do is start having a 'core' which is just the real basics of the VM and the language and then a few profiles which specify what needs to be loaded, with the rest coming in on-demand based on the requirements of a given project.  The old 'it needs to have everything so the browser/desktop/etc' is just