AsynchronousDispatcher error

后端 未结 5 985
野的像风
野的像风 2021-01-01 16:45

i am getting the error when i try to upload a file based exactly off the example shown here Sample

The error is

Allocate exception for servle

相关标签:
5条回答
  • 2021-01-01 17:14

    I was using wildfly 10 to deploy my application when I got this error and tried the above solutions and didn't work for me and finally I had to exclude the jar resteasy-jaxrs using maven exclusions

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-servlet-initializer</artifactId>
            <version>3.0.19.Final</version>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <artifactId>resteasy-jaxrs</artifactId>
                    <groupId>org.jboss.resteasy</groupId>
                </exclusion>
            </exclusions>
        </dependency>
    
    0 讨论(0)
  • 2021-01-01 17:22

    If deploying to JBoss 7.x you need to change the scope of your resteasy dependencies to provided. This is because those particular libraries are already included in JBoss as modules:

    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>2.2.1.GA</version>
        <scope>provided</scope>
    </dependency>
    
    <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-multipart-provider</artifactId>
        <version>2.2.0.GA</version>
        <scope>provided</scope>
    </dependency>
    
    0 讨论(0)
  • 2021-01-01 17:26

    Like a charm

    One more thing, make sure you check for resteasy

    $ mvn dependency:tree | grep "resteasy"
    
    [INFO] \- org.jboss.resteasy:resteasy-jaxrs:jar:3.0.10.Final:provided
    [INFO]    +- org.jboss.resteasy:jaxrs-api:jar:3.0.10.Final:provided
    
    0 讨论(0)
  • 2021-01-01 17:26

    Maybe it's worth to mention that the RESTeasy documentation has information on how to upgrade the RESTeasy included in JBoss, which as mentioned above can cause some headache if you try to use another version.

    0 讨论(0)
  • 2021-01-01 17:36

    Simply, you can add this dependency to your pom.xml file and test it.

    <dependency>
    <groupId>org.jboss.resteasy</groupId>
    <artifactId>resteasy-jaxrs</artifactId>
    <version>2.2.1.GA</version>
    <scope>provided</scope>
    </dependency>
    
    0 讨论(0)
提交回复
热议问题