ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: Could not initialize DaoConfig when excecuting from a Quartz job
Date Tue, 05 Sep 2006 18:38:50 GMT
The DTD is wrong, but I do not think that is the issue.

Looks like the JNDI data source is buggered up somehow.

Can you get a connection from it using just a simple Java class?

Larry


On 9/5/06, Tuan.Le2@alconlabs.com <Tuan.Le2@alconlabs.com> wrote:
>
>
> In addition, the data source is defined below
>
> web.xml
>
>   <resource-ref>
>     <description>EZRA JDBC Connection</description>
>     <res-ref-name>jdbc/ezraDS</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>   </resource-ref>
>
> data-sources.xml
>
> <?xml version = '1.0' encoding = 'windows-1252'?>
> <data-sources
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd"
> schema-major-version="10" schema-minor-version="1">
>   <connection-pool name="EZRA Connection Pool"
>                    abandoned-connection-timeout="-1"
>                    time-to-live-timeout="-1"
>                    connection-retry-interval="1"
>
> disable-server-connection-pooling="false"
>                    inactivity-timeout="60"
>                    initial-limit="5"
>                    login-timeout="10"
>                    max-connect-attempts="5"
>                    max-connections="25"
>                    min-connections="5"
>                    used-connection-wait-timeout="60"
>                    num-cached-statements="0"
>                    validate-connection="false"
>                    property-check-interval="900">
>      <connection-factory
> factory-class="com.microsoft.sqlserver.jdbc.SQLServerDriver"
>                          user="xyz"
>                          password="blahblahblah"
>                          login-timeout="10"
>
> url="jdbc:sqlserver://myserverhost\EZRADEV:1434;database=EZRA">
>      </connection-factory>
>   </connection-pool>
>   <managed-data-source name="ezraDS"
>                        connection-pool-name="EZRA Connection Pool"
>                        jndi-name="jdbc/ezraDS">
>   </managed-data-source>
> </data-sources>
>
> THanks,
> Tuan
>
>  ________________________________
>  From: Tuan.Le2@AlconLabs.com [mailto:Tuan.Le2@AlconLabs.com]
> Sent: Tuesday, September 05, 2006 9:53 AM
> To: user-java@ibatis.apache.org
> Subject: Could not initialize DaoConfig when excecuting from a Quartz job
>
>
>
> 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>(ServiceRequestService.java:40)
> 06/09/05 09:23:17       at
> com.alcon.ezra.service.timer.StartPendingSRReviewAuditJob.execute(StartPendingSRReviewAuditJob.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>(ServiceRequestService.java:40)
> 06/09/05 09:23:17       at
> com.alcon.ezra.service.timer.ExcludeSRReviewAuditJob.execute(ExcludeSRReviewAuditJob.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>(ServiceRequestService.java:40)
> 06/09/05 09:23:17       at
> com.alcon.ezra.service.timer.ExpireSRReviewAuditJob.execute(ExpireSRReviewAuditJob.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">
>
> <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">
> <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.
>
>
>
>
>
> 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