- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我使用 Grails-2.2.0、JDK-1.7.0 进行 Grails 应用程序开发,并使用 Maven 进行依赖管理。应用程序运行良好,但当我在 Tomcat 7.0 上从 Maven 部署 grails 应用程序 war 构建时收到以下错误:
`SEVERE: Exception sending context initialized event to listener instance of class org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener
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.reflect.MalformedParameterizedTypeException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
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:294)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:591)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
at org.codehaus.groovy.grails.web.context.GrailsContextLoader.initWebApplicationContext(GrailsContextLoader.java:69)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5118)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1015)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:991)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.reflect.MalformedParameterizedTypeException
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments(Unknown Source)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.<init>(Unknown Source)
at sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make(Unknown Source)
at sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType(Unknown Source)
at sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Unknown Source)
at sun.reflect.generics.tree.ClassTypeSignature.accept(Unknown Source)
at sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(Unknown Source)
at java.lang.reflect.Method.getGenericParameterTypes(Unknown Source)
at java.beans.FeatureDescriptor.getParameterTypes(Unknown Source)
at java.beans.MethodDescriptor.setMethod(Unknown Source)
at java.beans.MethodDescriptor.<init>(Unknown Source)
at java.beans.MethodDescriptor.<init>(Unknown Source)
at java.beans.Introspector.getTargetMethodInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at groovy.lang.MetaClassImpl$15.run(MetaClassImpl.java:2924)
at java.security.AccessController.doPrivileged(Native Method)
at groovy.lang.MetaClassImpl.addProperties(MetaClassImpl.java:2922)
at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2905)
at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:312)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:164)
at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:180)
at org.codehaus.groovy.runtime.callsite.ClassMetaClassGetPropertySite.<init>(ClassMetaClassGetPropertySite.java:35)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createClassMetaClassGetPropertySite(AbstractCallSite.java:304)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.createGetPropertySite(AbstractCallSite.java:258)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.acceptGetProperty(AbstractCallSite.java:245)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:237)
at org.codehaus.groovy.grails.commons.cfg.ConfigurationHelper.loadConfigFromClasspath(ConfigurationHelper.groovy)
at org.codehaus.groovy.grails.commons.DefaultGrailsApplication.getConfig(DefaultGrailsApplication.java:296)
at org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.setPluginFilter(DefaultGrailsPluginManager.java:185)
at org.codehaus.groovy.grails.plugins.DefaultGrailsPluginManager.<init>(DefaultGrailsPluginManager.java:169)
at org.codehaus.groovy.grails.plugins.GrailsPluginManagerFactoryBean.afterPropertiesSet(GrailsPluginManagerFactoryBean.java:113)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 26 more`
我的 Maven 构建的 pom.xml 是:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MyApp</groupId>
<artifactId>MyApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>grails-app</packaging>
<properties>
<grails.version>2.2.0</grails.version>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy.modules.http-builder</groupId>
<artifactId>http-builder</artifactId>
<version>0.5.0</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>xml-resolver</groupId>
<artifactId>xml-resolver</artifactId>
</exclusion>
<exclusion>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>${grails.version}</version>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
<version>${grails.version}</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.8.0</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>resources</artifactId>
<version>1.1.6</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>database-migration</artifactId>
<version>1.2</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.0.1</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>csv</artifactId>
<version>0.3.1</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>mysql-connectorj</artifactId>
<version>5.1.22.1</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
<dependency>
<groupId>org.mnode.ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement />
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<configuration>
<fork>true</fork>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>http://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>http://repo.grails.org/grails/plugins</url>
</repository>
<repository>
<id>grails-plugins1</id>
<name>grails-plugins1</name>
<url>https://grails.org/plugins</url>
</repository>
<repository>
<id>maven2</id>
<url>http://repo1.maven.org/maven2</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.release</id>
<name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/release</url>
</repository>
<repository>
<id>com.springsource.repository.bundles.external</id>
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
<url>http://repository.springsource.com/maven/bundles/external</url>
</repository>
</repositories>
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
我做错了什么?我已将项目的所有依赖项包含在 pom.xml 中。
最佳答案
我已更新我的 pom.xml,如下所示:
<?xml version="1.0" encoding="utf-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>MyApp</groupId>
<artifactId>MyApp</artifactId>
<packaging>grails-app</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>A custom grails project</name>
<description>A custom grails project</description>
<url>http://www.myorganization.org</url>
<properties>
<grails.version>2.2.0</grails.version>
</properties>
<dependencies>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-dependencies</artifactId>
<version>${grails.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.grails</groupId>
<artifactId>grails-plugin-testing</artifactId>
<version>${grails.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>tomcat</artifactId>
<version>${grails.version}</version>
<type>zip</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>hibernate</artifactId>
<version>${grails.version}</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>jquery</artifactId>
<version>1.8.0</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>resources</artifactId>
<version>1.1.6</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>database-migration</artifactId>
<version>1.2</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>cache</artifactId>
<version>1.0.1</version>
<type>zip</type>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.grails.plugins</groupId>
<artifactId>mysql-connectorj</artifactId>
<version>5.1.22.1</version>
<type>zip</type>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>org.mnode.ical4j</groupId>
<artifactId>ical4j</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.4</version>
</dependency>
</dependencies>
<build>
<pluginManagement />
<plugins>
<!-- Disables the Maven surefire plugin for Grails applications, as we have our own test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
<executions>
<execution>
<id>surefire-it</id>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
<configuration>
<filesets>
<fileset>
<directory>plugins</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.grails</groupId>
<artifactId>grails-maven-plugin</artifactId>
<version>${grails.version}</version>
<configuration>
<fork></fork>
</configuration>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>grails</id>
<name>grails</name>
<url>http://repo.grails.org/grails/core</url>
</repository>
<repository>
<id>grails-plugins</id>
<name>grails-plugins</name>
<url>http://repo.grails.org/grails/plugins</url>
</repository>
<!-- uncomment the following snapshot repository if you want to use snapshot versions of the grails-maven-plugin -->
<!--
<repository>
<id>grails-plugins-snapshots</id>
<name>grails-maven-plugins</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
-->
</repositories>
<!-- uncomment the following snapshot repository if you want to use snapshot versions of the grails-maven-plugin -->
<!--
<pluginRepositories>
<pluginRepository>
<id>grails-maven-plugins</id>
<name>grails-maven-plugins</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
-->
<profiles>
<profile>
<id>tools</id>
<activation>
<property>
<name>java.vendor</name>
<value>Sun Microsystems Inc.</value>
</property>
</activation>
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>${java.version}</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
当我执行 mvn pakage
命令以及 -Dgrails.env=product
作为参数时,它起作用了
关于java - 由于 Grails 中的 java.lang.reflect.MalformedParameterizedTypeException,创建名称为 'pluginManager' 的 bean 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52183305/
有谁知道如何实现称为 PRUNING 的图像处理技术?任何想法,例子等?我正在使用 OpenCV 和 C#,如果有人可以提供帮助,我将不胜感激。 最佳答案 我假设您希望从图像中移除不需要的杂散和伪影。
假设我已经构建了一个可调用对象数组 callables = [] callables << block1 callables << block2 callables << block3 callabl
这个问题在这里已经有了答案: std::shared_ptr of this (2 个答案) 关闭 8 年前。 我正在学习 C++11 特性,特别是 shared_ptr,我在引用 this 并将其
我主要是一个oracle新手,所以如果这是一个愚蠢的问题,请原谅我...... 我已经阅读了很多关于 authID 的文章,我的理解是 AUTHID 子句指示 Oracle 是否以调用者的权限 (CU
我使用的是 Python 2.7。 按照惯例,__iter__、__init__、__str__ 等内置方法使用双下划线来标识它们。为什么 next() 函数没有这个? 它与这里的其他内置函数一起
这是疏忽吗?还是跟JVM有关? 最佳答案 Java 确实有指针——不能在指针上执行指针运算。 来自可敬的JLS : There are two kinds of types in the Java p
我越来越多地发现宣传“原生”桌面应用程序的服务,但在下载或研究后发现它们是在 Electron 或类似的 Web View 框架中构建的 Web View 。他们误解了“本地人”还是我? 另外,我可以
我尝试在 Wordpress 中使用,但它在控制台中显示 jstree 不是函数在 header PHP 文件中: /dist/libs/jquery.js"> /dist/themes/defaul
我想让 scons 调用带有目录列表的 nosetests。执行此操作的最佳方法是什么? 最佳答案 如果您需要分析外部应用程序的返回码(例如,如果您调用测试),您需要使用 Command() + py
这是一些尝试使用 OOB(紧急)数据的基本代码。我的问题是,如果客户端使用 C 或 Java,则服务器部分的行为不同。请注意,您可能认为这两个客户端都有些棘手,但如果我使用 C 服务器(以更好地控制
虚拟文件系统 (VFS) 或虚拟文件系统交换机是更具体文件系统之上的抽象层。 VFS的目的是允许客户端应用程序以统一的方式访问不同类型的具体文件系统。 如果我们看到 VFS 的实际工作,这个定义似乎是
"Effective Go"状态: By convention, one-method interfaces are named by the method name plus an -er suff
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题吗? 更新问题,以便 editing this post 提供事实和引用来回答它. 关闭 3 个月前。 社区审核了是否
在深入研究 Scala 时,我遇到了 这个词。类型类 . 它一直令人困惑,因为一个类是一个类型,而一个类型可以 在 Scala 中是一个类,“类型”和“类”本身就是抽象术语。 在阅读了一些示例后,我感
我正在尝试编写一个简单地杀死我的程序的函数。它被称为退出聊天。但是,当我调用函数 messenger:quitChat() 时,出现此错误。 ** exception error: bad argum
我正在尝试编写一个简单地杀死我的程序的函数。它被称为退出聊天。但是,当我调用函数 messenger:quitChat() 时,出现此错误。 ** exception error: bad argum
如果您向 DB2/zOS 引擎 DBA 询问有关 DB2 行为的问题,DBA 会将 DB2 引擎称为“他”,就像水手使用“她”来指代他的船一样。 例如:“一旦您填充了可用空间,DB2 仍希望在表空间中
案例:我有 2 个具有以下 OneToMany 关系的表:TagAbstract 1..* TagConf,其中: tag_abstract_ID 是一个字段,用于标识许多 TagConf 记录,这些
我有一个表格,我想让第一行“自动固定”(这意味着当向下滚动时它固定在顶部,而如果不向下滚动,它就不固定)。这是代码:``` table { background: yellow; } td
其他动词对我来说都有意义,但我对“发布”作为动词没有太多上下文。它是像在邮局发帖(这有一定道理,虽然看起来有点牵强)还是像在公告板上发帖(对我来说意义不大)?有谁知道是谁决定了“POST”以及为什么选
我是一名优秀的程序员,十分优秀!