当前栏目
System.Data.OracleClient.OracleException:ORA-12154: TNS:could not resolve the connect identifier spe
最近接手离职同事的项目,交接进行了30分钟,牛人直接给了我一个.7z的压缩包,然后电话不接,QQ消息不回,失踪了。 没法,将压缩包解压出来之后,打算编译一个版本准备先发布到服务器上去
项目环境:
VS2010 + MVC3 + ORACLE,
服务器环境:
PL/SQL Developer Version 7.1.1.1339 Windows Vista (64-bit) 6.0 Build 6002 (Service Pack 2)
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
X86下本地测试一切正常,
于是乎编译X64往64位Server 2008服务器上放的时候发生错误-
System.Data.OracleClient.OracleException:ORA-12154: TNS:could not resolve the connect identifier spe
当前服务器上有一个老的版本,并且应用程序池设定不兼容32bit,能够正常运行,PLSQL也运行正常,数据库操作正常,可就是新部署的新版本网站不正常,报错信息如下。
我发现这个Exception来至于System.Data.OracleClient.OracleException ,
1>我下载了一个64位的System.Data.OracleClient.dll测试,问题依旧,
2>我在程序池中设定兼容32位,然后本地BUILD 一个x86的包部署,不但所有DLL无法加载,老的版本也跟着报错
3>改回设定默认:不兼容32位,然后本地BUILDX64,ANYCPU的包部署,问题依旧,
ORA-12154: TNS:could not resolve the connect identifier specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
---|
Stack Trace:
[OracleException (0x80131938): ORA-12154: TNS:could not resolve the connect identifier specified
]
System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) +519713
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +469060
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +147
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +58
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +49
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +417430
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +91
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +1922
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +253966
System.Data.OracleClient.OracleConnection.Open() +48
NHibernate.Connection.DriverConnectionProvider.GetConnection() +377
NHibernate.Tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.Prepare() +92
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.GetReservedWords(Dialect dialect, IConnectionHelper connectionHelper) +154
NHibernate.Tool.hbm2ddl.SchemaMetadataUpdater.Update(ISessionFactory sessionFactory) +312
NHibernate.Impl.SessionFactoryImpl..ctor(Configuration cfg, IMapping mapping, Settings settings, EventListeners listeners) +1810
NHibernate.Cfg.Configuration.BuildSessionFactory() +292
iTCP.Db.NHibernateSession..cctor() in D:\conti\ITCP\Chery\Solutions\iTCP.Db\NHibernateSession.cs:22
[TypeInitializationException: The type initializer for 'iTCP.Db.NHibernateSession' threw an exception.]
iTCP.Db.NHibernateSession.GetNHibernateSession() in D:\conti\ITCP\Chery\Solutions\iTCP.Db\NHibernateSession.cs:32
iTCP.Db.SessionFactory.GetSession() in D:\conti\ITCP\Chery\Solutions\iTCP.Db\SessionFactory.cs:33
iTCP.Db.NHibFactory.get_DataBaseSession() in D:\conti\ITCP\Chery\Solutions\iTCP.Db\NHibFactory.cs:68
iTCP.Db.DBHelper.GetList(String strWhere, String strSortFiled, Boolean direction, Boolean sessionClear) in D:\conti\ITCP\Chery\Solutions\iTCP.Db\DBHelper.cs:248
iTCP.Db.DBHelper.GetList(String strWhere, String strSortFiled, Boolean direction) in D:\conti\ITCP\Chery\Solutions\iTCP.Db\DBHelper.cs:234
iTCP.Lib.LogManageLib.GetLastQuitMessage() in D:\conti\ITCP\Chery\Solutions\iTCP.Lib\LogManageLib.cs:92
iTCP.Web.Controllers.HomeController.Index(Nullable`1 pageindex) in D:\conti\ITCP\Chery\Solutions\iTCP.Web\Controllers\HomeController.cs:34
lambda_method(Closure , ControllerBase , Object[] ) +118
System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +248
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +39
System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +125
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +640
System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +312
System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +691
System.Web.Mvc.Controller.ExecuteCore() +162
System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +305
System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +62
System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +453
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +371
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
相关文章
- 【已解决】spring boot项目从mysql中获取数据候错误The driver has not received any packets from the server
- ORA-00438: string Option not installed ORACLE 报错 故障修复 远程处理
- ORA-22601: pickler TDS context [string] is not initialized ORACLE 报错 故障修复 远程处理
- ORA-23629: string.string is not an eligible index on table string.string for comparison ORACLE 报错 故障修复 远程处理
- ORA-24161: name string does not exist in the name value pair list ORACLE 报错 故障修复 远程处理
- ORA-24303: call not supported in non-deferred linkage ORACLE 报错 故障修复 远程处理
- ORA-27611: Smart I/O failed due to a block corruption detected on the host. The block was received from cell “string”. disk: “string”, block: “string”, disk offset: “string” ORACLE 报错 故障修复 远程处理
- ORA-29341: The transportable set is not self-contained ORACLE 报错 故障修复 远程处理
- ORA-29893: indextypes without column data do not need the given data type ORACLE 报错 故障修复 远程处理
- ORA-32141: get method does not match the type of the parameter ORACLE 报错 故障修复 远程处理
- ORA-41013: instance name not specified ORACLE 报错 故障修复 远程处理
- ORA-41708: the identifier for the shared condition may not be modified ORACLE 报错 故障修复 远程处理
- ORA-47281: Realm Object string,string.string not found in Realm string ORACLE 报错 故障修复 远程处理
- ORA-48412: The parameters exceeds the maximum number [string] ORACLE 报错 故障修复 远程处理
- ORA-48464: The predicate buffer reached the maximum length [string] ORACLE 报错 故障修复 远程处理
- ORA-56605: DRCP: Session switching and migration not allowed ORACLE 报错 故障修复 远程处理
- ORA-56726: Category string is referred to by a consumer group and cannot be deleted ORACLE 报错 故障修复 远程处理
- ORA-00339: archived log does not contain any redo ORACLE 报错 故障修复 远程处理
- ORA-01022: database operation not supported in this configuration ORACLE 报错 故障修复 远程处理
- ORA-01479: last character in the buffer is not Null ORACLE 报错 故障修复 远程处理
- ORA-02434: cannot enable unique(string) – unique key not defined for table ORACLE 报错 故障修复 远程处理
- ORA-06514: PL/SQL: The remote call cannot be handled by the server ORACLE 报错 故障修复 远程处理
- ORA-14146: Old CONNECT BY does not support partitioned tables ORACLE 报错 故障修复 远程处理
- ORA-15273: Could not create the required number of voting files. ORACLE 报错 故障修复 远程处理
- ORA-15299: FINE striping not allowed for the Staleness Registry ORACLE 报错 故障修复 远程处理
- ORA-15409: All disks in disk group string are not of the same type. ORACLE 报错 故障修复 远程处理
- ORA-15564: contents of the replay directory provided to the workload replay client do not match with the replay directory provided to the database server ORACLE 报错 故障修复 远程处理
- ORA-16811: apply instance not recorded by the Data Guard broker ORACLE 报错 故障修复 远程处理