Wednesday, October 15, 2008

A reminder of the "Object Preferences" feature in the Debugger in JDeveloper 11

Worth mentioning again now 11 is final production as this is a really useful feature that many people don't find for a long time.

Basically it allow the user to control what is displayed by the debugger, up to and including the invocation of accessor methods.

Applying Patches to JDeveloper/WebLogic using Smart Update. (Fixing the ADF vs WebService issue in 11)

A really nasty bug that made it in to the boxer release is the total failure if you mix ADF and web services in the same application. Fortunately we have a patch for this now; but it is not obvious how you might go about applying this if your are not familiar with the bea smart update tool.

First of all you need a bea account, you can get this from support.bea.com. I am told that you wont need a support license for this particular patch. Then you need to go to %ORACLE_HOME%/utils/bsu and run either bsu.sh or bsu.cmd depending on your platform.

When you are logged in make select the "JDeveloper" installation that you want to patch. Don't confuse this other plain "WebLogic" installs you might have hanging around.

Then make sure the "Get Patches" tab is selected and select the menu item Patches -> Retrieve Patch. In this case the patch ID is "RFRS" and the passcode "VGJ16G15". Download the patch, just agree to any dialogs that come up.

Now you can go to the "Manage Patches" tab to find the patch you have just downloaded and press the apply icon.

The patch should now move to the "Default" table and is now ready to test. Restart WebLogic | JDeveloper and hopefully the problem will go away.

In case google is watching you expect the following stack trace when deploying a web service if this patch is not applied:

Target state: deploy failed on Server srg 
 [java] java.lang.NullPointerException 
 [java]     at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:213) 
 [java]     at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:229) 
 [java]     at weblogic.wsee.wsdl.WsdlTypes.collectNamespaces(WsdlTypes.java:229) 
 [java]     at weblogic.wsee.wsdl.WsdlTypes.parse(WsdlTypes.java:151) 
 [java]     at weblogic.wsee.wsdl.WsdlDefinitions.parseChild(WsdlDefinitions.java:520) 

Monday, October 13, 2008

Jersey 1.0 Released

The first production release of the reference implementation of Jersey in now out there to play with. Previous notes on weblogic / jdeveloper still apply as far as I can tell.

Wednesday, October 8, 2008

What happened to extension X in JDeveloper 11? (Worked example with Spring extension)

Warning, this is a workaround and I give absolutely no warranty as to the results of trying this. Only use this if you really need a particular extension in order to move forward. It might may your JDeveloper to become unstable and cause your pets to come out in a rash. Right health and safety over.....

Those of you how are moving up to JDeveloper from 10.1.3 will notice that some of the extensions you know and love are not yet available in 11. This is mostly likely because the extension developer has been conservative in there bundle definition to restrict the usage in future versions. The good news is that that APIs for JDeveloper were frozen in 10.1.3 and for most part well written extensions should work. (You will note that the ones I have worked on will turn up in the center already as I tend to be more pragmatic about such things.)

You can work around this though with a little bit of work. First of all we need to capture the traffic between JDeveloper and the update center. To do this start the the HTTP Analyzer in JDeveloper. (View->HTTP Analyzer, Then press the green start start button) Then run the update tool Help->Check for Updates and proceed to the page you would normally see you extensions on. You can press cancel now as we have captured all the important information.

In my build the most important request goes to "http://www.oracle.com/technology/products/jdev/101/update/exchange.xml". So do a quick search of the response text, and yes you do have to copy the text to another editor to do this I have logged a bug for this, to find the extension you want. In my case I needed the spring extension and found this:

  <u:update id="oracle.jdeveloper.spring2">
    <u:name>JDeveloper Spring 2.5 Support</u:name>
    <u:version>08.01.09.01</u:version>
    <u:author>Oracle</u:author>
    <u:author-url>http://www.oracle.com/technology/products/jdev/htdocs/partners/addins/exchange/spring/spring-extension.html</u:author-url>

    <u:description>
        Adds support for creating and editing Spring 2.5 bean defintions. This addin will create the Spring 2.5.1 library and register the relevant XSDs and DTDs
        with the IDE to provide a productive editing experience for Spring definitions.
    </u:description>

    <!--u:post-startup-hook>oracle.jdevimpl.spring.addin.SpringAddinInstaller</u:post-startup-hook-->

    <u:requirements>
      <u:requires-extension id="oracle.jdeveloper"
                            minVersion="10.1.3.36.73" 
                            maxVersion="10.1.3.9999" />
    </u:requirements>  
<u:bundle-url>http://download.oracle.com/otn/java/jdeveloper/10131/extensions/JDeveloperSpring2.zip</u:bundle-url>
  </u:update>

Note the "requires" entry is the one that is causing problem. So we ignore this and just download the related zip file and place the contents in .../jdeveloper/jdev/extensions/ directory. This will not run any installer that comes with the extension; but should work in most cases.

In the spring case though you need to modify the name of the install directories. It appears that the long version numbers aren't liked by the more recent build of JDeveloper. You can discover this by looking at the libraries defined by the extension, Tools->Manage Libraries->Spring 2.5, and seeing where they are trying to find the jar files. In this case it seems we have to rename the extension jar and directory from "oracle.jdeveloper.spring2.08.01.09.01" to "oracle.jdeveloper.spring2.8". Now in theory you shouldn't need the version numbers at all; but but removing them didn't work in this case.

Next time you start JDeveloper you should find that in most cases the extension will work without problems. Even if you have an issue this should tide you over until the extension developer gets time to put another release out. When they do you may have to manually delete the extension before trying to install the new true extension from the update center. Also please disable this extension before reporting bugs on the forum to work out whether they are causing problems.

Right now I need to go back and figure out what I was working on and try to remember why I wanted the spring extension!

Tuesday, October 7, 2008

Overview of JAX-RS 1.0 and Jersey extensions.

Good overview of JAX-RS 1.0 and hopefully in a few days one for those extensions that are part of Jersey and not part of the specification yet.

JDeveloper 11 goes production, horrah!

Finally you can see what we have been up to all these years in a full production version. It appears that the issues with the download page that were seen earlier today have been fixed.

This version is built on top of the very new Weblogic 10.3 so you get more toys for your money. Collateral for 11 should start to pop up on OTN in due course.

One final point, JDeveloper now comes as an installer. So run the jar file, don't try to unzip it.

Monday, October 6, 2008

JAX-RS / Jersey targeted for the 13th of October?

Based on a quote from Paul Sandoz JAX-RS / Jersey goes production on the 13th. As noted in my previous post there are still some work aroundable issues; but it will be nice to have a library that is claimed to be production quality.