Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-7645

Upgrading from a version before 3.3 causes all attachments to be broken when running on an Oracle database

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.0-milestone-2, 3.5.1
    • 3.4-rc-1
    • Old Core, Storage
    • None
    • Linux Centos 5 64bit (2.6.18-164.15.1.el5)
      Tomcat 6.0.26
      jdk1.6.0_20
      Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
      Oracle JDBC Driver 10.2.0.5.0
    • migration
    • Unknown

    Description

      I'm trying to migrate from XE 2.5.32127 to XE 3.4-rc-1. All the images can't be displayed and the console log shows the following:

      2012-01-24 15:29:50,601 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.i.m.DefaultCacheManager      - ISPN000156: You are not starting all your caches at the same time. This can lead to problems as asymmetric clusters are not supported, see ISPN-658. We recommend using EmbeddedCacheManager.startCaches() to start all your caches upfront.
      2012-01-24 15:29:50,832 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.h.u.DTDEntityResolver        - recognized obsolete hibernate namespace http://hibernate.sourceforge.net/. Use namespace http://www.hibernate.org/dtd/ instead. Refer to Hibernate 3.6 Migration Guide!
      2012-01-24 15:29:53,214 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] INFO  .HibernateDataMigrationManager - Running storage schema updates and migrations
      2012-01-24 15:30:08,751 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] INFO  .HibernateDataMigrationManager - No storage migration required since current version is [15429]
      2012-01-24 15:30:09,400 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.i.m.DefaultCacheManager      - ISPN000156: You are not starting all your caches at the same time. This can lead to problems as asymmetric clusters are not supported, see ISPN-658. We recommend using EmbeddedCacheManager.startCaches() to start all your caches upfront.
      2012-01-24 15:30:09,546 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.i.m.DefaultCacheManager      - ISPN000156: You are not starting all your caches at the same time. This can lead to problems as asymmetric clusters are not supported, see ISPN-658. We recommend using EmbeddedCacheManager.startCaches() to start all your caches upfront.
      2012-01-24 15:30:09,712 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.i.m.DefaultCacheManager      - ISPN000156: You are not starting all your caches at the same time. This can lead to problems as asymmetric clusters are not supported, see ISPN-658. We recommend using EmbeddedCacheManager.startCaches() to start all your caches upfront.
      2012-01-24 15:30:29,950 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.i.m.DefaultCacheManager      - ISPN000156: You are not starting all your caches at the same time. This can lead to problems as asymmetric clusters are not supported, see ISPN-658. We recommend using EmbeddedCacheManager.startCaches() to start all your caches upfront.
      2012-01-24 15:30:31,086 [http://oastest.gidi.it:7778/xwiki/bin/view/Main/] WARN  o.x.v.i.DefaultVelocityEngine  - Deprecated usage of method [com.xpn.xwiki.api.XWiki.getXMLEncoded] in xwiki:Main.WebHome@2,42
      2012-01-24 15:30:37,761 [http://oastest.gidi.it:7778/xwiki/bin/download/XWiki/tec526/bruegeltorredibabele.jpg?width=50&height=50&keepAspectRatio=true] WARN  o.h.u.JDBCExceptionReporter    - SQL Error: 17004, SQLState: null
      2012-01-24 15:30:37,762 [http://oastest.gidi.it:7778/xwiki/bin/download/XWiki/tec526/bruegeltorredibabele.jpg?width=50&height=50&keepAspectRatio=true] ERROR o.h.u.JDBCExceptionReporter    - Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CLongRawAccessor
      2012-01-24 15:30:37,769 [http://oastest.gidi.it:7778/xwiki/bin/download/XWiki/tec526/bruegeltorredibabele.jpg?width=50&height=50&keepAspectRatio=true] WARN  c.x.x.p.i.ImagePlugin          - Failed to transform image attachment.
      com.xpn.xwiki.XWikiException: Error number 3231 in 3: Exception while loading attachment bruegeltorredibabele.jpg of document XWiki.tec526
      Wrapped Exception: could not load an entity: [com.xpn.xwiki.doc.XWikiAttachmentContent#-277601551]
              at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.loadAttachmentContent(XWikiHibernateAttachmentStore.java:227) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.doc.XWikiDocument.loadAttachmentContent(XWikiDocument.java:4340) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.doc.XWikiAttachment.getContentInputStream(XWikiAttachment.java:558) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.plugin.image.ImagePlugin.shrinkImage(ImagePlugin.java:336) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.plugin.image.ImagePlugin.downloadImageFromCache(ImagePlugin.java:310) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.plugin.image.ImagePlugin.downloadImage(ImagePlugin.java:271) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.plugin.image.ImagePlugin.downloadAttachment(ImagePlugin.java:245) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.plugin.XWikiPluginManager.downloadAttachment(XWikiPluginManager.java:285) [xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.web.DownloadAction.render(DownloadAction.java:93) [xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:231) [xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) [xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) [struts-1.2.9.jar:1.2.9]
              at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) [struts-1.2.9.jar:1.2.9]
              at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [struts-1.2.9.jar:1.2.9]
              at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.9.jar:1.2.9]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) [servlet-api.jar:na]
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) [servlet-api.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:128) [xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-3.4-rc-1.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) [xwiki-platform-webdav-server-3.4-rc-1.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:217) [xwiki-platform-container-servlet-3.4-rc-1.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109) [xwiki-platform-container-servlet-3.4-rc-1.jar:na]
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.26]
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.26]
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.26]
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.26]
              at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:269) [catalina.jar:6.0.26]
              at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:81) [catalina.jar:6.0.26]
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.26]
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina.jar:6.0.26]
              at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) [tomcat-coyote.jar:6.0.26]
              at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) [tomcat-coyote.jar:6.0.26]
              at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) [tomcat-coyote.jar:6.0.26]
              at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) [tomcat-coyote.jar:6.0.26]
              at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891) [tomcat-coyote.jar:6.0.26]
              at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690) [tomcat-coyote.jar:6.0.26]
              at java.lang.Thread.run(Thread.java:619) [na:1.6.0_20]
      Caused by: org.hibernate.exception.GenericJDBCException: could not load an entity: [com.xpn.xwiki.doc.XWikiAttachmentContent#-277601551]
              at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:140) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:128) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.loadEntity(Loader.java:2041) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:86) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:76) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3293) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:496) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:477) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:227) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:285) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:152) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:1090) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.impl.SessionImpl.load(SessionImpl.java:974) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at com.xpn.xwiki.store.XWikiHibernateAttachmentStore.loadAttachmentContent(XWikiHibernateAttachmentStore.java:212) ~[xwiki-platform-legacy-oldcore-3.4-rc-1.jar:na]
              ... 48 common frames omitted
      Caused by: java.sql.SQLException: Invalid column type: getBLOB not implemented for class oracle.jdbc.driver.T4CLongRawAccessor
              at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:147) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.Accessor.unimpl(Accessor.java:359) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.Accessor.getBLOB(Accessor.java:1301) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.OracleResultSetImpl.getBLOB(OracleResultSetImpl.java:1281) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.OracleResultSetImpl.getBlob(OracleResultSetImpl.java:1467) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at oracle.jdbc.driver.OracleResultSet.getBlob(OracleResultSet.java:1979) ~[ojdbc14.jar:Oracle JDBC Driver version - "10.2.0.5.0"]
              at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:565) ~[commons-dbcp-1.3.jar:1.3]
              at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:565) ~[commons-dbcp-1.3.jar:1.3]
              at org.apache.commons.dbcp.DelegatingResultSet.getBlob(DelegatingResultSet.java:565) ~[commons-dbcp-1.3.jar:1.3]
              at org.hibernate.type.descriptor.sql.BlobTypeDescriptor$5.doExtract(BlobTypeDescriptor.java:115) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.type.descriptor.sql.BasicExtractor.extract(BasicExtractor.java:64) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:254) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:250) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.type.AbstractStandardBasicType.nullSafeGet(AbstractStandardBasicType.java:230) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.type.AbstractStandardBasicType.hydrate(AbstractStandardBasicType.java:331) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2283) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1527) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1455) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.getRow(Loader.java:1355) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:611) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.doQuery(Loader.java:829) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              at org.hibernate.loader.Loader.loadEntity(Loader.java:2037) ~[hibernate-core-3.6.9.Final.jar:3.6.9.Final]
              ... 59 common frames omitted
      

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              ccoreggioli Claudio Coreggioli
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: