-->
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: Problem at insert, ASA Error -143: Column '@p0' not found.
PostPosted: Thu Feb 10, 2005 6:36 am 
Beginner
Beginner

Joined: Thu Jan 22, 2004 6:16 am
Posts: 40
Location: Luxembourg
Could someone please help me with the following error :

[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.impl.BatcherImpl - about to open: 0 open PreparedStatements, 0 open ResultSets
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.SQL - insert into BC_CHANNEL_STATUS (timestamp, status, statusMsg, cartridge, objectType, objectID) values (?, ?, ?, ?, ?, ?)
select @@identity
Hibernate: insert into BC_CHANNEL_STATUS (timestamp, status, statusMsg, cartridge, objectType, objectID) values (?, ?, ?, ?, ?, ?)
select @@identity
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.impl.BatcherImpl - preparing statement
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.persister.EntityPersister - Dehydrating entity: [com.abpro.babel.frwk.channels.ChannelStatus#<null>]
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.TimestampType - binding '2005-02-10 10:22:02' to parameter: 1
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.StringType - binding 'CHANNEL_IN' to parameter: 2
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.TextType - binding 'D:\ABRepository\core\babel2-frwk-2.1\target\testDir\encryptedMT502.asc' to parameter: 3
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.StringType - binding 'cartridge1' to parameter: 4
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.StringType - binding 'com.abpro.babel.frwk.channels.comms.in.CommsChannelInAC' to parameter: 5
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.type.StringType - binding '4028iee284723e5z7z6r4332e3ee2988' to parameter: 6
[10/02/05 10:22:02][Finalizer ][DEBUG] net.sf.hibernate.impl.SessionImpl - running Session.finalize()
[10/02/05 10:22:02][Thread-1 ][DEBUG] net.sf.hibernate.util.JDBCExceptionReporter - SQL Exception
com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -143: Column '@p0' not found
at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:2538)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:1922)
at com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)


This is my Hibernate mapping file :<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping>
<class
name="com.abpro.babel.frwk.channels.ChannelStatus"
table="BC_CHANNEL_STATUS">

<id name="ID" type="long">
<generator class="native"/>
</id>

<property name="timestamp" type="timestamp" not-null="false" unique="false"/>
<property name="status" type="string" length="50" not-null="true" unique="false"/>
<property name="statusMsg" type="text" not-null="false" unique="false"/>
<property name="cartridge" type="string" length="50" not-null="false" unique="false"/>

<property name="objectType" type="string" not-null="false" unique="false">
<column name="objectType" length="250" index="BC_CHANNEL_STATUS_objectType"/>
</property>
<property name="objectID" type="string" not-null="true" unique="false">
<column name="objectID" length="32" index="BC_CHANNEL_STATUS_objectID"/>
</property>

</class>
</hibernate-mapping>

and these are the scripts I used to create the tables :
create table BC_CHANNEL_STATUS (
ID NUMERIC(19,0) IDENTITY NOT NULL,
timestamp DATETIME null,
status VARCHAR(50) not null,
statusMsg TEXT null,
cartridge VARCHAR(50) null,
objectType VARCHAR(250) null,
objectID VARCHAR(32) null,
primary key (ID)
);

create index BC_CHANNEL_STATUS_objectType on BC_CHANNEL_STATUS (objectType);
create index BC_CHANNEL_STATUS_objectID on BC_CHANNEL_STATUS (objectID);


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 7:19 am 
Beginner
Beginner

Joined: Thu Jan 22, 2004 6:16 am
Posts: 40
Location: Luxembourg
Where does this column @p0 come from ? When I run the query "select @p0" I got :

"Error: com.sybase.jdbc2.jdbc.SybSQLException: ASA Error -188: Not enough values for host variables"

as result.

Could someone please help me with this ?

Regards


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.