Migrating JIRA 6 custom servlet filter to JIRA 7

Hi,

 

We are migrating our JIRA server 6.4.5 to JIRA Software (Server) 7.3.8 right now and we are encountering a problem with one of our custom plugin.

It's a servlet filter that we have developped to interface with our CAS SSO (not for login/logout, that's another one wich extends JIRASecurityFilter and works fine) and in the logs, we have an exception that says that our class cannot be cast to javax.servlet.Filter (java.lang.ClassCastException).

I have modified the pom.xml (see below) to use the latest version of JIRA and the sal plugin and also modified it to use Java 1.8 for compiling. And yet it seems to not be enough.

When I look at the dependancies recovered, I see that we use javax-servlet-3.0.1and servlet-api.2.0.1 so I assume the problem is from there, as we moved from tomcat 7 to 8 but I can't figure out how to solve it.

Does anyone have any idea ?

Thanks !

PS : Here is our pom :

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.xxx.jira.plugins</groupId>
	<artifactId>jira-xxx-services-users</artifactId>
	<version>3.0.1</version>

	<organization>
		<name>XXX</name>
		<url>http://www.xxx.com/</url>
	</organization>

	<name>XXX Synchro Groupes/Utilisateurs</name>
	<description>Ce plugin est utilisé pour la gestion des groupes et des utilisateurs. Il est relié à la plateforme de groupe.</description>
	<packaging>atlassian-plugin</packaging>

	<dependencies>

		<dependency>
			<groupId>com.xxx</groupId>
			<artifactId>libthrift</artifactId>
			<version>0.10.0</version>
		</dependency>
		<dependency>
			<groupId>com.atlassian.jira</groupId>
			<artifactId>jira-api</artifactId>
			<version>${jira.version}</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.sal</groupId>
			<artifactId>sal-api</artifactId>
			<version>3.0.7</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.atlassian.crowd</groupId>
			<artifactId>embedded-crowd-core</artifactId>
			<version>2.10.2-rc04</version>
			<scope>provided</scope>
		</dependency>
		 <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
			<version>1.1.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>com.google.code.gson</groupId>
			<artifactId>gson</artifactId>
			<version>2.2.2-atlassian-1</version>
		</dependency>
		<dependency>
		  <groupId>org.springframework</groupId>
		  <artifactId>spring</artifactId>
		  <version>2.5.6.SEC01</version>
		  <scope>provided</scope>
		</dependency>
		<dependency>
		    <groupId>cas</groupId>
		    <artifactId>casclient</artifactId>
		    <version>2.1.1</version>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
			            <goals><goal>add-source</goal></goals>
                        <configuration>
                            <sources>
                                <source>thrift.generated</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
			<plugin>
				<groupId>com.atlassian.maven.plugins</groupId>
				<artifactId>maven-jira-plugin</artifactId>
				<version>${amps.version}</version>
				<extensions>true</extensions>
				<configuration>
					<productVersion>${jira.version}</productVersion>
					<productDataVersion>${jira.data.version}</productDataVersion>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.8</source>
					<target>1.8</target>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<properties>
		<jira.version>7.3.8</jira.version>
        <amps.version>6.2.9</amps.version>
        <plugin.testrunner.version>1.1.1</plugin.testrunner.version>
		<!-- TestKit version 5.x for JIRA 5.x, 6.x for JIRA 6.x -->
		<testkit.version>5.2.26</testkit.version>
	</properties>

</project>

0 answers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,140 views 13 19
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot