Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 2.0 final, 2.0.1, 2.0.2
-
Fix Version/s: 2.0.4
-
Component/s: None
-
Labels:
-
Environment:HideWebSphere Express 6.1.0.29 (java.vm.info=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20100630 (JIT enabled) J9VM - 20100629_60535_lHdSMr JIT - 20100623_16197_r8 GC - 20100211_AA)
JDK 1.6.0_31 for building
Linux (RedHat 32bit), but also tried on Win XPShowWebSphere Express 6.1.0.29 (java.vm.info=J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20100630 (JIT enabled) J9VM - 20100629_60535_lHdSMr JIT - 20100623_16197_r8 GC - 20100211_AA) JDK 1.6.0_31 for building Linux (RedHat 32bit), but also tried on Win XP
-
Flagged:Impediment
Description
Sorry for bothering you with WebSphere... even I'm not happy with this product but it's essential for my company to get Grails 2 running on it.
With Grails 1.3.7 everything worked like a charm, but after upgrading to Grails 2 I'm helpless with a NullPointerException.
To make sure the problem is not specific to my application or a plugin, I started from scratch with the simplest possible application without any Domain class nor a Controller:
- Downloaded and installed WebSphere Application Server Express 6.1.0.3
- Updated to 6.1.0.29
- Installed JDK 1.6.0_31 and set JAVA_HOME
- Unzipped Grails 2.0.1 and set GRAILS_HOME
- grails create-app foobar201
- WebSphere runs with Java 1.5, so adapted the JVM compatibility in BuildConfig.groovy:
grails.project.target.level = 1.5
grails.project.source.level = 1.5 - grails war target/foobar201.war
- Deployed to WAS with the admin console webgui:
http://localhost:9060/ibm/console -> Install New Application -> enter full path to foobar201.war and set Context root to foobar201 -> everything else as default -> save
Started the 'foobar201_war' application - Opened http://localhost:9080/foobar201/ — see 09.stacktrace-contextroot.html
- Opened http://localhost:9080/foobar201/index.gsp — see 10.stacktrace-index.gsp.html
- Within WebSphere admin console: Set the the property 'com.ibm.ws.webcontainer.invokefilterscompatibility' to 'true' (Servers -> Application Servers -> <server> -> Web Container Settings -> Web Container -> Custom Properties)
(this was also necessary to get my application with Grails 1.3.7 working) - Restarted WAS
- Re-deployed the war
- Opened http://localhost:9080/foobar201/ — see 14.stacktrace-contextroot-invokefilterscompatibility.html
- Opened http://localhost:9080/foobar201/index.gsp — see 15.stacktrace-index.gsp-invokefilterscompatibility.html
Thank you very much for investigating on this!
(If you need direct download links for the IBM files, let me know)
Issue Links
- depends on
-
GRAILS-8565
Can't deploy Grails 2.0.0 with JDK 1.5
-
Activity
Markus Ernst
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Status | Open [ 1 ] | Edit [ 10000 ] |
| Summary | Grails 2.0.1 fails on WebSphere Express 6.1.0.29 | Grails 2 fails on WebSphere |
| Affects Version/s | 2.0.2 [ 13064 ] | |
| Last Reviewed | 17/Feb/12 | 03/Apr/12 |
| Flagged | Impediment [ 10010 ] |
Graeme Rocher
made changes -
| Assignee | Burt Beckwith [ burtbeckwith ] | |
| Fix Version/s | 2.0.4 [ 13099 ] | |
| Priority | Major [ 3 ] | Blocker [ 1 ] |
Burt Beckwith
made changes -
| Status | Edit [ 10000 ] | Open [ 1 ] |
Lari Hotari
made changes -
| Link |
This issue depends on |
Graeme Rocher
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Resolution | Fixed [ 1 ] |
I have had very similar issues trying to run an empty grails 2.0 app on Websphere 7.0.0.21.
I was able to put a break point on where the root cause NullPointerException was happening (websphere logs truncated the important parts). It was at FiltersGrailsPlugin.groovy:183. On that line, the return value of applicationContext.getAutowireCapableBeanFactory() was null causing the exception.
I have tried this with grails 2.0.0, 2.0.1 and 2.0.1 together with websphere 7.0.0.21. Running a blank grails 1.3.7 app had no such issues so this is a regression in grails 2.0.x.
Like everyone else, switching to another container is not an option. This issue is a blocker for those forced to use Websphere for deployment.