I have another question regarding modeshape.
Have someone ever tried to use modeshape on Websphere Application server, and using websphere jdbc-datasources in modeshape configuration for binary repository? If yes, how did you configure those datasources? Any special settings\hacks?
I am getting next error, when I try to add something to repository:
[4/21/14 9:59:10:188 GMT+03:00] 000003d2 BusinessExcep E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "addFile" on bean "BeanId(modeshape-integration#modeshape-integration-filerepository.jar#ModeShapeFileRepository, null)". Exception data: org.modeshape.jcr.value.ValueFormatException: Error converting InputStream to a BinaryValue
Caused by: com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: Statement is closed.
... 95 more
(complete logs in the attached files)
Some facts that are true for this case:
- for other types of binary repository, for example, "file", it works fine.
- Same JNDI name for same websphere datasource is used in infinispan configuration, and it works fine too. Also that is a proof that jndi name is valid and exist.
- If I specify a direct connection to DB in modeshape configuration - it works fine again.
- Same application with same configuration files works fine on Jboss eap 6.1.
I have tried to debug this error, and log above doesn't lie, it happens on the accessing prepared statement (initialization goes without error)
Line 393 of Database.class, procedure retrieveContentSQL inside org.modeshape.jcr.value.binary
I have tried to google this websphere error (about "statement is closed"), but there either:
- unrelated to my case causes
- no solution for same cause described (meaning error happens on access to previously prepared statement)
- suggestion to reinitialize prepared statement as a local variable (that is not good solution since I have to modify modeshape package myself, and the sole purpose of prepared statement is defeated, if I will reinitialize it every time).
Since none other parts of application I'm working on is using modeshape database in anyway, and it is unlikely that I will get inconsistent changes, I can use modeshape configured for direct database connection in this case
But I would be greatful for possible reasons of this error, or settings that I should set for Websphere datasource, or what is the difference between datasouces of Websphere and Jboss, that causes this problem.
Application server: Websphere Standalone server 8.5.5, with Java SDK 1.7_64 installed
Modeshape version: 3.7.2 Final
Database: Oracle 11g r2 \ MS SQL Server 2012 (tested on both, everything above is true for both databases)
error_logs.zip 16.3 KB