Getting Started with Netbeans and Shiro – Part 1

1 12 2009

Apache Shiro (formerly known as JSecurity and KI) is a security framework that handles authentication, authorization, enterprise session management and cryptography. With the move from sourceforge to Apache the GPL license turned into the Apache license. The current version is still 0.9 (still JSecurity), but you can build yourself a current version until the version is released. Shiro is NOT basd on JAAS.

Pre-Requirements for this tutorial:

  • Netbeans (any newer version 6.5.1 + already installed)
  • Maven (assuming most people dont use it yet)
  • Shiro code base (via svn)
  • Ubuntu (applies only to the installation of maven) Read the rest of this entry »




Update to Android 1.6

16 11 2009

Using the HTC developer phone the update to Android 1.6 will most probably the last one you can run on this device. Version 2.0 will not run on it (officially)
To update the version from 1.5 to 1.6 you follow the same steps as in my previous blog entry about Android update (link) using the lastest files from HTC (link):

  • Radio Image: ota-radio-2_22_19_26I.zip (same file as for 1.5)
  • Recovery Image: signed-dream_devphone_userdebug-ota-14721.zip

The release notes of 1.6 (from September 2009) you find at android.com.

If you dare to walk outside the standard path, go to Cyanogen.com for a homebew, but popular mod.





ZK 3.6.3 with Netbeans 6.8 Beta on Glassfish V3

6 11 2009

I am using Netbeans 6.8B for a few days and mainly testing if my existing JEE5 projects can be opened, deployed and executed on GF3. I am using ZK as Web/Ajax Framework. Usually the ZK team releases a new NB plugin to help you to create ZK based Java Web projects. Currently the plugin supports 3.6.2, some days back ZK 3.6.3 was released, so I guess in a few days time we will have a 3.6.3 plugin. The plugin creates a skeleton for a JEE5 webproject and I doubt they will support Java EE6 before EE6 is finally released (December?).

I was curious to see if I get the latest ZK running on GF V3 as a JEE6 application.

Part 1: ZK 3.6.2 with Netbeans 6.8B as EE5 Web Project

First, lets try first to add the 3.6.2. plugin to NB 6.8B

SVH20091105_001

ZK plugin 3.6.2

Read the rest of this entry »





Tutorial: Getting started with Netbeans and JUnit plus Cobertura and Hudson (Part 3)

26 09 2009

Following part 1 and 2 which covered the JUnit test class creation and the coverage evaluation by Cobertura, we will add in part 3 another dimension: Automation. So far we run the tests manually, but we want to achieve a continuous integration and test environment.

Part 3 (Cobertura and Hudson)

Preparation:





Tutorial: Getting started with Netbeans and JUnit plus Cobertura (Part 2)

25 09 2009

Following part 1 which covered the class and JUnit class creation and ended in a suspected successful test.

Part 1 (covering Cobertura setup and execution)

Preparation:





Tutorial: Getting started with Netbeans and JUnit plus Cobertura (Part 1)

25 09 2009

I believe strongly in testing. I saw companies and products without any automatic test frameworks and the slightest change to the codebase (often in the urgent ‘we-need-to-fix-it-now-and-give-to-the-customer-in-1hr’ mode) made parts of the product or modules prone to crashes because no one could test the changes against the complete application. In my current endevour to create a new product we embrace testing, though we dont practice TDD (test-driven-development), but at least we maximize the amount of automatic testing with tools/frameworks like Netbeans, Hudson, Cobertura and others. If you dont practice TDD, how can you judge how much of your codebase is really tested, even you assume all you business testcases are covered ?

The other day Code Coverage crossed my way (Thanks Chris!). Eager to find out how to “do it” or to “use it” I found a few tools suitable for the Netbeans environment. It actually drilled down to only one tool: Cobertura. It fits exactly into our landscape using Netbeans and Hudson and it is opensource.
To get started with Cobertura you should be familiar (a bit) with Netbeans, JUnit and Ant. The Cobertura website offers sufficient reference for all functions and introduction to get you started. But what I missed is a tutorial the start from the scratch using Netbeans and Cobertura. I found 3 references (I will add them at the end,) which are not complete or just not working for me), so let me share the most basic getting-started steps with you.
Please note: This is how I get started, it might not be complete, foolproof or even correct in all details. Please feel free to comment, correct or give other feedback !

Read the rest of this entry »





How to install PostgreSQL on OpenSolaris

31 05 2009

The installation is not straight forward as a double-click “setup.exe” on Windows. I summarized the steps to get a running PostgreSQL 8.3.x installation on OpenSolaris 2008.11. All done using a terminal session. Commands to execute in green.

  1. Login or open terminal as root user.
  2. pkg install SUNWpostgr-83-server
  3. pkg install SUNWpostgr-83-client
    Read the rest of this entry »




Howto: Netbeans not starting up

3 05 2009

After I installed a new plugin and restarted Netbeans (6.5), it flashed me with this error

Netbeans startup error

Netbeans startup error

I believe the plugin file was corrupt and/or the xml-file with the respective settings turned to be corrupt. An expert might be able to judge from the error (see end of this entry for full error error message). After closing the error message I got a complete empty Netbeans screen.

Netbeans startup error

Netbeans startup error

After investigating about remedies or similar cases, the only solution I found, is to delete (rename) the userdir (see link for more info).

Remarks:

  • There should be a safemode mode to start up Netbeans (is there one?)
  • Deleting the userdir is not a satisfying solution because you throw away all your personalized settings.
  • Submitted as error 164329 (link)

Full error message:

Read the rest of this entry »






On Passwords

24 04 2009

After running live CD’s or installing Ubuntu and openSolaris several times, I keep on forgetting the default passwords for the default user and or root user.

openSolaris (2008.11 Live)

  • root – opensolaris
  • jack – jack

Ubuntu

  • Runningthe LiveCD does not require login.
  • The root account is not activated after installation. Better read this article on root and sudo (link)

Remark: After installation the passwords are your own business. But there are ways to reset a passwords (at least in Ubuntu, see link)