- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
更新:奇怪的是,只有当我用 Gradle 构建 jar 时才会抛出这个错误。 Maven 生成的 jar 运行良好!所以我目前正在探索我的 gradle 构建脚本/spring boot 配置是否以及如何失败。
我有一个 spring boot 应用程序抛出以下错误
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
DataSourceAutoConfiguration
- @ConditionalOnClass classes found: org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType (OnClassCondition)
DataSourceAutoConfiguration.DataSourceInitializerConfiguration
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.jdbc.DataSourceInitializer; SearchStrategy: all) found no beans (OnBeanCondition)
DataSourceTransactionManagerAutoConfiguration
- @ConditionalOnClass classes found: org.springframework.jdbc.core.JdbcTemplate,org.springframework.transaction.PlatformTransactionManager (OnClassCondition)
DataSourceTransactionManagerAutoConfiguration.TransactionManagementConfiguration
- @ConditionalOnMissingBean (types: org.springframework.transaction.annotation.AbstractTransactionManagementConfiguration; SearchStrategy: all) found no beans (OnBeanCondition)
DispatcherServletAutoConfiguration
- found web application StandardServletEnvironment (OnWebApplicationCondition)
- @ConditionalOnClass classes found: org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
DispatcherServletAutoConfiguration.DispatcherServletConfiguration
- no ServletRegistrationBean found (DispatcherServletAutoConfiguration.DefaultDispatcherServletCondition)
- @ConditionalOnClass classes found: javax.servlet.ServletRegistration (OnClassCondition)
EmbeddedServletContainerAutoConfiguration
- found web application StandardServletEnvironment (OnWebApplicationCondition)
EmbeddedServletContainerAutoConfiguration.EmbeddedTomcat
- @ConditionalOnClass classes found: javax.servlet.Servlet,org.apache.catalina.startup.Tomcat (OnClassCondition)
- @ConditionalOnMissingBean (types: org.springframework.boot.context.embedded.EmbeddedServletContainerFactory; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration
- @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet (OnClassCondition)
- found web application StandardServletEnvironment (OnWebApplicationCondition)
ErrorMvcAutoConfiguration#basicErrorController
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorController; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration#errorAttributes
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ErrorAttributes; SearchStrategy: current) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration
- No error template view detected (ErrorMvcAutoConfiguration.ErrorTemplateMissingCondition)
- SpEL expression on org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration: ${error.whitelabel.enabled:true} (OnExpressionCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#beanNameViewResolver
- @ConditionalOnMissingBean (types: org.springframework.web.servlet.view.BeanNameViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
ErrorMvcAutoConfiguration.WhitelabelErrorViewConfiguration#defaultErrorView
- @ConditionalOnMissingBean (names: error; SearchStrategy: all) found no beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration
- @ConditionalOnClass classes found: org.springframework.http.converter.HttpMessageConverter (OnClassCondition)
HttpMessageConvertersAutoConfiguration#messageConverters
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.HttpMessageConverters; SearchStrategy: all) found no beans (OnBeanCondition)
HttpMessageConvertersAutoConfiguration.ObjectMappers
- @ConditionalOnClass classes found: com.fasterxml.jackson.databind.ObjectMapper (OnClassCondition)
HttpMessageConvertersAutoConfiguration.ObjectMappers#mappingJackson2HttpMessageConverter
- @ConditionalOnMissingBean (types: org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; SearchStrategy: all) found no beans (OnBeanCondition)
JacksonAutoConfiguration
- @ConditionalOnClass classes found: com.fasterxml.jackson.databind.ObjectMapper (OnClassCondition)
JacksonAutoConfiguration.JacksonObjectMapperAutoConfiguration
- @ConditionalOnClass classes found: com.fasterxml.jackson.databind.ObjectMapper (OnClassCondition)
JmxAutoConfiguration
- @ConditionalOnClass classes found: org.springframework.jmx.export.MBeanExporter (OnClassCondition)
- SpEL expression on org.springframework.boot.autoconfigure.jmx.JmxAutoConfiguration: ${spring.jmx.enabled:true} (OnExpressionCondition)
JmxAutoConfiguration#mbeanServer
- @ConditionalOnMissingBean (types: javax.management.MBeanServer; SearchStrategy: all) found no beans (OnBeanCondition)
MultipartAutoConfiguration
- @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.multipart.support.StandardServletMultipartResolver,javax.servlet.MultipartConfigElement (OnClassCondition)
- SpEL expression on org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration: ${multipart.enabled:true} (OnExpressionCondition)
MultipartAutoConfiguration#multipartConfigElement
- @ConditionalOnMissingBean (types: javax.servlet.MultipartConfigElement; SearchStrategy: all) found no beans (OnBeanCondition)
MultipartAutoConfiguration#multipartResolver
- @ConditionalOnMissingBean (types: org.springframework.web.multipart.support.StandardServletMultipartResolver; SearchStrategy: all) found no beans (OnBeanCondition)
ServerPropertiesAutoConfiguration
- found web application StandardServletEnvironment (OnWebApplicationCondition)
ServerPropertiesAutoConfiguration#serverProperties
- @ConditionalOnMissingBean (types: org.springframework.boot.autoconfigure.web.ServerProperties; SearchStrategy: current) found no beans (OnBeanCondition)
WebMvcAutoConfiguration
- found web application StandardServletEnvironment (OnWebApplicationCondition)
- @ConditionalOnClass classes found: javax.servlet.Servlet,org.springframework.web.servlet.DispatcherServlet,org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter (OnClassCondition)
- @ConditionalOnMissingBean (types: org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration#hiddenHttpMethodFilter
- @ConditionalOnMissingBean (types: org.springframework.web.filter.HiddenHttpMethodFilter; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#beanNameViewResolver
- @ConditionalOnBean (types: org.springframework.web.servlet.View; SearchStrategy: all) found the following [error] (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#defaultViewResolver
- @ConditionalOnMissingBean (types: org.springframework.web.servlet.view.InternalResourceViewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#requestContextListener
- @ConditionalOnMissingBean (types: org.springframework.web.context.request.RequestContextListener; SearchStrategy: all) found no beans (OnBeanCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#viewResolver
- @ConditionalOnBean (types: org.springframework.web.servlet.ViewResolver; SearchStrategy: all) found the following [beanNameViewResolver, defaultViewResolver] @ConditionalOnMissingBean (names: viewResolver; SearchStrategy: all) found no beans (OnBeanCondition)
Negative matches:
-----------------
....
....
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#dateFormatter
- @ConditionalOnProperty missing required properties: date-format not found (OnPropertyCondition)
WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter#localeResolver
- @ConditionalOnMissingBean (types: org.springframework.web.servlet.LocaleResolver; SearchStrategy: all) found no beans (OnBeanCondition)
- @ConditionalOnProperty missing required properties: locale not found (OnPropertyCondition)
WebSocketAutoConfiguration
- required @ConditionalOnClass classes not found: org.springframework.web.socket.WebSocketHandler,org.apache.tomcat.websocket.server.WsSci (OnClassCondition)
15:11:13.684 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762) ~[spring-context-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482) ~[spring-context-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109) ~[spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/web/servlet/config/annotation/DelegatingWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:952) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
Disconnected from the target VM, address: '127.0.0.1:61052', transport: 'socket'
at org.springframework.boot.SpringApplication.run(SpringApplication.java:941) [spring-boot-1.1.6.RELEASE.jar:1.1.6.RELEASE]
at org.ihc.phr.status.Initializer.main(Initializer.java:17) [main/:na]
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_20]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
at org.ihc.phr.status.Initializer.main(Initializer.java:17)
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_20]
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_20]
at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_20]
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_20]
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_20]
at java.lang.Class.createAnnotationData(Class.java:3508)
at java.lang.Class.createAnnotationData(Class.java:3508) ~[na:1.8.0_20]
at java.lang.Class.annotationData(Class.java:3497)
at java.lang.Class.createAnnotationData(Class.java:3513)
at java.lang.Class.annotationData(Class.java:3497)
at java.lang.Class.getDeclaredAnnotations(Class.java:3464)
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:352)
at java.lang.Class.annotationData(Class.java:3497) ~[na:1.8.0_20]
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:319)
at java.lang.Class.createAnnotationData(Class.java:3513) ~[na:1.8.0_20]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:173)
at java.lang.Class.annotationData(Class.java:3497) ~[na:1.8.0_20]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:123)
at java.lang.Class.getDeclaredAnnotations(Class.java:3464) ~[na:1.8.0_20]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:103)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:126)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:352) ~[spring-core-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
... 15 more
at org.springframework.core.annotation.AnnotationUtils.findAnnotation(AnnotationUtils.java:319) ~[spring-core-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:173) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:123) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:103) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:126) ~[spring-webmvc-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[spring-beans-4.0.7.RELEASE.jar:4.0.7.RELEASE]
... 15 common frames omitted
:bootRun FAILED
FAILURE: Build failed with an exception.
@Configuration
@ComponentScan(basePackages={"com.mycompany",
"com.mycompany.utils",
"com.mycompany.domain","com.mycompany.resources",
"com.mycompany.resources.hook"})
@EnableAutoConfiguration
public class Initializer {
public static void main(String[] args) {
SpringApplication.run(Initializer.class, args);
}
}
@Configuration
@EnableAsync
@EnableScheduling
@PropertySource("classpath:application-dev.properties")
@ImportResource(value="classpath:applicationContext.xml")
@ComponentScan(basePackages={
"com.mycompany.web"})
public class StatusConfiguration {
@Autowired
Environment env;
@Bean
public ObjectMapper jacksonObjectMapper() {
return new CustomObjectMapper();
}
@Bean
public TargetServer targetServer(){
TargetServer targetServer = new TargetServer();
targetServer.setJndiValidationConnectionURL(env.getProperty("jndiValidationConnectionURL"));
targetServer.setJndiValidationUsername(env.getProperty("jndiValidationUsername"));
targetServer.setJndiValidationPassword(env.getProperty("jndiValidationPassword"));
return targetServer;
}
}
@RestController
public class StatusController {
@Autowired
private ReportService reportService;
@Autowired
private TargetServer targetServer;
private Logger log = LoggerFactory.getLogger(StatusController.class);
@RequestMapping(value = "/report")
public MyReport getStatus(){
MyReport report = reportService.getReport();
return report;
}
@RequestMapping(value = "/report/no-cache")
public MyReport getStatusNoCache(){
autoRunReport();
MyReport report = reportService.getReport();
return report;
}
@Scheduled(fixedDelay=300000)
public void autoRunReport(){
reportService.kickOffReport(targetServer);
log.debug("Running the scheduled validation Report!");
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'spring-boot'
dependencies {
compile("org.springframework.boot:spring-boot-starter-web:1.1.6.RELEASE")
compile(group: 'org.ihc.mh', name: 'mh-util', version:'13.12.5') {
exclude(module: 'slf4j-api')
exclude(module: 'slf4j-log4j12')
}
/* testCompile(group: 'org.springframework.boot', name: 'spring-boot-starter-test', version:'1.1.6.RELEASE') {
exclude(module: 'commons-logging')
}*/
}
buildscript {
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:1.1.6.RELEASE")
}
}
/*
idea {
module {
inheritOutputDirs = false
outputDir = file("$buildDir/classes/main/")
}
}*/
Only in Gradle Build: commons-logging-1.1.3.jar
Only in Gradle Build: jackson-annotations-2.3.0.jar
Only in Gradle Build: spring-boot-starter-security-1.1.6.RELEASE.jar
Only in Gradle Build: spring-context-support-3.0.5.RELEASE.jar
Only in Gradle Build: spring-jdbc-3.0.5.RELEASE.jar
Only in Gradle Build: spring-security-config-3.2.5.RELEASE.jar
Only in Gradle Build: spring-security-core-3.2.5.RELEASE.jar
Only in Gradle Build: spring-security-web-3.2.5.RELEASE.jar
Only in Gradle Build: spring-tx-3.0.5.RELEASE.jar
Only in Maven Build: jackson-annotations-2.3.4.jar
Only in Maven Build: spring-context-support-4.0.7.RELEASE.jar
Only in Maven Build: spring-jdbc-4.0.7.RELEASE.jar
Only in Maven Build: spring-tx-4.0.7.RELEASE.jar
最佳答案
我们(Spring Boot 团队)以前见过这种问题几次。不幸的是,JVM 的诊断非常糟糕。它试图告诉您的是,它遇到了一个带有 Class[] 属性的注释,该注释引用了一个不在类路径上的类。如果它告诉您缺少的类(class)是什么,那将非常有帮助......
我曾尝试使用上面的代码片段重现您的失败,但无法做到。当您使用 Maven 时,请尝试查看 unzip -l
的输出针对使用 Maven 和 Gradle 构建的 jar 运行,看看您是否能发现 Gradle 案例中缺少的内容。
关于Spring Boot requestMappingHandlerMapping java.lang.ArrayStoreException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25857126/
在 Tomcat 6/Ubuntu 12.04 上启动 Grails 2.1.0 应用程序时出现以下错误。 Error 500 - Internal Server Error. groovy.lang
在运行 Storm 拓扑时,我收到此错误。拓扑完美运行 5 分钟,没有任何错误,然后失败。我正在使用 Config.TOPOLOGY_TICK_TUPLE_FREQ_SECS as 300 sec i
我有一个 jsp 代码在其中一台机器上运行良好。但是当我复制到另一台机器时,我得到了这个 no such method found 异常。我是 Spring 的新手。有人可以解释我错过了什么吗? 以下
已关闭。此问题需要 debugging details 。目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and the
我的代码在下面给出了一个错误; Exception in thread "main" java.lang.NoSuchMethodError: com/myApp/Client.cypherCBC(L
我正在尝试一个 Restful web 服务示例,所以当我要访问 url 时,我遇到了异常 java.lang.NoSuchMethodError: jersey.repackaged.com.goo
我正在将一个 Spring web 项目转换为一个 Maven 项目,但我收到了这个错误: java.lang.NoSuchMethodError: org.jboss.logging.Logger.
在我的项目中,我有一个像这样的枚举: public enum MyEnum { FIRST(1), SECOND(2); private int value; private MyEnum(int v
我创建了这个简单的示例,用于读取 Linux 正常运行时间: public String getMachineUptime() throws IOException { String[] di
我正在使用 Eclipse,并且正在使用 Java。我的目标是使用 bogoSort 方法对 vector 进行排序在一个 vector (vectorExample)中适应我的 vector 类型,
我正在运行以下查询。它显示一条错误消息。如何解决这个错误? ListrouteList=null; List companyList = session.createS
我有以下模型类: @Entity @Table(name="user_content") @org.hibernate.annotations.NamedQueries({ @org.
我有那个错误。这是我的代码: GmailSettingsService service = new GmailSettingsService(APPLICATION_NAME, DOMAIN_NAME
实际上我在执行我的java程序时遇到了下面提到的错误 Exception in thread "pool-1-thread-1" java.lang.ClassCastException: jav
java.lang.ClassCastException: java.lang.Float cannot be cast to java.lang.String 我在以下代码中遇到此异常: Strin
我正在尝试从 linkedhashset 中检索随机元素。下面是我的代码,但它每次都给我异常。 private static void generateRandomUserId(Set userIds
我已经完成了 Android 中的代码: List spinnerArray = new ArrayList(); for (int i = 0; i item = (LinkedTreeMap)
这个问题已经有答案了: Explanation of ClassCastException in Java (12 个回答) 已关闭 6 年前。 我已经编写了 java 到 Json 的代码,同时从页
这个问题在这里已经有了答案: ClassCastException java.lang.Long cannot be cast to clojure.lang.IFn (4 个答案) 关闭 6 年前
我在运行时遇到问题来编译这段代码,这给我一个错误,java.lang.Integer 无法转换为 Java.lang.Double。如果有人帮助我更正此代码,我将非常高兴 double x; pu
我是一名优秀的程序员,十分优秀!