-
1. Re: File upload problem
peterj Aug 12, 2006 6:20 PM (in response to peterj)I realized that I did not give enough information about the file I uploaded. What I did was zipped up the contents of the docs directory for Ant 1.6.5. That was the 6MB file. The 800K file was the same, but without the api directory. The final file was just a handful of the files. So perhaps it is not the size of the download but instead the number of embedded files that need to be processed.
-
2. Re: File upload problem
salomem Aug 17, 2006 5:37 AM (in response to peterj)Hi Peter
I am experiencing the same problem. Did you perhaps find a solution?
Salome -
3. Re: File upload problem
salomem Aug 17, 2006 6:03 AM (in response to peterj)I made the archive smaller by just removing some of the jpg files from the image subfolder inside the archive... and then it uploaded successfully. It seems as if it has to do with the size of the upload file, e.g. it works if it is below 1MB but not if the size is above 1MB?? So what if one has files greater than that???
-
4. Re: File upload problem
julien1 Aug 17, 2006 8:12 AM (in response to peterj)did you try to increase the server heap size ?
-
5. Re: File upload problem
peterj Aug 17, 2006 12:55 PM (in response to peterj)Is a 1.4GB heap large enough?
I tried two different zip files, each containing only a single binary file. One contained a ppt file of 3.5M. There other a doc file of 500MB.
At work I am seeing the following error (don't recall getting that on my laptop at home):2006-08-17 09:50:41,375 ERROR [org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager] failed to read binary data: 364764f8-fe6d-4feb-9239-e03cca90ab38/{http://www.jcp.org/jcr/1.0}data[0] org.hibernate.HibernateException: java.sql.SQLException: could not reset reader at org.jboss.portal.jems.hibernate.CacheableBlobUserType.equals(CacheableBlobUserType.java:72) at org.hibernate.type.CustomType.isEqual(CustomType.java:85) at org.hibernate.type.CustomType.isEqual(CustomType.java:90) at org.hibernate.type.AbstractType.isSame(AbstractType.java:104) at org.hibernate.type.AbstractType.isDirty(AbstractType.java:70) at org.hibernate.type.CustomType.isDirty(CustomType.java:226) at org.hibernate.type.TypeFactory.findDirty(TypeFactory.java:476) at org.hibernate.persister.entity.AbstractEntityPersister.findDirty(AbstractEntityPersister.java:2900) at org.hibernate.event.def.DefaultFlushEntityEventListener.dirtyCheck(DefaultFlushEntityEventListener.java:474) at org.hibernate.event.def.DefaultFlushEntityEventListener.isUpdateNecessary(DefaultFlushEntityEventListener.java:197) at org.hibernate.event.def.DefaultFlushEntityEventListener.onFlushEntity(DefaultFlushEntityEventListener.java:120) at org.hibernate.event.def.AbstractFlushingEventListener.flushEntities(AbstractFlushingEventListener.java:195) at org.hibernate.event.def.AbstractFlushingEventListener.flushEverythingToExecutions(AbstractFlushingEventListener.java:76) at org.hibernate.event.def.DefaultAutoFlushEventListener.onAutoFlush(DefaultAutoFlushEventListener.java:35) at org.hibernate.impl.SessionImpl.autoFlushIfRequired(SessionImpl.java:962) at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1107) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79) at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager$DbBLOBStore.get(HibernatePersistenceManager.java:997) at org.apache.jackrabbit.core.state.util.Serializer.serialize(Serializer.java:219) at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager.store(HibernatePersistenceManager.java:624) at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager.storeHB(HibernatePersistenceManager.java:341) at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager.store(HibernatePersistenceManager.java:291) at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:569) at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:170) at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:172) at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:315) at org.jboss.portal.cms.impl.jcr.JCRCMS.execute(JCRCMS.java:468) --- removed many lines --- at org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:167) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: java.sql.SQLException: could not reset reader at org.hibernate.lob.BlobImpl.getBinaryStream(BlobImpl.java:83) at org.hibernate.lob.SerializableBlob.getBinaryStream(SerializableBlob.java:39) at org.jboss.portal.jems.hibernate.ByteArrayBlob.get(ByteArrayBlob.java:121) at org.jboss.portal.jems.hibernate.CacheableBlobUserType.equals(CacheableBlobUserType.java:67) ... 253 more
-
6. Re: File upload problem
roy.russo Aug 17, 2006 1:13 PM (in response to peterj)1.x GB should be more than enough for that size file.
Can you please open a bug req in jira. I'll test it. -
7. Re: File upload problem
peterj Aug 17, 2006 1:45 PM (in response to peterj)It is JIRA issue JBPORTAL-983. http://jira.jboss.com/jira/browse/JBPORTAL-983
-
8. Re: File upload problem
roy.russo Aug 24, 2006 2:52 PM (in response to peterj)Peter, what DB are you using?
On mysql5, with large file uploade, I see this:Caused by: org.jboss.util.NestedSQLException: Error; - nested throwable: (java.lang.OutOfMemoryError) at org.jboss.resource.adapter.jdbc.WrappedConnection.checkException(WrappedConnection.java:557) at org.jboss.resource.adapter.jdbc.WrappedStatement.checkException(WrappedStatement.java:561) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:255) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33) ... 256 more Caused by: java.lang.OutOfMemoryError
which is normally fixed by increasing the heapsize. -
9. Re: File upload problem
peterj Aug 24, 2006 3:12 PM (in response to peterj)I am using PostgreSQL 8.1.
I just now tried it again with a 600KB zip file. Here is a partial stack trace:2006-08-24 12:00:27,553 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState: 99999 2006-08-24 12:00:27,553 ERROR [org.hibernate.util.JDBCExceptionReporter] Unexpected error writing large object to database. 2006-08-24 12:00:27,553 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session org.hibernate.exception.GenericJDBCException: could not insert: [org.jboss.portal.cms.hibernate.state.WSPBinVal] at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103) at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) ... at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager$DbBLOBStore.get(HibernatePersistenceManager.java:997) at org.apache.jackrabbit.core.state.util.Serializer.serialize(Serializer.java:219) at org.jboss.portal.cms.hibernate.state.HibernatePersistenceManager.store(HibernatePersistenceManager.java:624) ... at org.jboss.portal.core.portlet.cms.admin.CMSAdminPortlet.internalProcessAction(CMSAdminPortlet.java:505) at org.jboss.portal.core.portlet.cms.admin.CMSAdminPortlet.processAction(CMSAdminPortlet.java:353) at org.jboss.portlet.JBossPortlet.processAction(JBossPortlet.java:379) ... at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:595) Caused by: org.postgresql.util.PSQLException: Unexpected error writing large object to database. at org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:2740) at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setBlob(WrappedPreparedStatement.java:517) at org.hibernate.type.BlobType.set(BlobType.java:49) at org.hibernate.type.BlobType.nullSafeSet(BlobType.java:117) at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1910) at org.hibernate.persister.entity.AbstractEntityPersister.dehydrate(AbstractEntityPersister.java:1887) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2117) ... 250 more Caused by: java.io.IOException: Read error at java.io.FileInputStream.readBytes(Native Method) at java.io.FileInputStream.read(FileInputStream.java:194) at org.postgresql.jdbc2.AbstractJdbc2Statement.setBlob(AbstractJdbc2Statement.java:2727) ... 256 more
-
10. Re: File upload problem
peterj Aug 24, 2006 3:13 PM (in response to peterj)Argh! I hit the wrong button, meant to hit Preview!
Anyway, I tried earlier setting my heap to 1.4GB and still got the error so I don't think expanding the heap will help. I will try loading the same file while using MySQL andl et you knwo the results. -
11. Re: File upload problem
peterj Aug 24, 2006 4:00 PM (in response to peterj)OK, I tried it again with MySQL 5.0. This time the zip file uploaded just find. Well, almost. I did get quite a lot of errors that look like this:
12:18:56,704 ERROR [VersionManager] Error while setting references: javax.jcr.RepositoryException: 6d43a21c-ae9a-44fb-a117-d9f7b96cf2cb: 6d43a21c-ae9a-44fb-a117-d9f7b96cf2cb
But the files appear to be loaded.
Oh, I just realized that I am using a 2.4 portal that I build this morning from source downloaded from CVS. Be back in a second.
Ok, now I am running on 2.4.0GA and MySQL 5.0. Uploaded the 600K zip file and got the same results as indicated above. By the way, this zip file contains over 200 files in various directories, most of the files are HTML.
I then tried to upload a 2MB zip file (containing a single pdf file - the quick start guide) and got an error: Packet for query is too large. Fixed that and tried again. Now the file uploads just fine.
So it looks like the problem is PostgreSQL specific. -
12. Re: File upload problem
roy.russo Aug 24, 2006 4:09 PM (in response to peterj)I'll look at postgres soon.
Tinkering with oracle, produced odd errors as well, that seem to be coming from the driver, and not the portal cms code. These DBs may have some flags to set, that I need to find. Much like mysql used to have max_allowed_packet -
13. Re: File upload problem
dans13 Oct 12, 2006 2:51 PM (in response to peterj)Hi,
I experiencing the same problem.
Anybody know any solution to make postgres work with large files ? -
14. Re: File upload problem
nat.blundell Dec 6, 2006 6:57 AM (in response to peterj)I'm stuck with postgres too - anyone found a solution?