Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Excel
FOR UPDATE clause
Eduardo M��ndez
2009-04-16 10:13:01.0
I have succesfully configure Adobe Livecycle Dataservices with the Excel driver. SELECT's, INSERT's and DELETE's work fine but UPDATE's don't.

I have configured the Hibernate Excel Dialect as per your instructions and when I update something I always get:

FOR UPDATE has been used but your connection is in readonly mode.

Any clue?.

Thanks,


Eduardo.

exception: org.hibernate.exception.SQLGrammarException: could not load an entity: [test.Company#4]
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1874)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:48)
at org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:42)
at org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:3049)
at org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:399)
at org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:375)
at org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:139)
at org.hibernate.event.def.DefaultLoadEventListener.lockAndLoad(DefaultLoadEventListener.java:297)
at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:106)
at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:878)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:869)
at org.hibernate.impl.SessionImpl.get(SessionImpl.java:864)
at flex.data.assemblers.HibernateType.getObjectFromServer(HibernateType.java:469)
at flex.data.assemblers.HibernateAssembler.updateItem(HibernateAssembler.java:1289)
at flex.data.adapters.JavaAdapter.doUpdateItem(JavaAdapter.java:1893)
at flex.data.adapters.JavaAdapter.invokeAssemblerSync(JavaAdapter.java:1685)
at flex.data.adapters.JavaAdapter.invokeBatchOperation(JavaAdapter.java:1546)
at flex.data.adapters.JavaAdapter.invoke(JavaAdapter.java:617)
at flex.messaging.services.MessageService.serviceMessage(MessageService.java:262)
at flex.data.DataService.sendBatchToAdapter(DataService.java:1412)
at flex.data.DataService.serviceTransactedMessage(DataService.java:787)
at flex.data.DataService.serviceMessage(DataService.java:465)
at flex.messaging.MessageBroker.routeMessageToService(MessageBroker.java:1495)
at flex.messaging.endpoints.AbstractEndpoint.serviceMessage(AbstractEndpoint.java:882)
at flex.messaging.endpoints.amf.MessageBrokerFilter.invoke(MessageBrokerFilter.java:121)
at flex.messaging.endpoints.amf.LegacyFilter.invoke(LegacyFilter.java:158)
at flex.messaging.endpoints.amf.SessionFilter.invoke(SessionFilter.java:44)
at flex.messaging.endpoints.amf.BatchProcessFilter.invoke(BatchProcessFilter.java:67)
at flex.messaging.endpoints.amf.SerializationFilter.invoke(SerializationFilter.java:146)
at flex.messaging.endpoints.BaseHTTPEndpoint.service(BaseHTTPEndpoint.java:278)
at flex.messaging.MessageBrokerServlet.service(MessageBrokerServlet.java:315)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:613)
Caused by: java.sql.SQLException: FOR UPDATE has been used but your connection is in readonly mode.
at com.hxtt.global.SQLState.SQLException(Unknown Source)
at com.hxtt.sql.de.a(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.bm.a(Unknown Source)
at com.hxtt.sql.ag.a(Unknown Source)
at com.hxtt.sql.dg.executeQuery(Unknown Source)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:76)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.loadEntity(Loader.java:1860)
... 45 more
Re:FOR UPDATE clause
Eduardo M��ndez
2009-04-16 10:15:46.0
I forgot to include the statement that Hibernate is generating:

Hibernate: select company0_.id as id0_0_, company0_.name as name0_0_ from company company0_ where company0_.id=? for update

Re:Re:FOR UPDATE clause
HXTT Support
2009-04-16 18:23:26.0
It's limited by a readonly connection. You can remove For Update clause or use connection.createStatement(ResultSet.CONCUR_UPDATABLE,....)
Re:Re:FOR UPDATE clause
HXTT Support
2009-04-16 18:27:02.0
Since you're using PreparedStatement, you should use conneciton.prepearStatement(sql, ResultSet.CONCUR_UPDATABLE,....)
Re:FOR UPDATE clause
Eduardo M��ndez
2009-04-16 22:28:49.0
Thanks for answering but I'm not using PreparedStatement directly (Hibernate does) so it has to be something in Hibernate's configuration. For the same reason, I can't remove the FOR UPDATE clause (Hibernate generates it).
Re:Re:Re:Re:Re:FOR UPDATE clause
HXTT Support
2009-04-20 06:46:32.0
Please download the latest package, which allows FOR UPDATE clause to get an Updatable ResultSet from a read only connection now.
Re:FOR UPDATE clause
Eduardo M��ndez
2009-04-20 07:16:24.0
I'll do but, in the meantime, I have modified your hibernate dialect with:

public String getForUpdateString()
{
return "";
}

So far, seems to work fine.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap