Context -
I have a spring boot app and
I updated the spring-boot-starter-parent version from 1.5.12.RELEASE to 2.4.0
I had this dependency in my pom -
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1-android</version>
</dependency>
Now when I am running my app, I am getting this error -
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cachesEndpoint' defined in class path resource ...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'guavaCacheManager' defined in class path resource...
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'guavaCacheManager' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/cache/guava/GuavaCache ...
Caused by: java.lang.NoClassDefFoundError: org/springframework/cache/guava/GuavaCache
at biz.kaar.common.services.cache.TempGuavaCacheConfig.guavaCacheManager(TempGuavaCacheConfig.java:32)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
... 43 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.cache.guava.GuavaCache
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519)
... 49 common frames omitted
I resolved this by completely removing guava dependency and its references from my project.
If you still need to use caching then try using Caffeine.
With some more research over the web, I was able to fix the same exception which was occurring in my project by adding spring-context-support to the project.
I did it by adding following dependency to my build.gradle:
compile("org.springframework:spring-context-support:4.1.7.RELEASE")
spring-context-support is a library that contains helper methods and classes for configuring the cache.
Here is the blog that I followed:
https://codedevstuff.blogspot.com/2015/07/add-guava-cache-to-spring-boot-to-cache.html
Related
I am trying to encrypt / decrypt messages using libvibesimplejava.so of 6.21 version where I have added the dependencies to load the jar from system path when I deployed to dev instance it's throwing this error:
Caused by: java.lang.NoClassDefFoundError: com/voltage/securedata/enterprise/VeException
Caused by: java.lang.ClassNotFoundException: com.voltage.securedata.enterprise.VeException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_181]
at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_181]
Below is the code for library instantiation
Loading Library -
static {
System.load("src/main/resources/****/libvibesimplejava.so");
}
Library context instanitiation -
LibraryContext library = new LibraryContext.Builder()
.setPolicyURL(policyURL)
.setFileCachePath(cachePath)
.setTrustStorePath(trustStorePath)
.setClientIdProduct("****",
"***")
.build();
Pom file -
<dependency>
<groupId>vibesimplejava</groupId>
<artifactId>vibesimplejava</artifactId>
<version>6.21.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/resources/****/lib/vibesimplejava.jar</systemPath>
</dependency>
Why it is failing to load the class in dev? Could any one suggest me the way to resolve this issue?
I trying a small maven project, and I try to connect to db2 database, so I need the com.ibm.db2.jcc.DB2Driver jar for the connection.
I tried many method from internet but still fail, here is some of the method I tried:
edit in pom.xml
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc4</artifactId>
<version>10.5.0.7</version>
<scope>system</scope>
<systemPath>
/home/Workspace/book/springData/lib/db2jcc4-10.5.0.7.jar
</systemPath>
</dependency>
use maven command to install:
mvn install:install-file -Dfile=/home/Workspace/book/springData/lib/db2jcc4-10.5.0.7.jar -DpomFile=/home/Workspace/book/springData/pom.xml
or
mvn install:install-file -Dfile=/home/meow/Workspace/mbsb-cib/springData/lib/db2jcc4-10.5.0.7.jar -DgroupId=com.ibm.db2 -DartifactId=db2jcc4 -Dversion=10.5.0.7 -Dpackaging=jar -DgeneratePom=true
But, I am still hitting could not load JDBC driver.
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.ibm.db2.jcc.DB2Driver]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
... 70 more
Caused by: java.lang.IllegalStateException: Could not load JDBC driver class [com.ibm.db2.jcc.DB2Driver]
at org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(DriverManagerDataSource.java:150)
at com.journaldev.spring.config.DataConfig.dataSource(DataConfig.java:52)
at com.journaldev.spring.config.DataConfig$$EnhancerBySpringCGLIB$$46013fb.CGLIB$dataSource$0(<generated>)
at com.journaldev.spring.config.DataConfig$$EnhancerBySpringCGLIB$$46013fb$$FastClassBySpringCGLIB$$8fec3ead.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
at com.journaldev.spring.config.DataConfig$$EnhancerBySpringCGLIB$$46013fb.dataSource(<generated>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
... 71 more
Caused by: java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2Driver from [Module "deployment.springData.war" from Service Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(DriverManagerDataSource.java:147)
... 82 more
Try to add the reference from central repository in pom.xml?
<!-- https://mvnrepository.com/artifact/com.ibm.db2.jcc/db2jcc4 -->
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>10.1</version>
</dependency>
Once you add this please rebuild your project with maven.
Or if you want to proceed from local disk : click here to view the answer in stackoverflow itself
I am using spring 4.x dependency jars in my spring boot 2.0.3 application and one of the classes in the jars depends on org.springframework.util.Log4jConfigurer
Below is the exception trace I get when starting the application
ERROR: org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'log4jConfigurer' defined in class path resource [common-context.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/springframework/util/Log4jConfigurer
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317)
Caused by: java.lang.NoClassDefFoundError: org/springframework/util/Log4jConfigurer
at com.xyz.common.util.config.XyzLog4jConfigurer.initializeLog4JConfigurer(XyzLog4jConfigurer.java:58)
at com.xyz.common.util.config.XyzLog4jConfigurer.init(XyzLog4jConfigurer.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1833)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1776)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704)
... 24 more
I have the following ivy configuration corresponding to the class in the dependent project's ivy.xml
<dependency org="org.springframework" name="spring-core" rev="4.1.6" conf="compile->compile(*),master(*);runtime->runtime(*);all->default(*)"/>
I don't understand why does the error occur. Can someone help me fix this ?
It was because of spring boot version 2.0.3. I think Log4jConfigurer is deprecated in version 2.0. It was fixed by using spring boot 1.5.10.RELEASE
I'm trying to port ServiceRocket's JIRA Mercurial Plug-in (https://bitbucket.org/servicerocket-labs/jira-mercurial-plugin/overview) to work with JIRA 7. It works fine on JIRA 6.4.7 (via atlas-run-standalone --product JIRA --version 6.4.7). Long story short -- I've only just upgraded my private JIRA server to JIRA 7, and this is the only thing that doesn't work...
On JIRA 7.1.9, the Mercurial Repositories configuration page throws a 404 error, and I get a massive backtrace in catalina.out (copied below).
I can't get it to run in atlas-debug or atlas-run. The only way I've been able to get the plugin to run is by running JIRA stand-alone.
The error I get from atlas-debug and atlas-run is:
[ERROR] Failed to execute goal com.atlassian.maven.plugins:maven-amps-dispatcher-plugin:6.2.4:debug (default-cli) on project mercurial-jira-plugin-project: Couldn't detect an AMPS product to dispatch to > [Help 1]
Can anyone offer me some help with this?
I've a sneaking suspicion this is a dependency issue – the servlet API upgrade seems like a likely candidate (https://developer.atlassian.com/jiradev/latest-updates/preparing-for-jira-7-0/jira-7-0-platform-changes#JIRA7.0-Platformchanges-servletapi). Unfortunately my Java knowledge dates back about ten years, and the limited documentation ("just add a dependency in the project pom file") in the Atlassian documentation is going way over my head...
Thanks.
Backtrace follows:
2016-07-23 13:13:59,844 http-nio-8081-exec-5 WARN philpem 793x2212x1 n4e75l 10.0.0.32,10.0.0.1 /secure/ViewMercurialRepositories.jspa [n.c.j.p.ext.mercurial.MultipleMercurialRepositoryManagerImpl] No Mercurial repositories configured yet
2016-07-23 13:13:59,845 http-nio-8081-exec-5 ERROR philpem 793x2212x1 n4e75l 10.0.0.32,10.0.0.1 /secure/ViewMercurialRepositories.jspa [c.a.j.config.webwork.JiraActionFactory] Error autowiring Action 'net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction'.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97)
at com.atlassian.jira.config.webwork.JiraActionFactory$JiraPluginActionFactory.getActionImpl(JiraActionFactory.java:389)
at webwork.action.factory.PrefixActionFactoryProxy.getActionImpl(PrefixActionFactoryProxy.java:99)
at webwork.action.factory.JspActionFactoryProxy.getActionImpl(JspActionFactoryProxy.java:59)
at webwork.action.factory.CommandActionFactoryProxy.getActionImpl(CommandActionFactoryProxy.java:60)
at com.atlassian.jira.config.webwork.LookupAliasActionFactoryProxy.getActionImpl(LookupAliasActionFactoryProxy.java:61)
at webwork.action.factory.CommandActionFactoryProxy.getActionImpl(CommandActionFactoryProxy.java:60)
at webwork.action.factory.ContextActionFactoryProxy.getActionImpl(ContextActionFactoryProxy.java:36)
at webwork.action.factory.PrepareActionFactoryProxy.getActionImpl(PrepareActionFactoryProxy.java:37)
at com.atlassian.jira.config.webwork.JiraActionFactory$SafeParameterSettingActionFactoryProxy.getActionImpl(JiraActionFactory.java:147)
at webwork.action.factory.ChainingActionFactoryProxy.getActionImpl(ChainingActionFactoryProxy.java:53)
at com.atlassian.jira.config.webwork.JiraActionFactory.getActionImpl(JiraActionFactory.java:301)
... 2 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 50 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
... 62 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 89 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1094)
... 229 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexService.getMultipleMercurialRepositoryManager(RevisionIndexService.java:190)
at net.customware.jira.plugins.ext.mercurial.action.MercurialActionSupport.<init>(MercurialActionSupport.java:24)
at net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction.<init>(ViewMercurialRepositoriesAction.java:20)
... 3 filtered
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 231 more
2016-07-23 13:13:59,849 http-nio-8081-exec-5 ERROR philpem 793x2212x1 n4e75l 10.0.0.32,10.0.0.1 /secure/ViewMercurialRepositories.jspa [c.a.j.web.dispatcher.JiraWebworkActionDispatcher] Exception thrown from action 'ViewMercurialRepositories', returning 404
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1046)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:342)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:97)
at com.atlassian.jira.config.webwork.JiraActionFactory$JiraPluginActionFactory.getActionImpl(JiraActionFactory.java:389)
at webwork.action.factory.PrefixActionFactoryProxy.getActionImpl(PrefixActionFactoryProxy.java:99)
at webwork.action.factory.JspActionFactoryProxy.getActionImpl(JspActionFactoryProxy.java:59)
at webwork.action.factory.CommandActionFactoryProxy.getActionImpl(CommandActionFactoryProxy.java:60)
at com.atlassian.jira.config.webwork.LookupAliasActionFactoryProxy.getActionImpl(LookupAliasActionFactoryProxy.java:61)
at webwork.action.factory.CommandActionFactoryProxy.getActionImpl(CommandActionFactoryProxy.java:60)
at webwork.action.factory.ContextActionFactoryProxy.getActionImpl(ContextActionFactoryProxy.java:36)
at webwork.action.factory.PrepareActionFactoryProxy.getActionImpl(PrepareActionFactoryProxy.java:37)
at com.atlassian.jira.config.webwork.JiraActionFactory$SafeParameterSettingActionFactoryProxy.getActionImpl(JiraActionFactory.java:147)
at webwork.action.factory.ChainingActionFactoryProxy.getActionImpl(ChainingActionFactoryProxy.java:53)
at com.atlassian.jira.config.webwork.JiraActionFactory.getActionImpl(JiraActionFactory.java:301)
... 2 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 50 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:59)
... 62 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:70)
... 89 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:163)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:89)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1094)
... 229 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexer
at net.customware.jira.plugins.ext.mercurial.revisions.RevisionIndexService.getMultipleMercurialRepositoryManager(RevisionIndexService.java:190)
at net.customware.jira.plugins.ext.mercurial.action.MercurialActionSupport.<init>(MercurialActionSupport.java:24)
at net.customware.jira.plugins.ext.mercurial.action.ViewMercurialRepositoriesAction.<init>(ViewMercurialRepositoriesAction.java:20)
... 3 filtered
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:147)
... 231 more
I've updated my application to Grails 2.3 and I’m now having an extremely frustrating issue getting the app up and running. I was hoping someone could offer some assistance. We have a dependency on doc4j and every time I go to run the app I get a "java.lang.ClassNotFoundException:org.docx4j.openpackaging.packages.WordprocessingMLPackage".
After doing some research I found that this issue could be related to not having all of the dependencies for docx4j in my classpath, yet I've gone through and verified that all of the dependencies listed here-- http://dev.plutext.org/docx4j/docx4j-2.5.0/ --are in "Grails Dependencies" under:
Properties->JavaBuildPath->Libraries.
The package that is causing the trouble is also there under:
Grails Dependencies->Docx4j-2.5.0.jar->org.docx4j.openpackaging.packages->
WordprocessingMLPackage.class
Here is my stack trace:
| Loading Grails 2.3.0
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application.....
| Error log4j:ERROR Property missing when configuring log4j: appName
| Running Grails application
| Error log4j:ERROR Property missing when configuring log4j: appName
2013-09-19 21:34:23,746 ERROR [context.ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/docx4j/openpackaging/packages/WordprocessingMLPackage
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethods(Class.java:1810)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.docx4j.openpackaging.packages.WordprocessingMLPackage
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 7 more
2013-09-19 21:34:23,762 ERROR [context.GrailsContextLoader] Error initializing the application: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsControllerClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: java.lang.NoClassDefFoundError: org/docx4j/openpackaging/packages/WordprocessingMLPackage
at java.lang.Class.privateGetDeclaredMethods(Class.java:2451)
at java.lang.Class.getDeclaredMethods(Class.java:1810)
... 5 more
Caused by: java.lang.ClassNotFoundException: org.docx4j.openpackaging.packages.WordprocessingMLPackage
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 7 more
If you could please offer me any assistance, I would greatly appreciate it. Thanks.
-----EDIT-----
I'm adding my BuildConfig.groovy in case that will provide any extra information:
/moving plugins dir to plugins directory under main project folder
grails.project.plugins.dir = 'plugins'
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// uncomment to disable ehcache
// excludes 'ehcache'
}
log "warn"
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment these to enable remote dependency resolution
// from public Maven repositories
mavenCentral()
mavenLocal()
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
}
dependencies {
// specify dependencies here under either 'build', 'compile',
// 'runtime', 'test' or 'provided' scopes eg.
// runtime 'mysql:mysql-connector-java:5.1.16'
}
plugins {
//----- for versions before 2.3 -----//
//compile ":hibernate:$grailsVersion"
//build ":tomcat:$grailsVersion"
// for versions after 2.3
//compile':hibernate:3.6.10.M3'
// moved from application.properties
compile ":cookie:0.4"
compile ":dojo:1.7.2.0"
compile ":help-balloons:1.4"
compile ":jsecurity:0.4.1"
compile ":p6spy:0.5"
compile ":searchable:0.6.4"
runtime ":hibernate:3.6.10.1"
build ':tomcat:7.0.41'
}
}