Test failed.尝试加载Oracle客户端库时引发BadImageFormatException_.NET_编程开发_程序员俱乐部

中国优秀的程序员网站程序员频道CXYCLUB技术地图
热搜:
更多>>
 
您所在的位置: 程序员俱乐部 > 编程开发 > .NET > Test failed.尝试加载Oracle客户端库时引发BadImageFormatException

Test failed.尝试加载Oracle客户端库时引发BadImageFormatException

 2015/4/21 19:29:47  有心依然  程序员俱乐部  我要评论(0)
  • 摘要:CodeSmith6.5不像前几个版本,需要用户手动添加oracle驱动,内部已经集成了oracle的驱动。网上遇到很多win764位机子使用CodeSmith连接oracle的时候出现错误如下:这是因为在64位的机器上使用了32位的oracle客户端连接,导致连接失败。解决方案:安装oracle的64位客户端连接1首先到官网下载文件:http://www.oracle.com/technetwork/database/features/instant-client/index-097480
  • 标签:for failed ORA 客户 客户端 Oracle

CodeSmith6.5不像前几个版本,需要用户手动添加oracle驱动,内部已经集成了oracle的驱动。

网上遇到很多win7 64位机子使用CodeSmith连接oracle的时候出现错误如下:

QQbUYzpcK59KkdxgW6i++shqsENLGX8eAx8H1s/zmtv78eL+MUqx6uacHmhu1jdoH+4vkPF3kwGLK0OSyeQAfP6rY/BtXETWBZl4X8HBboUWfzPH1NuvJLZ9+VjNat7gZ8POGbBgTa1Y92aEdZxoawhWPQuknN1osL9HgTBeK1Kq406nSuwsv9lcn/19L5cQ9aFHLaKA6xj3x0iDzvCrML9Eefns4h0B99epqQuR/ikG7KqrvVg7/pCq2f3NDxhKJFQxxejupLoVXJQ2qdQWG+P1lV/Ui8ITwuhdi9Ow+O4hieGWr/zwiJStXV7eI1qdl6qlkWtSqm2YwOgchLNLJrJVJVXZMEBDr6jLA45zA79YN7gNXJUvBocJeYXaATZwxOtbQoh3c7bj2bGnqT0xGMJzVaWNre0k8BMR8Smk/D5BOvupok0L7/5uwn/uzz7jS2D1I4gVA7SNB/24eCqrrdPvR0TKUTiRpZrae+TmvGcN5GKVIfs63upaoq6EePP8Gb7kGrDW1feRWLK8sCid4dZhdoZ52NkMldUrZ/7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z0oOGyIAANE9higb40uIWFEH4IDCACAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGSKIdDfAgBABiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAACZgkADAGQKAg0AkCkINABApiDQAHCZ7B01O26RxkGgAeAyiSvU1oNAA0C+7B0133zzzTfffPPqq6/u4L8INADkSyvQrVrtIAg0AOTL3lHzfCf51a9+9fz5cwQaAPKlFehWrXYQBBoA8gUPOtI4CDQAXCZ7R83XX3/9y1/+8uudBIEGgHxpBXpjfPK74nefRH7/v3+/Gt9gbbTXJAQaAPJl76g5Ozv7xS9+cTYDD+5cLToO756d3T0sBId3vY0Mrt55MEfRViDQAJAvrUDPyYM7Vw/viv/Pzs7O7h4W/ecHd66GRfju4VwC3V6TEGgAyJdZPeizs7OzB3cO7zw4O7t7ePXw0HOV53WPE0CgASBf9o6aZ3PSRzUO796/c/XqnfvPnt2/c/Xw7rNnz9q/78cjHEVx9c79OQr2yiuvPHv2DIEGgHzZO2q++uqrn//851/NwclhURSHJ1+dHBaHJ/dv77viu3/7vrvL/dv7hyezFMYCgQaAfGkFeh7u394/PDyUAr1/+/4gwd3f3aYnzqd5aa9JCDQA5Mu8HvRXrTSPetBCq52tDB97nSDQAJAve0fN0zk5OSgOTp6eHBQHt2/v79/+7OnTp5/d3j84af9vv3h6clAUxcHJ06fi17l5+eWXnz59ikADQL60At2q1RycHHSu8H4nx65AnxwU+7c/Ozkoiv3bn21MoFsQaADIl72j5nROPj4oDj4+PT397MP9g4/brz77cP/gww/3i6IoDj7uN1htbND/vFZeeuml09NTBBoA8qUV6FatdhAEGgDyZW4POlvwoAEgd/aOmi+//PJnP/vZlzsJAg0A+bJ31DzZSX76058+efIEgQaAfGkFulWrHQSBBoB8wYOONA4CDQCXyd5R8/jx45/85Cc7+O/jx48RaADIl1agdxYEGgDyZe+o2XGLNA4CDQCQKQg0AECmINAAAJmCQAMAZAoCDQCQKQg0AECmINAAAJmCQAMAZAoCDQCQKQg0AECmINAAAJmCQAMAZAoCDQCQKQg0AECmuAKNYRiGZWUINIZhWKb2p1vvFP/1299gGIZhudl//tM//j9serz1HBnykwAAAABJRU5ErkJggg==" alt="" />

 

这是因为在64位的机器上使用了32位的oracle客户端连接,导致连接失败。

解决方案:安装oracle的64位客户端连接

1首先到官网下载文件:http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html?ssSourceSiteId=ocomen

需要用到的文件(64位系统):(32位系统对应下载32位客户端)

instantclient-basic-windows.x64-11.2.0.3.0.zip

instantclient-jdbc-windows.x64-11.2.0.3.0.zip

instantclient-odbc-windows.x64-11.2.0.3.0.zip

instantclient-sqlplus-windows.x64-11.2.0.3.0.zip

 

解压缩文件到同一目录

2设置环境变量

NLS_lANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

TNS_ADMIN=E:\Oracle\instantclient_11_2

Path=E:\Oracle\instantclient_11_2;

配置好后,重新开codesmith.

发表评论
用户名: 匿名