Andrej Koelewijn

6/22/2004

ADF and JAXB

Filed under: — andrejk @ 11:07 pm

I’m currently working on a prototype for a mobile java application. It’s going to run on a laptop, so i can just use swing and j2se, nothing exciting there. The biggest challenge is to use ADF for a mostly offline jclient application. The current idea is to use xml for ofline data storage. When a network connection becomes available we’ll use a web service to send the xml document to a server.

Some weeks ago I saw Oracle’s Steven Davelaar demo ADF in combination with xml. He was using castor to create java bindings for his xml document. He showed that it’s pretty straightforward to use these castor generated classes with ADF. Now castor is OK, but i’d rather go with something standard, like JAXB. So i first tried using that. But it looks like ADF doesn’t like JAXB generated java.

The difference between JAXB and castor is that JAXB uses interfaces. It generates Interfaces for all your elements and types in an xml schema. Castor doesn’t use interfaces. So my guess is, ADF doesn’t like interfaces. You can only create data controls for javabeans (i.e., classes), not for interfaces.

Bad luck. So now we are also using castor. I also briefly looked at apache’s xmlbeans, but i think they have the same problem.

On the server side we’re using the readXml method provided by ADF’s business components to read the xml document into tables. Works really nice, sofar. I couldn’t find a lot of documentation on the readXml method, but Steve Muench has some usefull entries in his blog: Writing XML Using View Objects and Code Sample Illustrating Various BC4J Programming Techniques.

JBO-35000: Cant resolve spel expression

Filed under: — andrejk @ 10:43 pm

I ran into the following error in jdeveloper today: JBO-35000: Cant resolve spel expression for attribute {0} in {1}. If this happens, check your ui model. In my case, i had an iterator binding referencing a non-existent method data control binding. Removing the iterator binding fixed the problem.

Powered by WordPress