Opened 16 years ago

Closed 16 years ago

#1221 closed defect (invalid)

Error creating a direcotory

Reported by: base Owned by: everyone
Priority: major Milestone:
Component: web Version: 2.9.1
Keywords: Cc:

Description

I get the below stacktrace when I create a directory. However, the directory is created and visible. Our server was upgraded to 2.9.1 one hour ago.

Unexpected error

DatabaseException on page /onk/filemanager/directories/index.jsp
	
Version	BASE 2.9.1 (build #4709; schema #65)
Web server	Apache Tomcat/6.0.16
Database Server	MySQL 5.0.51a-log
Database Dialect	org.hibernate.dialect.MySQLInnoDBDialect
JDBC Driver	com.mysql.jdbc.Driver (version 5.1)
Java runtime	Java(TM) SE Runtime Environment (1.6.0_04-b12), Sun Microsystems Inc.
Operating system	Linux i386 2.6.18-53.1.14.el5PAE
Memory	Total: 91.5 MB
Free: 36.3 MB
Max: 976.5 MB
Browser	Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1
Error message	Duplicate entry 'Uploads-523' for key 2
Stack trace	
DatabaseException
...at HibernateUtil.saveData(HibernateUtil.java:1134)
...at DbControl.commit(DbControl.java:394)
...at org.apache.jsp.filemanager.directories.index_jsp._jspService(index_jsp.java:177)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
...at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
...at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
...at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
...at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
...at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
...at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
...at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
...at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
...at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
...at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
...at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
...at java.lang.Thread.run(Thread.java:619)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry 'Uploads-523' for key 2
...at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
...at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
...at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
...at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
...at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
...at com.mysql.jdbc.Util.getInstance(Util.java:381)
...at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1015)
...at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
...at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
...at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
...at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
...at com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1328)
...at com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:838)
...at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
...at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
...at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
...at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
...at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
...at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
...at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2186)
...at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2666)
...at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
...at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
...at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
...at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
...at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
...at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:210)
...at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:56)
...at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:195)
...at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:50)
...at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:93)
...at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:562)
...at org.hibernate.impl.SessionImpl.save(SessionImpl.java:550)
...at org.hibernate.impl.SessionImpl.save(SessionImpl.java:546)
...at HibernateUtil.saveData(HibernateUtil.java:1129)
...at DbControl.commit(DbControl.java:394)
...at org.apache.jsp.filemanager.directories.index_jsp._jspService(index_jsp.java:177)
...at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
...at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
...at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
...at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at net.sf.basedb.clients.web.servlet.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:70)
...at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
...at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
...at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
...at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
...at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
...at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
...at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
...at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
...at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
...at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
...at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
...at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
...at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
...at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
...at java.lang.Thread.run(Thread.java:619)

Change History (1)

comment:1 by Nicklas Nordborg, 16 years ago

Resolution: invalid
Status: newclosed

The error happens because the directory already exists.

Note: See TracTickets for help on using tickets.