select Query result display problem

select Query result display problem

Hi,

String SQL_QUERY ="from Cc";
 Query query = session.createQuery(SQL_QUERY);
 for(Iterator it=query.iterate();it.hasNext();){
       Object[] row = (Object[]) it.next();
       System.out.println("ID: " + row[0]);

       System.out.println("Name: " + row[1]);

     }

when I am executing the above query the following error will happend

Hibernate: select cc0.id as col00 from cc cc0_ Cc$$EnhancerByCGLIB$$2235676a cannot be cast to [Ljava.lang.Object;

can any one suggest the solution for this

Thanks

View Answers

Ads









Related Tutorials/Questions & Answers:
select Query result display problem
select Query result display problem  Hi, String SQL_QUERY ="from Cc"; Query query = session.createQuery(SQL_QUERY); for(Iterator it=query.iterate...]); } when I am executing the above query the following error will happend
display result
display result  i want a code that takes input from user through dropdown box and display the result into table.all the values regarding the user input must be displayed. i am using mysql database   hi i want study
Advertisements
select query
select query  how to write select query with where clause having multiple variables. example: i want to select the data from DB in which i want to check againest two variable in where cluase. String sql = "select * from
query problem
", "root", "root"); String query = "select Ename from employee where Designation...query problem  how write query in jsp based on mysql table field? i have employee table it contain designation field, how write query in jsp
select query
select query  how to retrieve a single image from mysql table using $row[] value
JSP - Problem of displaying result at webpage
JSP - Problem of displaying result at webpage  Can anyone please help to solve my problem below. My webpage has problem in displaying result position. The result should be display below my title. How do i solve it? Thank you so
select query in mysql
select query in mysql  Select query in mysql. Can anyone
select result from three tables using sql.
select result from three tables using sql.  I want to get a result from three tables. i dont how to write the sql query. Please help me. "I want to display Name,Username and Product_Name where Id=007" table "register" Name
how can i display a editable result of form?
how can i display a editable result of form?  how can i display a editable result of form? i know how to display form result but the result... to display form result in same page i have alredy created a hidden div which
Jfreechart chart display problem
(request.getParameter("q")); String query="select dateof,dayinprice,company from stockprice...Jfreechart chart display problem  Using JSP and Jfreechart displays the chart fine on an internal browser in eclipse but doesnt display it on Chrome
Select from select list + display
Select from select list + display  i have a select list containing... select EmpCode from the select list, the corresponding EmpName and DeptName should...;/div> <tr><td><b>Select:</b></td><td><
select query using hibernate
select query using hibernate  Hi, can any one tell me to select records from table using hibernate. Thanks   Please visit the following link: Hibernate Tutorials The above link will provide you different
query regarding multiple select
query regarding multiple select  i have a select in jsp with multiple options.When i select multiple values i am not able to insert it into database and how do i retrieve them..please help me with an example code
Integer display problem
Integer display problem  class Bean{ int n1,n2; public Bean(){ } public Bean(int n1, int n2){ this.n1=n1; this.n2=n2; } public...); } } In above program value of n1 should display 10. But it is displaying 8. what
display sql query in hibernate
display sql query in hibernate  If you want to see the Hibernate generated SQL statements on console, what should we do
PHP SQL Result
; This example illustrates how to display result on the browser and how to use the result in the php application. To understand how to display the result...;* FROM users" is executed using mysql_query() method to select
Problem in executing query....
Problem in executing query....  Suppose there is a textbox or a text... this data with request.getParameter() but when I execute the query to store in oracle it is showing error because of the '.I understand where the problem is.If
JSP:select image for db and display in image tag
JSP:select image for db and display in image tag  Hi, i am new to this forum. My query is that, i am trying to display image in tag but i am...); response.getOutputStream().flush(); } i think, this code will display image
JSP:select image for db and display in image tag
JSP:select image for db and display in image tag  Hi, i am new to this forum. My query is that, i am trying to display image in tag but i am...); response.getOutputStream().flush(); } i think, this code will display image
JSP:select image for db and display in image tag
JSP:select image for db and display in image tag  Hi, i am new to this forum. My query is that, i am trying to display image in image tag but i am...); response.getOutputStream().flush(); } i think, this code will display
Problem with display of images in applets - Applet
Problem with display of images in applets  Hi all, When I run... in figuring out the problem....  Hi frined, import java.applet.*; import..., this); } } --------------------------------------- Display image in Java Applet
SELECT query using executeUpdate() instread of executeQuery()
SELECT query using executeUpdate() instread of executeQuery()  can we execute SQL SELECT query using executeUpdate() instread of executeQuery() method   Hi Friend, No, You cannot. Thanks
Select query in JSP
Select query in JSP We are going to describe select query in JSP... that we use SELECT query. SELECT query is a retrieve the data from database than... interface. Syntax of select query:- SELECT * FROM TableName; Now we have
i have problem with this query... please tell me the resolution if this .........
i have problem with this query... please tell me the resolution if this .........  select length(ename)||' charecters exist in '||initcap(ename)||'s name' as "names and length" from emp
i have problem with this query... please tell me the resolution if this .........
i have problem with this query... please tell me the resolution if this .........  select initcap(ename),job from emp where substr(job,4,length(job,4,3)))='age
how to export the query result in SQL Server to .csv file?
how to export the query result in SQL Server to .csv file?  how to write table data into CSV file using SQL SERVER 2008
SQL display date in between query
SQL display date in between query  how to get ( 15 march 2011) and (15/03/2011) output using SQL
php problem
php problem  Hello!! I have a problem ,i want to display the data... not connect: ' . mysql_error()); } $sql = 'SELECT * FROM users WHERE username="'.$username.'" LIMIT 1'; $result = mysql_query( $sql); if(! $result) { die('Could
SELECT query using executeUpdate() instread of executeQuery()
SELECT query using executeUpdate() instread of executeQuery()  for Ex...{ st.executeUpdate("select * from EMP"); //gives us Exception... executeUpdate() method with select quesry then you can't be able to retrieve data from
how to display(update) current date and month in select box on selecting the year.
how to display(update) current date and month in select box on selecting the year.  how to display(update) current date and month in select box on selecting the year
Php Sql Result
a select query by using mysql_query method and stored it in the result variable which indicate by $ (dollar sign). Here we display the result in form of html...Php Sql Result This example illustrates how to display result on the browser

Ads