Error while uploading files in database through plugin

I am getting error after navigating to servlet url is that 

java.lang.IllegalStateException: Unable to process parts as no multi-part configuration has been provided

I correctly written servlet url in .xml file


public class CourseSchedule extends HttpServlet
private TemplateRenderer tr;
private PageBuilderService pbs;
private ActiveObjects ao;

public CourseSchedule(TemplateRenderer tr, PageBuilderService pbs,ActiveObjects ao)

protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException

tr.render("/templates/adminOperations/courseSchedule.vm", response.getWriter());

Connection con=null;
Statement st=null;
String msg=null;
String url="jdbc:mysql://localhost:3306/LU_Data?useSSL=false";
String user="root";
String password="123456";

Random rand = new Random();
int n = rand.nextInt(9999) + 1;
String idTemp=(String.valueOf(n));

String semesterName=request.getParameter("semesterName");
Part part=request.getPart("scheduleFile");

PrintWriter pw=response.getWriter();

InputStream is=null;

if(part != null)
long fileSize=part.getSize();
String fileContent=part.getContentType();


con=DriverManager.getConnection(url, user, password);

PreparedStatement pst=con.prepareStatement("INSERT INTO Course_schedule VALUES(?,?,?)");
pst.setString(1, semesterName);
pst.setString(2, idTemp);


pst.setBinaryStream(3, is, (int) part.getSize());

int row=pst.executeUpdate();

pw.print("Error in Uploading a file");
pw.print("File Uploaded Successfully");


catch(SQLException e)
} catch (ClassNotFoundException e)
if(con!= null)
try {
}catch(SQLException e) {e.printStackTrace();}


<title>Course Schedule</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<h1>Upload Course Schedule</h1>
<form action="CourseSchedule" method="post" enctype="multipart/form-data">
<table border="0">
<td>Semester Name</td>
<td><input type="text" name="semesterName" size="50"/></td>
<td>Course Schedule File </td>
<td><input type="file" name="scheduleFile" size="50"/></td>
<td colspan="2">
<input type="submit" value="Upload">


0 answers

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

136 views 1 10
Read article

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