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, project.properties) 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.

Wednesday Jun 18, 2008

Grails and web service development with Metro

I searched through my blog entries, and realized that I somehow forgot to blog about the Metro Plugin for Grails framework I introduced in the beginning of this year. So, this is an attempt to do a (late) little advertising.

If you use Grails, you are certainly aware of it's plugin system. I decided to wrote a little Metro plugin which enables you to expose your Groovy/Grails classes as Metro web services in a simple and easy way using natural Grails commands, such as

grails create-service

and natural Metro annotations, such as @WebService, like this:

import javax.jws.\*
class CalculatorService {
def int add(int i, int j) {
return i+j;
def multiply(int i, int j) {
return i\*j;

Those are the only things you need to do to develop web services with Grails after installing the plugin. You can find exact installation/how to use instructions at plugin website. Currently I host the plugin as a subproject of JAX-WS Commons project, but am working on making sure it is hosted at Grails plugin site as well.

Btw, I recently found also these instructions on how to use the Metro Grails plugin to develop contract-first (WSDL first) web services, which gives exactly the areas where I planned to improve the plugin in. So in future, the instructions might get even more simple.

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: http://weblogs.java.net/blog/bhaktimehta/archive/2008/05/working_with_me.html

  2. Next, download and install latest NetBeans 6.5 development build e.g. from here (get the full or javaee bundle): http://deadlock.netbeans.org/hudson/job/trunk/lastSuccessfulBuild/artifact/nbbuild/dist/zip/

  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 NetBeans.org
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 project.properties 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 ohloh.net 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)

Monday May 07, 2007

Java and Microsoft Interoperability Hands On Lab

time's up for this year's JavaOne. WSIT is there as well. Besides all technical sessions, you can also try things yourself.
Me, Sreejith A K and Fabian Ritzmann will guide you through Sun Java and Microsoft WCF interoperability step by step at JavaOne's Hands-on-lab session on Wednesday 9th:

3:50 PM - 5:20 PM LAB-3350 Make Java Technology and .NET 3.0 Interoperability Work With WSIT

If you don't plan to attend this year, or there's no place left, you can still try everything safe at home on your computer. The lab will be accessible online, and we'll provide a forum where we'll try to answer all your issues, questions, requests. Stay tuned, I'll post the necessary info here soon.


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


« April 2014