-->
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: What does this error mean?
PostPosted: Sun Oct 01, 2006 9:25 pm 
Beginner
Beginner

Joined: Mon Sep 18, 2006 5:33 am
Posts: 25
What does this error mean? and how can i possibly fix it?

Code:
exception

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is java.sql.SQLException: Table not found in statement [select photo0_.id as id, photo0_.location as location, photo0_.photographer as photogra3_, photo0_.datetaken as datetaken, photo0_.description as descript5_ from Photo photo0_]
   org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:406)
   org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:358)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


root cause

org.springframework.jdbc.BadSqlGrammarException: Hibernate operation: Could not execute query; bad SQL grammar []; nested exception is java.sql.SQLException: Table not found in statement [select photo0_.id as id, photo0_.location as location, photo0_.photographer as photogra3_, photo0_.datetaken as datetaken, photo0_.description as descript5_ from Photo photo0_]
   org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:224)
   org.springframework.orm.hibernate.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:364)
   org.springframework.orm.hibernate.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:351)
   org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:369)
   org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:705)
   org.springframework.orm.hibernate.HibernateTemplate.find(HibernateTemplate.java:684)
   src.db.PhotoDaoHib.getPhotoinfoList(PhotoDaoHib.java:17)
   src.bus.PhotoManager.getPhotos(PhotoManager.java:18)
   src.controller.PhotoinfoController.onSubmit(PhotoinfoController.java:23)






Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 01, 2006 11:28 pm 
Regular
Regular

Joined: Tue Sep 26, 2006 11:37 am
Posts: 115
Location: Sacramento, CA
Table Photo does not exist? Maybe table names are case sensitive on your server's OS (mysql on Linux is case sensitive, for example).

Marius


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 02, 2006 2:28 am 
Beginner
Beginner

Joined: Tue Oct 18, 2005 3:44 am
Posts: 27
Perhaps your table exists but for a another owner that the one that is now running, so you have to use the ownerName.tableName (I had the case with JBoss that was the owner of my tables in MSSQL). The name of the owner can be omitted if the owner name 'dbo' is. To avoid have another owner, set directly dbo.tableName at the creation of the table.

Hope this helps
Cathy


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.