What am i doing wrong? This code:
def messages = ResourceBundle.getBundle('messages')
is giving this error. I am trying to get internationalization working in my application:
2014-06-01 10:10:14,330 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver - MissingResourceException occurred when processing request: [POST] /FatcaOne_0/customer/authenticate - parameters:
username:
password: ***
Can't find bundle for base name com.fatcaone.i18n.messages, locale en_US. Stacktrace follows:
Message: Can't find bundle for base name com.fatcaone.i18n.messages, locale en_US
Line | Method
->> 1499 | throwMissingResourceException in java.util.ResourceBundle
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1322 | getBundleImpl in ''
| 1028 | getBundle . . . . . . . . . . in ''
| 33 | doCall in com.twc.fatcaone.CustomerController$_closure2$$EOfwWAnt
| 198 | doFilter . . . . . . . . . . in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . . . . . in java.lang.Thread
Related
I keep getting the same error with DWR on grails when I connect to the page that is using it:
2014-12-15 08:48:57,621 [http-bio-8080-exec-8] INFO log.startup - Starting: DwrServlet v3.0.0-RC3-dev-574 on Apache Tomcat/7.0.55 / JDK 1.8.0_25 from Oracle Corporation at /CRM
2014-12-15 08:48:58,669 [http-bio-8080-exec-8] INFO log.startup - Starting: Using container abstraction org.directwebremoting.server.servlet3.Servlet30ContainerAbstraction
2014-12-15 08:48:58,703 [http-bio-8080-exec-8] INFO servlet.UrlProcessor - Probably not an issue: the url:/gi.js (org.directwebremoting.gi.GiHandler) Handler is not available. This is only an problem if you wanted to use it.
Error |
2014-12-15 08:48:58,878 [http-bio-8080-exec-8] ERROR util.LocalUtil - Failed to load 'pageflow' (org.directwebremoting.beehive.PageFlowCreator)
Message: null
Line | Method
->> 1349 | classForName in org.directwebremoting.util.LocalUtil
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 55 | addCreatorType in org.directwebremoting.impl.DefaultCreatorManager
| 192 | loadInits . . . . . . . . in org.directwebremoting.impl.DwrXmlConfigurator
| 161 | configure in ''
| 597 | configureFromSystemDwrXml in org.directwebremoting.impl.StartupUtil
| 714 | configureContainerFully in ''
| 113 | configureContainer . . . in org.directwebremoting.servlet.DwrServlet
| 72 | init in ''
| 1142 | runWorker . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 617 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run . . . . . . . . . . . in java.lang.Thread
Caused by ClassNotFoundException: Beehive/Weblogic jar file not available.
->> 57 | <init> in org.directwebremoting.beehive.PageFlowCreator
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1349 | classForName in org.directwebremoting.util.LocalUtil
| 55 | addCreatorType . . . . . in org.directwebremoting.impl.DefaultCreatorManager
| 192 | loadInits in org.directwebremoting.impl.DwrXmlConfigurator
| 161 | configure . . . . . . . . in ''
| 597 | configureFromSystemDwrXml in org.directwebremoting.impl.StartupUtil
| 714 | configureContainerFully . in ''
| 113 | configureContainer in org.directwebremoting.servlet.DwrServlet
| 72 | init . . . . . . . . . . in ''
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Everything works properly, nothing breaks but this exception is polluting the logs.
Anyone know what is it about and what should I do about it?
I am using Grails with optaplanner 6.0.1.Final and drools jars (version 5.4.0) but getting some error while running the code. StackTrace is as follows :
ERROR errors.GrailsExceptionResolver - ClassNotFoundException occurred when processing request: [GET] /Volcare-BRMS/API/eventCreationDatePrePlanning
org.drools.core.event.AbstractEventSupport. Stacktrace follows:
Message: org.drools.core.event.AbstractEventSupport
Line | Method
->> 366 | run in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 355 | run in ''
| 354 | findClass . . . . . . . . . in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 800 | defineClass . . . . . . . . in ''
| 142 | defineClass in java.security.SecureClassLoader
| 449 | defineClass . . . . . . . . in java.net.URLClassLoader
| 71 | access$100 in ''
| 361 | run . . . . . . . . . . . . in java.net.URLClassLoader$1
| 355 | run in ''
| 354 | findClass . . . . . . . . . in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 48 | <init> . . . . . . . . . . . in org.optaplanner.core.impl.solver.DefaultSolver
| 129 | buildSolver in org.optaplanner.core.config.solver.SolverConfig
| 101 | buildSolver . . . . . . . . in org.optaplanner.core.config.solver.XmlSolverFactory
| 13 | createSolver in com.volcare.brms.CustomSolverFactory
| 74 | eventCreationDatePrePlanning in volcare.brms.api.APIController
| 200 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter . . . . . . . . . . in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
I have also included all JAR files in classpath.
The class org.drools.core.event.AbstractEventSupport seems to be part of the drools-core module. Optaplanner provides the correct Drools version so you DO NOT need to specify any Drools module in your BuildConfig.groovy.
compile 'org.optaplanner:optaplanner-core:6.0.1.Final'
compile 'org.optaplanner:optaplanner-benchmark:6.0.1.Final'
When I try to run my Grails 2.4.1 app, I get the following exception, which I don't really understand.
| Running Grails application
objc[15346]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.
| Error 2014-06-19 16:54:40,048 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: org/hibernate/event/spi/PreLoadEventListener
Message: org/hibernate/event/spi/PreLoadEventListener
Line | Method
->> 800 | defineClass in java.lang.ClassLoader
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 142 | defineClass in java.security.SecureClassLoader
| 449 | defineClass . . . . . . . in java.net.URLClassLoader
| 71 | access$100 in ''
| 361 | run . . . . . . . . . . . in java.net.URLClassLoader$1
| 355 | run in ''
| 354 | findClass . . . . . . . . in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 94 | doCall . . . . . . . . . in grails.plugin.hibernate4.HibernatePluginSupport$__clinit__closure1
| 754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
| 584 | beans . . . . . . . . . . in ''
| 527 | invokeMethod in ''
| 262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
Caused by ClassNotFoundException: org.hibernate.event.spi.PreLoadEventListener
->> 366 | run in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 355 | run in ''
| 354 | findClass . . . . . . . . in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 800 | defineClass . . . . . . . in ''
| 142 | defineClass in java.security.SecureClassLoader
| 449 | defineClass . . . . . . . in java.net.URLClassLoader
| 71 | access$100 in ''
| 361 | run . . . . . . . . . . . in java.net.URLClassLoader$1
| 355 | run in ''
| 354 | findClass . . . . . . . . in java.net.URLClassLoader
| 425 | loadClass in java.lang.ClassLoader
| 94 | doCall . . . . . . . . . in grails.plugin.hibernate4.HibernatePluginSupport$__clinit__closure1
| 754 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
| 584 | beans . . . . . . . . . . in ''
| 527 | invokeMethod in ''
| 262 | run . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 744 | run in java.lang.Thread
| Error Forked Grails VM exited with error
Note that I don't have any complex code in my app so far, just a few domain classes reverse-engineered from an existing database using db-reverse-engineer plugin.
I imagine the error is coming from the db-reverse-engineer plugin which may rely on classes from Hibernate 3 whilst Grails 2.4 by default uses Hibernate 4. Try downgrade the Hibernate 3 plugin or remove the db-reverse-engineer plugin if you no longer need it
I am trying to setup a dynamic route, here https://github.com/vaneyck/testingCamel
but it seems that i cant use Java fluent builder syntax to add throttling to the routes if I include routes in other routes.
If I add the throttle code to the routes in grails-app/routes the code works well, but this does not conform to the setup i am using in my code.
| Error 2014-02-19 08:01:33,743 [pool-7-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition
Message: org.apache.camel.model.ThrottleDefinition cannot be cast to org.apache.camel.model.RouteDefinition
Line | Method
->> 638 | addRouteDefinitions in org.apache.camel.impl.DefaultCamelContext
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 13 | doCall in BootStrap$_closure1
| 300 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 293 | executeForEnvironment in ''
| 269 | executeForCurrentEnvironment . . in ''
| 303 | innerRun in java.util.concurrent.FutureTask$Sync
| 138 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 895 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
| 918 | run . . . . . . . . . . . . . . in ''
^ 662 | run in java.lang.Thread
Did not upgrade anything, nothing should have changed, but I may have a silly problem I describe here:
Grails: refresh dependencies
HTTPBuilder now gives this error when I try to
def http = new HTTPBuilder( 'http://google.com/' )
UPDATE: I had the wrong error before, this is the error I'm getting when calling that code above in bootstrap.groovy.
| Error 2012-03-25 22:50:03,433 [Thread-11] ERROR context.GrailsContextLoader - Error executing bootstraps: java.lang.NoSuchMethodError: org.apache.xml.resolver.CatalogManager.setIgnoreMissingProperties(Z)V
Message: java.lang.NoSuchMethodError: org.apache.xml.resolver.CatalogManager.setIgnoreMissingProperties(Z)V
Line | Method
->> 290 | evaluateEnvironmentSpecificBlock in grails.util.Environment
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 283 | executeForEnvironment in ''
| 259 | executeForCurrentEnvironment . . in ''
| 334 | innerRun in java.util.concurrent.FutureTask$Sync
| 166 | run . . . . . . . . . . . . . . in java.util.concurrent.FutureTask
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run . . . . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run in java.lang.Thread
Caused by NoSuchMethodError: org.apache.xml.resolver.CatalogManager.setIgnoreMissingProperties(Z)V
->> 107 | <clinit> in groovyx.net.http.ParserRegistr
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 182 | <init> in groovyx.net.http.HTTPBuilder
| 204 | <init> . . . . . . . . . . . . . in ''
| 15 | determineConversionFactor in myproject.AskGoogle
| 14 | doCall . . . . . . . . . . . . . in BootStrap$_closure1
| 290 | evaluateEnvironmentSpecificBlock in grails.util.Environment
| 283 | executeForEnvironment . . . . . in ''
| 259 | executeForCurrentEnvironment in ''
| 334 | innerRun . . . . . . . . . . . . in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 1110 | runWorker . . . . . . . . . . . in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . . . . . . . . . . . . in java.lang.Thread
Removed a jar that was carelessly added to fix dependencies. It was jaxb-something.