I am trying to create RESTClient in grails using jersey. I am getting following error even after adding jersey-bundle-1.12.jar and jersey-0.7-ea.jar files.
Error 2012-03-20 10:21:06,912 [T`enter code here`hread-7] ERROR application.RootResourceUriRules - The ResourceConfig instance does not contain any root resource classes.
| Error 2012-03-20 10:21:06,912 [Thread-7] ERROR inject.Errors - The following errors and warnings have been detected with resource and/or provider classes:
SEVERE: Missing dependency for field: com.sun.ws.rest.spi.template.TemplateContext com.sun.ws.rest.impl.template.ViewableMessageBodyWriter.tc
| Error 2012-03-20 10:21:06,912 [Thread-7] ERROR servlet.SpringServlet - Exception occurred when intialization
Message: The ResourceConfig instance does not contain any root resource classes.
Line | Method
->> 103 | <init> in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1182 | _initiate in com.sun.jersey.server.impl.application.WebApplicationImpl
| 161 | access$600 . . . . in ''
| 698 | f in com.sun.jersey.server.impl.application.WebApplicationImpl$12
| 695 | f . . . . . . . . in ''
| 193 | processWithErrors in com.sun.jersey.spi.inject.Errors
| 695 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
| 117 | initiate in com.sun.jersey.spi.spring.container.servlet.SpringServlet
| 287 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
| 587 | load in com.sun.jersey.spi.container.servlet.WebComponent
| 213 | init . . . . . . . in ''
| 342 | init in com.sun.jersey.spi.container.servlet.ServletContainer
| 516 | init . . . . . . . in ''
| 51 | init in org.grails.jaxrs.web.JerseyServlet
| 174 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
| 164 | init in ''
| 45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
| 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 ''
^ 662 | run in java.lang.Thread
| Error 2012-03-20 10:21:06,943 [Thread-7] ERROR [localhost].[/GrailsRESTClient] - Exception sending context initialized event to listener instance of class org.grails.jaxrs.web.JaxrsListener
Message: The ResourceConfig instance does not contain any root resource classes.
Line | Method
->> 103 | <init> in com.sun.jersey.server.impl.application.RootResourceUriRules
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1182 | _initiate in com.sun.jersey.server.impl.application.WebApplicationImpl
| 161 | access$600 . . . . in ''
| 698 | f in com.sun.jersey.server.impl.application.WebApplicationImpl$12
| 695 | f . . . . . . . . in ''
| 193 | processWithErrors in com.sun.jersey.spi.inject.Errors
| 695 | initiate . . . . . in com.sun.jersey.server.impl.application.WebApplicationImpl
| 117 | initiate in com.sun.jersey.spi.spring.container.servlet.SpringServlet
| 287 | initiate . . . . . in com.sun.jersey.spi.container.servlet.ServletContainer$InternalWebComponent
| 587 | load in com.sun.jersey.spi.container.servlet.WebComponent
| 213 | init . . . . . . . in ''
| 342 | init in com.sun.jersey.spi.container.servlet.ServletContainer
| 516 | init . . . . . . . in ''
| 51 | init in org.grails.jaxrs.web.JerseyServlet
| 174 | init . . . . . . . in org.grails.jaxrs.web.JaxrsContext
| 164 | init in ''
| 45 | contextInitialized in org.grails.jaxrs.web.JaxrsListener
| 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 ''
^ 662 | run in java.lang.Thread
| Error 2012-03-20 10:21:06,958 [main] ERROR core.StandardContext - Error listenerStart
| Error 2012-03-20 10:21:06,958 [main] ERROR core.StandardContext - Context [/GrailsRESTClient] startup failed due to previous errors
Any idea on how to solve above error? Thanks!
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?
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 have recently upgraded my Grails application to version 2.3.5 from 2.2.3
But after that my application is not statrting at all, after searching and debugging the application and plugins by adding all the plugins in a new application. The application runs only when i remove the below dependency from BuildConfig.groovy.
Apache Camel Plugin runtime dependency for Receiving emails from GMail
dependencies {
runtime 'org.apache.camel:camel-mail:2.9.0'
}
causing application to stop by throwing below Exception
Please help me in resolving the issue, I have also tried with Apache Camel Plugin latest version 1.2.9 but no luck so far.
Error |
2014-02-05 12:10:05,196 [localhost-startStop-1] ERROR context.GrailsContextLoader - Error initializing the application: null
Message: null
Line | Method
->> 3357 | <init> in java.util.Arrays$ArrayList
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 3343 | asList in java.util.Arrays
| 238 | getDeclaredFields . . . . in com.sun.xml.internal.bind.v2.model.nav.ReflectionNavigator
| 47 | getDeclaredFields in ''
| 359 | findFieldProperties . . . in com.sun.xml.internal.bind.v2.model.impl.ClassInfoImpl
| 290 | getProperties in ''
| 165 | getProperties . . . . . . in com.sun.xml.internal.bind.v2.model.impl.RuntimeClassInfoImpl
| 232 | getClassInfo in com.sun.xml.internal.bind.v2.model.impl.ModelBuilder
| 89 | getClassInfo . . . . . . in com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder
| 70 | getClassInfo in ''
| 198 | getClassInfo . . . . . . in com.sun.xml.internal.bind.v2.model.impl.ModelBuilder
| 84 | getClassInfo in com.sun.xml.internal.bind.v2.model.impl.RuntimeModelBuilder
| 70 | getClassInfo . . . . . . in ''
| 304 | getTypeInfo in com.sun.xml.internal.bind.v2.model.impl.ModelBuilder
| 319 | getTypeInfo . . . . . . . in ''
| 430 | getTypeInfoSet in com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl
| 277 | <init> . . . . . . . . . in ''
| 1100 | build in com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder
| 143 | createContext . . . . . . in com.sun.xml.internal.bind.v2.ContextFactory
| 110 | createContext in ''
| 191 | createContext . . . . . . in ''
| 128 | newInstance in javax.xml.bind.ContextFinder
| 290 | find . . . . . . . . . . in ''
| 372 | newInstance in javax.xml.bind.JAXBContext
| 337 | newInstance . . . . . . . in ''
| 188 | createJaxbContext in org.apache.camel.spring.handler.CamelNamespaceHandler
| 175 | getJaxbContext . . . . . in ''
| 303 | doParse in org.apache.camel.spring.handler.CamelNamespaceHandler$CamelContextBeanDefinitionParser
| 131 | invokeMethod . . . . . . in grails.spring.DynamicElementReader
| 61 | doCall in RoutingGrailsPlugin$_closure1
| 756 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
| 584 | beans in ''
| 527 | invokeMethod . . . . . . in ''
| 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 ''
^ 662 | run in java.lang.Thread
| Running Grails application
| Error 2013-05-15 22:37:49,943 [localhost-startStop-1] ERROR plugins.DefaultGrailsPluginManager - Error configuring dynamic methods for plugin [resources:1.1.6]: String index out of range: 39
Message: String index out of range: 39
Line | Method
->> 1907 | substring in java.lang.String
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 412 | relativeTo in org.grails.plugin.resource.ResourceMeta
| 352 | relativeToWithQueryParams . . in ''
| 57 | doCall in org.grails.plugin.resource.CSSRewriterResourceMapper$_map_closure1
| 60 | doCall . . . . . . . . . . . in org.grails.plugin.resource.CSSLinkProcessor$_process_closure1
| 55 | process in org.grails.plugin.resource.CSSLinkProcessor
| 36 | map . . . . . . . . . . . . . in org.grails.plugin.resource.CSSRewriterResourceMapper
| 139 | invoke in org.grails.plugin.resource.mapper.ResourceMapper
| 128 | invokeIfNotExcluded . . . . . in ''
| 587 | applyMappers in org.grails.plugin.resource.ResourceProcessor
| 533 | prepareResource . . . . . . . in ''
| 602 | doCall in org.grails.plugin.resource.ResourceProcessor$_prepareSingleDeclaredResource_closure12
| 29 | addDeclaredResource . . . . . in org.grails.plugin.resource.util.ResourceMetaStore
| 600 | prepareSingleDeclaredResource in org.grails.plugin.resource.ResourceProcessor
| 649 | prepareResourceBatch . . . . in ''
| 804 | resourcesChanged in ''
| 800 | loadModules . . . . . . . . . in ''
| 1056 | reloadAll in ''
| 172 | doCall . . . . . . . . . . . in ResourcesGrailsPlugin$_closure3
| 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
| Server running. Browse to ......../MyApp
I have upgraded my Grails project from version 1.3.6 to 2.0.1 successfully but whenever I try to run my project via Grails run-app command I face the following issue:
Error 2012-04-17 15:44:52,038 [pool-6-thread-1] ERROR [localhost].[/blahblah] - Error configuring application listen er of
class org.codehaus.groovy.grails.web.util.Log4jConfigListener Message:
org.codehaus.groovy.grails.web.util.Log4jConfigListener Line |
Method
->> 46 | findClass in org.grails.plugins.tomcat.ParentDelegatingClassLoader | 307 |
loadClass in java.lang.ClassLoader | 248 | loadClass in '' |
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
'' ^ 662 | run in java.lang.Thread | Error 2012-04-17
15:44:52,116 [pool-6-thread-1] ERROR [localhost].[/blahblah] -
Skipped installing application liste ners due to previous error(s) |
Error 2012-04-17 15:44:52,117 [pool-6-thread-1] ERROR
core.StandardContext - Error listenerStart | Error 2012-04-17
15:44:52,120 [pool-6-thread-1] ERROR core.StandardContext - Context
[/blahblah] startup failed due to previous errors
After googling I have found this is a know issue and the work around is suggested here:
Grails JIRA
I have followed the work around but it bring out another issue when I try to run my project, the log is pasted below:
Error 2012-04-17 15:59:57,849 [pool-6-thread-1] ERROR context.GrailsContextLoader - Error executing bootstraps: java.l
ang.NoClassDefFoundError: org/codehaus/groovy/grails/plugins/springsecurity/DummyResponse
Message: java.lang.NoClassDefFoundError: org/codehaus/groovy/grails/plugins/springsecurity/DummyResponse
Line | Method
->> 736 | invokeBeanDefiningClosure in grails.spring.BeanBuilder
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 569 | beans in '' | 511 | invokeMethod .
. . . . . in '' | 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 '' ^ 662 | run in
java.lang.Thread
Caused by NoClassDefFoundError:
org/codehaus/groovy/grails/plugins/springsecurity/DummyResponse
->> 169 | forName in java.lang.Class
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 334 | doCall in
SpringSecurityCoreGrailsPlugin$_closure2 | 736 |
invokeBeanDefiningClosure in grails.spring.BeanBuilder | 569 | beans
in '' | 511 | invokeMethod . . . . . . in '' | 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 '' ^ 662 | run in
java.lang.Thread
Caused by ClassNotFoundException:
org.codehaus.groovy.grails.plugins.springsecurity.DummyResponse
->> 202 | run in java.net.URLClassLoader$1
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 190 | findClass in java.net.URLClassLoader | 307
| loadClass . . . . . . . . in java.lang.ClassLoader | 248 |
loadClass in '' | 169 | forName . . . . . . . .
. in java.lang.Class | 334 | doCall in
SpringSecurityCoreGrailsPlugin$_closure2 | 736 |
invokeBeanDefiningClosure in grails.spring.BeanBuilder | 569 | beans
in '' | 511 | invokeMethod . . . . . . in '' | 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 '' ^ 662 | run in
java.lang.Thread