core icon indicating copy to clipboard operation
core copied to clipboard

Problems to push some file after rename

Open bryanboza opened this issue 13 years ago • 4 comments

Steps to reproduce: 1- Create new folder and add a html page 2- Push it 3- Go to node A and add some file assets to the same folder 4- Rename the folder (change name and url) 5- Try to push again

here the screencast: http://screencast.com/t/Src7TioPc this is the error in the log in the end-point: https://gist.github.com/bryanboza/91cfe6714d18be6ee44e

bryanboza avatar Oct 16 '13 22:10 bryanboza

I think thi smight be SQL Server specific. @bryanboza can you test that for us please.

jtesser avatar Oct 17 '13 13:10 jtesser

I was tested, and i am able to reproduce on mySQL and postgres

bryanboza avatar Oct 17 '13 13:10 bryanboza

not sure why I get a different stack trace

[17/10/13 10:55:00:664 CST]  WARN util.JDBCExceptionReporter: SQL Error: 0, SQLState: P0001
[17/10/13 10:55:00:664 CST] ERROR util.JDBCExceptionReporter: ERROR: Cannot insert/update for this path does not exist for the given host
[17/10/13 10:55:00:665 CST] ERROR impl.SessionImpl: Could not synchronize database state with session
[17/10/13 10:55:00:665 CST] ERROR business.ESContentletAPIImpl: Unable to flush Hibernate Session 
[17/10/13 10:55:00:665 CST] ERROR business.ESContentletAPIImpl: com.dotmarketing.exception.DotHibernateException: Unable to flush Hibernate Session 
[17/10/13 10:55:00:669 CST] ERROR business.PublisherAPIImpl: Error Publishing Bundle: Unable to flush Hibernate Session 
com.dotcms.publishing.DotPublishingException: Unable to flush Hibernate Session 
    at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handleContents(ContentHandler.java:210)
    at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(ContentHandler.java:81)
    at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handle(ContentHandler.java:71)
    at com.dotcms.publisher.receiver.BundlePublisher.process(BundlePublisher.java:137)
    at com.dotcms.rest.PublishThread.run(PublishThread.java:42)
    at java.lang.Thread.run(Thread.java:724)
Caused by: com.dotmarketing.exception.DotHibernateException: Unable to flush Hibernate Session 
    at com.dotmarketing.db.HibernateUtil.saveWithPrimaryKey(HibernateUtil.java:821)
    at com.dotmarketing.business.IdentifierFactoryImpl.createNewIdentifier(IdentifierFactoryImpl.java:295)
    at com.dotmarketing.business.IdentifierAPIImpl.createNew(IdentifierAPIImpl.java:134)
    at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:2137)
    at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:1959)
    at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:1955)
    at com.dotcms.content.elasticsearch.business.ESContentletAPIImpl.checkin(ESContentletAPIImpl.java:1912)
    at com.dotmarketing.portlets.contentlet.business.ContentletAPIInterceptor.checkin(ContentletAPIInterceptor.java:256)
    at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.publish(ContentHandler.java:237)
    at com.dotcms.enterprise.publishing.remote.handler.ContentHandler.handleContents(ContentHandler.java:146)
    ... 5 more
Caused by: net.sf.hibernate.exception.GenericJDBCException: could not insert: [com.dotmarketing.beans.Identifier#7ea49906-09c2-4998-a616-715ae8cc500d]
    at net.sf.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:80)
    at net.sf.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:69)
    at net.sf.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
    at net.sf.hibernate.persister.AbstractEntityPersister.convert(AbstractEntityPersister.java:1331)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:472)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:436)
    at net.sf.hibernate.impl.ScheduledInsertion.execute(ScheduledInsertion.java:37)
    at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2449)
    at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2435)
    at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2392)
    at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2261)
    at com.dotmarketing.db.HibernateUtil.saveWithPrimaryKey(HibernateUtil.java:819)
    ... 14 more
Caused by: org.postgresql.util.PSQLException: ERROR: Cannot insert/update for this path does not exist for the given host
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2102)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1835)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:500)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:388)
    at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:334)
    at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:102)
    at net.sf.hibernate.impl.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:22)
    at net.sf.hibernate.persister.EntityPersister.insert(EntityPersister.java:462)
    ... 21 more

dotjorgeu avatar Oct 17 '13 16:10 dotjorgeu

Fix is working on 3.2.1 build

shaydotcms avatar Jun 18 '15 15:06 shaydotcms