How does Virtualbox help me in hacking with Netbeans, Glassfish and PostgreSQL ? (2)

9 02 2010

Did you read yet Part 1 ? If not, I recommend to run through it here.

We started from the scratch with VirtualBox and created a new virtual machine running Ubuntu Server 9.10. The last step was to shutdown the virtual machine. Now it is time to clean up, update our server, finetune the configuration and install JDK and Glassfish.
Read the rest of this entry »





News: Kenai, Netbeans Updates

9 02 2010
  • After the previous announcement that kenai.com would be shut down and the email asking you to vacate the place until April 30th
    Hello fellow Project Administrators,
    
    It's with a sad heart that we have to announce that the Kenai.com domain will be shutdown as part of the consolidation of project hosting sites now that Sun is a wholly owned subsidiary of Oracle.
    
    Project Kenai has always existed as two different things: Kenai the infrastructure, and Kenai the website (Kenai.com).  While it has come time to close the domain of Kenai.com, the infrastructure (which is already used under NetBeans.org) will live on to support other domains in the future.
    
    With this decision from Oracle to close the Kenai.com domain, it is now time for project owners to begin the process of migrating their repositories and content over to other locations.  A few things to note as you begin this process:
    [..]
    Any public projects that remain after the 60 day limit (April 2nd 2010) will be removed when the site is turned off.
    
    It has been an amazing ride, and a great pleasure to personally work with so many of you over the last year or so. From the entire Project Kenai Team I want to thank you for all of the feedback, criticisms, and support over our time together.
    
    With much respect,
    The Project Kenai Team
    

    now someone realized the user-base is much stronger than they thought. Making a good decision: Lets move the kenai features into dev.java.net !

    Gentlepeople,
    
    In an effort to get information out to the Kenai community quickly, while trying to manage the integration of our two companies, I think we did a poor job at communicating our plans for Kenai.com to you.  I would like to remedy that now.  Our strategy is simple.  We don't believe it makes sense to continue investing in multiple hosted development sites that are basically doing the same thing.  Our plan is to shut down kenai.com and focus our efforts on java.net as the hosted development community.  We are in the process of migrating java.net to the kenai technology.  This means that any project currently hosted on kenai.com will be able to continue as you are on java.net.  We are still working out the technical details, but the goal is to make this migration as seamless as possible for the current kenai.com projects.  So in the meantime I suggest that you stay put on kenai.com and let us work through the details and get back to you later this month.
    
    Thanks for your feedback and patience.
    
    Ted Farrell
    Oracle Corporation
    
  • Netbeans 6.8 Updates available
    Please visit your friendly plugin page (Tools|Plugins|Reload catalog) and find a bunch of updates for your favorite IDE.

    Netbeans Updates





How does Virtualbox help me in hacking with Netbeans, Glassfish and PostgreSQL ?

6 02 2010

Using the Netbeans IDE together with Glassfish as application server is quite easy and comes out-of-the box with the Netbeans installer. To install PostgreSQL is not significantly harder to install on Linux (or Windows). Our team uses Ubuntu 9.10, Netbeans 6.8, Glassfish and PostgreSQL 8.4.2. If you work alone, it is usually no problem to develop and deploy locally but once you are embedded into a team, you better ensure that you deploy and test applications in the same environment. Very quick you will have Ubuntu updating the OS and PostgreSQL and someone might install Glassfish updates or even add optional modules, soon you have as many deployment environments as you have team-members (times 2). The straight forward answer would be to have all working with the same one server running the application server and the DB, but we still need the comfort of a local sandbox playground and in-dependency from being online or in the office. Certainly I do not advocate island development leading to a different codebase and varying DB’s. But after the tutorial you will agree with me our solution is a reasonable approach.

Our approach: We create a virtual server (with VirtualBox) that everyone is running on his/her desktop and also one instance on a central server. One team-member is responsible to create so-called raw virtual images of the server and documents new versions that are deployed to each desktop. Each team-member does nothing but starting the guest Server in VirtualBox (Glassfish and PostreSQL autostarting) and immediately can connect with Netbeans and pgadmin to AS and DB.

Virtual Ubuntu 9.10 Server

Not all developers are familar with setting up Ubuntu Server and VirtualBox, so I compiled this tutorial as a walk-through the necessary steps to get you started witthout knowing too much about  the OS nitty-gritty stuff. You want to concentrate on creating your application, not learning to hack the operating system (even I recommend to know as much as possible on Linux).
A remark on the naming: Your desktop or Notebook running VirtualBox is the HOST and the server or OS you run in the virtual machine is the GUEST.

Read the rest of this entry »





Kenai.com alternatives ?

3 02 2010

Kenai.com (link) is dead (shot by the Sheriff, but he didn’t shoot no deputy, ooh, ooh,..) and by April 30th you better backup your belongings, otherwise they go /dev/null. (The domain will be removed as well). Unfortunately it was well integrated with Netbeans and this level of collaboration you wouldn’t achieve with another OS code repositories. No choice, so here a comparison of services on wikipedia (link).
My personal choice: I will select one with a public API, potentially could create a plugin (if it is not available yet). Maybe Launchpad or Github.





ZK5.0 Netbeans Plugin released

3 02 2010

Within few days the new NB plugin was available for download at sourceforge.net (link). Thanks.





SUN is history

30 01 2010

On an emotional side note: If you want to remember the SUN logo, download it quickly ! It is breathtaking in what speed the Oracle logo replaces the SUN logo on various websites:

not yet:

  • netbeans.org
  • hudson.dev.java.net

They dont even bother to create a combined logo or similar (or fomerly SUN…).





News on Sun goes Oracle

29 01 2010

After months of rumors, speculation and fears of loosing products, tools, jobs and world freedom, Oracle announced their strategy in form of a webcast. Still not confirmed but presented as their current plans and intentions. From the technical tools cast (Oracle link, not sure why you need to resize the browser !?!?!) my main points:

  • Netbeans to be continued with the same team and the same setup towards the community. Collaborating with the JDeveloper and Eclipse plugin team.
  • Kenai to die (aka becomes internal). I just started to place my tutorial projects there, time again, to move back to SourceForge or launchpad or github.

Find the other recorded webcasts here (Oracle link).

My personal view: It is still 100% finalized, even short-term changes might not be dramatic, but over time changes will come and I wont like the introduction of enterprise features here and there for  $$$, while a community edition becomes just good enough for students.





ZK 5.0 released

29 01 2010

Finally version 5.0 of the growing popular Ajax-Web-Framework is released. Quite a number of new and updated features certainly drives up the number of users and pushes the community further. Find more information at zkoss.org. As usual the Netbeans plugin will most probably follow in a few days time. Keep you updated.





Accessing Trac with Python from inside a Java application

17 01 2010

In my continuous endeavor to access the Trac Wiki/Ticket system (trac.edgewall.org) from outside I came across Python to test the various methods provided by the XMLRPC plugin (trac-hacks.org/wiki/XmlRpcPlugin). The goal is a Trac NB plugin implemented  in Groovy. Before the Groovy library was finally fixed (see my blog post) I tried to use Python (or better Jython) embedded in regular Javacode foloowing the JSR 223 (jcp.org/en/jsr/detail?id=223). I spare you from the usual comparison between Python and Jython vs other JVM based dynamic languages, you will find plenty of forums and websites rambling about this. Here we just have a short walk-through to see something in the console.

First we add the Jython plugin to Netbeans (Tools|Plugin)

Jython plugin

Create a simple java console application

New Java Project

Add the Jython library

Jython Library

Make a simple test

public static void main(String[] args) {
PythonInterpreter interp = new PythonInterpreter();
interp.exec("import sys");
interp.set("a", new PyInteger(42));
interp.exec("print a");
interp.exec("x = 2+2");
interp.exec("print x");
 }

Fix the imports

import org.python.core.PyInteger;
import org.python.util.PythonInterpreter;

Execute the application and we will get this (only slightly exciting) result:

run:
42
4
BUILD SUCCESSFUL (total time: 1 second);

You even can access the results from the Java “host” with this

 PyObject x = interp.get("x");
 System.out.println("x: " + x);

Now, we move on the Trac access via XML-RPC by using these few lines:

interp.exec("import xmlrpclib from xmlrpclib");
interp.exec("server = xmlrpclib.ServerProxy('https://user:password@sometracserver.com/cobra/login/xmlrpc') ");
interp.exec("print server.wiki.getPage('TracAdmin')");x);

Unfortunately the console serves us this error

run:
Exception in thread "main" Traceback (most recent call last):
 File "<string>", line 1, in <module>
ImportError: No module named xmlrpclib
Java Result: 1
BUILD SUCCESSFUL (total time: 2 seconds)

The XML-RPC is obviously not in the standard Standard but in the extra modules (that you find in you Netbeans folder under python1\jython2.5.1\lib). Adding that file to our classpath alone would not fix the problems due to the dependencies. Short-cut: Add all the .py  (aifc.py to zlib.py) files from the lib-folder into a new lib folder inside our java application lib-folder. (You dont need to add the subfolders from the jython and you dont need all the py files, but it is easier than digging out the depending ones.

Lib folder

Execute again, and there we go, Trac talks back ! (inclusive of a deprecation warning, which I leave to you to fix)

Trac

I recommend to explore the various methods to access your wiki content, create entries and manage tickets.

More about the NB plugin soon.

Reference and more information:

Complete NB Project on kenai: https://svn.kenai.com/svn/javadudes-toolshop~tracpythontest





Java EE 6 Online Codecamp

8 01 2010

Starting next week (Monday 12th) there is a one-week codecamp on the Java EE6 features. I did previously the “online” seminars from Sang Shin at www.javapassion.com. Find more info at here.