我成功地编写了部署程序扩展和存储扩展。
以下是我从核心日志中获取的日志,显示所有内容都已完美加载!!
2013-01-08 11:30:19,759 INFO BundleConfigurationLoader - Added 'PublishAction' for storage 'persistence' with 'com.tridion.storage.dao.JPAPublishActionDAO'.
2013-01-08 11:30:38,259 DEBUG JPAPublishActionDAO - Constructor of JPAPublishActionDAO- storageId:searchdb
2013-01-08 11:30:38,259 DEBUG JPAPublishActionDAO - Constructor of JPAPublishActionDAO- entityManagerFactory:true
2013-01-08 11:30:38,259 DEBUG JPAPublishActionDAO - Constructor of JPAPublishActionDAO- storageName:PublishAction
2013-01-08 11:19:38,400 INFO Module - No TransformProcessor configured, will not transform files before deployment for module com.tridion.custom.extensions.SearchPageDeployer
2013-01-08 11:30:38,400 DEBUG SearchPageDeployer - Constructor of SearchPageDeployer //This is my PageDeployer Constructor
2013-01-08 11:30:38,744 DEBUG SearchPageDeployer - Called processPage from SearchPageDeployer //This is my process Page of pagedeployer class
2013-01-08 11:30:38,572 DEBUG SearchPageDeployer - SearchPageDeployer Called processItem
2013-01-08 11:30:38,572 DEBUG StorageManagerFactory - Default storage provider has caching set to: false
2013-01-08 11:30:38,572 DEBUG StorageManagerFactory - Loaded following dao Properties[publication=0, typeMapping=PublishAction, storageId=searchdb, cached=false] for publication/typeMapping/itemExtension: 0 / PublishAction / null
2013-01-08 11:30:38,572 DEBUG StorageManagerFactory - Loading a non cached DAO for publicationId/typeMapping/itemExtension: 0 / PublishAction / null
2013-01-08 11:30:38,572 DEBUG StorageManagerFactory - Wrapping DAO's, currently 0 wrappers installed
2013-01-08 11:30:38,572 INFO JPAPublishActionDAO - Entering Method: JPAPublishActionDAO.PublishAction.store
2013-01-08 11:40:33,228 ERROR SearchPageDeployer - SearchPageDeployer - Exception occurred com.tridion.broker.StorageException: Unable to persist data entity, Error while commiting the transaction, Error while commiting the transaction
现在,当我尝试将数据存储在我的表中时,我收到“发生异常 com.tridion.broker.StorageException:无法持久化数据实体,提交事务时出错,提交事务时出错”
这是我的实体类的任何问题还是我缺少的东西。
编辑:在 logback xml 中启用记录器级别“ON”之后。
我在核心文件中遇到以下异常:
2013-01-08 14:42:10,713 DEBUG SQL - insert into AUTN_ITEMS (ACTION, FLAG, ITEM_TYPE, LAST_PUBLISHED_DATE, PUBLICATION_ID, SCHEMA_ID, TCMURI, URL, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)
2013-01-08 14:42:10,728 DEBUG AbstractBatcher - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
2013-01-08 14:42:10,744 DEBUG JDBCExceptionReporter - could not insert: [com.tridion.storage.dao.PublishAction] [insert into AUTN_ITEMS (ACTION, FLAG, ITEM_TYPE, LAST_PUBLISHED_DATE, PUBLICATION_ID, SCHEMA_ID, TCMURI, URL, ID) values (?, ?, ?, ?, ?, ?, ?, ?, ?)]
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot insert explicit value for identity column in table 'AUTN_ITEMS' when IDENTITY_INSERT is set to OFF.
谢谢