Hello,
I have a JPA entity with Large Amounts of data stored inside it.
The entity is as follows:
[code]
@Entity
public class FileContents implements Serializable {
@Id
@TableGenerator (...)
@GeneratedValue(....)
@Column(name="ID")
private Long idField;
@Basic (fetch = FetchType.LAZY)
@Lob
@Column (name="FILE_CONTENTS")
private String contents;
// setters and getters not shown
}
[/code]
Basically, this entity is used for storing the contents of some file.
When attempting to persist this from a local ejb, from an entity manager, I see the following messages in the server log:
[code]
[#| INFO|glassfishv3.0|beginning persist#]
[#|.|WARNING|glassfishv3.0|com.sun.grizzly.config.GrizzlyServiceListener|Interrupting idle Thread: http-thread-pool-8181(1) | #]
[# | SEVERE|glassfishv3.0| com.sun.xml.ws.transport.http.HttpAdapter| ...| Couldn't create SOAP message due to exception: org.jvnet.mimepull.MIMEParsingException: java.io.IOException: Invalid chunk header
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: org.jvnet.mimepull.MIMEParsingException
at com.sun.xml.ws.econding.SOAPBindingCodec.decode(SOAPBindingCodec.java:359)
....
....
#]
[/code]
Originally, I thought that this was related to not getting the data from the web service fast enough, however, I am able to print the content of the file fairly quickly in the server logs, and I'm able to save the file to /tmp on the server.
I traced these errors to the ejb's persist method, which appears to be stuck in a transaction for over 1 hour!!! I don't think that this is realistic, as the file is less than 200 Megabytes in size.
My second log message leads me to believe that the http service in glassfish is simply timing out.
So, - I think that what is going on here is that the the HTTP connection is timing out, and the last log message is indicating that there is a problem with the SOAP request from the client. In fact, the client receives some fairly nasty errors.
Is there anyway to optimize the storage of large data in JPA? or make this take less than 1 hour ? Or am I not using the API Correctly?
Thanks [b]very much[/b] for any clues/help.
[Message sent by forum member 'hoffman462' (HoffmanDanielG_at_gmail.com)]
http://forums.java.net/jive/thread.jspa?messageID=389667