jorgeuriarte / grails-i18n-fields-plugin Goto Github PK
View Code? Open in Web Editor NEWGorm localization plugin for Grails
License: Other
Gorm localization plugin for Grails
License: Other
Here is the log:
Error 2013-07-11 08:57:39,036 [http-bio-8080-exec-1] ERROR errors.GrailsExceptionResolver - MissingMethodException occurred when processing request: [GET] /test/alert/create
No signature of method: groovy.util.ConfigObject.contain() is applicable for argument types: (java.lang.String) values: [en_US]
Possible solutions: toString(), toString(), notify(), containsKey(java.lang.Object), countBy(groovy.lang.Closure), count(groovy.lang.Closure). Stacktrace follows:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Error executing tag <g:form>: Error executing tag <g:render>: Error evaluating expression [alertInstance?.title_en_US] on line [10]: groovy.lang.MissingMethodException: No signature of method: groovy.util.ConfigObject.contain() is applicable for argument types: (java.lang.String) values: [en_US]
Possible solutions: toString(), toString(), notify(), containsKey(java.lang.Object), countBy(groovy.lang.Closure), count(groovy.lang.Closure)
Solved modifying:
def isRedisLocale = getSpringBean("grailsApplication").config[I18nFields.I18N_FIELDS][I18nFields.REDIS_LOCALES].contains(locale)
to
def isRedisLocale = getSpringBean("grailsApplication").config[I18nFields.I18N_FIELDS][I18nFields.REDIS_LOCALES].containsKey(locale)
in I18nFieldsHelper
The latest version of branch redis_integration does not start giving me this:
(on grails 2.2.3)
[localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: No such property: eventListeners for class: com.sun.proxy.$Proxy37
groovy.lang.MissingPropertyException: No such property: eventListeners for class: com.sun.proxy.$Proxy37
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
at org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:35)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:227)
at I18nFieldsGrailsPlugin$_closure3.doCall(I18nFieldsGrailsPlugin.groovy:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1259)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1082)
at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1106)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
at groovy.lang.Closure.call(Closure.java:412)
at I18nFieldsGrailsPlugin$_closure3.call(I18nFieldsGrailsPlugin.groovy)
at org.codehaus.groovy.grails.plugins.DefaultGrailsPlugin.doWithApplicationContext(DefaultGrailsPlugin.java:488)
at org.codehaus.groovy.grails.plugins.AbstractGrailsPluginManager.doPostProcessing(AbstractGrailsPluginManager.java:177)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.performPostProcessing(GrailsRuntimeConfigurator.java:238)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:178)
at org.codehaus.groovy.grails.commons.spring.GrailsRuntimeConfigurator.configure(GrailsRuntimeConfigurator.java:127)
at org.codehaus.groovy.grails.web.context.GrailsConfigUtils.configureWebApplicationContext(GrailsConfigUtils.java:121)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:107)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
at java.lang.Thread.run(Thread.java:680)
Application context shutting down...
Application context shutdown.
Hello Jorge,
Thank you very much for your response via stackoverflow. (http://stackoverflow.com/questions/22320759/repetitive-method-name-signature-for-method-compilation-error-when-using-i18nfi/22595080#22595080)
With your new code, the error disappears. But now I can not find any fields that are i18n enabled when generating scaffolding code. I do not get for example name or name_en. The fields completely disappear. Can you confirm this behaviour? I tried to clean the project and delete the .grails folder. I do not get any errors and don't know yet where to look for the problem. I tested the code with println messages to look what values are used and I could not find any problems.
I am also using the fields plugin, but I do not override the i18n fields.
Two (non exclusive) ways:
The 0.6.4 version does not work, yammer-metrics dependency is not resolved.
Hello, and thanks for this great work ! Could we get it working for grails 3? What would be needed ?
Best,
Orestis
When i try to use grails-i18n-fields-plugin as a dependency on another a plugin i create then use my plugin in my project an exception is thrown:
Steps to generate the error:
Create a plugin-project (let say A) that depends on the grails-i18n-fields-plugin plugin then in A add a domain class like
@i18nfields.I18nFields
abstract class CalculationLocation {
String names
static i18nFields=['names']
static embedded = ['names']
static constraints = {
names nullable: true, blank: true
}
}
then package A as a plugin then use A in project B
running B generate the following exception:
| Error 2012-07-27 11:10:12,605 [Thread-15] ERROR [localhost].[/testing-location-plugin] - Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
Message: Error creating bean with name 'transactionManagerPostProcessor': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]
Line | Method
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
Caused by BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
Caused by HibernateException: Unable to instantiate default tuplizer [org.hibernate.tuple.component.PojoComponentTuplizer]
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
Caused by InvocationTargetException: null
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
Caused by PropertyNotFoundException: Could not find a setter for property bytes in class java.lang.String
->> 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run in java.util.concurrent.FutureTask
| 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 908 | run in ''
^ 680 | run . . in java.lang.Thread
| Error 2012-07-27 11:10:12,642 [main] ERROR core.StandardContext - Error listenerStart
| Error 2012-07-27 11:10:12,644 [main] ERROR core.StandardContext - Context [/testing-location-plugin] startup failed due to previous errors
2012-07-27 11:10:12,648 [main] INFO support.XmlWebApplicationContext - Closing Root WebApplicationContext: startup date [Fri Jul 27 11:10:10 CAT 2012]; root of context hierarchy
2012-07-27 11:10:12,649 [main] DEBUG support.DefaultListableBeanFactory - Returning cached instance of singleton bean 'lifecycleProcessor'
2012-07-27 11:10:12,649 [main] INFO support.DefaultListableBeanFactory - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@45f8d1f2: defining beans [grailsApplication,pluginManager,grailsConfigurator,grailsResourceLoader,characterEncodingFilter]; root of factory hierarchy
2012-07-27 11:10:12,649 [main] DEBUG support.DisposableBeanAdapter - Invoking destroy() on bean with name 'characterEncodingFilter'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.