|
I'm trying to find the source jar for grails 1.3.7 so that I can attach to it in eclipse and do some debugging. Unfortunately I've been unable to find it.
I'm trying to debug an issue with MockUtils, and browsing the git repository has been unhelpful. I'm not able to find MockUtils.groovy in the 1.3.7 branch. If the source jar for 1.3.7 just isn't available can some tell me where in the 1.3.7 branch I can find MockUtils.groovy? I have a unit test that is failing on the mockDomain() call with an NPE. The stacktrace is as follows: java.lang.NullPointerException at java.lang.Class.isAssignableFrom(Native Method) at java_lang_Class$isAssignableFrom.call(Unknown Source) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40) at java_lang_Class$isAssignableFrom.call(Unknown Source) at grails.test.MockUtils$_addDynamicInstanceMethods_closure74.doCall(MockUtils.groovy:805) [snipped...] Here is the relevant section of source code: void testNullableConstraints() { mockDomain(FileDataSourceProfile) //<----------This is the line that is failing. def fdsp = new FileDataSourceProfile() assertFalse fdsp.validate() assertEquals 'nullable', fdsp.errors['fileSourceSystem'] assertEquals 'nullable', fdsp.errors['fileTargetSystem'] assertEquals 'nullable', fdsp.errors['fileType'] assertEquals 'nullable', fdsp.errors['dataSourceName'] assertEquals 'nullable', fdsp.errors['fileinputOutputIndicator'] } The FileDataSourceProfile class exists, and is located in the domain/ folder of the grails application. The application runs fine. I just can't get the unit test to mock the domain class without failing. Any help would be greatly appreciated. |
|
Check: http://repo.grails.org
On Wed, Jun 27, 2012 at 8:41 PM, dsharp <[hidden email]> wrote: I'm trying to find the source jar for grails 1.3.7 so that I can attach to it -- Thanks and regards, Ravi Teja |
|
In reply to this post by dsharp
On 27/06/2012 16:11, dsharp wrote:
> I'm trying to find the source jar for grails 1.3.7 so that I can attach to it > in eclipse and do some debugging. Unfortunately I've been unable to find > it. > > I'm trying to debug an issue with MockUtils, and browsing the git repository > has been unhelpful. I'm not able to find MockUtils.groovy in the 1.3.7 > branch. If the source jar for 1.3.7 just isn't available can some tell me > where in the 1.3.7 branch I can find MockUtils.groovy? It's definitely there: https://github.com/grails/grails-core/blob/1.3.x/src/java/grails/test/MockUtils.groovy Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
On 27/06/2012 16:23, Ian Roberts wrote:
> It's definitely there: > https://github.com/grails/grails-core/blob/1.3.x/src/java/grails/test/MockUtils.groovy But more generally, if you download the grails-1.3.7.zip distribution then you have all the core sources in the src/java directory. Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
Thanks for the help everyone. I downloaded the distribution zip and it had everything I needed. I thought it was a binary-only distribution, and was looking for a src distribution. I guess that's what I get for assuming.
In the end, I still couldn't figure out why it wasn't working, but I was able to use mockForConstraintsTests() instead and that works for our purposes currently. Thanks again, Dave |
| Powered by Nabble | Edit this page |
