ValuePattern.SetValue Throws ElementNotAvailableException (Inner Exception of InvalidOperationException)

I have a Wpf FrameworkElement derived control that offers a custom AutomationPeer:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Automation.Provider;
namespace TSystem.Content
internal class MarkTopicElementAutomationPeer : FrameworkElementAutomationPeer, IValueProvider
private static readonly Dictionary<string, TcsMarkStates> StringToStateMap = new Dictionary
<string, TcsMarkStates>
{"Positive", TcsMarkStates.Positive},
{"Negative", TcsMarkStates.Negative},
{"Neutral", TcsMarkStates.Neutral}
#region Constructors
public MarkTopicElementAutomationPeer(FrameworkElement owner) : base(owner)
if (!(owner is MarkTopicElement))
throw new ArgumentException("Owner must derive from MarkTopicElement");
#endregion
#region Automation Peer Overrides
protected override string GetNameCore()
StringBuilder name = new StringBuilder();
name.AppendFormat("MarkTopicElement:{0}:{1}", OwnerAsElement.Caption, OwnerAsElement.ElementID);
Topic parentTopic = OwnerAsElement.FindLogicalAncestorByType<Topic>();
if (null != parentTopic)
name.AppendFormat(":ParentTopic:{0}:{1}", parentTopic.GetType(), parentTopic.Instance);
return name.ToString();
public override object GetPattern(PatternInterface patternInterface)
return patternInterface == PatternInterface.Value ? this : base.GetPattern(patternInterface);
protected override AutomationControlType GetAutomationControlTypeCore()
return AutomationControlType.ComboBox;
protected override bool IsContentElementCore()
return true;
protected override bool IsControlElementCore()
return true;
#endregion
#region IValueProvider Implementation
public bool IsReadOnly
get { return OwnerAsElement.ReadOnly; }
public void SetValue(string value)
OwnerAsElement.ChangeMarkState(StateFromString(value));
public string Value
get { return OwnerAsElement.MarkState.ToString(); }
#endregion
#region Helper methods
private MarkTopicElement OwnerAsElement
get { return (MarkTopicElement) Owner; }
private static TcsMarkStates StateFromString(string value)
TcsMarkStates state;
return (StringToStateMap.TryGetValue(value, out state) ? state : TcsMarkStates.Neutral);
#endregion
However, when I try to access its implementation the ValuePattern:
WpfComboBox mark = HistoryPage.UIEVSite234Window.UIHostedPageWindow.UIItemCustom.UIItemCustom11.StartedTopic.StartedJustPTA;
var markElement = (AutomationElement) mark.NativeElement;
ValuePattern pattern = (ValuePattern) markElement.GetCurrentPattern(ValuePattern.Pattern);
pattern.SetValue("Positive");
It throws this exception:
Result Message: 
Test method EVTCSTest.HistoryStartedTest.SetStartedToPositive threw exception:
System.Windows.Automation.ElementNotAvailableException: Element not available ---> System.InvalidOperationException: Operation is not valid due to the current state of the object.
Result StackTrace: 
at UIAutomationClient.IUIAutomationValuePattern.SetValue(String val)
   at System.Windows.Automation.ValuePattern.SetValue(String value)
 --- End of inner exception stack trace ---
    at System.Windows.Automation.ValuePattern.SetValue(String value)
   at EVTCSTest.HistoryStartedTest.SetStartedToPositive() in c:\Development\zTest\EVTCSTest\EVTCSTest\HistoryStartedTest.cs:line 46
Any ideas why this may be?  I know that the element is enabled and is not read only.
One final update...I have confirmed that it is getting to my implementation of the read-only Value property of my automation peer.  However it doesn't seem to even be reaching my implementation of SetValue.
Thanks,
Kelly Hilliard

Hi,
Based on your description, I don’t think that the issue is really related to Coded UI test itself. Your issue is mainly on setting a value using ValuePattern.SetValue. I think it is more related to accessibility and automation. I noticed that you post a
new thread on Windows Desktop Development for Accessibility and automation forum:
http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/8c8f4566-22df-4944-ba57-13898dcec6be/valuepatternsetvalue-throws-elementnotavailableexception-inner-exception-of?forum=windowsaccessibilityandautomation#8c8f4566-22df-4944-ba57-13898dcec6be
I am not an expert on accessibility and automation, I am sorry for that I can’t provide you something useful about ValuePattern.SetValue method’s usage. I think that community members on Windows Desktop Development for Accessibility and Automation forum
will help you resolve this issue better.
Thank you for your understanding and support.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • SharePoint Search Service upgrade to 2013 fails: "Inner Exception: An item with the same key has already been added."

    Here's the situation:
    Upgrading a SharePoint Server 2010 Search Service Application dB to our SharePoint 2013 SP 1 development environment, using the Management Shell
    Running the following commands: 
    $applicationPool= Get-SPServiceApplicationPool -Identity 'SearchService_AppPool'
    $searchInst = Get-SPEnterpriseSearchServiceInstance -local
    Restore-SPEnterpriseSearchServiceApplication -Name 'SearchServiceApplication' -applicationpool $applicationPool -databasename 'SearchServiceApplicationDB' -databaseserver SERVERNAME -AdminSearchServiceInstance $searchInst
    Creates the search dBs (crawl, links, analytics) successfully; however, in the end, I get....
    "Exception: Action 15.0.107.0 of Microsoft.Office.Server.Search.Upgrade.SearchAdminDatabaseSequence failed."
    Looking at the ULS logs, I find the following:
    Inner Exception: An item with the same key has already been added.
    at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)     at Microsoft.Office.Server.Search.Administration.OOTBSchemaDefinition.FindAndFixExistingManagedProperties()     at Microsoft.Office.Server.Search.Administration.OOTBSchemaDefinition.InstallManagedProperties(Boolean
    upgrade)     at Microsoft.Office.Server.Search.Administration.OOTBSchemaDefinition.Upgrade()     at Microsoft.Office.Server.Search.Upgrade.UpdateAllOOTBProperties.Upgrade()     at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()
    Exception: Action 15.0.107.0 of Microsoft.Office.Server.Search.Upgrade.SearchAdminDatabaseSequence failed.
    at Microsoft.SharePoint.Upgrade.SPActionSequence.Upgrade()     at Microsoft.SharePoint.Upgrade.SPDatabaseSequence.Upgrade()     at Microsoft.Office.Server.Search.Upgrade.SearchDatabaseSequence.Upgrade()     at Microsoft.SharePoint.Upgrade.SPUpgradeSession.Upgrade(Object
    o, Boolean bRecurse)
    Anyone encounter anything like this during their search upgrade process? I'm not honestly even sure what duplicate value to look for at this point, if I were to run a SELECT Id, ClassId, ParentId, Name, Status, Version, Properties FROM Objects on
    "SharePoint_Config" in SSMS. Any insight or opinions on the matter are welcome; and thanks to those who choose to reply to this, in advance.

    Hi ,
    You can enable the ULS log on verbose level (note, remember to reset to default level after finished troubleshooting) for more information per the following article, then check there should be more useful message for helping solve the issue.
    http://www.brightworksupport.com/enabling-verbose-logging-to-compare-against-c/
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/12c99279-d3aa-46de-bc57-d5d250692ff0/upgrade-of-search-service-application-from-2010-to-2013-failure?forum=sharepointadmin
    https://www.simple-talk.com/blogs/2014/04/22/sharepoint-2010-to-2013-search-service-application-upgrade-issueaction-15-0-80-0-fails/http://blogs.msdn.com/b/biyengar/archive/2009/10/27/psconfig-failure-with-error-an-item-with-the-same-key-has-already-been-added.aspx
    Thanks,
    Daniel Yang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected] 
    Daniel Yang
    TechNet Community Support

  • Receive the following error message when trying to approve or reject from Pending "The service threw an unknown exception. See inner exception for details"

    Hi, The server agent was grayed out.  I uninstall it from control panel and removed it from agent managed.  When I tried to install the agent, it failed.  I installed the agent manaully and tried to approve it received the error message
    "The service threw an unknown exception. See inner exception for details"  I have the details but does not tell me much (I can post it).  I removed it from control panel (while still showin in pending),
    and tried to reject it.  Again, received the same error message as above.  This a very critical server, could someone help me with this issue?  Thanks, Ziba

    Thank you Alexey, please see the following details:
    Date: 8/19/2010 7:28:51 AM
    Application: System Center Operations Manager 2007 R2
    Application Version: 6.1.7221.0
    Severity: Error
    Message:
    Microsoft.EnterpriseManagement.Common.UnknownServiceException: The service threw an unknown exception. See inner exception for details. ---> System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]:
    Exception of type 'Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException' was thrown. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
    Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException: Exception of type 'Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException' was thrown.
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DataAccessUtility.GetManagedEntityKeyValuePairs(IList`1 baseManagedEntityIds, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.DiscoveryDataManager.DeleteUserActionManagersByAgentPendingActionId(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccess.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccessTieringWrapper.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccessExceptionTracingWrapper.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at ...).
       --- End of inner exception stack trace ---
       at Microsoft.EnterpriseManagement.DataAbstractionLayer.SdkDataAbstractionLayer.HandleIndigoExceptions(Exception ex)
       at Microsoft.EnterpriseManagement.DataAbstractionLayer.AdministrationOperations.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Administration.ManagementGroupAdministration.RejectAgentPendingActions(IList`1 monitoringObjects)
       at Microsoft.EnterpriseManagement.Mom.Internal.UI.Views.PendingManagementView.<>c__DisplayClass8.<OnRejctAgent>b__7(Object , ConsoleJobEventArgs )
       at Microsoft.EnterpriseManagement.Mom.Internal.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)
    System.ServiceModel.FaultException`1[System.ServiceModel.ExceptionDetail]: Exception of type 'Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException' was thrown. (Fault Detail is equal to An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true,
    whose value is:
    Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException: Exception of type 'Microsoft.EnterpriseManagement.Common.DataItemDoesNotExistException' was thrown.
       at Microsoft.EnterpriseManagement.Mom.DataAccess.DataAccessUtility.GetManagedEntityKeyValuePairs(IList`1 baseManagedEntityIds, DatabaseConnection databaseConnection)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.DiscoveryDataManager.DeleteUserActionManagersByAgentPendingActionId(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccess.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccessTieringWrapper.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at Microsoft.EnterpriseManagement.Mom.ServiceDataLayer.SdkDataAccessExceptionTracingWrapper.RejectAgentPendingActions(IList`1 agentPendingActionIds)
       at ...).

  • WPUMFactory.getUserFactory() throws null pointer exception

    Hi,
    I am trying to use KM API's to read files from KM repository. I am using the below code as mentioned in the blog: How to download KM documents using Web Dynpro Java
    Below is my code:
    IWDClientUser wdClientUser = WDClientUser.getCurrentUser();
    com.sap.security.api.IUser sapUser = wdClientUser.getSAPUser();
    IUser epUser = WPUMFactory.getUserFactory().getEP5User(sapUser);
    However the line WPUMFactory.getUserFactory() throws null pointer exception. Can some one please help on why these happens as these seems to be the standard code to read a file from KM.
    Thanks.
    Regards,
    Ponraj M

    Hi Ponraj ,
    Instead of fetching the current logged on user , use the below line to set the resource context and see if it helps .
    com.sapportals.wcm.repository.IResourceContext resourceContext = ResourceFactory.getInstance().getServiceContext("cmadmin_service");
    cmadmin_service is a existing user that can be used to access KM resources .
    Regards
    Mayank

  • How to throw a permanent exception during mapping?

    I'm using the java coding: "throw new RuntimeException(message);" to trigger an error during mapping.
    This will set the message status to: "System error, manual restart possible".
    How can I throw a permanent exception during mapping? So that the message is set to error but will NOT be restartable.

    Hi,
    Any error in  asynchronous mode in XI will be in a Restart Mode.  I dont think this can be done.
    /people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
    /people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically
    Regards,
    Bhavesh

  • Vector.clear() throws null pointer exception

    is there anything wrong in my code. when i try to clear the vector irrespective of whether i add elements to it or not, if there are no elements added to the vector v1.clear() it throws null pointer exception
    Vector v1 = new Vector(1,1);
    v1.clear()

    And the guessing game continues... anyone for a shortctu to duplicate this problem?
    public class NullVectorCreator
        private Vector v1;//just love the name, so clear and unambiguous... :)
        public NullVectorCreator
             Vector v1 = new Vector();//well done - a local variable masquerading as
                                                          // a class member
        public Vector getVector()
             return v1;
        public static void main(String[] args)
               NullVectorCreator nvc = new NullVectorCreator();
                nvc.getVector().clear();//Why does this throw an NPE? why? java is bugged!
    }

  • When error says "See the inner exception for more details."

    Errors in Power Query say "See the inner exception for more details."  How does one do this? Thanks.

    First, a disclaimer: this is behavior which exists in preview builds to help us with debugging. It is not a supported feature of the product and may change or disappear in future releases of Power Query.
    That said, to enable tracing find this registry key: [HKEY_CURRENT_USER\Software\Microsoft\Microsoft Power Query for Excel] and set TracingEnabled = 1 (REG_DWORD). You'll probably need to exit and restart Excel for the change to take effect. Log files will
    be saved under the path %LOCALAPPDATA%\Microsoft\Power Query\Traces, and separate log files are written for the code running in Excel itself and for the code running in a helper process. The trace files are quite verbose, so you'll want to turn them off as
    soon as you have the information you need.
    But I want to stress that any place where you have a bad experience is a place where another user might have a bad experience too. We'd rather fix any problems for all users than to enable individual users to troubleshoot things on their own.

  • Should a signed applet ever throw a security exception?

    hi,
    I've had a few times when a signed applet seems to throw a security exception (at the moment am trying to figure out a SocketException being thrown).
    I thought if the applet was signed, and when the browser asks if you want to grant it permissions you press Yes (which I do), then there should not be any security issues?
    thanks,
    asjf

    A signed applet has to assert which permissions it wants. The client JVM then asks the user if they will give those permissions to the signer. If the applet tries to do something for which it hasn't been granted permission a security exception is thrown.

  • How to throw a SOAP exception

    Hi,
    I have a requirement from customer that when they call the WSDL from their app and the workflow will not get what it should, that it should throw standard SOAP exception.
    To give more details on it, they will send for example input string "A" and based on that I will return output string "B" in the process.
    Now if they ask for "C" for instance, I need to be able to throw that SOAP exception. Is that possible? The process in workbench consists of simple decision point and set value activity based on route conditions.
    Thanks
    J.

    I am assuming you are wanting something to come back as a SOAP fault element?
    Unhandled process exceptions are sent back as faults. So, theoretically, you could write a service component to do nothing but throw an exception. Then you could route your process to call that in specific situations.
    As an alternative, I would consider having something like an additional 'status' output variable that always came back in the response which indicated the status of your process.
    Good Luck,
    Ryan M. Jacobs
    [email protected]
    Cardinal Solutions Group

  • HttpURLConnection throws a FileNotFound exception

    Hi Everybody,
    I want to post the data to a remote servlet using HttpURLConnection.
    But it throws a FileNotFound exception. Pls send me the solution.
    My code is
    First Servlet:
    ==============
    import java.io.*;
    import java.net.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Test extends HttpServlet {
         public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws IOException, ServletException {
    response.setContentType("text/html");
              URL url = new URL("http://node_18:8080/examples/servlet/HelloWorldExample1");
              HttpURLConnection conn = (HttpURLConnection) url.openConnection();
              conn.setRequestMethod("POST");
              //HttpURLConnection.setFollowRedirects(true);
              conn.setUseCaches(false);
              conn.setDoOutput(true);
              conn.setDoInput(true);
              String postData = "name=value&othername=value";
              String lengthString = String.valueOf(postData.length());
              conn.setRequestProperty("Content-Length", lengthString);
              conn.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
              Writer out = new OutputStreamWriter(conn.getOutputStream());
              out.write(postData);
              out.close();
              PrintWriter out1 = response.getWriter();
              BufferedReader in =
              new BufferedReader(new InputStreamReader(conn.getInputStream()));
              String line = null;
              while (null != (line = in.readLine()))
              out1.println(line);
              in.close();
              out1.close();
    Second Servlet:
    ================
    import java.io.*;
    import java.text.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloWorldExample1 extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String name = request.getParameter("name");
    String othername = request.getParameter("othername");
    System.out.println("name = "+name+" othername = "+othername);
    out.println("<html>");
    out.println("<head>");
         out.println("<title> Test </title>");
    out.println("</head>");
    out.println("<body bgcolor=\"white\">");
         out.println("Test");
    out.println("</body>");
    out.println("</html>");
    public void destroy() {
         System.out.println("Servlet Destroyed");
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException
         doPost(request,
    response);
    Error:
    =======
    java.io.FileNotFoundException: http://node_18:8080/examples/servlet/HelloWorldExample1
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:574)
         at Test.doGet(Test.java:37)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at filters.ExampleFilter.doFilter(ExampleFilter.java:149)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:213)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:471)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
         at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:623)
         at java.lang.Thread.run(Thread.java:484)

    Hi p200002,
    I call doPost method in doPost in the second servlet. It will be
    public void doPost(HttpServletRequest request,
    HttpServletResponse response)
    throws IOException, ServletException
         doGet(request,
    response);
    }

  • Inner Exception The provider is not compatible with the version of Oracle

    I am using the 64 bit ODP and Net 2.0 SDK in a C# program which runs standalone and is also hosted by another win32 process.
    When running standalone it works ok. But when being hosted by another process, I get the following exceptions thrown when i create a connection:
    INFO 2007-01-10 12:38:26,843 265ms frmCCMain LogMessage - Exception During Batch Processing1: [The type initializer for 'Oracle.DataAccess.Client.OracleConnection' threw an exception.]
    INFO 2007-01-10 12:38:26,843 265ms frmCCMain LogMessage - Inner Exception The provider is not compatible with the version of Oracle client
    I checked the DllPath value under the ODP.NET key and it points to the directory where OraOps10w.dll is installed. I also tried copying that Dll into the host process working directory and searched and found no other versions of that DLL.

    Yes, this sounds like you may be using the 9.2 client with ODP.NET and ASP.NET Providers for 11g. Usually, you can stop and start IIS to resolve this. IIS will then pick up that the 11g client directory is first in the Windows PATH, ahead of the 9.2 client directory, then use that for any subsequent Oracle client calls.

  • Purpose of throws clause in exception handling

    hi all,
    I have written a sample code for exception handling...please refer below....
    class a
    void fun() throws ArithmeticException
    int i=0;
    i=10/0;
    class exec
    public static void main(String a[])
    a a1=new a();
         try{a1.fun();}
         catch(ArithmeticException e){System.out.println("hi");}
    }

    I read the article...and came out with these points...
    1..If method is throwing an unchecked exception (as in this case) then there is no need for throws clause, if you are not catching it then and there only.....
    2...if a method is throwing a checked exception then either you need to catch it then and there only or you must specify a throws clause for the same in function definition......*And the purpose of not catching it then and there only is*
    "For example, if you were providing the ListOfNumbers class as part of a package of classes, you probably couldn't anticipate the needs of all the users of your package. In this case, it's better to not catch the exception and to allow a method further up the call stack to handle it."
    M I RIGHT??

  • Wehre can i find all the throw and catch exceptions

    I havent had much success figuring out which predefined exceptions i should/can use. Can someone please guide me where i can find out what kind of throw and catch exceptions are there in java and how and where can i find them. thanks.

    Read this first: http://java.sun.com/docs/books/jls/second_edition/html/exceptions.doc.html#44044
    You can't find them all anywhere. You'll just encounter them as you use different APIs.
    One of the most basic concepts around exceptions has to do with the difference between checked and unchecked exceptions. Any exception that extends RuntimeException is unchecked. Which means that if you call a method that throws an unchecked exception, you don't have to provide a catch block. These exceptions are usually thrown for things that could be avoided, i.e. programmer error.
    The compiler will require you to have a catch block for all checked exceptions. This means you should take steps in your code to handle them and retry the operation, such as user errors.

  • Getting inner exception "dtd is prohibited in this xml document exchange" while reading emails from outlook

    Getting error "The response received from the service didn't contain valid XML." with inner exception "dtd is prohibited in this xml document exchange" while reading emails from outlook(Not while reading every mail).
    Can anybody please tell me what might be the issue. Below is the code where I am getting error
    FindItemsResults<Item> RetrievedItems=null ;
    RetrievedItems = service.FindItems(FIds, new ItemView(4));
    String[] SignatureList = ConfigurationManager.AppSettings.Get("SignatureTypes").Split(',');
    if (RetrievedItems != null && RetrievedItems.Count() > 0)
    RetrievedItems.ToList().ForEach(x =>
    try
    List<String> Attachments = new List<String>();
    List<String> ScanFileName = new List<String>();
    bool IsAvailable = true;
    //Getting error while Load() - below line of code
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Load();
    Vo.EmailMessage msg = new Vo.EmailMessage();
    msg.MessageId = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Id.UniqueId;
    msg.From = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).From.Address;
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).ToRecipients.ToList().ForEach(z => msg.To += z.Address + ",");
    ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).ReplyTo.ToList().ForEach(y => msg.ReplyToEmailAddress += y.Address + ",");
    msg.Subject = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Subject;
    msg.Body = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).Body.Text;
    msg.Dated = ((Microsoft.Exchange.WebServices.Data.EmailMessage)x).DateTimeSent;
    Please help.

    Hi,
    Thank you for your post.
    This is a quick note to let you know that we are performing research on this issue.
    Niko Cheng
    TechNet Community Support

  • Throwing Client Soap Exceptions

    I am writing j2ee web services and would like to throw Client soap exceptions when a input validation error occurs. Currently I can throw a soap exception and have the msg= be set to what I would like. I cannot set the faultCode to what I would like.
    An example of the kind of errors I am generating.
    SOAPException: faultCode=SOAP-ENV:Server; msg=Input SSN is not valid.]
    An exmpale of the kind of error I would like to generate.
    SOAPException: faultCode=SOAP-ENV:Client; msg=Input SSN is not valid.]
    Thank you,
    David Schwartz

    Hi ,
    The client does not have a hook on the SOAP Fault(or for that matter , the SOAP message ).It only receives the marshalled java objects from the proxy.
    You might hack the generated proxy code , and hack further into the Response objects , and the Fault object to create your customized fault .
    Thanks
    Anirban

Maybe you are looking for

  • Accessing internal tables at runtime.

    Hi all, I am writing a code where in i have to transfer data from excel to database table. Iam getting the excel data in an itab. Can anybody help me with how to access internal tables at runtime ? i am using the following code with sy-tabix. here, w

  • Back to My Mac - can't figure out NAT stuff

    So I'm far from technical...I just can't figure out how to get Back To My Mac (BTMM) to work. I am setting this up from home now... I have walked through the BTMM manual: I start in AirPort Utility and select my Base Station. To be able to see the "I

  • Can't change songs on new ipod in iTunes

    I just went from a first gen iPod to a 5th gen, and I notice that I used to be able to edit the pod's playlist in itunes. Now, when I try to go directly to the new ipod's playlist, everything's greyed out. It's there, but greyed out. What's this all

  • Syncing work google calendar

    im wanting to have all my work (google) calendar synced on my mac and on my iphone, is it best to sync it to my macs ical then sync that to my iphone with itunes, or sync it straight to my iphone and have it sync to my mac via itunes? or can you do b

  • Session  problem in LSMW.

    Hi,         For uploading the FIXED ASSETS to system, i am using the Standard Batch input method with object 0160, method 0001 and program name RAALTD01.      The problem is with the create batch input session step. This step is directly processing t