Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Y Jadhav
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

table or view does not exist

It looks pretty self explanatory: the table DRIVER does not exist.
 
Y Jadhav
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

Thanks!!!

--
Madhur Tanwani
http://madhurtanwani.blogspot.com
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic