Migrating From NetBeans to JDeveloper - The Video

So Oracle now own NetBeans as well as JDeveloper - but can code be migrated between the two?

The answer is yes - and it is quite simple actually - have a look.

If you are a developer with an open mind and you like to explore new IDEs and you decide that you want to have a look at JDeveloper we have lots of demos and tutorials for you on OTN. Most of them will show you how to create an application from scratch in JDeveloper; what if you actually want to try the tool on your existing source/project?

I'm working on a short how-to that covers the basic steps for this, and while working on this I recorded that short 10 minutes demo that shows you how to take one of NetBeans' sample application - the consulting agency - which uses JPA and JSF and open, compile and run it with JDeveloper and WebLogic.

The basic steps are:
Create project from existing source (or WAR).
Set project properties in JDeveloper and add libraries.
Compile and Run.

In the specific application I picked there were some other tricky parts like a mislocated persistence.xml file (not under META-INF), a reference to dynafaces that seems to be dead, and a connection to the Derby database.
But I got all of this sorted out and working.

Now I could use the visual JSF editor in JDeveloper to edit the pages.


Hello Shay, many people use netbeans with vwp = Woodstock. Woodstock is really a great tool - a jewel - for developing web applications. Some people from Sun think we need no efficient development and killed Woodstock. Nobody understands this decision. We all want this visual designer back. Will it be possible to migrate from Woodstock to JBuilder visual designer? Peter

Posted by Peter Magsam on January 28, 2010 at 06:41 PM PST #

Thanks for the blogs aimed at NetBeans developers. As someone who has used NB since the beginning, it's helpful to see what the two IDEs have in common before I start learning the extra features in JDeveloper. Blogs like this will help get us Sun-now-Oracle folks up to speed more quickly. Cheers, Bobby

Posted by Bobby Bissett on February 04, 2010 at 09:46 AM PST #

I looked at JDev once and really found it a nice GUI and ease of creating a page. I did not get too far into it due to the ADF licencing structure which I felt was more aimed at 1000+ employee companies and insisted on Oracle server... anything else (ie tomcat) really really did cost. Ie Jdev is not really freeware as it can not produce anything you can use. The community will simply not go there. Also the sql databinding was not so obvious as NB. NB you just dragged and dropped and somewhere behind the scenes it just worked. Also examples in Jdev were few, community support low etc. If someone can get a Woodstock JSF1.2 VWP project into and working onto Jdev.. great... or a howto... in NB you did this.. in Jdev you do this. etc. Somewhere there needs to be a rethink on ADF costs and a work through of getting NB visual into Jdev. Basically I am trying to say the gap between the community and the commerical in the Oracle camp is just too great. James

Posted by Jamesarbrown on June 10, 2010 at 04:41 AM PDT #

James, JDeveloper is free, ADF is not. You can use JDeveloper to build applications that you can deploy for free as long as you don't use the ADF specific technology. But if you want to build a JSF, JPA, EJB application with Woodstock or Trinidad - no problem - it is free. By the way - here is how to get woodstock working in JDeveloper - http://blogs.oracle.com/shay/2010/01/woodstock_jsf_components_with.html and here is how the components map to the ADF Faces set of components - http://www.oracle.com/technology/products/adf/adffaces/woodstock2adfMatix.html If you want declarative data binding with a simple drag and drop - this is where ADF comes into the picture - see this: http://download.oracle.com/otn_hosted_doc/jdeveloper/11gdemos/adfoverview/adfoverview.htm So to summarize, JDeveloper is free and you can use it to do visual JSF development. ADF has a cost - and we believe the functionality it provides justifies this cost. You can choose to use it or not.

Posted by shay.shmeltzer on June 10, 2010 at 06:29 AM PDT #

Hi Shay, My connection to the database will get the context.xml (woodstock project it's working), but the migrated project no. how can i fixed?

Posted by Julio Araujo on December 20, 2010 at 08:35 AM PST #

Julio, I'm not exactly sure what the issue is - what do you mean it gets the context.xml? In WLS you usually use datasources defined in the server.

Posted by shay.shmeltzer on December 20, 2010 at 08:41 AM PST #

Hi Shay, Thanks for reply. Actually, in my project with jsf woodstock components and deployed on Apache Tomcat/6.0.29, we obtain the connection to database reading the datasources define in context.xml like this: public static Connection getConnection() throws SQLException { Connection connection = null; try { Context ctx = new InitialContext(); DataSource ds = (DataSource) ctx.lookup("java:comp/env/jdbc/PERDB"); //DataSource ds = (DataSource) ctx.lookup("jdbc/PERDB"); connection = ds.getConnection(); } catch( NamingException namingE) { System.out.println( "Oops, the lookup didn't work " + namingE.getMessage()); //throw namingE; //return null; } catch(SQLException sqlE) { System.out.println( "Oops, we got a SQL Exception " + sqlE.getMessage()); throw sqlE; } return connection; } But, when i try to run the same application (migrated of course), on weblogic, didn't find the datasources name.

Posted by Julio Araujo on December 21, 2010 at 02:48 AM PST #

You'll need to define the datasource on the embedded WebLogic Server. So once you run your page and the embedded WLS started go to login with weblogic/weblogic1 - and you'll be able to add that datasource definition through the console.

Posted by shay.shmeltzer on December 21, 2010 at 08:08 AM PST #

Hi Shay, I did it !!! but it's something wrong, because i can't read the datasource name. There is some clue to define this in weblogic and how to get from the application.? ragards. jaraujo

Posted by Julio Araujo on December 22, 2010 at 07:32 AM PST #

Try the WebLogic Documentation for example: http://download.oracle.com/docs/cd/E14571_01/web.1111/e13726/programming.htm#i1023868 Or try the WebLogic discussion forum if it doesn't work.

Posted by shay.shmeltzer on December 22, 2010 at 07:40 AM PST #

Post a Comment:
  • HTML Syntax: NOT allowed

I'm a Director of Product Management for Oracle's Cloud Development Tools and Frameworks.
Follow me:

« June 2016