春季启动在Glassfish [英] Spring Boot on Glassfish

查看:1050
本文介绍了春季启动在Glassfish的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有我在春天启动部署GF3,4期间得到这
虽然它是知道问题看

春季启动问题

另一个

有无处可寻,除了在GF来源的try / catch黑客的解决方案。

整个问题是关于@Conditional ...春天引导注解,其中包含类的引用上没有的CP和GF这个检查禁用春天引导的使用。

我不想放弃春节引导,但关掉@EnableAutoconfiguration不工作,排除注释自动配置类也不起作用。有没有办法解决(扔掉所有自动CONFIGS)或我的注定并需要回落到香草春?????

大家都把手中抢走,因为它似乎是GF问题。任何黑客意见AP preciated。

 警告| glassfish3.1.2 |国际| _ThreadID = 86; _ThreadName =线程2; |错误注释处理:java.lang.NoClassDefFoundError的:组织/ springframework的/批号/核心/配置/注释/ BatchConfigurer |#]警告| glassfish3.1.2 |国际| _ThreadID = 86; _ThreadName =线程2; |错误注释处理:java.lang.NoClassDefFoundError的:组织/ springframework的/批号/核心/配置/注释/ BatchConfigurer |#]严重| glassfish3.1.2 |国际| _ThreadID = 86; _ThreadName =线程2; |类[组织/阿帕奇/ Solr的/客户/ solrj / SolrServer]未找到。错误而载入[类org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration] |#]严重| glassfish3.1.2 |国际| _ThreadID = 86; _ThreadName =线程2; |类[liquibase /集成/春/ SpringLiquibase]未找到。错误而载入[类org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration $ LiquibaseConfiguration] |#]SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-2;|Exception在部署应用程序[PaySafeCardConnector-1.0-快照] |#]SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-2;|sun.reflect.annotation.TypeNot$p$psentExceptionProxy
java.lang.ArrayStoreException:sun.reflect.annotation.TypeNot presentExceptionProxy
    在sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:715)
    在sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:522)
    在sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348)


解决方案

您可以通过在你的web.xml中,它告诉GlassFish中不处理注释将元数据的完整=真解决这个问题,因为应用程序有已经这样做了。

此修复java.lang.ArrayStoreException:sun.reflect.annotation.TypeNot presentExceptionProxy和意志,例如,允许例如弹簧引导战争的应用程序,提供春季部署和成功运行

there I'm getting this during Spring Boot deployment to GF3,4 although it is know problem see

spring boot problem

another

there is nowhere solution to be found, except for the hack with try/catch in GF sources.

The whole problem is about @Conditional... Spring-Boot annotations, which holds classes references that are not on CP and this GF check disables the usage of Spring-Boot.

I don't want to abandon Spring-Boot, but switching off @EnableAutoconfiguration is not working, exclude auto-config classes in the annotation does not work either. Is there a way around(throw away all auto-configs) or I am doomed and need to fall back to vanilla Spring?????

Everybody is giving hands away as it seems to be GF problem. Any hack advice appreciated.

WARNING|glassfish3.1.2|global|_ThreadID=86;_ThreadName=Thread-2;|Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer|#]

WARNING|glassfish3.1.2|global|_ThreadID=86;_ThreadName=Thread-2;|Error in annotation processing: java.lang.NoClassDefFoundError: org/springframework/batch/core/configuration/annotation/BatchConfigurer|#]

SEVERE|glassfish3.1.2|global|_ThreadID=86;_ThreadName=Thread-2;|Class [ org/apache/solr/client/solrj/SolrServer ] not found. Error while loading [ class org.springframework.boot.autoconfigure.solr.SolrAutoConfiguration ]|#]

SEVERE|glassfish3.1.2|global|_ThreadID=86;_ThreadName=Thread-2;|Class [ liquibase/integration/spring/SpringLiquibase ] not found. Error while loading [ class org.springframework.boot.autoconfigure.liquibase.LiquibaseAutoConfiguration$LiquibaseConfiguration ]|#]

SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-2;|Exception while deploying the app [PaySafeCardConnector-1.0-SNAPSHOT]|#]

SEVERE|glassfish3.1.2|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=86;_ThreadName=Thread-2;|sun.reflect.annotation.TypeNotPresentExceptionProxy
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:715)
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:522)
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:348)

解决方案

You can get around this by putting metadata-complete="true" in your web.xml, which tells glassfish to not process the annotations, as the app has already done so.

This fixes the java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy and will, for example, allow the example Spring Boot war application that Spring provide to deploy and run successfully.

这篇关于春季启动在Glassfish的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆