-- Eduardo
Connecting to MySQL was not a problem...the data source was located
and the tables were created successfully. Queries will also work. I
can create a wiki if you wish, listing the general steps.
However, there seems to be a problem in executing an UPDATE query on
the XDM_DATASOURCE_DOCUMENTS table for xcap-caps app usage document.
The data meant to be updated in the XML column is too big for it..and
hence gives a Data Truncation error. I believe the xcap-caps global
document goes in the XML column.
Class where it is traced to:
org.mobicents.slee.xdm.server.datasource.jpa.Document JPA entity class
representing the table mentioned above.
DEBUG log trace:
-----------------------------
2009-02-13 14:45:17,008 DEBUG [org.hibernate.impl.SessionImpl] opened
session at timestamp: 12345165170
2009-02-13 14:45:17,008 DEBUG
[org.hibernate.ejb.AbstractEntityManagerImpl] Looking for a JTA
transaction to join
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.JDBCContext]
successfully registered Synchronization
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.AbstractBatcher]
about to open PreparedStatement (open PreparedStatements: 0, globally:
0)
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.ConnectionManager]
opening JDBC connection
2009-02-13 14:45:17,008 DEBUG [org.hibernate.SQL] update
XDM_DATASOURCE_DOCUMENTS set XML=?, ETAG=? where APPUSAGE_ID=? and
COLLECTION_NAME=? and DOCUMENT_NAME=?
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.AbstractBatcher]
about to close PreparedStatement (open PreparedStatements: 1,
globally: 1)
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.ConnectionManager]
aggressively releasing JDBC connection
2009-02-13 14:45:17,008 DEBUG [org.hibernate.jdbc.ConnectionManager]
releasing JDBC connection [ (open PreparedStatements: 0, globally: 0)
(open ResultSets: 0, globally: 0)]
2009-02-13 14:45:17,008 DEBUG
[org.hibernate.util.JDBCExceptionReporter] could not execute update
query [update XDM_DATASOURCE_DOCUMENTS set XML=?, ETAG=? where
APPUSAGE_ID=? and COLLECTION_NAME=? and DOCUMENT_NAME=?]
com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for
column 'XML' at row 1
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2939)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3249)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1268)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1541)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1455)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1440)
at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
at org.hibernate.hql.ast.exec.BasicExecutor.execute(BasicExecutor.java:75)
at org.hibernate.hql.ast.QueryTranslatorImpl.executeUpdate(QueryTranslatorImpl.java:396)
at org.hibernate.engine.query.HQLQueryPlan.performExecuteUpdate(HQLQueryPlan.java:259)
at org.hibernate.impl.SessionImpl.executeUpdate(SessionImpl.java:1141)
at org.hibernate.impl.QueryImpl.executeUpdate(QueryImpl.java:94)
at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)
at org.mobicents.slee.xdm.server.datasource.jpa.JPADataSource.updateDocument(JPADataSource.java:100)
at org.openxdm.xcap.server.slee.resource.datasource.DataSourceSbbInterface.updateDocument(DataSourceSbbInterface.java:114)
at org.openxdm.xcap.server.slee.RequestProcessorSbb.put(RequestProcessorSbb.java:1420)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnObject(SbbLocalObjectInterceptor.java:72)
at org.openxdm.xcap.server.slee.RequestProcessorSbbLocalObjectImpl.put(RequestProcessorSbbLocalObjectImpl.java)
at org.openxdm.xcap.server.slee.AbstractAppUsageSbb.updateXCAPCapsGlobalDoc(AbstractAppUsageSbb.java:202)
at org.openxdm.xcap.server.slee.AbstractAppUsageSbb.onServiceStartedEvent(AbstractAppUsageSbb.java:252)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(SbbEntity.java:871)
at org.mobicents.slee.runtime.EventRouterImpl.routeQueuedEvent(EventRouterImpl.java:892)
at org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:64)
at org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:121)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
2009-02-13 14:45:17,008 WARN
[org.hibernate.util.JDBCExceptionReporter] SQL Error: 0, SQLState:
01004
2009-02-13 14:45:17,008 ERROR
[org.hibernate.util.JDBCExceptionReporter] Data truncation: Data too
long for column 'XML' at row 1
2009-02-13 14:45:17,008 DEBUG
[org.hibernate.ejb.AbstractEntityManagerImpl] mark transaction for
rollback
2009-02-13 14:45:17,008 ERROR
[org.openxdm.xcap.server.slee.RequestProcessorSbb]
javax.persistence.PersistenceException:
org.hibernate.exception.GenericJDBCException: could not execute update
query
2009-02-13 14:45:17,008 DEBUG
[org.openxdm.xcap.server.slee.resource.appusagecache.AppUsageCacheResourceAdaptorSbbInterface]
release(auid=xcap-caps)
2009-02-13 14:45:17,008 DEBUG
[org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor]
Invocation resulted in exception: null
2009-02-13 14:45:17,023 ERROR [STDERR]
org.openxdm.xcap.common.error.InternalServerErrorException: Failed to
serialize resulting dom document to string
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.openxdm.xcap.server.slee.RequestProcessorSbb.put(RequestProcessorSbb.java:1428)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2009-02-13 14:45:17,023 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:585)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.mobicents.slee.container.deployment.interceptors.SbbLocalObjectInterceptor.invokeAndReturnObject(SbbLocalObjectInterceptor.java:72)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.openxdm.xcap.server.slee.RequestProcessorSbbLocalObjectImpl.put(RequestProcessorSbbLocalObjectImpl.java)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.openxdm.xcap.server.slee.AbstractAppUsageSbb.updateXCAPCapsGlobalDoc(AbstractAppUsageSbb.java:202)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.openxdm.xcap.server.slee.AbstractAppUsageSbb.onServiceStartedEvent(AbstractAppUsageSbb.java:252)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2009-02-13 14:45:17,023 ERROR [STDERR] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2009-02-13 14:45:17,023 ERROR [STDERR] at
java.lang.reflect.Method.invoke(Method.java:585)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.mobicents.slee.runtime.sbbentity.SbbEntity.invokeEventHandler(SbbEntity.java:871)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.mobicents.slee.runtime.EventRouterImpl.routeQueuedEvent(EventRouterImpl.java:892)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.mobicents.slee.runtime.EventRouterImpl.access$100(EventRouterImpl.java:64)
2009-02-13 14:45:17,023 ERROR [STDERR] at
org.mobicents.slee.runtime.EventRouterImpl$EventExecutor.run(EventRouterImpl.java:121)
2009-02-13 14:45:17,023 ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
2009-02-13 14:45:17,023 ERROR [STDERR] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
2009-02-13 14:45:17,023 ERROR [STDERR] at
java.lang.Thread.run(Thread.java:595)
Appreciate some help :)
aayush
-- Eduardo
I think i found an alternative solution.....i will need to test it out
though !!
Refer to this message---> This guy was getting this error with JBOSS
Portals+ MySQL combo:
http://www.mail-archive.com/jboss...@lists.sourceforge.net/msg112526.html
He added jdbcCompliantTruncation=false property to the connection URL
and it worked for him.
There is also a bugsy entry on this issue on JBOSS lists:
https://jira.jboss.org/jira/browse/JBPORTAL-533
Will keep you posted..
aayush
On the load tests, are those sipp scripts you can share?
-- Eduardo
-- Eduardo