Org.hibernate.exception.SQLGrammarException:could not execute query did not find the database

Source: Internet
Author: User
Tags stack trace apache tomcat

Org.hibernate.exception.SQLGrammarException:could not execute Queryorg.hibernate.exception.SQLStateConverter.convert (sqlstateconverter.java:90) Org.hibernate.exception.JDBCExceptionHelper.convert (jdbcexceptionhelper.java:66) Org.hibernate.loader.Loader.doList (loader.java:2235) Org.hibernate.loader.Loader.listIgnoreQueryCache ( loader.java:2129) org.hibernate.loader.Loader.list (loader.java:2124) org.hibernate.loader.hql.QueryLoader.list ( queryloader.java:401) org.hibernate.hql.ast.QueryTranslatorImpl.list (querytranslatorimpl.java:363) Org.hibernate.engine.query.HQLQueryPlan.performList (hqlqueryplan.java:196) org.hibernate.impl.SessionImpl.list ( sessionimpl.java:1149) org.hibernate.impl.QueryImpl.list (queryimpl.java:102) DAO. Addressdao.findall (addressdao.java:106) service. Faselect.execute (faselect.java:13) sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) Sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingmethoDACCESSORIMPL.JAVA:25) Java.lang.reflect.Method.invoke (method.java:597) Com.opensymphony.xwork2.DefaultActionInvocation.invokeAction (defaultactioninvocation.java:441) Com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (defaultactioninvocation.java:280) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:243) Com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (defaultworkflowinterceptor.java:165 ) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (validationinterceptor.java:252) Org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept ( annotationvalidationinterceptor.java:68) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept ( methodfilterinterceptor.java:87) com.opensymphony.xwork2.defaultactioninvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (conversionerrorinterceptor.java:122) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (parametersinterceptor.java:195) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (parametersinterceptor.java:195) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (staticparametersinterceptor.java:179 ) Com.opensymphony.xwork2.DefaultActionInvocatIon.invoke (defaultactioninvocation.java:237) org.apache.struts2.interceptor.MultiselectInterceptor.intercept ( multiselectinterceptor.java:75) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Org.apache.struts2.interceptor.CheckboxInterceptor.intercept ( checkboxinterceptor.java:94) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Org.apache.struts2.interceptor.FileUploadInterceptor.intercept ( fileuploadinterceptor.java:235) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept ( modeldriveninterceptor.java:89) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept ( scopedmodeldriveninterceptor.java:130) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Org.apache.struts2.intercEptor.debugging.DebuggingInterceptor.intercept (debugginginterceptor.java:267) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (chaininginterceptor.java:126) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (prepareinterceptor.java:138) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (i18ninterceptor.java:165) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (servletconfiginterceptor.java:164) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) com.Opensymphony.xwork2.interceptor.AliasInterceptor.intercept (aliasinterceptor.java:179) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (exceptionmappinginterceptor.java:176 ) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Org.apache.struts2.impl.StrutsActionProxy.execute (strutsactionproxy.java:52) Org.apache.struts2.dispatcher.Dispatcher.serviceAction (dispatcher.java:488) Org.apache.struts2.dispatcher.FilterDispatcher.doFilter (filterdispatcher.java:395)

Root cause

Com.microsoft.sqlserver.jdbc.SQLServerException: Object name ' address ' is not valid. Com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError (sqlserverexception.java:216) Com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult (sqlserverstatement.java:1515) Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement ( sqlserverpreparedstatement.java:404) com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement$ Prepstmtexeccmd.doexecute (sqlserverpreparedstatement.java:350) Com.microsoft.sqlserver.jdbc.TDSCommand.execute ( iobuffer.java:5696) Com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand (Sqlserverconnection.java : 1715) Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand (sqlserverstatement.java:180) Com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement (sqlserverstatement.java:155) Com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery (sqlserverpreparedstatement.java:285) Org.hibernate.jdbc.AbstractBatcher.getResultSet (ABSTRACTBAtcher.java:208) Org.hibernate.loader.Loader.getResultSet (loader.java:1812) org.hibernate.loader.Loader.doQuery ( loader.java:697) org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections (loader.java:259) Org.hibernate.loader.Loader.doList (loader.java:2232) Org.hibernate.loader.Loader.listIgnoreQueryCache ( loader.java:2129) org.hibernate.loader.Loader.list (loader.java:2124) org.hibernate.loader.hql.QueryLoader.list ( queryloader.java:401) org.hibernate.hql.ast.QueryTranslatorImpl.list (querytranslatorimpl.java:363) Org.hibernate.engine.query.HQLQueryPlan.performList (hqlqueryplan.java:196) org.hibernate.impl.SessionImpl.list ( sessionimpl.java:1149) org.hibernate.impl.QueryImpl.list (queryimpl.java:102) DAO. Addressdao.findall (addressdao.java:106) service. Faselect.execute (faselect.java:13) sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method) Sun.reflect.NativeMethodAccessorImpl.invoke (nativemethodaccessorimpl.java:39) Sun.reflect.DelegatingMethodAccessorImpl.invoke (Delegatingmethodaccessorimpl.jaVA:25) Java.lang.reflect.Method.invoke (method.java:597) Com.opensymphony.xwork2.DefaultActionInvocation.invokeAction (defaultactioninvocation.java:441) Com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly (defaultactioninvocation.java:280) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:243) Com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept (defaultworkflowinterceptor.java:165 ) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept (validationinterceptor.java:252) Org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept ( annotationvalidationinterceptor.java:68) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept ( methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionINvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept (conversionerrorinterceptor.java:122) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (parametersinterceptor.java:195) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept (parametersinterceptor.java:195) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept (staticparametersinterceptor.java:179 ) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (Defaultactioninvocation.java:237) Org.apache.struts2.interceptor.MultiselectInterceptor.intercept ( multiselectinterceptor.java:75) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Org.apache.struts2.interceptor.CheckboxInterceptor.intercept ( checkboxinterceptor.java:94) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Org.apache.struts2.interceptor.FileUploadInterceptor.intercept ( fileuploadinterceptor.java:235) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept ( modeldriveninterceptor.java:89) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept ( scopedmodeldriveninterceptor.java:130) Com.opensymphony.xwork2.DefaultActionInvocation.invoke ( defaultactioninvocation.java:237) org.apache.struts2.interceptor.debugging.Debugginginterceptor.intercept (debugginginterceptor.java:267) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ChainingInterceptor.intercept (chaininginterceptor.java:126) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.PrepareInterceptor.doIntercept (prepareinterceptor.java:138) Com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept (methodfilterinterceptor.java:87) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.I18nInterceptor.intercept (i18ninterceptor.java:165) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Org.apache.struts2.interceptor.ServletConfigInterceptor.intercept (servletconfiginterceptor.java:164) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwoRk2.interceptor.AliasInterceptor.intercept (aliasinterceptor.java:179) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept (exceptionmappinginterceptor.java:176 ) Com.opensymphony.xwork2.DefaultActionInvocation.invoke (defaultactioninvocation.java:237) Org.apache.struts2.impl.StrutsActionProxy.execute (strutsactionproxy.java:52) Org.apache.struts2.dispatcher.Dispatcher.serviceAction (dispatcher.java:488) Org.apache.struts2.dispatcher.FilterDispatcher.doFilter (filterdispatcher.java:395)

Note The full stack trace of the root cause are available in the Apache tomcat/6.0.13 logs.

The database was not found, either set *.hbm.xml, or set hibernate

<property name= "Connection.url" >
jdbc:sqlserver://127.0.0.1:1433;databasename=***
</property>

<class name= "DAO. Address "table=" address "schema=" dbo "catalog=" Nton ">

Org.hibernate.exception.SQLGrammarException:could not execute query did not find the database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.