Thursday Sep 26, 2013

Last chance to see the great Java EE demos presented at the Java EE 7 booth at this year's JavaOne!

don't miss the last hours chance to review the great Java EE 7 features presented at EE7 booth at JavaOne demogrounds!

Wednesday Mar 23, 2011

This blog will be migrated

Just a short migration note ... this blog will be migrated to in a month or two.

Tuesday Jun 24, 2008

parse-nb equivalent to parse-ipr and parse-dot-classpath

While working on some parts of JAXB, and using NetBeans myself for development, I came across the two projects parse-ipr and parse-dot-classpath, which are useful when you need to invoke your project files from command line without an IDE. I developed a NetBeans equivalent of those: parse-nb. What it does?

Basically, it allows you to parse your NetBeans Java project files (nbproject/project.xml, and give you a java classpath-way formatted string as an output.

So if you run it on JAXB2.1 project (which I just updated from freeform to regular NB J2SE project), you get a scary output like this:

I believe you would never want to write or maintain this by hand, and it is still useful to have it to be able to run e.g. an individual tests manually from command line, so this way you can write your own scripts to set whatever classpath you wish to set. Read more at parse-nb website, and download from the project's download area.

I do run it as a part of bash setup, so that I can then always start debugging tests like this:

java $DBG $JB21 TestCaseRunner .

And here's a usage info:

It of course lacks in many areas, so improvements are always welcome! I'd also appreciate if the NetBeans library system gets much simpler, as it's very hard to work with currently.

Thursday Jun 12, 2008

Metro features with NetBeans

With Geertjan's help, my article about Metro use in NetBeans has been published to NetBeans Zone. Enjoy! And vote for it if you like it ;O)

Wednesday Jun 04, 2008

New features in Metro 1.3 with NetBeans 6.1

Couple of people asked about availability of the new features I described earlier. The bits there point to NetBeans 6.5 builds. Question is whether you can use the same bits for NetBeans 6.1?
Unfortunately the answer so far is no, it is not possible. However, come here for updates.

I've tried to keep the bits the same, but there has been a change in classpath apis which didn't allow me to produce the same artefacts for both 6.5 and 6.1 builds. There's also a WS server api redesign planned for 6.5. So, I'll try to provide the build, but we'll see.

Tuesday Jun 03, 2008

Signing/Encrypting message attachments

Ashutosh reminded me of a feature which was not supported yet by NetBeans. It's the ability to sign and encrypt message attachments. This is connected to the message level specific settings.

For each operation, or better say for each message of your web service, you have an option to select whether the whole message body shall be encrypted, or signed, or both. If you don't want to process the whole body, and want to sign & encrypt only specific credit card information field to improve performance significantly, you may specify such configuration as well.

The new feature now enables you to configure the same for message attachments. You may choose to sign and/or encrypt message attachments. Just click "Add Attachments" button and then check checkboxes in respective columns:

The security policy generated from such configuration looks like this:

Monday Jun 02, 2008

New features in Metro 1.3 and NetBeans

Recently, there've been couple of blogs about new features in Metro 1.2 release, and about some additional things that will be released with Metro 1.3.

I've been working on updating the NetBeans Metro plugin to make sure these features are easily configurable from our tools as well.

Today, I'd like to announce availability of NetBeans 6.5 builds that contain support for both Metro 1.2 and Metro 1.3 features. Click here to download your NetBeans 6.5 copy from Hudson continuous builds, or grab a daily builds. You shall get either JavaEE or Full bundle.
Note that in order to leverage the new features, you need to have Metro 1.2 or Metro 1.3 installed on top of your GlassFish installation.

The biggest changes you find in the UI are shown in the following screens:

  • Namespace Version Chooser - Metro 1.3 supports .NET 3.5 release, which has policy assertions in a different (standard based) namespaces than .NET3.0. Thus, you need to have a choice which version your service shall be developed with.

  • Kerberos - additional security profile available for 1.3 version with Kerberos support. Read more about Metro Kerberos support on Ashutosh's blog, and if you are not familiar with Kerberos itself, read more on Wikipedia

  • STS Issued Supporting Token Profile - new security profile based on Issued tokens.

  • Hash passwords - support for Hash Passwords in the Username Authentication with Symmetric Keys security profile. Read more about Hash Password support on Ashutosh's blog, and if you are not familiar with Digest Authentication itself, read more on Wikipedia

  • Encrypted Supporting Tokens - ability to encrypt supporting tokens.

There are some other things which I might forgot about, so let me know if you miss anything. Also, let me know if you find any errors, meet any exceptions, anything like that. Currently these are development builds, and release quality shall be met with NetBeans 6.5 release. However, I think the metro modules shall be stable enough already. Let me know ;O)

Tuesday May 27, 2008

Metro with GlassFish v3 TP2 and NetBeans

I just finalized NetBeans support for Metro on top of GlassFish v3 TP2. What do you need to do to start using it? Here are the steps:

  1. First, download and install GlassFish V3 TP2 with Metro support from it's update center. Bhakti has a nice blog post with instructions how to do it:

  2. Next, download and install latest NetBeans 6.5 development build e.g. from here (get the full or javaee bundle):

  3. Start NetBeans, go to Tools --> Plugins menu, and select "Available Plugins" tab

  4. Check checkbox next to "GlassFish V3 JavaEE Integration" and click "Install"

  5. Add the server to IDE. Go to "Services" tab, right-click "Servers" node, select "Add Server..." and follow wizard instructions to register your GlassFish v3 instance to NetBeans

Now you can use GlassFish V3 TP2 as a target server for your Web Projects and create web services/clients inside the same way you would do with GlassFish v2. The only difference is that JSR 109 integration with GlassFish is not ready yet, so you can't enjoy features like Web Service Tester, or deploying services/clients without generating necessary artefacts. Work on JSR 109 is in progress, and shall be ready soon. Keep an eye on Bhakti's blog for this.


Friday Mar 21, 2008

NetBeans 6.0.1 patch released, solves problem with outdated certificate

Patch released for NetBeans 6.0/6.0.1 fixes outdated certificate issue.

[Read More]

Tuesday Nov 06, 2007

Hudson, NetBeans, Findbugs and "Online IDE"

 Well, it's been a while ... but anyway, I'm back. Got through a couple of pretty good books in the meantime (Freakonomics, Joel On Software, Idioti na plavbe kolem sveta, ... ;O) ), but more important I have been playing with Yarda Tulach's online FindBugs plugin for NetBeans. I like the "Online IDE" approach a lot. If you use Hudson for building your project, it automatically builds your FindBugs results as well.

 Now when the data are computed on server, why would you need to compute them locally to be able to see them in your IDE together with the code? You don't ! It's enough to do compilation - it takes too long already anyway. So how to reuse the data from Hudson?

 Just use latest NetBeans 6 nightly, and install Find Bugs
Tasks for
module from daily development update center -
then you will get smooth integration with Task List. Install the
module, open the task list window (Window -> Task List), select which project/s you want to scan and wait till the list of FindBugs errors is downloaded.

 Yarda's plugin worked only for NetBeans NBM projects, but I wanted to be able to use it for our WSIT project, which is part of Metro web service stack. Those projects are setup as a plain Java SE projects. So I enhanced the plugin with the ability to work for this type projects as well. The url to findbugs result is stored in 'findbugs.url' property in file, so you can use it for your project (and your Hudson) as well.

 When you use it, it looks like this:

Monday Jul 23, 2007

WSIT NetBeans modules Code Report

I just came across Ashutosh's blog about open source analysis using for WSIT and XWSS. Interesting info there. Worth reading.
So, of course I was tempted to try it for my open source modules: WSIT NetBeans modules. Some interesting info to mention here:

1. Codebase - 33122 LOC
2. Estimated Effort: 8 Person years

Hmmm, man, I am productive ;O) I'm the only one working on the code for little more than a year (with a few small commits coming from other NetBeans guys. I had a lot of sleepless nights working on the project with it's schedules trying to deliver the tooling story and the number seems to reflect that. Of course, the number is way too off, and the metrics used are always arguable, but looking at numbers of other projects which I know well and worked on (NetBeans, WSIT, Glassfish, ...), they usually reflect the reality quite well.

Anyway, enjoy the full report and if you find any interesting information there, let me know ;O)

Tuesday May 08, 2007

Lab is live at SDN

JavaOne 2007 hands on labs are live at SDN. Enjoy!

[Read More]

Friday Aug 18, 2006

Code coverage support in Netbeans

Recently while working on Netbeans support for the latest web services project WSIT which is a new generation of web services stack interoperable with Microsoft .NET and supporting latest WS-\* standards and is going to be included soon in Glassfish, I had a need to write tests for underlying work with models of wsit configuration files or wsdl files - to be able to attach correct policy assertions to right places.

I was lucky, because exactly at that time, Mikhail Kondratyev together with a team, released first version of their Code Coverage Netbeans Plugin publicly for everybody to use at and And, it got me. I LIKE IT A LOT! Interested why? Read below...

Usually, when you write tests, you should try to cover the code as much as possible in a reasonable time. If you write some library, or APIs (whole NetBeans code is based on public-or-not APIs) it's even more important. Another usecase is when you have some code already written and you plan some large rewrite (better performance, architecture, ...). How do you make sure the functionality stays the same? Tests. There's no other way.

Netbeans has a very good JUnit test support for a long time, so this part is covered already - writing tests is pretty easy. Also, you are able to measure the test coverage in HTML form in a percentage by using some tools like Emma. However, look here:

This is how output of Mikhail's plugin looks like. Green lines mean your code has been covered by the latest running tests. Yellow lines (not present on screenshort) were marked partially, and white lines is the work you still need to do. After you install the module, enable coverage data collection by right-clicking your project and selecting Coverage -> Activate Coverage Collection. In this version, you need to do it everytime you restart NetBeans. See screenshot:

That's it! Really!

Afterwards, simply run your unit tests, or just one unit test, any way you want. When your tests pass, open any source code you have and enjoy the view ;O).
I didn't even have to use any code-quality scanning tools, and with help of this plugin I found unused methods after refactoring the code - would you believe you can't test unused private method? ;O)).

Go there:

Download, and give it a try! And, let Mikhail or me know what do you think!

Martin Grebac

Thursday Jul 20, 2006

Netbeans Beta2 is out!

Check it out: Netbeans 5.5 Beta 2 A lot of bugs fixed, even in the WSIT integration.

Tuesday Jul 18, 2006

Not able to use WSIT security?

Do you have Netbeans installed and still not able to use WSIT security features? If you have Enterprise Pack installed in your Netbeans 5.5, and in Security tab you always or often see the message "Security is supported only on Sun Application Server":

Make sure you follow these steps:

1. In Netbeans main menu, go to Tools -> Module Manager
2. In the installed modules list, select Identity Profile UI and click the checkbox next to it (Active column) to disable the module (as on screenshot below)

3. Restart Netbeans

There's a clash in Identity Manager and WSIT security UIs which will be solved for release, so please excuse the current inconvenience.


The views expressed on this [blog; Web site] are my own and do not necessarily reflect the views of Oracle.


« April 2014