error in a WPF application using oracle.manageddataaccess.client
Hello
We have problems with a WPF MVVM using Oracle.ManagedDataAccess.Client application. We installed oracle.manageddataaccess.dll release 12.1.0.1.0 on a developer machine with 64 bit of Windows 7, Microsoft Visual Studio 2013 and Microsoft .NET Framework 4 OS. Installation seems to be ok and oracle.manageddataaccess.dll results to be registered in .net\assembly\GAC_MSIL c:\windows\microsoft. But when we try to compile the application, the following errors occurs
Error 175: The ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client' not is either not saved in the config machine or the application of the file, or could not be loaded
errors are caused by the entity data model files (there is an error for each .edmx file).
Note that the application works on another computer with the same configuration, so I guess that the problem is due to a bad setting on the computer
any idea?
Hello
Finally, we have solved the problem! simply, we uninstalled and reinstalled Visual Studio and Oracle.manageddataaccess in this order. Now it's working. Thank you
Tags: Database
Similar Questions
-
x 64 application entity Framework using Oracle.DataAccess.Client
I am trying to build a x 64 application Entity Framework using the current Oracle.DataAccess.Client. I can launch the application as Any CPU and x 86 using the managed provider, but when I compile for x 64, I get the error below when running. If I change the provider to Oracle.ManagedDataAccess.Client it works with x 86 and x 64 compiler. Unfortunately, we are unable to use the managed provider until the xml is supported. I have two clients x 86 and x 64 installed. Any ideas?
System.Data.EntityException was not handled
HResult =-2146233087
Message = the underlying provider failed to open.
Source = System.Data.Entity
StackTrace:
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)
at System.Data.EntityClient.EntityConnection.Open)
at System.Data.Objects.ObjectContext.EnsureConnection)
to System.Data.Objects.ObjectContext.SaveChanges (SaveOptions options)
at System.Data.Entity.Internal.InternalContext.SaveChanges)
at System.Data.Entity.Internal.LazyInternalContext.SaveChanges)
at System.Data.Entity.DbContext.SaveChanges)
at EntityFramework1.EFTest.AddItem (c:\TFS2012\AD). NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFramework1\EFTest.cs:line 21
at EntityFrameworkConsole.Program.Main (String [] args) in c:\TFS2012\AD. NYSAS. ICPC\DEV\M01\EntityFramework1\EntityFrameworkConsole\Program.cs:line 12
at System.AppDomain._nExecuteAssembly (RuntimeAssembly assembly, String [] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly)
at System.Threading.ExecutionContext.RunInternal (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run (ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart)
InnerException: Oracle.DataAccess.Client.OracleException
HResult =-2147467259
Message =""
ErrorCode =-2147467259
StackTrace:
at Oracle.DataAccess.Client.OracleException.HandleErrorHelper (Int32 errCode, OracleConnection conn, IntPtr opsErrCtx, OpoSqlValCtx * pOpoSqlValCtx, ByVal src, String procedure, Bcheck Boolean, Int32 isRecoverable)
at Oracle.DataAccess.Client.OracleException.HandleError (Int32 errCode, OracleConnection conn, IntPtr, Object src opsErrCtx)
at Oracle.DataAccess.Client.OracleConnection.Open)
at System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf (Boolean openCondition, storeConnectionToOpen of DbConnection, DbConnection originalConnection, String exceptionCode, String attemptedOperation, Boolean & closeStoreConnectionOnFailure)
InnerException:
Here is my web.config (less sensitive information):
<? XML version = "1.0" encoding = "utf-8"? >
< configuration >
< configSections >
< section name = "EF" type = "System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, Entity Framework, Version = 5.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089' requirePermission ="false"/ >"
< / configSections >
< Entity Framework >
< defaultConnectionFactory type = "System.Data.Entity.Infrastructure.LocalDbConnectionFactory, Entity Framework" >
< Parameters >
< setting = "v11.0" / >
< / Parameter >
< / defaultConnectionFactory >
< / Entity Framework >
< connectionStrings >
< add name = 'Entities' connection string connectionString="metadata=res://*/Models.EFEntities.csdl|res://*/Models.EFEntities.ssdl|res://*/Models.EFEntities.msl;provider=Oracle.DataAccess.Client;provider = & quot; data source = DATASOURCE; password = PASSWORD; persist info security = True; user ID = username & quot; "" ProviderName "/ >
< / connectionStrings >
< / configuration >
Alex,
Finally, we have solved the problem. It turns out that we had a bad x 64 home path in the PATH variable. I lost track of what it was originally, but I'm sure the x 64 bin path was correct. I did not notice that it was wrong, until I tried to install the full client and began to see an error indicating that it was missing a dll. This led me to a post on the forum, in which you indicated that the PATH variable has not been set (ODAC 12 c for xcopy issues). In our case, it is not missing, just fake.
This is the behavior that we see if the PATH variable for the home directories and bin is incorrect:
- Full client: an error of external system (no exceptions). The error message is that the oraons.dll is missing.
- XCOPY customer: generates an exception without error message. The Exception.Message property is empty and there is no inner exception.
Can the ODP team can add a meaningful message for this exception? If the exact error cannot be highlighted during execution, a generic name on the path audit would help enormously. I must have looked at it a dozen times and didn't notice that it was false. If I had no idea that this could be the cause, it would be discussed more in detail, or had someone else Verify that it was correct. I hope that we would have solved much earlier.
Thank you.
-
Test of the E-Business Suite applications using Oracle performance ATS
Hello
I'm going to do tests on the E-Business Suite applications using Oracle Application Testing Suite of performance. I used it for the Siebel load earlier tests, but never for E-Business applications. Can someone tell me what specific setting, I need to put in place on the side of the E-Business Application for load tests?
Are there any parameters server side that needs to be changed so that everything is saved in openscript? Please notify
Concerning
CPHello
Nothing to do on the side of the EBS.
Compare to Siebel, load tests using more memory agent, don't expect not to run too SAW with a single agent. So depending on the number max of SAW, you must properly size your CA.
Linux is a more scalable system to manage the memory usage. (you can not do that with siebel since the lib of correlation must run on windows).
According to the script (web or forms, mix, short or long), you will be probably limited to 200/300 users per agent.JB
-
Oracle.ManagedDataAccess.Client no Oracle client deployment
Hello
We are trying to deploy our application on a server that has no Oracle client installed. We use the managed dll dataAccess with entity framework 5. Our web.config file contains the following:
< connectionStrings >
< add name = "CroEntities" connection string connectionString="metadata=res://*/CroModel.csdl|res://*/CroModel.ssdl|res://*/CroModel.msl;provider=Oracle.ManagedDataAccess.Client;provider = & quot; DATA SOURCE =oracle; PASSWORD = password; PERSIST SECURITY INFO = True; USER ID = user & quot; "" ProviderName "/ >
< / connectionStrings >
< Oracle.ManagedDataAccess.Client >
< version number = "4.121.1.0" >
< dataSources >
"" < alias dataSource = "oracle"descriptor ="(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = myhost.bc.ca) (PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = serviceName.bc.ca)))" / >
< / dataSources >
< / version >
< /Oracle.ManagedDataAccess.Client >
Oracle.ManagedDataAccess.dll is in our Bin folder.
At run time, we get the following error: ORA-12541: TNS: no listener.
The earpiece works very well. My thought is that something is missing in our configuration. When we add some debug information for the value of context. Database.Connection.Database we get empty string that make me think that the information in the configuration file does not in the run-time application.
Any thought on what might be missed?
Thank you
Ken
The XML tag should be
. All lowercase. In your configuration file, you pulled profit some letters in the tag. It's probably why ODP.NET can't read XML. -
Oracle.manageddataaccess.client with Silverlight with Ria Services + c#
Hello guys.
I have a c# Silverlight + Oracle dashboard with RIA services.
I published in my computer and it work ok. But in the server it doesn´t run.
I don't know what to do. It works just before.
My web.config:
---***---***---***---***---***---***---***---***---***---***---***---***
<? XML version = "1.0"? >
(<!-copyright ©) Microsoft Corporation. All rights reserved. ->
< configuration >
< configSections >
"< name =" article oracle.manageddataaccess.client"type =" OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version = 4.121.2.0, Culture = neutral, PublicKeyToken = 89b483f429c47342 "/ >
< / configSections >
< system.web >
< debug compilation = "true" targetFramework = "4.0" / >
< system.web >
< system.data >
< DbProviderFactories >
< remove invariant = "Oracle.DataAccess.Client" / > "
< remove invariant = "Oracle.ManagedDataAccess.Client" / > "
"< add name =" ODP.NET, successful pilot"invariant =" Oracle.DataAccess.Client.
Description = "Oracle Data Provider for.NET, successful pilot"
Type = "Oracle.ManagedDataAccess.client.OracleClientFactory, Oracle.ManagedDataAccess, Version = 4.121.1.0, Culture = neutral, PublicKeyToken = 89b483f429c47342" / > "
< / DbProviderFactories >
< system.data >
< system.serviceModel >
< links >
< customBinding >
< binding name = "Painel.Web.Service.customBinding" >
< binaryMessageEncoding / >
< httpTransport / >
< / binding >
< / customBinding >
< / links >
< serviceHostingEnvironment aspNetCompatibilityEnabled = "true" multipleSiteBindingsEnabled = "true" / >
< services >
< name = "Painel.Web.Service service" >
"< endpoint address =" "binding ="customBinding"bindingConfiguration =" Painel.Web.Service.customBinding "contract =" Painel.Web.Service"/ >"
< endpoint address = link "mex" = "mexHttpBinding" contract = "IMetadataExchange" / >
< / service >
< / services >
behaviors of <>
< serviceBehaviors >
behavior of <>
< serviceMetadata httpGetEnabled = "True" / >
< serviceDebug includeExceptionDetailInFaults = "false" / >
< / behavior >
< / serviceBehaviors >
< / behaviours >
< system.serviceModel >
< system.webServer >
< runAllManagedModulesForAllRequests modules = "true" / >
< system.webServer >
< oracle.manageddataaccess.client >
< version number = "4.121.2.0" >
< Parameters >
< name of the parameter = value 'TNS_ADMIN"="C:\instantclient"/ >
< / Parameter >
< / version >
< /oracle.manageddataaccess.client >
< / configuration >
---***---***---***---***---***---***---***---***---***---***---***---***
The message using Server doesn´t:
---***---***---***---***---***---***---***---***---***---***---***---***
Exception information:
Exception type: ConfigurationErrorsException
Exception message: Nao faith possible carregar o tipo System.ServiceModel.Activation.HttpModule assembly System.ServiceModel, Version = 3.0.0.0, Culture = neutral, PublicKeyToken = b77a5c561934e089.
---***---***---***---***---***---***---***---***---***---***---***---***
Any help?
Thanks in advance.
Luis
Guys,
I modify the machine.config to the machine.config.default and everything works.
Thanks again for your help.
Luis
-
Oracle.ManagedDataAccess.Client Nuget package
You will deliver Oracle.ManagedDataAccess.Client via nuget package?
Thank you
Yes. We are finishing towards the top of our tests. It should be available soon.
-
How to use oracle.jbo.client.remote.ejib. *?
Hello
I think that the oracle.jbo.client.remote.ejib. * package to simplify the interface EJB citing, right? But how to use oracle.jbo.client.remote.ejib. *? example of use code is perfect! Thank you!
Published by: EdwardXiao on September 18, 2011 19:29I'm not sure about the question that you asked... but if you are looking for use, see
http://radio-weblogs.com/0118231/stories/2004/05/07/handcodingDynamicDiscoveryOfEjbdeployedAppmodule.html -
Deployment of application using Oracle EM failed
Hello
I use Jdeveloper 11.1.1.1.6, we previously deployed same EAR with V2.0, and now I'm trying to redeploy new EAR using Oracle EM, I get the error below. Any body has any idea what could go wrong?
Archive selected ' Test.ear' is not versioned. You cannot redeploy application "Test_application1" without version. The application has been deployed previously versioned "V2.0."
How to version an EAR before deployment?
Thank you
Please read Andrejus Baranovskis Blog: how to set the EAR Version for ADF Application on WebLogic which shows how to set up.
Timo
-
Error in the web application using jxls
I use Jdeveloper 11.1.2.0 and when I use to fill a jxls of excel files, I get the following error:
Event < digester > < startElement > Begin threw the exception
java.lang.ClassNotFoundException: net.sf.jxls.tag.ForEachTag
in java.net.URLClassLoader$ 1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged (Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
to Sun.misc.Launcher$appclassloader$ AppClassLoader.loadClass (Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.apache.commons.digester.ObjectCreateRule.begin(ObjectCreateRule.java:205)
at org.apache.commons.digester.Rule.begin(Rule.java:175)
at org.apache.commons.digester.Digester.startElement(Digester.java:1453)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1329)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:376)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:322)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digester.java:1785)
at net.sf.jxls.parser.CellParser.parseTag(CellParser.java:294)
....
< CellParser > < parseTag > cannot parse cell tag < jx:forEach elements = "${groups} ' var = 'grupo' >: fullXML: < jxls xmlns:jx ="http://jxls.sourceforge.net/jxls/jx"> < jx:forEach elements =" ${groups} ' var = 'grupo' > < / jx:forEach > < / jxls >
java.lang.ClassNotFoundException: net.sf.jxls.tag.ForEachTag
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3181)
at org.apache.commons.digester.Digester.createSAXException(Digester.java:3207)
at org.apache.commons.digester.Digester.startElement(Digester.java:1456)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1329)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:376)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:322)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:226)
at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
at org.apache.commons.digester.Digester.parse(Digester.java:1785)
Added jar are obviously necessary, I think that the problem is the XML parser that uses Oracle Weblogic.
I did a Test case jsf libraries leaving only jslt 2.0, 1.2 and pots to jxls and the error is the same, do not pass this in a tomcat.
Any idea?
Best regards, MarceloI even put libraries in the WEB-INF/lib and the error remains the
even.
Packaged libraries are not found by the WebLogic Server is running.
Add jxls JAR files for the + to the \\user_projects\domains\base_domain\bin\startWebLogic+ script
Variable CLASSPATH and restart WebLogic server. -
I just create my new Single Edition App, but Apple rejected my application because:
"We found your application uses iOS identifier for advertising but does not include.
feature ad. This is not consistent with the terms of iOS Developer
"License program, as required by the App Store Review Guidelines."
What does that mean? What should I do? I already created another unique edition correctly...
Rebuild your simple editing application and then try again to Apple. We have released a fix for this Friday.
Neil
-
"404" error when running ADF Applications using Weblogic / OAM / Webtier
Hi Experts,
Our organization works on the implementation of Weblogic 10.3.5 on HP - UX 11.31 / PA RISC hardware.
All is well enough to work, but we met a particular hurdle and I hope I can get some advice from people here in the forums.
We have virtual hosts within the Weblogic web layer for different areas. We also have Oracle Access Manager configured to protect some web resources (to force the user to authenticate to access the page). Each virtual host is configured to use the https protocol, and we have SSL certificates installed.
The problem arises when trying to deploy an ADF application for weblogic, then run it through one of these virtual servers. We want these applications to use https only. Mod_wl_ohs has also been configured to forward requests to the web layer weblogic.
App deploys fine, and when you try to access the app, we are redirected to a login page by OAM, which is what we want. However, when the application starts to run, it seems that ADF is adding to the URL query parameters, and when he does this, redirecting to https, which causes a 404 error. If you manually add the 's' on the URL, the application loads and works very well.
For example:
Say the url of our application is
https://foo.mydomain.com/MyApp/faces/search
Navigate to this url redirects to the login page. After the connection, we headed over to something like this (the actual settings vary):
http://foo.mydomain.com/MyApp/faces/search?_afrLoop=7078069345015890 & _afrWindowMode = 0 & _adf. CTRL-State = yvpch8hdh_4
.. which returns a 404 error.
If put us the 's' on the url, it works as expected.
Why is this happening? Why is redirect to the login page staying is not in https?
To facilitate debugging, we created a very simple jsp page that was not developed using ADF, and deployed in a similar way, and he remained in https after redirection from the login page.
Is this a specific problem ADF? Is something that needs to be configured in the ear file deployment of JDeveloper?
Any advice would be much appreciated...
Published by: corn on September 18, 2012 09:43Hello
It seems that you use any porxy between the two.
Please activate weblogicplugin activated under
Server-->
--> configuration--> advance. Enable this option and try to restart the server again.
Kind regards
Kal -
Case study: reorganize an Oracle Forms application using Oracle JDevelope
After reading http://www.oracle.com/technology/products/jdev/collateral/4gl/papers/redeveloping_forms_in_adf_11g.pdf (case study: reorganize an Oracle Forms application to help)
Oracle JDeveloper 11 g and 11 g of OracleADF), I noticed that the Total Order field has not migrated to ADF. I want to create a summary based on a column like this field. How can I do?I think (without looking at the code.tables) that the order total is the sum of the of the linetotal of elements
So in the OrdersVO, you should have a transient OrderTotal attribute that is assigned to the groovy expression ItemsVO.sum ("LineTotal").
The syntax may not be perfect, but it's the essence of what you need.
Concerning
Grantp.s. see http://www.oracle.com/technology/products/jdev/11/how-tos/groovy/introduction_to_groovy.pdf for more details on these groovy expressions.
-
Planning an Application using Oracle EPM 11.1.1.1.0
Hello
I just installed Oracle EPM 11.1.1.0 and I want to create a planning application. Do I still need to have all EMP services running? For some reason, these services are not starting and I wonder if I can still go ahead and create a planning application.
Thanks in advance,
ADHello
If you create a planning directly through a planning application and not the workspace then the minimum services you have started will be.
OpenLdap
Shared services
Essbase
Planning
RMI Registry & EAS (although strictly you might not need them running only to create an application, but it is advisable to make them work)Then you can go directly to set up an application via http://
: 8300/HyperionPlanning/AppWizard.jsp See you soon
John
-
IIS to DSN Oracle using Oracle Instant Client 12.1
Hello
I hope someone here can help me, because it turns out to be a real chore.
I need a web application of .NET in order to connect to an Oracle database.
I use IIS 7.5 on a Web of Windows 2008R2 server 0 x 64 and ASP.NET framework 4.0
I know very little about Oracle, I'm afraid (I'm a dedicated man of SQL Server - sorry!), so I duly donwloaded and installed the 12.1 client instant 0 x 64.
I followed all the instructions, created the environment variables PATH and TNS_ADMIN (located at c:\instantclient_12_1, where are installed the Oracle), I had some problems with a missing 0 x 64 DLL (visual .net distribution mfc100.dll) delivered with the instant client (since this is a production almost Virgin Web server, and I don't want to install anything I don't need) , but I finally managed to make the system ODBC DSN to connect successfully.
The tnsnames.ora file has been provided by the DBA and is as follows;
xxx =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx) (PORT = 1521))
)
(CONNECT_DATA =
(SID = xxxx)
(SERVER = DEDICATED)
)
)
Great, I thought. Now for IIS.
My IIS connection string is of the form;
Dim conn As New Odbc.OdbcConnection("DSN=xxx;) UID = xxx; Pwd = xxx; »)
However, whenever I try to open the said connection, I get the ubiquitous;
"ERROR [08004] [Oracle] [ODBC] [Ora] ORA-12154: TNS: could not resolve the connection identifier specifiedERROR [IM006] [Microsoft] [ODBC Driver Manager] driver's SQLSetConnectAttr failed.
After much research, I came to realize that I'm not the only person with the above error. He seems to be everywhere.
This means that my IIS application is probably not rethink research tnsnames.ora reference?
OK, I thought, let's add all accounts of IIS to the c:\instantclient_12_1 (read and execute). It's IIS do not have access to the tnsnames.ora file permissions, but still no joy.
I also tried to set the identity of the application pool to run under a domain with privalidges account additional IIS, but still the same error.
I tried to play with various permutations of connection string. I tried it;
Dim conn As New Odbc.OdbcConnection ("Driver = {Oracle in instantclient_12_1}; ("Source = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST=xx.xx.xx.xx) (PORT = 1521))) (CONNECT_DATA = (SID = xxxx) (SERVER = DEDICATED))); uid = xxx; pwd = xxx") data
and this one...
Dim conn As New Odbc.OdbcConnection ("Driver = {Oracle in instantclient_12_1}; Data Source = (DESCRIPTION = (ADDRESS = (PROTOCOL = tcp)(HOST=xx.xx.xx.xx) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = xxxx))); uid = xxx; pwd = xxx")
The two caused a completely different error, but all too ubiquitous, it seems;
"ERROR [HY000] [Oracle] [ODBC] [Ora] ORA-12560: TNS:protocol adapter interneErreur [IM006] failedERROR SQLSetConnectAttr in the [Microsoft] [ODBC Driver Manager] [HY000] [Oracle] [ODBC driver] [Ora] ORA-12560: TNS:protocol adapter error.
In order to try the House on it, I tried to write a small VB SCript file to access the DSN using the same connection string, I first tried;
Set adoConnection = CreateObject ("ADODB. Connection")
adoConnection.ConnectionString = "DSN = xxx; UID = xxx; Pwd = xxx; »
It worked a treat, and I was able to connect perfectly. To try to drill down to the problem, I run this file as the domain user, I put IIS to run as, and it worked a treat with IIS authentication information too.
So I'm at the end of my mind. I don't understand why IIS can simply use the system DSN.
Thanks to everyone in advance for their help. It is much appreciated.Ok. I spent some time on this and managed to get to the bottom of all this.
Here's what the problem was, in the case where everyone faces a similar problem.
By deliberately that gives a bad name DSN (another mistake) and an incorrect password (resulted in the same error), I was able to determine that the problem is really that the tnsnames.ora file is not get referenced. No traffic left the server at all, and so the password was not relevant.
Next step was to check that relax TNS_ADMIN variable has been read by IIS.
I used the command System.Environment.GetEnvironmentVariable ("TNS_ADMIN") to prove it was empty. That explains pretty much everything that. The recently set the environment variable has not been picked up by IIS. It was nothing to do with permissions to the location of the file tnsnames.ora to all. It's a Kipper.
It would seem that, surprisingly, server restart is necessary for the work process IIS pick up new environment variables. Basically this simple problem cost me a lot of time and bother. NOT BELIEVE messages that say the restart of IIS or the application will pick up any changes to the environment variables - IT WILL NOT.
There is a problem more annoying, and it's to make sure that you remove the spaces trrailing on behalf of the Service TNS odbc name box, but it was easier to drill down reletatively for, compared to having to restart the production server.
Thanks ReubenC for your help. I didn't need to go down the road ODP.NET, but thanks for your suggestion. I wish only Oracle would be to write some notes about it, because I'm sure others will hit / have this problem too. It would also be too much to expect Oracle to include all DLLS in the download as well (!)
In any case, I'm glad I'm on the right track.
-
Why Oracle ManagedDataAccess (4.121.1.0) throws a System.FormatException "first chance" exception to the debugger when you use OracleCommand.BindByName (on some machines, but not others)?
This occurs when calling a ref cursor-returning packaged function stored with OracleCommand.BindByName set to true.
When BindByName undefined, it works as expected.
I've only been able to recreate this problem on a machine in my control. This issue has also reported to me by a customer.
I tried to change the locale of the system of EN - UK EN-US, but I was not aware of any change in behavior.
Similarly, I've tried explicitly overriding the default locale of the system with the OracleGlobalization parameters, and it also had no effect.
Please see the example below.
---
Environment (default):
Windows 7 Professional 64-bit SP1
Visual Studio 12.0.21005.1 REL / / CAN BE SIGNIFICANT
.NET framework 4.5.51209
Local system: EN - UK (but also does not, EN-US).
Oracle.ManagedDataAccess 4.121.1.0
"< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >
Environment (base):
Windows 7 Professional 64-bit SP1
Updated Visual Studio 12.0.31101.00 //SEE above 4
.NET framework 4.5.51209
Local system: EN - UK
Oracle.ManagedDataAccess 4.121.1.0
"< supportedRuntime version ="v4.0"sku =". NETFramework,Version=v4.5.1"/ >
Call stack:
mscorlib.dll. Unknown System.Number.StringToNumber(string str, System.Globalization.NumberStyles options, ref System.Number.NumberBuffer number, System.Globalization.NumberFormatInfo info, bool parseDecimal) mscorlib.dll. Unknown System.Number.ParseInt32(string s, System.Globalization.NumberStyles style, System.Globalization.NumberFormatInfo info) Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Types.OracleRefCursor.OracleRefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.ServiceObjects.OracleRefCursorImpl refCursorImpl, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long initialLongFS, long initialLobFS, long [] scnFromExecution) unknown Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.ExtractRefCursorFromAccessor (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution, int currentRow) unknown Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleParameterImpl.GetRefCursorFromBytes unknown (Oracle.ManagedDataAccess.Client.OracleConnection conn, accessor OracleInternal.TTC.Accessors.Accessor, long fetchSize, Oracle.ManagedDataAccess.Client.PrmEnumType enumType, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution) Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleParameter.PostBind_RefCursor (connection Oracle.ManagedDataAccess.Client.OracleConnection, OracleInternal.TTC.Accessors.Accessor bindAccessor, long fetchSize, Oracle.ManagedDataAccess.Types.OracleIntervalDS sessionTimeZone, string commandText, string paramPosOrName, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown Oracle.ManagedDataAccess.dll! OracleInternal.ServiceObjects.OracleCommandImpl.ExtractAccessorValuesIntoParam (Oracle.ManagedDataAccess.Client.OracleParameterCollection paramColl, Oracle.ManagedDataAccess.Client.OracleConnection connection, string commandText, long longFetchSize, long lobFetchSize, long [] scnFromExecution) unknown Oracle.ManagedDataAccess.dll! Unknown Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader(bool requery, bool fillRequest, System.Data.CommandBehavior behavior) Oracle.ManagedDataAccess.dll! Oracle.ManagedDataAccess.Client.OracleCommand.ExecuteReader (unknown) > ManagedSimpleRefCursor1.exe! NoddyConsole.Program.Command_ExecuteReader_BindByName_Fails (Line 63 c#)
Example:
----
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Oracle.ManagedDataAccess.Client;
using Oracle.ManagedDataAccess.Types;
using System.Data;
namespace NoddyConsole
{
public class Program
{
public static int Main (string [] args)
{
Error int = 0;
Errors += Command_ExecuteReader_BindByName_Fails();
Errors += UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails();
return errors;
}
public static int Command_ExecuteReader_BindByName_Fails()
{
Error int = 0;
Try
{
var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");
var conn = new OracleConnection ("user Id = UNIT620; Password = UNIT620; ("Data Source = / / ln1apidb01:1521 / fm");
Conn. Open();
IRRELEVANT
OracleGlobalization og is conn. GetSessionInfo();
og. DateFormat = "HH24:MI:SS MON-DD-YYYY";
Conn. SetSessionInfo (og);
var cmd is conn. CreateCommand();
cmd.CommandType = CommandType.Text;
BindByName. cmd = true;
cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;
var prm1 is cmd. CreateParameter();
PRM1. ParameterName = "rc";
PRM1. Direction = ParameterDirection.ReturnValue;
PRM1. OracleDbType = OracleDbType.RefCursor;
cmd. Parameters.Add (prm1);
/ * SHAUN.recreate_issue_1 * /.
var prm2 is cmd. CreateParameter();
PRM2. ParameterName = "in_code";
PRM2. Direction = ParameterDirection.Input;
PRM2. OracleDbType = OracleDbType.Varchar2;
PRM2. Value = "A";
cmd. Parameters.Add (prm2);
/* */
var reader is cmd. ExecuteReader(); FAILS to System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)
/* *-/
OracleRefCursor orc = null;
cmd ExecuteNonQuery()); must fail here
ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;
If (orc is nothing)
throws InvalidOperationException new ("Invalid return the ref cursor type");
var = orc player. GetDataReader();
/* */
While (reader. Read
{
var values = new object [reader. FieldCount];
drive. GetOracleValues (values);
for (int i = 0; i < values.) Length; (++ I)
{
Console.WriteLine(values[i]);
}
}
drive. Dispose();
cmd. Dispose();
Conn. Dispose();
}
catch (Exception ex)
{
Console.Error.WriteLine (ex) Message);
Errors ++;
}
Finally
{
Return (true);
}
return errors;
}
public static int UseReturnValue_Command_ExecuteNonQuery_BindByName_Fails()
{
Error int = 0;
Try
{
var conn = new OracleConnection ("UID = USER; Password = PASS; ("Data Source = / / your-host: 1521 / yours-sid");
Conn. Open();
IRRELEVANT
OracleGlobalization og is conn. GetSessionInfo();
og. DateFormat = "HH24:MI:SS MON-DD-YYYY";
Conn. SetSessionInfo (og);
var cmd is conn. CreateCommand();
BindByName. cmd = true; // ####
cmd.CommandText = "START: rc: = SHAUN.recreate_issue_1 (in_code = >: in_code); END; « ;
cmd.CommandText = "START: rc: = SHAUN.recreate_issue_2; END; « ; No params, works
var prm1 is cmd. CreateParameter();
PRM1. ParameterName = "rc";
PRM1. Direction = ParameterDirection.ReturnValue;
PRM1. OracleDbType = OracleDbType.RefCursor;
cmd. Parameters.Add (prm1);
/ * SHAUN.recreate_issue_1 * /.
var prm2 is cmd. CreateParameter();
PRM2. ParameterName = "in_code";
PRM2. Direction = ParameterDirection.Input;
PRM2. OracleDbType = OracleDbType.Varchar2;
PRM2. Value = "A";
cmd. Parameters.Add (prm2);
/* */
var reader is cmd. ExecuteReader();
OracleRefCursor orc = null;
HERE does NOT cmd. BindByName = true; System.FormatException first-chance exception in at System.Number.StringToNumber (String str, NumberStyles options, NumberBuffer & number, NumberFormatInfo info, Boolean parseDecimal)
cmd ExecuteNonQuery());
ORC = cmd. Parameters ["rc"]. Value as OracleRefCursor;
If (orc is nothing)
throws InvalidOperationException new ("Invalid return the ref cursor type");
var = orc player. GetDataReader();
While (reader. Read
{
var values = new object [reader. FieldCount];
drive. GetOracleValues (values);
for (int i = 0; i < values.) Length; (++ I)
{
Console.WriteLine(values[i]);
}
}
drive. Dispose();
ORC. Dispose();
cmd. Dispose();
Conn. Dispose();
}
catch (Exception ex)
{
Console.Error.WriteLine (ex) Message);
Errors ++;
}
Finally
{
Return (true);
}
return errors;
}
}
}
---
create or replace package THAT SHAUN is
type ref_cur_type is ref cursor;
function recreate_issue_1)
in_code varchar2: = null
) return ref_cur_type;
end SHAUN;
/
create or replace package body what SHAUN
-TTS000233
function recreate_issue_1)
in_code varchar2: = null
) return ref_cur_type is ref_cur ref_cur_type;
Start
Open the ref_cur for
Select UO.object_name from user_objects UO;
Return ref_cur;
end recreate_issue_1;
end SHAUN;
/
---
Thanks a lot to qualify again for me Alex. I'll try upgrading to the latest version of the provider.
The difference in behavior between the two hosts was found to be reduced to differences in configuration VS.
Checking 'Just my code' prevents the first chance thrown in the debugger exception. As in fact, the exception is handled in the provider, it is enough for me.
Maybe you are looking for
-
Restore iTunes after the recovery of the El Capitan of Time Machine OS
So, I installed El Capitan. And Safari does not work... so I made the recovery of TM to previous operating system (10.11.5). Fixed my problem Safari but not iTunes (this copy of iTunes is damaged or is not installed properly. Please reinstall iTune
-
Tecra A4 won't start no-switches power off after 3 seconds
Hey all,. I really hope you can help me on this. I recently bought a step expensive laptop Toshiba Tecra A4 to Ebay. He said there is a disk failure hard only... it's not. When I try to turn on the laptop, the lights come on and the DVD player starts
-
SD card reader does not work on Tecra M5 PTM51E
I have the same problem on my Tecra M5-ptm51e. When I put the sd card in the card reader that it returns code 10 (cannot start device) I already try this on Vista and Windows XP (sp2 and sp3) and I do not know what to do.
-
New upgrade SSD carbon type X 1 to 512 GB - same procedure as that of the old carbon X 1?
Is equivalent to the procedure of SSD upgrade the old carbon X 1? What is the part number for the current 512 GB SSD module?
-
How to change my Office information?
I can't change my wallpaper. How to change pls help me?