henadzit / grails-browser-detection

https://grails.org/plugin/browser-detection
Apache License 2.0
11 stars 11 forks source link

Unable to resolve class javax.transaction.NotSupportedException #10

Open klemensz opened 10 years ago

klemensz commented 10 years ago

Hi,

I'm trying to install the plugin, but get this error during startup:

| Error Compilation error: startup failed:.
/Users/klemens/.grails/2.3.11/projects/myapp/plugins/browser-detection-0.4.3/grails-app/services/org/geeks/browserdetection/UserAgentIdentService.groovy: 8: unable to resolve class javax.transaction.NotSupportedException
 @ line 8, column 1.
   import javax.transaction.NotSupportedException
   ^

1 error

I havent's seen this error before, do I need something special for it to work? My Java version:

$ java -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
henadzit commented 10 years ago

java.lang.UnsupportedOperationException should be used instead of javax.transaction.NotSupportedException. nvinet@ already contacted me and I added him as a collaborator. I hope, he will fix that.

https://github.com/henadzit/grails-browser-detection/blob/master/grails-app/services/org/geeks/browserdetection/UserAgentIdentService.groovy#L8

nvinet commented 10 years ago

why not just delete the 2 methods. If you are throwing UnsupportedOperationException exception or a methodNotFoundException ... that will have the same result: non backward compatible code

nvinet commented 10 years ago

ok I pushed the fix ... not sure how to publish it though ... @henadzit could you do it or help? I've created a new branch with many changes to the plugin but I need more tests to make sure it is all coolio (the main change is making it stateless).