Org. hibernate. exception. SQLGrammarException: cocould not execute query does not find the database, couldnotexecute

Source: Internet
Author: User
Tags apache tomcat

Org. hibernate. exception. SQLGrammarException: cocould not execute query does not find the database, couldnotexecute

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: the object name 'address' is invalid. 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 $ prep;texeccmd. doExecute (SQLServerPreparedStatement. java: 3500000com.microsoft.sqlserver.jdbc.tdscommand.exe cute (IOBuffer. java: 5696w.com.microsoft.sqlserver.jdbc.sqlserverconnection.exe cuteCommand (SQLServerConnection. java: 17152.16com.microsoft.sqlserver.jdbc.sqlserverstatement.exe cuteCommand (SQLServerStatement. java: 18020.com.microsoft.sqlserver.jdbc.sqlserverstatement.exe cuteStatement (SQLServerStatement. java: 1552.16com.microsoft.sqlserver.jdbc.sqlserverpreparedstatement.exe cuteQuery (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: zookeeper service.faselect.exe cute (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.defaactionactioninvocation. invokeAction (defaactionactioninvocation. java: 441) com. opensymphony. xwork2.defaactionactioninvocation. invokeActionOnly (defaactionactioninvocation. java: 280) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 243) com. opensymphony. xwork2.interceptor. defaultWorkflowInterceptor. doIntercept (DefaultWorkflowInterceptor. java: 165) com. opensymphony. xwork2.interceptor. methodFilterInterceptor. intercept (MethodFilterInterceptor. java: 87) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. 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.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. conversionErrorInterceptor. intercept (ConversionErrorInterceptor. java: 122) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. parametersInterceptor. doIntercept (ParametersInterceptor. java: 195) com. opensymphony. xwork2.interceptor. methodFilterInterceptor. intercept (MethodFilterInterceptor. java: 87) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. parametersInterceptor. doIntercept (ParametersInterceptor. java: 195) com. opensymphony. xwork2.interceptor. methodFilterInterceptor. intercept (MethodFilterInterceptor. java: 87) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. staticParametersInterceptor. intercept (StaticParametersInterceptor. java: 179) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) org. apache. struts2.interceptor. multiselectInterceptor. intercept (MultiselectInterceptor. java: 75) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) org. apache. struts2.interceptor. checkboxInterceptor. intercept (CheckboxInterceptor. java: 94) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) org. apache. struts2.interceptor. fileUploadInterceptor. intercept (FileUploadInterceptor. java: 235) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. modelDrivenInterceptor. intercept (ModelDrivenInterceptor. java: 89) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. scopedModelDrivenInterceptor. intercept (ScopedModelDrivenInterceptor. java: 130) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) org. apache. struts2.interceptor. debugging. debuggingInterceptor. intercept (DebuggingInterceptor. java: 267) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. chainingInterceptor. intercept (ChainingInterceptor. java: 126) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. prepareInterceptor. doIntercept (PrepareInterceptor. java: 138) com. opensymphony. xwork2.interceptor. methodFilterInterceptor. intercept (MethodFilterInterceptor. java: 87) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. i18nInterceptor. intercept (I18nInterceptor. java: 165) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) org. apache. struts2.interceptor. servletConfigInterceptor. intercept (ServletConfigInterceptor. java: 164) com. opensymphony. xwork2.defaactionactioninvoc ation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. aliasInterceptor. intercept (AliasInterceptor. java: 179) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 237) com. opensymphony. xwork2.interceptor. predictionmappinginterceptor. intercept (ExceptionMappingInterceptor. java: 176) com. opensymphony. xwork2.defaactionactioninvocation. invoke (defaactionactioninvocation. java: 23720.org.apache.struts2.impl.strutsactionproxy.exe cute (StrutsActionProxy. java: 52) org. apache. struts2.dispatcher. dispatcher. serviceAction (Dispatcher. java: 488) org. apache. struts2.dispatcher. filterDispatcher. doFilter (FilterDispatcher. java: 395)

 

NoteThe full stack trace of the root cause is available in the Apache Tomcat/6.0.13 logs.

No database found, either set *. hbm. xml or hibernate

<Property name = "connection. url">
Jdbc: sqlserver: // 127.0.0.1: 1433; DatabaseName = ***
</Property>

<Class name = "DAO. Address" table = "address" schema = "dbo" catalog = "NtoN">

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.