Wednesday, October 24, 2012

AWS & VPC - OpenVPN setup with private subnets...

I have finally battled the beast of getting Openvpn set up on VPC to access both public AND private subnets. There is one thing not mentioned in any of the tutorials I found that is critical. When you install OpenVPN, and it is configured for NAT, it will use a private subnet for the vpn clients on 5.5.16.0/20, which you must add a route for under VPC-> route tables -> new -> destination -> 5.5.16.0/20 -> associate (enter your subnet ID) Now when clients VPN in with openVPN, they can contact everyone on both subnets. Don't forget to allow the traffic in using the security groups both inbound and outbound as well, such as ICMP ping, so you can test communications properly (and whatever services you need). helpful links: Using from linux: http://openvpn.net/index.php/access-server/docs/admin-guides/182-how-to-connect-to-access-server-with-linux-clients.html video tutorial (great, except the route part is missing) http://dbsgkhvbz3k7m.cloudfront.net/AmazonVPC/AmazonVPC.html happy routing!

Thursday, October 18, 2012

SpringOne2GX Wrap up

Great conference this year, it was very good to see some familiar faces and finally meet more in person. I hope my talks where useful to everyone! The big takeaway I got is Grails is moving to be more client capable and more social with the new platform core event bus technology as well as more mobile (jquery-mobile-scaffolding). Less and less are MVC types of systems being relevant with such rich Javascript and HTML5 capabilities of browsers. Users expectations are changing to rich client interfaces, single page apps, and quick deployments as well. Plugins are more important that ever, and user plugin contributions are one of the big things that make Grails so great. Also if weren't for all of the advancements with Groovy and Spring libraries Grails wouldn't be what it is today. Another thing I like about the Grails, Groovy, and Spring teams is every is so friendly, helpful, and willing to chat with everyone - that makes it feel like a big family even to outsiders to Springsource. Of course Jay Zimmerman is the master of these conferences, everything was so well done, professional, and smooth. I've uploaded sample apps to my github account at https://github.com/rvanderwerf and if you look in the doc folders it will include PDFs of my slides as well. During the conference I release a new version of the struts1 plugin to work with Grails2 th made numerous improvements to the GVPS (Grails Video Pseudo Streamer) plugin as well. You can go to http://www.grails.org/plugin/gvps to see the latest version. Special thanks and shoutouts goes out to Burt Beckwith, Sebastian Blanc, Soren Glasius, Peter Ledbrook, Colin Harrington, Cedric Champeau, Luke Daley, Graeme Rocher, Jeff Brown, Stefan Ambruster, Guillaume Laforge, Jay Zimmerman and everyone else who shared drinks and conversation. I especially want to thank those who attended my talks. I hope to see everybody next year, wherever it is at! Also according to Peter Ledbrook and S0ren Glasius, everytime someone calls Grails 'Groovy on Grails', a puppy dies ;)

Sunday, October 14, 2012

SpringOne2GX

Heading out to speak at SpringOne2GX in DC today. I'll be giving 2 talks, 'Streaming Video in Grails' (Using the formerly 'grails-video' plugin now called 'gvps'(Grails Video Pseudo Streaming Plugin). I'll go over the plugin, how ffmpeg, and basic streaming works, flowplayer and jw-flv integrations, and a little about quartz to help distribute video processing load. The second talk is 'Clustering Grails 2 with Terracotta' which is a dive into what you need to do and how to figure a total clustering solution with Grails 2 that uses Ehcache, HTTP Session Clustering, and Quartz. I'll give examples of each, and demo a Grails 2 app that uses all of these at once at the end. Of value you will find a library compatibility matrix of what you need to add to your BuildConfig to make everything work. There are so many great speakers and topics I'm going to have a hard time choosing what talks I will attend myself!

Friday, August 10, 2012

Learned a interesting lesson with Grails today.....

Learned a interesting lesson with Grails today..... NEVER give plugins a name in all caps(Or more than 1 capital letter in a row). I had 2 plugins I made, called 'SPP' and 'RFCORE' which (due to JIRA wanting to name the svn repos this way) cause an interesting breakdown in Grails. I publish these plugins to Artifactory via the release plugin in Grails, and bind them to the app in the plugins {} closure. The other day I added my fork of Weceem (I fixed it to work on Oracle and send a pull request back to them) to the plugins{} block. Works fine via inline plugin mode with my (all caps) plugin names. Once I deploy a WAR file, suddenly Grails has no idea where my plugins are (war is made, however the plugins are missing from the war). What threw me off was that if I uninstall the weceem plugin, my (all caps) plugins are now built into the war. So I step through the code in the Grails PluginBuildSettings class in the method 'getSupportedPluginInfos' and find that the plugin registry has my plugins like this 'SPP-0.1-SNAPSHOT' but the maven resolution is looking for them as 'spp-0.1-SNAPSHOT' and automatically lower casing it for me. If those don't match (it is case sensitive, I personally think it should not be), Grails acts like the plugin basically doesn't exist and doesn't package it up. Now I refactor my plugin class files from SSPGrailsPlugin to sppGrailsPlugin and it works. I'm not sure if this is a bug in Grails (2.x) or not, or it just doesn't support plugins with more than one capital letter in a row in it. If it's a bug I can patch it and submit a pull request. Moral of the story, don't make Grails plugins with more than 1 capital letter in a row, or you will spend all day figuring out what is going wrong ;)

Monday, July 30, 2012

Posted the slides for my #Gr8Conf Enterprise Talk on my github page: https://github.com/rvanderwerf/GR8Conf-slides

Wednesday, July 25, 2012

I Love GitHub!

We messed around with the new Grails plugin called 'Ajaxflows' at http://www.grails.org/plugin/ajaxflow and found a big bug stopping us from using it at all. I fork the GitHub repo, clone it, load it on my box and fix the bug. I sent a pull request to the plugin author (Jeroen Wesbeek) and within 2 hours a new version is released. That's the power of collaboration, between people who don't even know each other, and it's better than any commercial support money can buy :)

Friday, June 29, 2012

Netflix and Grails...

Good to see they've let this out to share with others!

Friday, June 22, 2012

Ran into a rather nasty Grails 2.0.4 bug the other day...

After deploying my first real production Grails 2.x application, which uses 2 plugins I also wrote, I got the lovely error trying to start the war file in Tomcat 6:


SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: Lgrails/test/mixin/services/ServiceUnitTestMixin; at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NoClassDefFoundError: Lgrails/test/mixin/services/ServiceUnitTestMixin; at java.lang.Class.privateGetDeclaredFields(Class.java:2308) at java.lang.Class.getDeclaredField(Class.java:1897) ... 1 more Caused by: java.lang.ClassNotFoundException: grails.test.mixin.services.ServiceUnitTestMixin ... 3 more There is some magic combination of plugins I think is causing this. It originates from one of my plugins, but I can't find anything wrong with it, other than Grails did not package the class (It shouldn't be looking for it AFAIK). So here is my workaround solution, which is working for now (Add to BuildConfig.groovy): grails.war.resources = { stagingDir, args -> // Manually copy the grails-plugin-testing-2.0.4.jar into war due to bug in Grails 2.0.4 // For some reason grails is making the war depend on this jar from the grails distro copy(file: "lib/grails-plugin-testing-2.0.4.jar", tofile: "${stagingDir}/WEB-INF/lib/grails-plugin-testing-2.0.4.jar") } You can find this in your Grails 2.x distro, under the dist folder. I currently can't re-create it from a scratch project, it happens when I add more complex things to the mix like a maven dependency to another grails plugin coming from my artifactory server.

Wednesday, June 6, 2012

Auto nested property extraction...

I ran into the need for a Grails supported select box with 'optgroup'. I was suprised to find out Grails didn't support this, but I did find a JIRA ticket where a guy added the code but it appears it was forgotten and never included. Here's the link with the code: http://jira.grails.org/browse/GRAILS-3961 However I found the example:


<g:selectWithOptGroup name = "song.id" 
                      from = "${Song.list()}" 
                      optionKey = "id" 
                      optionValue = "songName" 
                      groupBy = "album" />

groupBy doesn't support a tested property I'd expect. For example, say album is a parent 
property domain class, and you really want it to group by the parent's property of 'album.name'.
It will blow up when you do this. So I've modified this bit of code, learning from the Groovy class 'Eval'.

I added this around line 40 of the MyAppTagLib.groovy file:

 if (groupBy instanceof String && groupBy.indexOf(".")) {

                groupKey = Eval.x(el,"x."+groupBy)
 }
This will expand a dot notated nested property to give you the correct string value to sort on. Hopefully this will be merged in the Grails core soon, it seems like people expect this sort of thing these days.

Tuesday, May 29, 2012

gr8conf us discounts available!


I am speaking at the GR8Conf in Minneapolis, which is July 29-31. If you are interested in Groovy and Grails technologies, I highly recommend you come join us!

I have  a discount code you can use, enter code 'GR8RyanVanderwerf' to get the $399 price through July 1. With the price of the NFJS and Spring 2GX conferences continually going up each year, this is a great price!
more info at http://gr8conf.us/index


Tuesday, May 22, 2012

Keeping tidy table and columns in Oracle and Grails

Keeping tidy table and columns in Oracle and Grails...


Found I keep having to match your existing oracle schema (It's not case sensitive, but they create all of their tables and columns in all caps with underscored separating words). This doesn't jive with Grails defaults, where it makes tables and columns in lower case seperated by underscores. For example, of I have a domain object PizzaToppings, grails makes it 'pizza_toppings'.

You can fix it like this in your domain class:

static mapping = {
     table name: 'PIZZA_TOPPINGS'
}

But that gets very tedious, especially if you have to do the same for columns. So why not make it automatically do it for you?

So to fix this you can implement or extend the hibernate 'DefaultNamingStrategy' class:


class MyNamingStrategy extends DefaultNamingStrategy {
    @Override
    String classToTableName(String className) {

        return covertFromCamelCase(super.classToTableName(className))
    }

    String covertFromCamelCase(String input) {
       
        GrailsNameUtils.getNaturalName(input).replaceAll("\\s", "_").toUpperCase();
    }
}

Now add this to your DataSource.groovy:

hibernate {
   
    naming_strategy = com.mycompany.database.oracle.MyNamingStrategy

}

Somehow I remember Oracle being better than it was 15 years ago(10g). Now I find it's obtuse error codes and 31 character column/table name limits highly annoying and antiquated. I think I prefer MySQL 5+ now - and the price, just perfect. I'm guessing 80%+ of people running Oracle don't even need it these days, on small to medium installations. And installing on Ubuntu 64bit current versions, Oracle is just a huge mess. The only give you an RPM for 11g, and for 10g just a 32bit deb file - come on Oracle, what are you doing. Please don't ruin Java like this, or maybe it's too late.


Damn you Android camera app/gallery!

Ok so mad at the Android camera app today. My SD car was full, and the gallery and the app flip out when that happens. If you go into the camera app (while sd card is full), and try to go to the last picture (appears black), then delete it, it will delete ALL of your pictures. Argh! I saved a lot of them with an undelete tool, but I think it's time to go from CM7 to CM9 and see if that helps. Maybe it will help, or maybe it will have more bugs (likely). It seems when the sd card is full, the 'Camera' folder disappears in gallery, but if you free up some space, it re-appears. Not this time, it actually deleted all of my pics. Argh!!

Thursday, May 17, 2012

Groovy web scraping

Groovy web page scraping the easy way. I found this from an example on http://www.maclovin.de/2010/02/robust-html-parsing-the-groovy-way/ and it works quite well even today on Grails 2. This uses Tag Soup 1.2.1 and Groovy's XMLSlurper.

In about 10 lines if code I can scrape the form fields (this one only does inputs and selects) off a web page:


 def tagsoupParser = new org.ccil.cowan.tagsoup.Parser()
        def slurper = new XmlSlurper(tagsoupParser)
        def htmlParser = slurper.parse(config.clientUrl)
        ArrayList inputs = new ArrayList();

        htmlParser.'**'.findAll{
            it.name() == 'input' || it.name() == 'select'
        }.each {
            if (it.attributes().get(id) ) {
                inputs.add(it)
            }
        }

IntelliJ open source license w00t

I almost forgot I applied for this 2 months ago. Jetbrains finally gave me a free IntelliJ 11 open source license today. Wise on their part, now I will have IntelliJ running during my presentations this year at GR8Conf, free advertising for them. I feel eventually SpringSource STS is gaining ground on IntelliJ but I still prefer the Jetbrains product. I've been using it since the first versions and it's come a long way. Too bad I have to ask for a new open source license every year, but hey it's free! Thanks Nadya @ Jetbrains!

Salesforce - metadata gotchas

Found a nice gotcha in salesforce today. If you use the metadata API, and create a new field, you have to stay connected until it is complete. If you create a field, and don't check on it's status until it is done, your field will be gone. I'm assuming this is some sort of self-protection mechanism of salesfoce, who knows:

You have to to some something like this: (Assuming you are using the sf-connector-api)

 while (resultList.get(0).state.value() == 'InProgress') {
                sleep(500)
                resultList = metadataConn.checkStatus(tempList)
                if (resultList.get(0).state.value() == 'Error') {
                    // gather errors
                    throw new MetadataServiceException("Error creating custom field")
                }
            }

Also another nugget I found - you can only create 10 fields at a time. If you want to create more than that, you need to break  your list into chunks of 10. Any yes, you must check until they are successful if you want them to show up ;)

Thursday, May 10, 2012

Salesforce and Grails...

Salesforce integration - it's been a while since I have tried this. I have been thinking about this for a few days about how to integrate Grails is a halfway decent way with Salesforce. It's somewhat surprising there isn't a plugin already for this. After being annoyed with Apache CXF Client for Grails all morning, I sought out to find a better solution.

I did however find a pretty slick library called 'sf-api-connector' by a group calling itself 'TeamLazerBeez'. So far it's working, and is nicely arranged. Instead of installing a bunch of stubs and dealing with WSDL and whatnot (I'm trying to use the metadata API, sorry Soap only ugh!).  After you build it, it will install its jars in your local maven repo (I'd recommend publishing on your company's Artifactory or other maven server instance, because these are not hosted on a public repo). From there I just had to add the dependencies to BuildConfig.groovy, and take care to exclude the 'stax-api' from the dependencies (otherwise it conflicts with the built-in JAXB classes in Java6 or later).

Like so:


        compile ('com.teamlazerbeez:sf-soap-api-connector:trunk-SNAPSHOT') {
            excludes "stax-api"
        }
        build ('com.teamlazerbeez:sf-soap-api-connector:trunk-SNAPSHOT') {
            excludes "stax-api"
        }
        test ('com.teamlazerbeez:sf-soap-api-connector:trunk-SNAPSHOT') {
            excludes "stax-api"
        }
        runtime ('com.teamlazerbeez:sf-soap-api-connector:trunk-SNAPSHOT') {
            excludes "stax-api"
        }


Now, I am trying to figure out why, following their example, I keep getting logon denied. First, I made sure there is a 'Allow API' permission added to my salesforce role in the admin console. Second, I make sure I have an API token generated for my account. Third I make sure I append that token to my password login credentials. Still, no luck - wait I am in the SF Sandbox - How does it know that?

Well I had to dig through their code to find it, but here is an example to make a connection to the sandbox(This is Groovy, so yes this runs!, just make up something for orgId):

ConnectionBundle login(String orgId, String userName, String password)  { 
ConnectionPool<Integer> pool = new ConnectionPoolImpl<Integer>(orgId)
        //TODO use Config.groovy property to switch between Sandbox and regular mode
        pool.configureSandboxOrg(orgId, userName, password, 20)
        ConnectionBundle bundle = pool.getSandboxConnectionBundle(orgId)
        MetadataConnection metadataConn = bundle.getMetadataConnection()
     
        // metadata connection
        List<FileProperties> fileProps = metadataConn
                .listMetadata(Arrays.asList(new ListMetadataQuery("CustomField")))
        for (FileProperties fp: fileProps) {
            System.out.println("Custom field " + fp.getFullName() + " has id " + fp.getId())
        }
        return bundle
}


There ya go. If everything is good, you should see on your console a bunch of custom properties from your Salesforce instance. Go here for more info http://blog.teamlazerbeez.com/2011/03/03/a-new-java-salesforce-api-library/

Wednesday, May 9, 2012

Ahh... found a nice little nugget today related to Grails 2.0.3 - you can't have a domain class with 'DataSource' anywhere in it. I reversed engineered a legacy domain class called 'DataSource' - I figured this would cause a problem with the depenency injection, because there is an injectable object with the same name. I figure 'oh, I'll fool it and prefix the class with something'. Wrong, you can't do that either. It will give you weird compile errors on any class that references the class with 'DataSource' in it. Actually it looks like a compiler error, but under the covers it's actually a NPE in the compiler. Moral of the story is don't have a class name with 'datasource' anywhere in it :)



| Error Error running script run-app: org.codehaus.groovy.grails.cli.ScriptExitException (Use --stacktrace to see the full trace)
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more
| Error java.lang.RuntimeException: Reloading agent exited via exception, please raise a jira
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:91)
| Error at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
| Error at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:424)
| Error at java.lang.ClassLoader.defineClass1(Native Method)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
| Error at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
| Error at com.springsource.loaded.ChildClassLoader.defineClass(ChildClassLoader.java:21)
| Error at com.springsource.loaded.TypeRegistry.defineClass(TypeRegistry.java:1055)
| Error at com.springsource.loaded.CurrentLiveVersion.define(CurrentLiveVersion.java:110)
| Error at com.springsource.loaded.CurrentLiveVersion.<init>(CurrentLiveVersion.java:87)
| Error at com.springsource.loaded.ReloadableType.loadNewVersion(ReloadableType.java:369)
| Error at com.springsource.loaded.TypeRegistry.loadNewVersion(TypeRegistry.java:792)
| Error at com.springsource.loaded.agent.ReloadableFileChangeListener.fileChanged(ReloadableFileChangeListener.java:38)
| Error at com.springsource.loaded.agent.Watcher.determineChangesSince(FileSystemWatcher.java:202)
| Error at com.springsource.loaded.agent.Watcher.run(FileSystemWatcher.java:186)
| Error at java.lang.Thread.run(Thread.java:722)
| Error Caused by: java.lang.NullPointerException
| Error at com.springsource.loaded.agent.JVMPlugin.accept(JVMPlugin.java:131)
| Error at com.springsource.loaded.agent.SpringLoadedPreProcessor.preProcess(SpringLoadedPreProcessor.java:99)
| Error at com.springsource.loaded.agent.ClassPreProcessorAgentAdapter.transform(ClassPreProcessorAgentAdapter.java:89)
| Error ... 15 more




Thursday, May 3, 2012

Ubuntu 12.04

Running Ubuntu 12.04 Precise Pangolin release finally.. I tried out the Beta early, because I had 10.04 and nothing on my work laptop MSI GT683 machine worked with it. Now everything is working except the fancy lights, turbo, and eco modes.

Still getting used to Unity, I don't like how it combines running apps with an app toolbar - it's difficult to tell what is open or not by looking at it. I think I prefer the older Gnome 2 interface, maybe because it's just simpler and what I know. I did try MATE on LinuxMint12, although neat, it was incomplete and buggy. I found LinuxMint 12's default interface even more odd than unity, like a couple mismatched interfaces thrown together - I didn't get it.

I  suppose I'll stick it out with Unity a bit longer.

Monday, March 26, 2012

Good article I found on Burt's blog today.. I have found this to be so true, everyone can gain from Groovy. It's too powerful to ignore the ability to add all of the meta programming abilities, and so easily have code write code or pull code out of the DB and run it, or even give a good to a simple email template system using SimpleTemplateEngine(). Add to it the relatively simple process to introduce into the Java build process of most systems, why not, what do you have to lose?

At KPI we started with Groovy by just using it to write unit tests, using almost completely looking like Java. As you get into it, and try new things, you'll be hooked in no time :)

http://streetsaheadllc.com/article/ten-reasons-every-java-developer-should-learn-groovy--part-2-

Monday, February 27, 2012

I've been running LinuxMint12 on my work laptop (Dell Precision M4400)  a couple months ago. I found the stock interface weird, so I switched to MATE. I'm liking it, it's a little windows 7-ish, but at least I can easily make short-cuts on my desktop unlike the other way. I do have some bugs I have run into:

1) clicking lock desktop on a 2 monitor setup, moves the bottom nav to the left instead of locking - if I click it a second time it will lock
2) right click 'edit menu' on the main menu on bottom nav does nothing. I think that's important to add icons to the menus.
3) If I boot up with the hardware switch on my wireless disabled, flipping the switch does not work. I have to boot up with it enabled.

Other than that it works pretty well. I've been die-hard Ubuntu fan, but I just really hate Unity.

I did install Xubuntu a couple weeks ago on the wife's netbook - I was so tired of the windows trojans/virus issues I had to do something about it. I think I'll give it a try on my next work notebook OS install.

What is everyone else's Laptop Unix OS favorite flavor, and why?
I've been asked to speak at GR8Conf this summer in Minneapolis, MN, July 29-31. I will be giving 3 talks:

1) Grails in the Enterprise  - How to give your company a transition into Grails using the Struts plugin without rewriting everything. Giving a non-expensive path forward will really help you sell Grails to your organization when they know they won't need to re-write their entire application to start reaping the benefits.

2) Streaming Video with Grails - Pseudostreaming really, but there is some neat stuff to be done here with Grails that are no cost, cheap options to give you the ability to play video with the big boys.

3) Clustering Quartz (With Terracotta Open source edition) - I'll cover clustering in the old traditional sense with a simple database cluster, and go into using the free, open source edition of Terracotta to take it  to another level.

I'm very excited for this honor and will do my best to give Grails developers the info they need to help make their lives easier (And more scalable!).

Look for more posts in the future, mostly with nice Grails and Groovy nuggets of wisdom I come across. There are many gotchas and quirks to work around I have run into, it's only fair to warn others of issues you may have to work around.