Posts

End of a run and a new favorite?

I just came across a relatively new podcast called The Web Platform Podcast   The Web Platform Podcast is hosted by Erik Isaksen  ( @eisaksen )  and  Christian Smith ( @anvilhacks ). While I there are a few regular technical podcasts I try to make time for, I have been looking for something like what I think this is/will be ever since  The Java Posse  slowed or stopped, I am not sure which. The guys from the Java Posse had a unique blend of current technology, Java/JVM, humor, and overall production quality.  Joe, Tor, Dick, and Carl set the bar pretty high in my mind but like many good things they sometimes come to an end.  [I realize it's been some time since Chet replaced Joe but there have not been too many recorded episodes since then.]  I don't mean to discount the Roundup sessions because some are very good but they are sometimes hard to hear. I do hope The Web Platform Podcast both lives up to it's deep dive of "...'all things' w...

Themes for NetBeans

I have no idea how long this site has been around or how I missed it until very recently but I am glad I found it.  If you like NetBeans but would like to change the colors to match another favorite IDE or editor, there's a chance someone has already done it.  Check it out here Happy editing, Carl

JNLP: note to self

Java security was a hot topic in 2013 and I think it will continue to get some attention as tooling catches up to the newer requirements.  Signing the JNLP for Java Web Start programs is now required. The Java Web Start maven plugin does not yet sign the JNLP file but there is an outstanding issue which I imagine will be resolved before too much longer. In the meantime, this blog entry  and this stack overflow question and answer  may be all you need to get your JNLP signed correctly. The way I read it, you have two choices. First you can create a template file which should be named APPLICATION_TEMPLATE.JNLP in src/main/resources/JNLP-INF and wildcards are permitted.  This is nice if you have the need to deploy your application from more than one server. The second method involves creating a file named APPLICATION.JNLP also in the src/main/resources/JNLP-INF folder.  This file must match the application's jnlp file exactly. Don't forget to mo...

Glassfish JNDI settings

Image
Recently we had the need to add some configurable settings (such as user credentials) in a Java EE 7 application running on Glassfish 4.0. An example method to read the values might look like this:     private String getUserProperty(String property) {         String result = "";         Properties properties;         try {             InitialContext context = new InitialContext();             properties = (Properties) context.lookup("jndi/userinfo");             result = properties.getProperty(property);             context.close();         } catch (NamingException e) {         }         return result;     } Setting the values via the Glassfish console is achieved via Resources -> JNDI -...

NetBeans 7.4 recent projects

Image
Recently I had the need to remove one project from my recent projects list in NetBeans.  The problem was I had opened a very large project which was causing the    I found a few references to where one might find the file which contains the recent project list for older versions of NetBeans but they seemed to be a little dated.   The file I wanted to find and edit is called projectui.properties I happen to be on a Mac so that file could be found here: ~//Library/Application Support/NetBeans/7.4/config/Preferences/org/netbeans/modules I opened the file with a text editor and looked for the project name in the openProjectsDisplayNames entries.  Each of the entries include a dot followed by a number at the end to make them unique.  Once I found it, I noted the number and deleted that line.   Next I removed the corresponding entries in the openProjectsIcons and openProjectsURLs sections as well. I have a cou...

LibreOffice

I was recently asked about Mac/OS X software which can read and write WordPerfect format files.  As a not-so-regular but long-time OpenOffice user, the OpenOffice/LibreOffice debacle immediately came to mind.  There were numerous articles and blogposts written about the situation including a good bit of FUD.  The net effect on me is that I don't immediately know which one to recommend, assuming such a solution is otherwise in the best interest of the user. Ultimately I tested LibreOffice 4.1.4 on a couple of handy WP files I had handy and it worked well enough for my own needs.  [The latest version of OpenOffice I had installed would not read WordPerfect files but I believe I have used a filter to do so in the past.] The trick, however, seemed to be actually downloading a current copy from the LibreOffice site .  Perhaps I caught it at a bad time, but I had to try three mirror sites before I could get anything close to a reasonable download speed or worse ...

Complex JAX-RS

Working with JAX-RS to create a REST web service, I recently had the need to accept a List of a complex type as a parameter.  I was not able to find a complete example but I did read some Jersey documentation which I had not looked at in quite some time.  I read the  Jersey Parameter Annotations  section. The issue I was running into was the lack of a constructor for the complex type I wanted to pass in a list as a parameter to a REST web service method.  The documentation made me realize that I did not have a constructor which accepted a single String parameter from which an instance could be properly created. I also had some trouble with JSON marshalling/unmarshalling.  This may be a topic for another time but for now I solved it using the ObjectMapper from Jackson. Ultimately I put a trivial demo app together which is available here .  The application was created using NetBeans 7.4 as a maven web app to run on Glassfish 4.0 for convenience. ...

Out-of-the-box

The Intellij  IDEA IDE from JetBrains is one of those tools I have wanted to like for years now but it seems I am coming at things from a different perspective and so far it has not worked for me. I take it for a spin now and then (purchased licenses several times over the years to go beyond a short evaluation) and I thought the recent release of 13 signaled it was time to try it again. I downloaded the free Community Edition.  I decided to create a JavaFX application as my first action.  I tried it on a MacBook which happen to have a recent build of Java 8 on it.  IDEA found the JDK (this may have been from a previous installation) OK but the app would not run. The Fatal Error that greeted me after I clicked the Run button was:  unable to find package java.lang in classpath or bootclasspath My correction was to remove and add back the SDK.  (File -> Project Structure -> SDKs)  I'm not sure how extreme this might be considered by IDEA lo...

End of an Era

Given that I have been staying up a bit later than usual in recent weeks to watch my Red Sox successful quest to win another title, my schedule has been slightly off. Among other items, I almost missed the fact that Roger Brinkley recorded his last episode of the Java Spotlight Podcast . The episode, number 150, is a particularly good one IMHO because it's an interview with James Gosling.  Certainly some of what was asked and answered is not necessarily news but it is a very nicely done casual interview with one of our industry greats.  Hearing his perspective and knowing he is happily coding mostly Java using NetBeans made me smile.  Being a positive guy and wanting relative peace and harmony in our field, not to mention the world in general, I really appreciated hearing James say that he feels Oracle has been a good steward of Java. While I agree with the sentiment, I think because many, including James, did not expect it, the FUD-effect has lingered.  When J...

Mavericks

Earlier today I installed Mavericks on my MacBook Pro.  I found I had to reinstall Java 7 (JRE) in  order to get the Java Control Panel back.  I was also prompted to reinstall Java 6 when I started an older Java application. As far as NetBeans 7.4 development goes, I have not yet noticed any problems. All in all, so far...so good.

Glassfish Informix JDBC

Image
I recently had a need to get an Informix database connection going on Glassfish .  This is documented but what I found was not quite enough to get me going. I was using the JDBC driver from IBM .  After the driver is installed, there are six jar files in the lib directory.  Given that Informix is one of our primary databases, we use this driver with a variety of Java-based development tools.  Typically this involves making the ifxjdbc.jar file available on the CLASSPATH and you're good to go. In order to create an Informix JDBC Connection Pool in Glassfish,  I found that I needed to put both the ifxjdbc.jar and the ifxjdbcx.jar files in Glassfish lib directory. I used javax.sql.DataSource as the Resource Type and entered com.informix.jdbcx.IfxDataSource as the Datasource Classname . The additional settings properties I entered are pictured below. HTH, Carl 

The Mule ESB Cookbook Review

Not that long ago I began to read for review purposes the Mule ESB Cookbook.  I will start by saying I was a bit disappointed but there's certainly a possibility that my definition of a cookbook is a bit more picky that what the authors have in mind. I will say the book is generally well written and has source code references as one would expect.  When I compare the book to the documentation and examples from MuleSoft, I don't see a strong advantage with the cookbook. Generally speaking I like a cookbook to contain a recipe or two of a pattern I might want to create or something similar to it.  I don't expect to find a lot of getting started material or basic examples but then that's me.  To be fair, if you have no experience with Mule ESB (and you happen to be running Windows), this may well be a good "zero to mid-range-speed" how to guide.  For me it's a bit basic and if one is already familiar with Eclipse or an IDE which leverages Eclipse, there...

Now THAT's cool

I really do enjoy my job (for the most part) and staying current with technology, while certainly not totally attainable, is something I enjoying trying to achieve. SOA, NoSQL databases, new(ish) mobile development are a few of the technology spaces that grab my regular interest these days.  Every now and then something comes along that literally makes me fire off a positive email, tweet, blog entry, or comment to colleagues. I am very much aware of the future potential of cloud IDEs and codenvy is not something that's been off my radar.  A short while ago I got an email from codenvy that made me say "wow, now that's cool." Check it out...codenvy will now let you create an app, from a template, instantly, and without even signing in. They have built technology which creates an app, from a template, in a temporary workspace faster than some folks can get their favorite IDE to (fully) load.  In my case that may well depend upon how many projects I tend to leave ...

A Cookbook

I just started reading Mule ESB Cookbook  from Packt Publishing.  If you're like me, the "cookbook" connotation brings to mind the idea that one can use the book when a good "recipe" is needed in this case for Mule ESB.  In my experience I find such a book useful when I am first learning a technology or perhaps if I have not used the technology for a particular use case.  In most such situations there's probably not an exact match for what I might need but if it's a good book, the various solutions should include one that's in the ballpark.  I will follow up this short entry with my impressions after I have completed the book. Until then, happy coding. Carl

Mule

If you poke around a bit on the MuleSoft site, it probably won't take you long to find a nice definition of an ESB along with a discussion of when you might want to use one.  There's a line in there somewhere which makes me chuckle (mostly because I think it's true more often than we care to admit) about folks choosing a technology before understanding what architecture is actually needed for their project.  My experience has shown me that this phenomenon is not limited to SOA or even IT for that matter but that's a topic for another day. Recently we were working on some proof-of-concept stuff in Mule and ran into some trouble getting the connector for Google calendars to work.  This suite  appears to be a comprehensive set of connectors which expose the Google Apps API to MuleStudio very nicely.  My guess is that a version mismatch is causing the unit tests and examples to fail for us but I cannot confirm that.  After a few hours of effort which was int...

Time to Go?

Listening to technical podcasts while I am driving or running is a great way for me to try to keep up with changing technology and  The Changelog  is one of my newest favorites. The latest episode is on Google's  Go programming language .  While I say "Google's" I should quickly add, as does this edition of The Changelog, that Go is very much a community effort in the traditional open source style. If you have not taken the time to play with Go, I suggest doing so.  I also recommend that you listen the the Changelog and certainly this episode.  It had been some time since I looked at Go and I was reminded of the negative publicity that surrounded the announcement of its initial release.  Back then I paid little attention to the negative press but while I was impressed, I did conclude it was a bit too young for my daily needs. Go certainly has matured nicely and now has a strong following.  The fact that Go is statically typed is one of the r...

Up Next

I think it was back in March that I first blogged about DropWizard .  DropWizard is one of those funny technologies that I find falls into the category of sometimes making folks uncomfortable.  This usually initially comes off as looking down upon unconventional solutions but if you can have a conversation about it there may be something more. Sure there are organizations full of folks who won't discuss anything that's either "not supported" or even slightly off the beaten path.  It's not always part of the reason but it's worth keeping the "resume padding" factor in the back of your mind when having these discussions.  The other thought from days gone by is the "No one ever got fired for recommending ____________" (fill in the blank with your favorite currently popular and profitable software giant). The last time I blogged about DropWizard it was still new to me but I got it pretty quickly and I think you will too if it fits your use ...

whymenu

A short while ago I read a DZone article  that reminded me of some things developers should try to do on a regular basis.  In addition to staying current (or trying to do so) with all that's going on in our fun and fast-paced field, we should give something back. If you grew up in an open-source environment neither of these are foreign concepts to you.  I don't mean to imply that these are not priorities of yours if you live on the proprietary side of the street but it has been my experience that it may be less likely.  (There is a corollary in there somewhere about folks who are using open-source stuff but not buying into the concept.) On the staying current front, I have experimented with a variety of the PaaS offerings for some time now.  These include Google App Engine, CloudFoundry, AppFog, EC2, JElastic, and at least a couple more that don't come to mind at the moment.  Depending on how much time I have, I try to write something a good bit beyond ...

JDeveloper 12c on OS X

Image
It's pretty cool that JDeveloper is now a NetBeans platform app .  Wanting to give it a quick look on OS X I downloaded the Java edition generic installation. Unfortunately after unzipping it and placing it in Applications, it would not launch. Trying from the command line using this command open -n ./JDeveloper.app gave me a error: LSOpenURLsWithRole() failed with error -10810 for the file /Applications/jdeveloper/JDeveloper.app. Given past history trying to get JDeveloper going on OS X I thought I might try the JAVA_HOME environment variable first. First I checked which versions are available with this command: /usr/libexec/java_home -V this was the output: Matching Java Virtual Machines (5):     1.7.0_25, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home     1.7.0_21, x86_64: "Java SE 7" /Library/Java/JavaVirtualMachines/jdk1.7.0_21.jdk/Contents/Home     1.7.0_17, x86_64: "Java SE 7" /Li...

Nexus 7 by Asus

I bought my wife an Asus Nexus 7 back in mid February.  A few weeks ago it stopped working.  The unit would not come on at all.  After looking around for help on the web, we called both Google and Asus and ultimately had to RMA it back to Asus shipping on us via FedEx. Apparently this is not an uncommon problem . The phone calls to both Google and Asus involved a great deal of time and some effort to walk through the various attempts at diagnosis and revival.  These included charging cycles and button pushing/holding combinations none of which brought the brick back to life. I will note that the courtesy and sympathy levels of the Google folks seemed much higher than anyone I spoke to at Asus. Today the brick arrived at our home via FedEx in a non-working state.  Asus wants to reopen the RMA and have us send it back once again.  This time shipping is on them. We will be without this device for at least one month.  It would be nice to have a w...