Skip to content

rose 不支持jdk1.8 #30

Open
Open

Description

@sugazaki

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)

Activity

  1. met-pub commented on May 31, 2016

    @met-pub

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

    blog: http://bianbian.org

    On Mon, May 30, 2016 at 9:07 PM, sugazaki notifications@github.com 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
    .

  2. sugazaki commented on May 31, 2016

    @sugazaki
    Author

    换成1.7就好了

    目测是rose引用了
    image

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

  3. met-pub commented on May 31, 2016

    @met-pub

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

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

    blog: http://bianbian.org

    On Tue, May 31, 2016 at 4:25 PM, sugazaki notifications@github.com 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
    .

  4. hawkingfoo commented on Jan 17, 2018

    @hawkingfoo

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions