views:

13

answers:

0

I am trying to configure osworkflow with my database and load workflow from database. But I am getting error while I am trying to load workflow from database.

Error:

com.opensymphony.workflow.FactoryException: Could not read workflow names from datasource root cause: java.lang.NullPointerException at com.opensymphony.workflow.loader.JDBCWorkflowFactory.initDone(JDBCWorkflowFactory.java:141) at com.opensymphony.workflow.config.DefaultConfiguration.load(DefaultConfiguration.java:177) at com.opensymphony.workflow.AbstractWorkflow.getConfiguration(AbstractWorkflow.java:154)

Here is my osworkflow.xml

 <persistence class="com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore">
    <property key="datasource" value="jdbc/DefaultDS"/> 
    <property key = "entry.sequence" 
    value = "SELECT max(id)+10 FROM OS_WFENTRY" /> 
    <property key="entry.table" value="OS_WFENTRY"/> 
    <property key="entry.id" value="ID"/> 
    <property key="entry.name" value="NAME"/> 
    <property key="entry.state" value="STATE"/>          
    <property key = "step.sequence" 
    value = "SELECT max (ID) +1 FROM OS_STEPIDS" />
    <property key="step.sequence.increment" 
    value="INSERT INTO OS_STEPIDS (ID) values (null)"/>
    <property key="step.sequence.retrieve" 
    value="SELECT max(ID) FROM OS_STEPIDS"/>
    <property key="entry.sequence.increment" 
    value="INSERT INTO OS_ENTRYIDS (ID) values (null)"/>
    <property key="entry.sequence.retrieve" 
    value="SELECT max(ID) FROM OS_ENTRYIDS"/>               
    <property key="history.table" value="OS_HISTORYSTEP"/> 
    <property key="current.table" value="OS_CURRENTSTEP"/> 
    <property key="historyPrev.table" value="OS_HISTORYSTEP_PREV"/> 
    <property key="currentPrev.table" value="OS_CURRENTSTEP_PREV"/> 
    <property key="step.id" value="ID"/> 
    <property key="step.entryId" value="ENTRY_ID"/> 
    <property key="step.stepId" value="STEP_ID"/> 
    <property key="step.actionId" value="ACTION_ID"/> 
    <property key="step.owner" value="OWNER"/> 
    <property key="step.caller" value="CALLER"/> 
    <property key="step.startDate" value="START_DATE"/> 
    <property key="step.finishDate" value="FINISH_DATE"/> 
    <property key="step.dueDate" value="DUE_DATE"/> 
    <property key="step.status" value="STATUS"/> 
    <property key="step.previousId" value="PREVIOUS_ID"/> 
</persistence>  
<factory class="com.opensymphony.workflow.loader.JDBCWorkflowFactory">
    <arg name="datasource" value="jdbc/DefaultDS"/>
</factory>