Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After add maven dependency, org.apache.catalina.filters.CSRF_NONCE error message

Tags:

java

maven

In the tomcat7 manager When I deploy my war file, this message appear...

/manager/html/upload?org.apache.catalina.filters.CSRF_NONCE=11DD9FAE4DEB7F9DB7DC4FD9A308BEB7

I can't find why this message appear.. pz help me

my pom.xml (I added google api, but other dependencies is making same error)

    <dependency>
        <groupId>com.google.apis</groupId>
        <artifactId>google-api-services-vision</artifactId>
        <version>v1-rev24-1.22.0</version>
    </dependency>


<build>
    <defaultGoal>install</defaultGoal>

    <directory>${basedir}/build</directory>
    <sourceDirectory>${basedir}/src/main/java</sourceDirectory>

    <outputDirectory>${basedir}/build/classes</outputDirectory>
    <testSourceDirectory>${basedir}/src/test/java</testSourceDirectory>
    <testOutputDirectory>${basedir}/build/test-classes</testOutputDirectory>
    <finalName>${project.artifactId}-${project.version}</finalName>

    <resources>
        <resource>
            <directory>src/main/resources</directory>
            <includes>
                <include>**/**</include>
            </includes>
        </resource>
        <resource>
            <directory>src/main/resources-${environment}</directory>
            <includes>
                <include>**/**</include>
            </includes>
        </resource>
    </resources>

    <pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <configuration>
                    <port>8080</port>
                    <path>/</path>
                    <systemProperties>
                        <JAVA_OPTS>-Dfile.encoding=UTF-8 -Xms2048M -Xmx2048M -XX:PermSize=128M -XX:MaxPermSize=128M</JAVA_OPTS>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <encoding>UTF-8</encoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <warSourceDirectory>webapp</warSourceDirectory>
                    <webXml>webapp/WEB-INF/web.xml</webXml>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </pluginManagement>
</build>
like image 468
junho Avatar asked Sep 29 '16 14:09

junho


1 Answers

I solved this problem myself.

Problem's cause is tomcat7 deploy file-limit.

Solution Go to the web.xml of the manager application (for instance it could be under /tomcat7/webapps/manager/WEB-INF/web.xml. Increase the max-file-size and max-request-size:

<multipart-config>
    <!– 50MB max –>
    <max-file-size>92428800</max-file-size>
    <max-request-size>92428800</max-request-size>
    <file-size-threshold>0</file-size-threshold>
</multipart-config>
like image 74
junho Avatar answered Nov 06 '22 21:11

junho