-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: SQL Error: 208, SQLState: 42S02 ....What is this?
PostPosted: Mon May 17, 2004 10:16 pm 
Newbie

Joined: Mon May 17, 2004 9:58 pm
Posts: 1
I have a app using Hibernate with MS SQL and set a table named card in tomcat. when I run my app, tomcat log apprer following error messages:

<2004/05/18 09:29:24> WARN (JDBCExceptionReporter.java:38) - SQL Error: 208, SQLState: 42S02
<2004/05/18 09:29:24> WARN (SessionImpl.java:3358) - unclosed connection
<2004/05/18 09:29:24> ERROR (JDBCExceptionReporter.java:46) - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'CARD'.
<2004/05/18 09:29:24> WARN (JDBCExceptionReporter.java:38) - SQL Error: 16945, SQLState: HY000
<2004/05/18 09:29:24> ERROR (JDBCExceptionReporter.java:46) - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The cursor was not declared.
<2004/05/18 09:29:24> WARN (JDBCExceptionReporter.java:38) - SQL Error: 208, SQLState: 42S02
<2004/05/18 09:29:24> ERROR (JDBCExceptionReporter.java:46) - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'CARD'.
<2004/05/18 09:29:24> WARN (JDBCExceptionReporter.java:38) - SQL Error: 16945, SQLState: HY000
<2004/05/18 09:29:24> ERROR (JDBCExceptionReporter.java:46) - [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The cursor was not declared.
<2004/05/18 09:29:24> ERROR (JDBCException.java:38) - Could not execute query
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'CARD'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSCursorRequest.openCursor(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.execute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BasePreparedStatement.executeQuery(Unknown Source)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:205)
at net.sf.hibernate.impl.BatcherImpl.getResultSet(BatcherImpl.java:87)
at net.sf.hibernate.loader.Loader.getResultSet(Loader.java:795)
at net.sf.hibernate.hql.QueryTranslator.iterate(QueryTranslator.java:848)
at net.sf.hibernate.impl.SessionImpl.iterate(SessionImpl.java:1577)
at net.sf.hibernate.impl.QueryImpl.iterate(QueryImpl.java:27)
at com.uwc.portal.action.RechargeHandler.checkCardContent(RechargeHandler.java:73)
at com.uwc.portal.action.RechargeAction.rechargeExecute(RechargeAction.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
at org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:252)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at com.uwc.servlet.CharEncodingFilter.doFilter(CharEncodingFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:233)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:688)
at java.lang.Thread.run(Thread.java:534)

My card.hbm.xml:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping SYSTEM "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >
<hibernate-mapping>
<class name="com.uwc.portal.model.CardModel" table="CARD">
<id name="icdPk" column="iCD_PK" type="string">
<generator class="assigned"/>
</id>
<property name="ccdRN" column="cCD_RN" type="string"/>
<property name="dcdExpire" column="dCD_Expire" type="string"/>
<property name="icdCredit" column="iCD_Credit" type="string"/>
<property name="icdFaceValue" column="iCD_FaceValue" type="string"/>
<property name="icdSoldMoney" column="iCD_SoldMoney" type="string"/>
<property name="ccdGraph" column="cCD_Graph" type="string"/>
<property name="icdType" column="cCT_FK" type="string"/>
<property name="icdStatus" column="iCD_Status" type="string"/>
<property name="cpcFK" column="cPC_FK" type="integer"/>
<property name="cqcFK" column="cQC_FK" type="integer"/>
<property name="crcFK" column="cRC_FK" type="integer"/>
<property name="camFK" column="cAM_FK" type="integer"/>
</class>

</hibernate-mapping>

My hibernate.config:
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">


<hibernate-configuration>
<session-factory>
<property name="connection.datasource">java:comp/env/jdbc/DefaultDS</property>
<property name="show_sql">true</property>
<property name="dialect">net.sf.hibernate.dialect.SQLServerDialect</property>

<!--
<property name="dialect">net.sf.hibernate.dialect.HSQLDialect</property>
-->
<property name="cache.provider_class">net.sf.hibernate.cache.OSCacheProvider</property>
<property name="cache.use_query_cache">true</property>

<!-- Mapping files -->
<mapping resource="member.hbm.xml"/>
<mapping resource="game.hbm.xml"/>
<mapping resource="shoppingCart.hbm.xml"/>
<mapping resource="news.hbm.xml"/>
<mapping resource="order.hbm.xml"/>
<mapping resource="Card.hbm.xml"/>
</session-factory>
</hibernate-configuration>


It's seem to be MS SQL can't recognize "CARD". What should I do to solve this problem? Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 18, 2004 2:50 am 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
You don't have CARD table in you MSql model / schema.
Check your user name

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.