ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Tuan....@AlconLabs.com>
Subject Could not initialize DaoConfig when excecuting from a Quartz job
Date Tue, 05 Sep 2006 16:53:23 GMT
Hi,
 
I have a simple SQL insert statement that got executed fine if it's
called manually within an application. However, when I configured Quartz
1.5.2 to execute that same SQL insert statement, it threw Error parsing
XML during web containter startup.
 
I found a few posted messages related to Quartz issue in this forum but
their problems were not the same. 
 
Has anyone encountered this kind of error.
 
Thanks,
Tuan
 
Exeception:

06/09/05 09:23:17 Exception in thread "DefaultQuartzScheduler_Worker-2"
java.lang.NoClassDefFoundError
06/09/05 09:23:17       at
com.alcon.ezra.service.ServiceRequestService.<init>(ServiceRequestServic
e.java:40)
06/09/05 09:23:17       at
com.alcon.ezra.service.timer.StartPendingSRReviewAuditJob.execute(StartP
endingSRReviewAuditJob.java:39)
06/09/05 09:23:17       at
org.quartz.core.JobRunShell.run(JobRunShell.java:203)
 
06/09/05 09:23:17       at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java
:520)
06/09/05 09:23:17 Exception in thread "DefaultQuartzScheduler_Worker-0"
java.lang.NoClassDefFoundError
06/09/05 09:23:17       at
com.alcon.ezra.service.ServiceRequestService.<init>(ServiceRequestServic
e.java:40)
06/09/05 09:23:17       at
com.alcon.ezra.service.timer.ExcludeSRReviewAuditJob.execute(ExcludeSRRe
viewAuditJob.java:39)
06/09/05 09:23:17       at
org.quartz.core.JobRunShell.run(JobRunShell.java:203)
 
06/09/05 09:23:17       at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java
:520)
06/09/05 09:23:17 Exception in thread "DefaultQuartzScheduler_Worker-1"
java.lang.ExceptionInInitializerError
06/09/05 09:23:17       at
com.alcon.ezra.service.ServiceRequestService.<init>(ServiceRequestServic
e.java:40)
06/09/05 09:23:17       at
com.alcon.ezra.service.timer.ExpireSRReviewAuditJob.execute(ExpireSRRevi
ewAuditJob.java:39)
06/09/05 09:23:17       at
org.quartz.core.JobRunShell.run(JobRunShell.java:203)
 
06/09/05 09:23:17       at
org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java
:520)
06/09/05 09:23:17 Caused by: java.lang.RuntimeException: Description.
Cause: java.lang.RuntimeException: Could not initialize DaoConfig.
Cause: com.ibatis.dao.client.DaoException: Error while configuring
DaoManager.  Cause: com.ibatis.common.exception.NestedRuntimeException:
Error occurred.  Cause: com.ibatis.common.xml.NodeletException: Error
parsing XML.  Cause: com.ibatis.common.exception.NestedRuntimeException:
Error parsing XPath '/sqlMapConfig/transactionManager/dataSource/end()'.
Cause: com.ibatis.sqlmap.client.SqlMapException: There was an error
configuring JndiDataSourceDaoTransactionPool. Cause:
javax.naming.NamingException: Not in an application scope - start OC4J
with the -userThreads switch if using user-created threads
Caused by: javax.naming.NamingException: Not in an application scope -
start OC4J with the -userThreads switch if using user-created threads
Caused by: com.ibatis.sqlmap.client.SqlMapException: There was an error
configuring JndiDataSourceDaoTransactionPool. Cause:
javax.naming.NamingException: Not in an application scope - start OC4J
with the -userThreads switch if using user-created threads
 
 
 
sql-map-config.xml
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMapConfig
        PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
        "http://www.ibatis.com/dtd/sql-map-config-2.dtd
<http://www.ibatis.com/dtd/sql-map-config-2.dtd> ">
 
<sqlMapConfig>
    <!-- there are plenty of other optional settings, see the
ibatis-sql-maps doc -->
    <settings enhancementEnabled="true"  useStatementNamespaces="true"/>
 
    <!--
      Configure a datasource to use with this SQL Map using JNDI
      For the EZRA project the ezraDS JNDI is defined in datasources.xml
which
      is managed by the OC4J container
    -->
    <transactionManager type="JDBC">
        <dataSource type="JNDI">
            <property name="DataSource"
value="java:comp/env/jdbc/ezraDS"/>
        </dataSource>
    </transactionManager>
 
    <!-- 
      Identify all SQL Map XML files to be loaded by this SQL map.
      Notice the paths are relative to the classpath
    -->
    <sqlMap
resource="com/alcon/ezra/persistence/sql/service-request.xml"/>  
</sqlMapConfig>
 
 
service-request.xml
 
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd
<http://www.ibatis.com/dtd/sql-map-2.dtd> ">
<sqlMap namespace="ServiceRequest">
    <typeAlias alias="srObject"
type="com.alcon.ezra.vo.ServiceRequestVo" />
    <typeAlias alias="mapObject" type="java.util.HashMap"/>  
    <typeAlias alias="wfAuditObject"
type="com.alcon.ezra.vo.WorkflowAuditVo" />    
    <typeAlias alias="reviewObject" type="com.alcon.ezra.vo.ReviewVo" />

    <typeAlias alias="noteObject" type="com.alcon.ezra.vo.NoteVo" />

    <typeAlias alias="activityObject"
type="com.alcon.ezra.vo.ActivityVo" />   
    <typeAlias alias="codeObject" type="com.alcon.ezra.vo.CodeVo" />

    <typeAlias alias="orderObject" type="com.alcon.ezra.vo.OrderVo" />

    <typeAlias alias="partObject" type="com.alcon.ezra.vo.PartVo" />

    <typeAlias alias="ruleOutObject"
type="com.alcon.ezra.vo.ServiceRequestRuleOutVo" />          
    <!-- ######################################### -->
    <!--  Service Request Data                     -->
    <!-- ######################################### -->     
    <resultMap id="srResult" class="com.alcon.ezra.vo.ServiceRequestVo">
        <result column="srvc_request_num" property="serviceRequestId" />

    </resultMap>
     
    <insert id="insertStartedPendingSRAudit">
       INSERT INTO ra_wf_audit_t (srvc_request_num, 
                                  wf_action_cd, 
                                  last_updated_by,
                                  last_updated_dt)
       SELECT srvc_request_num, 
              'SPE', 
              lower(fe_user_id), 
              GETDATE()
       FROM   sr_srvc_request_v
       WHERE  srvc_request_num NOT IN (SELECT srvc_request_num 
                                       FROM ra_wf_audit_t 
                                       WHERE wf_action_cd = 'SPE' 
                                       OR wf_action_cd = 'EXC')
    </insert>       
   </sqlMap>
 


This e-mail (including any attachments) is confidential and may be legally privileged. If
you are not an intended recipient or an authorized representative of an intended recipient,
you are prohibited from using, copying or distributing the information in this e-mail or its
attachments. If you have received this e-mail in error, please notify the sender immediately
by return e-mail and delete all copies of this message and any attachments.
Thank you.

Mime
View raw message