Analyze what personality is behind your blog

According to this analyzer I’m  The Duty Fulfillers

The responsible and hardworking type. They are especially attuned to the details of life and are careful about getting the facts right. Conservative by nature they are often reluctant to take any risks whatsoever.
The Duty Fulfillers are happy to be let alone and to be able to work int heir own pace. They know what they have to do and how to do it.

It doesn’t perfectly fit on my personality, but for sure it isn’t too far.

Thanks to Mark Little for the link

JBossWS and Apache CXF collaboration

I’ve just pubblished a post on the JBosWS blog regarding the JBossWS involvement in the Apache CXF project. In few words, the JBossWS team is increasing its collaboration with the CXF developers, the target being to improve both projects.

It’s not that simple to achieve an active bi-directional collaboration, with both parties’ needs being considered, but this is working quite well now. For instance, read what Daniel Kulp (CXF lead) writes about the collaboration. Needless to say I like this, that’s a nice example of what open source can make possible.

[book-review] Pragmatic Thinking and learning

Some weeks ago I’ve been at my usual book store looking for some new book to read. I couldn’t resist when I see this catchy title: “Pragmatic Thinking and Learning. Refactor your wetware”…I had to buy it!

In fact the book have been even better than my expectations, giving me a lot of hint and idea around the day by day improvement and refactor of my brain.

As usual I wouldn’t bother you making just another complete book review (BTW you can find a great one here), but I would prefer to spot just 5 point that totally catch my attention and I’m applying (every day a bit more) in my work and life, hoping to add something to the discussion and stimulate your curiosity for the book:

  1. A greater awareness of R-mode to L-mode flow. Ok it’s not the first time I’ve heard about right vs left brain. In a nutshell (please keep in mind it is a terrible reduction to keep the post brief!!) R-mode is responsible of intuition and creativity, L-mode of verbal and logic. But Hunt’s explanation and hint to favour R-mode to L-mode flow are really great. There are some of his hint I’ve been already doing because they are natural for me (i.e. large use of metaphor and humor during explanatio ; step away from my keyboard when thinking to hard problem or pattern matching; describe problems to someone to get the solution). But now I have a more precise awareness that I’m working with these habit on R-mode to L-mode flow, and it make easier to understand what is happening into my brain and eventually try to drive this process.
  2. Mind map. I already know them. Perhaps because I’m italian: it’s quite impressive how much infos about you can find in italian language about on internet, much more than in english  (if you undertsand italian  just try this wikipedia page and follow external link). What Hunt’s book have added is the fantastic idea that simply make decoration on them expose in some way your R-mode thought. I’ve tried that and it’s quite impressive which results I’m getting.
  3. personal wiki to keep track and organize idea. Of course I already known wiki, but I’m trying to use it extensively to write down idea and knowledge of various kind. One more time I’m getting quite impressive results, getting much more ideas than ever and having a single place to correlate and link them. BTW I’m using zim desktop wiki…really a cool software for this purpose
  4. meditation to increase focus and attention. Well I’ve been already curious about. It just give the hint to try vipassana meditation. I like it, try to leave your prejudice (it’s nothing about religion!) and give it a try the results is tangible.
  5. keep the focus, avoid distraction in your environment. Hunt give some hints on how to avoid distraction starting from desktop workspace organization, email frequency and so on. The reason to avoid distraction is that our brain would spend a lot of energy and time (about 20 mins!) to change context and get back i.e to move away from IDE to answer an email and then switch back to programming activities. At a first look it seems impossible to limit the frequency of email check or just use a script to put a todo in your todo list without review the whole list before, but if you try that you will notice productivity will definitively increase.

They aren’t the only good points in the book, and I’m applying more hints, but for sure these 5 are the most effective for me. Moreover the second chapter of the book (you can read it here) is influencing a lot how I’m managing my team and considering expertise of people working with me and expertise of myself too.

The book of course contain much more than these, perhaps something that work better for you (no one of us have the same brain…luckily). Take a look to the linked book review, or much better leave your chair right now for few minutes, walk to your book store and pick up the book. Walking will re-activate  your Rigth Brain, and the book will do much more for it ;)

Thanks to Mr. Hunt for all the hints.

Ant 1.7.1 and package-info.java compilation problem of JAX-WS generated classes

Today I have spent a lot of time with a very strange issue compiling JAX-WS generated classes. I have been using jbossws wsconsume to generate some classes from a .NET wsdl and I had a very strange behaviour:

  1. Generate class calling wsconsume
  2. compile them and its client using ant and run my test perfectly working
  3. then calling my clean task to remove .class files and recompile them and run my tests doesn’t work!

IOW JAX-WS client have been working only the first time I compile them. I couldn’t figure out why it have been working in that manner, but after a lot of google search I got this commit. In practice what have been happening is better described in “Note on package-info.java” paragraph of javac target in ant manual. Starting from version 1.7.1 ant compile package-info.java only in these 3 case:

  1. If a package-info.class file exists and is older than the package-info.java file.
  2. If the directory for the package-info.class file does not exist.
  3. If the directory for the package-info.class file exists, and has an older modification time than the the package-info.java file. In this case <javac> will touch the corresponding .class directory on successful compilation.

In practice if you havea ant task like mine:

<target name=”compile” depends=”init” description=”Compile the Java source code”>
<javac destdir=”${classes.dir}” classpathref=”build.classpath” debug=”${javac.debug}” deprecation=”${javac.deprecation}” target=”1.5″>
<src path=”${src.java.dir}” />
</javac>

Here the compilation target compile all files and so create directory where package-info.class will be contained during other generated files compilation. In this case the compilation target never re-generate package-info.class because no one of the 3 conditions is true. My workaround have been to change my build.xml file and have this compile target:

<target name=”compile” depends=”init” description=”Compile the Java source code”>
<touch>
<fileset dir=”${src.java.dir}” includes=”**/package-info.java”/>
</touch>
<javac destdir=”${classes.dir}” classpathref=”build.classpath” debug=”${javac.debug}” deprecation=”${javac.deprecation}” target=”1.5″>
<src path=”${src.java.dir}” />
</javac>

Hoping this post would be useful for someone, let me remark that is a problem of ant javac task, not of jbossws and you will get the same problem with any other jaxws stack.

Let me remark also that Wise perfectly work in this case regenerating it’s classes on the fly :P

JBossWS wsconsume error “undefined element declaration ‘sch:schema’”

Today I was importing a .NET generated wsdl and getting this error using JBossWS wsconsume.sh tool (yes I’m not using Wise for this particular case!! But the problem would be the same in Wise since it use wsconsume under the hood) :

[WARNING] src-resolve.4.2: Error resolving component 'sch:schema'. It was detected that 'sch:schema' is in namespace 'http://www.w3.org/2001/XMLSchema', but components from this namespace are not referenceable from schema document 'file:/home/oracle/Desktop/security.asmx#types?schema1'. If this is the incorrect namespace, perhaps the prefix of 'sch:schema' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'file:/home/oracle/Desktop/security.asmx#types?schema1'.
  line 85 of file:/home/oracle/Desktop/security.asmx#types?schema1
[ERROR] undefined element declaration 'sch:schema'
  line 85 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 178 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 217 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 231 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 245 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 259 of file:/home/oracle/Desktop/security.asmx
[ERROR] undefined element declaration 'sch:schema'
  line 273 of file:/home/oracle/Desktop/security.asmx

Failed to invoke WsImport
java.lang.NullPointerException
        at com.sun.tools.xjc.reader.internalizer.SCDBasedBindingSet.apply(SCDBasedBindingSet.java:237)
        at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:518)
        at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:232)
        at com.sun.tools.xjc.api.impl.s2j.SchemaCompilerImpl.bind(SchemaCompilerImpl.java:85)
        at com.sun.tools.ws.processor.modeler.wsdl.JAXBModelBuilder.bind(JAXBModelBuilder.java:134)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildJAXBModel(WSDLModeler.java:2244)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.internalBuildModel(WSDLModeler.java:187)
        at com.sun.tools.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:133)
        at com.sun.tools.ws.wscompile.WsimportTool.run(WsimportTool.java:182)
        at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:217)
        at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:223)
        at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)

After some search Alessio pointed me to this excellent post where the problem is well explained and solution provided. The “problem” is not specific to JBossWS and solution explained there is fine for JBossWS too.

Hoping this cross post could help someone looking for the error in relation to JBossWS in google ;)