jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dada_ganguly <dada_gang...@cooltoad.com>
Subject Problem uploading document to a versionable node in jackrabbit
Date Mon, 03 Aug 2009 09:20:50 GMT

I am trying to upload a document to a versionable node in jackrabbit. I can
successfully save the input stream to a node’s property but I get error on
check-in of node.
Below given is the code snippet and the workspace.xml properties which I
have used to connect jackrabbit with Oracle 10g. Please help, if anybody has
a solution to this problem.

Code is 
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      TransientRepository repository = new
TransientRepository("D:/ATT_Working/VUIT-Configurations/Production-Data-DP/repository.xml",
"D:/ATT_Working/VUIT-Configurations/Production-Data-DP" );


                                InputStream input = new
FileInputStream("C:/Documents and
Settings/Dushyant_Pandit/Desktop/ATTENTMZ_VUIT_Data_Upload_Deviations_Summary_07292009.xls");
                                Session  branchSession = (SessionImpl)
repository.login( new SimpleCredentials("kr977s", "ad".toCharArray()),
"z09.02.Release");
                
                 Node root = branchSession.getRootNode();
                                 Node tempNode  = root.addNode("tempNode");
                                 tempNode.addMixin("mix:versionable");
                                 tempNode.checkout();
                                 tempNode.setProperty("FileAttachment",
input);
                                 tempNode.getSession().save();
                                 tempNode.checkin();
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Workspace.xml 

        <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
                                                
                                                                           
                                                                            
                                                       
                                                       
                </PersistenceManager>
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Repository.xml

           <PersistenceManager
class="org.apache.jackrabbit.core.persistence.bundle.OraclePersistenceManager">
                                                
                                                                           
                                                                                         
                        
                                                       
                                                       
                                                        
                </PersistenceManager>

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Error Logs

ERROR 03-08 14:26:45,980 (ConnectionRecoveryManager.java:logException:447)    
could not execute statement, reason: ORA-00942: table or view does not exist
, state/code: 42000/942
ERROR 03-08 14:26:45,980 (BundleBinding.java:writeState:607)       Error
while storing blob. id=9c48ce3d-e3dd-4230-927b-84cafeb4ae6c/{}FileAttachment
idx=0 size=73216
java.sql.SQLException: ORA-00942: table or view does not exist

      at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
      at
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:181)
      at
oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:420)
      at
oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:896)
      at
oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:452)
      at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986)
      at
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2888)
      at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:2979)
      at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:365)
      at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmtInternal(ConnectionRecoveryManager.java:292)
      at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:257)
      at
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.executeStmt(ConnectionRecoveryManager.java:237)
      at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager$DbBlobStore.put(BundleDbPersistenceManager.java:1400)
      at
org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeState(BundleBinding.java:595)
      at
org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeBundle(BundleBinding.java:273)
      at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1028)
      at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:703)
      at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:643)
      at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:524)
      at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
      at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:857)
      at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
      at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
      at
org.apache.jackrabbit.core.version.AbstractVersionManager$WriteOperation.save(AbstractVersionManager.java:180)
      at
org.apache.jackrabbit.core.version.AbstractVersionManager.checkin(AbstractVersionManager.java:378)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl$2.run(VersionManagerImpl.java:302)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced(VersionManagerImpl.java:579)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl.checkin(VersionManagerImpl.java:298)
      at
org.apache.jackrabbit.core.version.XAVersionManager.checkin(XAVersionManager.java:162)
      at org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2962)
      at com.att.cct.ivrtool.scripts.DeleteNode.main(DeleteNode.java:62)
ERROR 03-08 14:26:46,011 (BundleDbPersistenceManager.java:storeBundle:1036)   
failed to write bundle: 9c48ce3d-e3dd-4230-927b-84cafeb4ae6c
java.io.IOException: Error while storing blob.
id=9c48ce3d-e3dd-4230-927b-84cafeb4ae6c/{}FileAttachment idx=0 size=73216
      at
org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeState(BundleBinding.java:608)
      at
org.apache.jackrabbit.core.persistence.bundle.util.BundleBinding.writeBundle(BundleBinding.java:273)
      at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.storeBundle(BundleDbPersistenceManager.java:1028)
      at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.putBundle(AbstractBundlePersistenceManager.java:703)
      at
org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.store(AbstractBundlePersistenceManager.java:643)
      at
org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.store(BundleDbPersistenceManager.java:524)
      at
org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
      at
org.apache.jackrabbit.core.state.SharedItemStateManager.update(SharedItemStateManager.java:857)
      at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:324)
      at
org.apache.jackrabbit.core.state.LocalItemStateManager.update(LocalItemStateManager.java:300)
      at
org.apache.jackrabbit.core.version.AbstractVersionManager$WriteOperation.save(AbstractVersionManager.java:180)
      at
org.apache.jackrabbit.core.version.AbstractVersionManager.checkin(AbstractVersionManager.java:378)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl$2.run(VersionManagerImpl.java:302)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl$DynamicESCFactory.doSourced(VersionManagerImpl.java:579)
      at
org.apache.jackrabbit.core.version.VersionManagerImpl.checkin(VersionManagerImpl.java:298)
      at
org.apache.jackrabbit.core.version.XAVersionManager.checkin(XAVersionManager.java:162)
      at org.apache.jackrabbit.core.NodeImpl.checkin(NodeImpl.java:2962)
      at com.att.cct.ivrtool.scripts.DeleteNode.main(DeleteNode.java:62)
ERROR 03-08 14:26:46,011 (BundleDbPersistenceManager.java:logException:1244) 
rollback failed
ERROR 03-08 14:26:46,011 (BundleDbPersistenceManager.java:logException:1246)        
Reason: Closed Connection
ERROR 03-08 14:26:46,011 (BundleDbPersistenceManager.java:logException:1247)    
State/Code: null/17008
ERROR 03-08 14:26:46,542 (ConnectionRecoveryManager.java:logException:447)    
could not execute statement, reason: ORA-00942: table or view does not exist
, state/code: 42000/942
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Thanks!

-- 
View this message in context: http://www.nabble.com/Problem-uploading-document-to-a-versionable-node-in-jackrabbit-tp24787649p24787649.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message