Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rose 不支持jdk1.8 #30

Open
sugazaki opened this issue May 30, 2016 · 4 comments
Open

rose 不支持jdk1.8 #30

sugazaki opened this issue May 30, 2016 · 4 comments

Comments

@sugazaki
Copy link

Caused by: java.lang.IllegalStateException: Context namespace element 'annotation-config' and its parser class [org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser] are only available on JDK 1.5 and higher
at org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)

@met-pub
Copy link

met-pub commented May 31, 2016

你这报错是jdk版本低啊。。。

blog: http://bianbian.org

On Mon, May 30, 2016 at 9:07 PM, sugazaki [email protected] wrote:

Caused by: java.lang.IllegalStateException: Context namespace element
'annotation-config' and its parser class
[org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser]
are only available on JDK 1.5 and higher
at
org.springframework.context.config.ContextNamespaceHandler$1.parse(ContextNamespaceHandler.java:65)
at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#30, or mute the
thread
https://github.com/notifications/unsubscribe/AGwH0PjPE_SdzFusWBAopkVVyFQ5JFQzks5qGuEggaJpZM4IpyJV
.

@sugazaki
Copy link
Author

换成1.7就好了

目测是rose引用了
image

这个在jdk1.8中是跑不起来的

@met-pub
Copy link

met-pub commented May 31, 2016

这个不是rose引用的。这是spring低版本。你是不是有其他库依赖到了。
好像rose没有显式引用spring版本,你用什么版本就用什么版本。

我在1.8下完全能跑,我的spring是4.2.5

blog: http://bianbian.org

On Tue, May 31, 2016 at 4:25 PM, sugazaki [email protected] wrote:

换成1.7就好了

目测是rose引用了
[image: image]
https://cloud.githubusercontent.com/assets/1066802/15668119/3dafece8-274c-11e6-8800-fbbda4a7a527.png

这个在jdk1.8中是跑不起来的


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#30 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGwH0AkflCgf690eQBfXUl3pBkzsZZTmks5qG_CPgaJpZM4IpyJV
.

@hawkingfoo
Copy link

Rose和jade中排除掉Spring相关的包。再依赖spring4.1.4以上的版本就可以支持1.8了,亲测有效。

<dependency>
            <groupId>net.paoding</groupId>
            <artifactId>paoding-rose</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring-webmvc</artifactId>
                </exclusion>
            </exclusions>

如果有依赖jade,也要排除

<dependency>
            <groupId>net.paoding</groupId>
            <artifactId>paoding-rose-jade</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework</groupId>
                    <artifactId>spring</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants