-->
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.  [ 3 posts ] 
Author Message
 Post subject: ORA-00904: invalid column name
PostPosted: Wed Mar 31, 2004 7:50 pm 
Newbie

Joined: Wed Mar 31, 2004 11:53 am
Posts: 2
Having a problem with this HQL select, not sure how much output to show so I'm providing most of it. If this is in-appropriate just let me know.


My questions is what isn't hibernate likeing here. I've found several cases with this same error message where the problem was with the select and not a column at all.

dw

-------------------------- output follows ---------------------------------

[main]:D: 31 18:04:46.449: QueryTranslator.logQuery: HQL:

SELECT t
FROM com.clientx.pathy.model.table.ActivityPigeonHole t
WHERE t.activityPartId = 18 AND rowNumber >= 1 ORDER BY rowNumber DESC ,columnNumber DESC

[main]:D: 31 18:04:46.449: QueryTranslator.logQuery: SQL:

select
activityce0_.activity_cell_id as activity1_,
activityce0_.row_number as row_number,
activityce0_.answer_format as answer_f3_,
activityce0_.question_type as question4_,
activityce0_.column_number as column_n5_,
activityce0_.show_answer as show_ans6_,
activityce0_.activity_part_id as activity7_ from syn_activity_cell activityce0_
where (activityce0_.activity_part_id=18 )AND(rowNumber>=1 ) order by rowNumber DESC , columnNumber DESC

[main]:D: 31 18:04:46.449: BatcherImpl.logOpenPreparedStatement: about to open: 0 open PreparedStatements, 0 open ResultSets

[main]:D: 31 18:04:46.449: BatcherImpl.getPreparedStatement:

select
activityce0_.activity_cell_id as activity1_,
activityce0_.row_number as row_number,
activityce0_.answer_format as answer_f3_,
activityce0_.question_type as question4_,
activityce0_.column_number as column_n5_,
activityce0_.show_answer as show_ans6_,
activityce0_.activity_part_id as activity7_
from syn_activity_pigeonhole activityce0_
where (activityce0_.activity_part_id=18 )AND(rowNumber>=1 ) order by rowNumber DESC , columnNumber DESC

Hibernate:

select
activityce0_.activity_cell_id as activity1_,
activityce0_.row_number as row_number,
activityce0_.answer_format as answer_f3_,
activityce0_.question_type as question4_,
activityce0_.column_number as column_n5_,
activityce0_.show_answer as show_ans6_,
activityce0_.activity_part_id as activity7_
from syn_activity_pigeonhole activityce0_ where (activityce0_.activity_part_id=18 )AND(rowNumber>=1 ) order by rowNumber DESC , columnNumber DESC

[main]:D: 31 18:04:46.459: BatcherImpl.getPreparedStatement: preparing statement
[main]:D: 31 18:04:46.469: JDBCExceptionReporter.logExceptions: SQL Exception
java.sql.SQLException: ORA-00904: invalid column name


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 31, 2004 8:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
SELECT t
FROM com.clientx.pathy.model.table.ActivityPigeonHole t
WHERE t.activityPartId = 18 AND t.rowNumber >= 1 ORDER BY t.rowNumber DESC, t.columnNumber DESC


Top
 Profile  
 
 Post subject: Re: ORA-00904: invalid column name
PostPosted: Thu Jan 07, 2010 5:58 am 
Newbie

Joined: Thu Jan 07, 2010 1:42 am
Posts: 2
Hi,

I am getting the following exception,

org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.loader.Loader.doList(Loader.java:2231)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2125)
at org.hibernate.loader.Loader.list(Loader.java:2120)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:401)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:361)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1148)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
at timer.OAOQueueViewTester.selectRowsFromView(OAOQueueViewTester.java:21)
at timer.OAOQueueViewTester.main(OAOQueueViewTester.java:14)
Caused by: java.sql.SQLException: ORA-00904: "OAOQUEUEVI0_"."ID": invalid identifier

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:626)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:182)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:500)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:942)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:532)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1037)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2905)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:2946)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1808)
at org.hibernate.loader.Loader.doQuery(Loader.java:697)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:259)
at org.hibernate.loader.Loader.doList(Loader.java:2228)
... 9 more

Can you please help me in resolving this?
----------
Udhaya


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.