[Persistence, JBoss/CMP, Hibernate, Database] - Large strings not getting persisted in entity column annotat
by molson_m
Hi,
I am in a very terrible situation. I am trying to persist large strings into a table column with type CLOB. My database is in Oracle. I am using JPA and noticed that its fine with small strings, but crashes badly with the exception "streams type cannot be used in batching" ; if the strings are of size around 700 to 1000 characters. It would be great if anyone can help me regarding this issues. The following is my sample code and exception
Entity Class
| @Entity
| public class Report implements Serializable{
|
| private int id;
| private String reportContent;
|
| @Id
| @GeneratedValue(strategy = GenerationType.AUTO)
| @Column(name="REPORT_ID")
| public int getId () {
| return id;
| }
| public void setId (int reportID) {
| this.id = reportID;
| }
|
| @Lob
| @Basic(fetch=FetchType.LAZY)
| public String getReportContent () {
| return reportContent;
| }
|
| public void setReportContent (String reportContent) {
| this.reportContent = reportContent;
| }
|
| }
|
|
| 2007-06-26 09:31:45,173 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 17090, SQLState: null
| 2007-06-26 09:31:45,173 ERROR [org.hibernate.util.JDBCExceptionReporter] operation not allowed: streams type cannot be used in batching
| 2007-06-26 09:31:45,173 ERROR [org.hibernate.event.def.AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.exception.GenericJDBCException: could not update: [au.com.thedistillery.validate.persistence.reporting.ReportContent#2]
| 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.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2425)
| at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2307)
| at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2607)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058487#4058487
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058487
18Â years, 9Â months
[Remoting] - Re: EJB3/Socket invoker - connection timeouts
by javajedi
Apologies to Ron for double-posting both here and on the support ticket, but I want to give the other kind souls who have been helping me out an update.
Just tried with store-bought 1.4.6. Exact same problem. Lots of these:
| 2007-06-27 16:19:37,799 71584 ERROR [org.jboss.remoting.transport.socket.SocketServerInvoker] (SocketServerInvoker#0-3873:) Failed to accept socket connection
| java.lang.reflect.InvocationTargetException
| at sun.reflect.GeneratedConstructorAccessor53.newInstance(Unknown Source)
| at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
| at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
| at org.jboss.remoting.transport.socket.ServerThread.createServerSocket(ServerThread.java:175)
| at org.jboss.remoting.transport.socket.ServerThread.wakeup(ServerThread.java:216)
| at org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:488)
| at org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:412)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: java.io.IOException: Mismatch version of JBossSerialization signature
| at org.jboss.serial.io.JBossObjectInputStream.checkSignature(JBossObjectInputStream.java:113)
| at ...
|
Followed by one of these:
| 2007-06-27 16:19:37,800 71585 DEBUG [org.jboss.remoting.transport.socket.ServerThread] (SocketServerInvokerThread-68.142.219.95-2:) Exiting run on exception
| java.lang.InterruptedException
| at java.lang.Object.wait(Native Method)
| at java.lang.Object.wait(Object.java:485)
| at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:282)
|
(the missed notify)
and then deadlock. The deadlocked threads:
One of these:
| Thread: SocketServerInvoker#0-3873 : priority:5, demon:false, threadId:23, threadState:WAITING, threadLockName:org.jboss.remoting.transport.socket.LRUPool@4f2076
|
| java.lang.Object.wait(Native Method)
| java.lang.Object.wait(Object.java:485)
| org.jboss.remoting.transport.socket.SocketServerInvoker.processInvocation(SocketServerInvoker.java:460)
| org.jboss.remoting.transport.socket.SocketServerInvoker.run(SocketServerInvoker.java:412)
| java.lang.Thread.run(Thread.java:619)
|
and several of these:
| Thread: SocketServerInvokerThread-68.142.219.226-0 : priority:5, demon:false, threadId:79, threadState:WAITING, threadLockName:org.jboss.remoting.transport.socket.ServerThread@134ab9b
|
| java.lang.Object.wait(Native Method)
| java.lang.Object.wait(Object.java:485)
| org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:282)
|
The call to ServerThread.wakeup is throwing an exception, caused by that "mismatch version of JBossSerialization signature" error. Assuming that we can track down the root cause of that error, it's still going to be possible for a socket timeout to occur here, so we have to be prepared for this failure. When wakeup throws the exception, it never makes it to the end of the method to invoke notify() to wake up the waiting ServerThread thread. So the ServerThreads just continue to disappear from the threadpool every time wakeup() throws an exception before it gets to notify(), until eventually, the threadpool is empty, and the SocketServerInvoker just sits and waits forever (deadlock).
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058483#4058483
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058483
18Â years, 10Â months
[JBoss Seam] - Re: ResourceNotFoundException after Seam 2.0 upgrade
by mgrouch
anonymous wrote :
| org.ajax4jsf.framework.resource.ResourceNotFoundException: Resource not registered : org.richfaces.renderkit.html.GradientA
| at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResource(ResourceBuilderImpl.java:367)
| at org.ajax4jsf.framework.resource.ResourceBuilderImpl.getResourceForKey(ResourceBuilderImpl.java:322)
| at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:152)
| at org.ajax4jsf.framework.resource.InternetResourceService.serviceResource(InternetResourceService.java:141)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:261)
| at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
| at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
| at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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:230)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:853)
| at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
| at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1513)
| at java.lang.Thread.run(Thread.java:595)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4058482#4058482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4058482
18Â years, 10Â months