打开JDBC连接 - 单击提交到查询数据库后没有响应,

时间:2013-12-21 19:03:50

标签: spring hibernate

我得到.....打开JDBC连接 - 在控制台上进行堆栈跟踪,但它在那里挂起,之后没有响应..下面是我的配置..

<bean id="dataSource" destroy-method="close" class="org.apache.commons.dbcp.BasicDataSource">
    <property name="driverClassName" value="com.mysql.jdbc.Driver" />
    <property name="url" value="jdbc:mysql://localhost:3306/db1" />
    <property name="username" value="root" />
    <property name="password" value="" />
  </bean> 

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
    <property name="dataSource"><ref bean="dataSource" /></property> 
    <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
                <prop key="hibernate.show_sql">false</prop>
                <prop key="hibernate.c3p0.minPoolSize">5</prop>
                <prop key="hibernate.c3p0.maxPoolSize">25</prop>
                <prop key="hibernate.c3p0.timeout">600</prop>
                <prop key="hibernate.c3p0.max_statement">50</prop>
                <prop key="hibernate.c3p0.testConnectionOnCheckout">false</prop>
                <prop key="hibernate.c3p0.debugUnreturnedConnectionStackTraces">true</prop>
                <prop key="hibernate.c3p0.unreturnedConnectionTimeout">1</prop>
            </props>
        </property>
    <property name="packagesToScan">
    <list>
    <value>com.fsft.model.beans</value>
    </list>
    </property>
</bean>

<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
            <property name="sessionFactory"><ref local="sessionFactory" /></property>
    </bean>

 <bean id="baseDAO" class="com.common.dao.BaseDAOImpl">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>

    <bean id="serviceDAO" class="com.dao.ServiceDAOImpl">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>

这是我的堆栈跟踪 在打开最后一行的JDBC连接后......它挂在那里,我的意思是它不会前进

2013-12-22 00:13:35,078 DEBUG [org.hibernate.hql.ast.ErrorCounter] - <throwQueryException() : no errors>
2013-12-22 00:13:35,078 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] - <select << begin [level=1, statement=select]>
2013-12-22 00:13:35,079 DEBUG [org.hibernate.hql.ast.tree.FromElement] - <FromClause{level=1} :  com.model.beans.JobPostings (jobPost) -> jobpo0_>
2013-12-22 00:13:35,080 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - <Resolved :  jobPost -> jobpo0_.JOB_POSTING_ID>
2013-12-22 00:13:35,080 DEBUG [org.hibernate.hql.ast.tree.FromElement] - <handling property dereference [com.model.beans.JobPostings (jobPost) -> jobPostingId (class)]>
2013-12-22 00:13:35,080 DEBUG [org.hibernate.hql.ast.tree.DotNode] - <getDataType() : jobPostingId -> org.hibernate.type.LongType@30097f5f>
2013-12-22 00:13:35,081 DEBUG [org.hibernate.hql.ast.tree.FromReferenceNode] - <Resolved :  jobPost.jobPostingId -> jobpo0_.JOB_POSTING_ID>
2013-12-22 00:13:35,081 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] - <select : finishing up [level=1, statement=select]>
2013-12-22 00:13:35,081 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] - <processQuery() :  ( SELECT ( FromClause{level=1} bigg._job_postings jobpo0_ ) ( where ( = ( jobpo0_.JOB_POSTING_ID jobpo0_.JOB_POSTING_ID jobPostingId ) 4 ) ) )>
2013-12-22 00:13:35,082 DEBUG [org.hibernate.hql.ast.HqlSqlWalker] - <Derived SELECT clause created.>
2013-12-22 00:13:35,082 DEBUG [org.hibernate.hql.ast.util.JoinProcessor] - <Using FROM fragment [bigg._job_postings jobpo0_]>
2013-12-22 00:13:35,082 DEBUG [org.hibernate.hql.antlr.HqlSqlBaseWalker] - <select >> end [level=1, statement=select]>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.hql.ast.AST] - <--- SQL AST ---
 \-[SELECT] QueryNode: 'SELECT'  querySpaces (bigg._job_postings)
    +-[SELECT_CLAUSE] SelectClause: '{derived select clause}'
    |  +-[SELECT_EXPR] SelectExpressionImpl: 'jobpo0_.JOB_POSTING_ID as JOB1_5_' {FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=jobPost,role=null,tableName=bigg._job_postings,tableAlias=jobpo0_,origin=null,colums={,className=com.model.beans.JobPostings}}}
    |  \-[SQL_TOKEN] SqlFragment: 'jobpo0_.COMP_NAME as COMP2_5_, jobpo0_.COMP_URL as COMP3_5_, jobpo0_.CONT_EMAIL as CONT4_5_jobpo0_.NUM_POSTS as NUM5_5_'
    +-[FROM] FromClause: 'from' FromClause{level=1, fromElementCounter=1, fromElements=1, fromElementByClassAlias=[jobPost], fromElementByTableAlias=[jobpo0_], fromElementsByPath=[], collectionJoinFromElementsByPath=[], impliedElements=[]}
    |  \-[FROM_FRAGMENT] FromElement: 'bigg._job_postings jobpo0_' FromElement{explicit,not a collection join,not a fetch join,fetch non-lazy properties,classAlias=jobPost,role=null,tableName=bigg._job_postings,tableAlias=jobpo0_,origin=null,colums={,className=com.model.beans.JobPostings}}
    \-[WHERE] SqlNode: 'where'
       \-[EQ] BinaryLogicOperatorNode: '='
          +-[DOT] DotNode: 'jobpo0_.JOB_POSTING_ID' {propertyName=jobPostingId,dereferenceType=4,propertyPath=jobPostingId,path=jobPost.jobPostingId,tableAlias=jobpo0_,className=com.model.beans.JobPostings,classAlias=jobPost}
          |  +-[ALIAS_REF] IdentNode: 'jobpo0_.JOB_POSTING_ID' {alias=jobPost, className=com.model.beans.JobPostings, tableAlias=jobpo0_}
          |  \-[IDENT] IdentNode: 'jobPostingId' {originalText=jobPostingId}
          \-[NUM_INT] LiteralNode: '4'
>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.hql.ast.ErrorCounter] - <throwQueryException() : no errors>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - <HQL: from com.model.beans.JobPostings jobPost where jobPost.jobPostingId=4>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] - <SQL: select jobpo0_.JOB_POSTING_ID as JOB1_5_, jobpo0_.COMP_NAME as COMP2_5_, jobpo0_.COMP_URL as COMP3_5_ from bigg._job_postings jobpo0_ where jobpo0_.JOB_POSTING_ID=4>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.hql.ast.ErrorCounter] - <throwQueryException() : no errors>
2013-12-22 00:13:35,084 DEBUG [org.hibernate.engine.query.HQLQueryPlan] - <HQL param location recognition took 0 mills (from JobPostings jobPost where jobPost.jobPostingId=4)>
2013-12-22 00:13:35,085 DEBUG [org.hibernate.engine.query.QueryPlanCache] - <located HQL query plan in cache (from JobPostings jobPost where jobPost.jobPostingId=4)>
2013-12-22 00:13:35,085 DEBUG [org.hibernate.engine.query.HQLQueryPlan] - <find: from JobPostings jobPost where jobPost.jobPostingId=4>
2013-12-22 00:13:35,085 DEBUG [org.hibernate.engine.QueryParameters] - <named parameters: {}>
2013-12-22 00:13:35,085 DEBUG [org.hibernate.jdbc.AbstractBatcher] - <about to open PreparedStatement (open PreparedStatements: 0, globally: 0)>
2013-12-22 00:13:35,085 DEBUG [org.hibernate.jdbc.ConnectionManager] - <opening JDBC connection>

0 个答案:

没有答案