This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000" Watch "WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000" New topic
Author

WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000

Y Jadhav
Ranch Hand

Joined: Oct 02, 2008
Posts: 37
This error in Stdout.log of tomcat....

1453 [Thread-1] INFO : impl.SessionFactoryObjectFactory - Not binding factory to JNDI, no JNDI name configured
Hibernate: select driver0_.DRIVER_ID as DRIVER1_1_, driver0_.name as name1_, driver0_.age as age1_ from DRIVER driver0_ where driver0_.name=?
18250 [http-8080-1] WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000
18250 [http-8080-1] ERROR: util.JDBCExceptionReporter - ORA-00942: table or view does not exist

18250 [http-8080-1] ERROR: Connect - Exception In InsertViaHibernate Servlet: could not execute query
18250 [http-8080-1] ERROR: [/strutshibernate].[InsertViaHibernate] - Servlet.service() for servlet InsertViaHibernate threw exception
javax.servlet.ServletException
at tomcatJNDI.InsertViaHibernate.doGet(InsertViaHibernate.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:835)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
at java.lang.Thread.run(Unknown Source)


And catalina.log of tomcat shows error,

Oct 16, 2008 3:18:45 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]

What this error is about.


please help me???
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


table or view does not exist

It looks pretty self explanatory: the table DRIVER does not exist.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Y Jadhav
Ranch Hand

Joined: Oct 02, 2008
Posts: 37
Sorry Paul Sir, I was confused about whether to post this topic in hibernate or jdbc sections.. sorry.

Thanks for so quick reply...

But DRIVER CAR tables are present in my database

is it because of
catalina.log of tomcat shows error,

Oct 16, 2008 3:18:45 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]

What this error is about.
Y Jadhav
Ranch Hand

Joined: Oct 02, 2008
Posts: 37
Sorry Paul Sir, I was confused about whether to post this topic in hibernate or jdbc sections.. sorry.

Thanks for so quick reply...

But DRIVER CAR tables are present in my database

is it because of
catalina.log of tomcat shows error,

Oct 16, 2008 3:18:45 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]

What this error is about.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336


Oct 16, 2008 3:18:45 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Could not load resource factory class [Root exception is java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSourceFactory]

What this error is about.

Its a ClassNotFoundException - org.apache.commons.dbcp.BasicDataSourceFactory is not in your classpath. Are you using DBCP?


But DRIVER CAR tables are present in my database

Check your mapping file. It could be your are using a case-sensitive database. Plus, log on to the database as the same user as your data source uses and try runnign the query as it appear in the log (you'll need to add some garbage value for the bound parameters). It could be you do not have permissions to select fro mthis tabel, or it appears in a database created in a differenrt schema that you cannot see.
Y Jadhav
Ranch Hand

Joined: Oct 02, 2008
Posts: 37
Thank you sir , database is case sensitive, now servlet for retrieving data is for retrieving dat is working and shows DB dat in browser, But

When i tried to insert data using diff servlet , it shows...

1033859 [http-8080-1] ERROR: Connect - Exception In InsertViaHibernate Servlet: Index: 0, Size: 0
1033859 [http-8080-1] ERROR: [/strutshibernate].[InsertViaHibernate] - Servlet.service() for servlet InsertViaHibernate threw exception
javax.servlet.ServletException
at tomcatJNDI.InsertViaHibernate.doGet(InsertViaHibernate.java:68)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:835)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
at java.lang.Thread.run(Unknown Source)


How to insert data in it..??

Below is code for IsertViaHibernate.java

Y Jadhav
Ranch Hand

Joined: Oct 02, 2008
Posts: 37
Paul Sir,


ClassNotFoundException - org.apache.commons.dbcp.BasicDataSourceFactory


I already have necessary jars(common-dbcp*.jar) for this class .
Then also this error is there..

This might be last error , please help,
waiting for your response.
Madhur Tanwani
Greenhorn

Joined: Sep 25, 2006
Posts: 9

Plus, log on to the database as the same user as your data source uses .....

Thanks!!!

--
Madhur Tanwani
http://madhurtanwani.blogspot.com
 
wood burning stoves
 
subject: WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000
 
Similar Threads
ORA-02289: sequence does not exist
Hibernate error
java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@127.0.0.1:1521:XE
Error in configuration/accessing JBoss datasource jdbc not bound
WARN : util.JDBCExceptionReporter - SQL Error: 942, SQLState: 42000