|
I'd like to use GORM outside of GRAILS. A search leads to a couple of URLs:
http://www.grails.org/GORM+-+StandAlone+Gorm http://www.integrallis.com/blog/2009/09/08/using-gorm-to-boost-legacy-spring-applications Neither look to have been updated in a while (They appear to reference grails 1.1) Are they still applicable to grails 1.3 GORM ? Is there anywhere else I should be looking at ? Thanks, GTG --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
I'm having success with grails 1.3.2. I did use that second link to help me get started, though I found out that the <gorm:sessionFactory> element is supposed to be camel-case, not all lower case like in the blog entry. I also had some issues getting the schema recognized on startup. I ended up dropping the gorm.xsd file (copied from the grails-gorm jar) into the same folder as my application context file. Here's the beans element with schema info that worked, along with my <gorm:sessionFactory> element. Hopefully, it'll save you some trouble.
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <gorm:sessionFactory base-package="com.aranya.kaya.beans" data-source-ref="dataSource" message-source-ref="messageSource"> <property name="hibernateProperties"> <util:map> <entry key="hibernate.hbm2ddl.auto" value="update"/> </util:map> </property> </gorm:sessionFactory> Thanks, Mike Collado On Aug 19, 2010, at 9:23 AM, Gordon Ross wrote:
|
|
I had been using this approach successfully with grails 1.2.2 for 6 months.
I've upgraded to grails 1.3.4 and now I get a NullPointerException at line 380 in GrailsDomainConfigurationUtil.java at startup: This seems to be JIRAed at http://jira.codehaus.org/browse/GRAILS-6670 Any ideas? Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is java.lang.NullPointerException at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) ... 26 more Caused by: java.lang.NullPointerException at org.codehaus.groovy.grails.commons.GrailsDomainConfigurationUtil.evaluateConstraints(GrailsDomainConfigurationUtil.java:380) at org.codehaus.groovy.grails.commons.GrailsDomainConfigurationUtil.evaluateConstraints(GrailsDomainConfigurationUtil.java:452) at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.initializeConstraints(DefaultGrailsDomainClass.java:712) at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass.getConstrainedProperties(DefaultGrailsDomainClass.java:701) at org.codehaus.groovy.grails.commons.DefaultGrailsDomainClassProperty.isOptional(DefaultGrailsDomainClassProperty.java:204) at org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.bindColumn(GrailsDomainBinder.java:2387) at org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.bindSimpleValue(GrailsDomainBinder.java:2301) at org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.bindSimpleValue(GrailsDomainBinder.java:2258) regards, Michael On 20/08/2010, at 3:26 AM, MICHAEL COLLADO wrote:
|
|
For some reason Grails seems to be decoding into   Some example code; String test =
" testing" log.debug("######################## decoding
'${test}' = '${test.decodeHTML()}'") ,produces; ########################
decoding ' testing' = '         
testing' Is this a bug, or some project/config issue? Regards, Alex. |
| Powered by Nabble | Edit this page |
