Unreachable statement error occured while using return statement.

Consider this code
class q25{
     public static void main(String args[]){
          amethod(args);
     public static void amethod(String args[]){
          String str;
          try{
               str = "Hello "+args[0];
               System.out.println(str);
               System.out.println("Returning to caller");
               System.exit(0);
          catch(Exception e){
               System.out.println("Exception ocured");
               System.exit(0);          
          finally{
               System.out.println("In finally");
          System.out.println("At the end of method");     
}Above code compiles and runs successfully without any errors.
Now consider below code which is same as above one except "System.exit(0)" statements were replace by "return" statements. Below code when compiled gives error as
"q25.java:22: unreachable statement
System.out.println("At the end of method");
^
1 error"
One thing i didn't understood in this context that, the above code when compiled should get same error as stated above. But not. It is obvious that presence of System.exit(0) must generate unreachable statement same as when it is replaced by "return" statement. What is the difference in getting the error for above but not for below code. Pls anyone help.
class q25{
     public static void main(String args[]){
          amethod(args);
     public static void amethod(String args[]){
          String str;
          try{
               str = "Hello "+args[0];
               System.out.println(str);
               System.out.println("Returning to caller");
               return;
          catch(Exception e){
               System.out.println("Exception ocured");
               return;     
          finally{
               System.out.println("In finally");
          System.out.println("At the end of method");     
}

warnerja wrote:
masijade. wrote:
Since you have a "return" in both the try and the catch portions of the try/catch block *(the second of which you should never do)* , anything thing that comes after the try/catch/finally blocks will be unreachable.That is not true. There are plenty of reasons to return from a catch block. If you handle the exception instead of rethrowing it or another exception, then you'll need a return somehow, either there or after the catch block. What you should never do is "return" in a finally block, because that will mask any exception in flight about to be thrown to the caller.Perhaps masijade's use of never is too strong, but I too prefer/tend to avoid using return anywhere in try/catch/finally to avoid potential gotchas. Consider:
public class TryCatchFinally
  public Data process(String s)
    Data returnData = new Data();
    try
      returnData.value = Integer.parseInt(s);
      returnData.message = "Success";
      return returnData;
    catch (Exception ex)
      returnData.value = -1;
      returnData.message = "Fail";
      return returnData;
    finally
      returnData.value = 42;
      returnData.message = "?";
  public static void main(String[] args)
    TryCatchFinally demo = new TryCatchFinally();
    Data d = demo.process("2");
    System.out.println(d.message + ": " + d.value);
    d = demo.process("2.1");
    System.out.println(d.message + ": " + d.value);
  class Data
    int value = 0;
    String message = "";
}

Similar Messages

  • WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.

    I have two forests with a transitive on-way trust between them: PROD -> TEST (test trusts PROD). I had previously had kerberos authentication working with winrm from PROD to machines in TEST. I have verified the trust is healthy, I also verified users
    in TEST can use WINRM with kerberos just fine. Users from PROD cannot connect via kerberos to machines in TEST with winrm.
    I have verified the service has registered the appropriate SPNs. I ran dcdiag against all my PROD and TEST domain controllers and didn't find anything that would prevent kerberos from happening. I even tried disabling the firewall entirely on my TEST dcs
    but that didn't gain me anything.
    I've enabled kerberos logging but only see the expected errors such as it couldn't find a PROD SPN for the machine, which it shouldn't from what I understand, it should go to the TEST domain and find the SPN from there.
    I'm really out of next steps before I call PSS and hope someone here has run into this and could provide me some next steps.
    PowerShell Error:
    Connecting to remote server failed with the following error message : WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.  
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic.
        + CategoryInfo          : OpenError: (:) [], PSRemotingTransportException
        + FullyQualifiedErrorId : PSSessionStateBroken
    winrs Error:
    Winrs error:
    WinRM cannot process the request. The following error occured while using Kerberos authentication: The network path was not found.  
     Possible causes are:
      -The user name or password specified are invalid.
      -Kerberos is used when no authentication method and no user name are specified.
      -Kerberos accepts domain user names, but not local user names.
      -The Service Principal Name (SPN) for the remote computer name and port does not exist.
      -The client and remote computers are in different domains and there is no trust between the two domains.
     After checking for the above issues, try the following:
      -Check the Event Viewer for events related to authentication.
      -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
     Note that computers in the TrustedHosts list might not be authenticated.
       -For more information about WinRM configuration, run the following command: winrm help config.

    Hi Adam,
    I'm a little unclear about which SPNs you were looking for, in which case could you confirm you were checking that on the computer object belonging to the actual destination host it has the following SPNs registered?
    WSMAN/<NetBIOS name>
    WSMAN/<FQDN>
    If you were actually trying to use WinRM to connect to the remote forest's domain controllers, then what you said makes sense, but I was caught between assuming this was the case or you meant another member server in that remote forest.
    Also, from the client trying to connect to this remote server, are you able to telnet to port 5985? (If you've used something other than the default, try that port)
    If you can't, then you've got something else like a firewall (be that the Windows firewall on the destination or a hardware firewall somewhere in between) blocking you at the port level, or the listener on the remote box just isn't working as expected. I
    just replied to your other winrm post with steps for checking the latter, so I won't repeat myself here.
    If you can telnet to it and the SPNs exist, then you might be up against something called selective authentication which has to do with how the trust was defined. You can have a read of
    this to learn a bit more about selective trusts and whether or not it's affecting you.
    Cheers,
    Lain

  • Working fine with JAVA code and Error Occured while using in JSP

    Hi.....
    When initiating a BPEL process from JAVA the code is working fine and the Process is getting initiated.But while using that code in J2EE project as a java code and while calling that method Error is occuring.....
    Here by i am attaching my JAVA Code which runs as an applicateion and package which runs in Server....
    JAVA Code (Run as Application) Working Fine:
    package bo;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import java.util.Map;
    import java.util.Properties;
    import oracle.xml.parser.v2.XMLElement;
    /*import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession; */
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class processit {
         public static void main(String args[]){
              String input = "TATA";
              String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
              String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
              xml=xml+"<ns1:input>"+input+"</ns1:input>";
              xml=xml+"</ns1:BPELProcess1ProcessRequest>";
              try{
              Properties props=new Properties();
              props.setProperty("orabpel.platform","ias_10g");
              props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
              props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
              props.setProperty("java.naming.security.principal","oc4jadmin");
              props.setProperty("java.naming.security.credentials","oc4jadmin");
              props.setProperty("dedicated.rmicontext", "true");
              Locator locator = new Locator("default", "bpel", props);
              System.out.println("After creating the locator object......");
              IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
              System.out.println("Before creating the NormalizedMessage object......");
              NormalizedMessage nm = new NormalizedMessage();
              System.out.println("After creating the NormalizedMessage object.*.*.*...");
              nm.addPart("payload", xml);
              System.out.println("Before creating response object......");
              NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
              System.out.println("After calling the BPELProcess1 .*.*.*...");
              Map payload = res.getPayload();
              System.out.println("BPEL called");
              XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
              String replyText=xmlEl.getText();
              System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
              catch (Exception e) {
              System.out.println("Exception : "+e);
              e.printStackTrace();
    JSP and Java Method Used:
    JSP Code:
    ===============
    <%@ page import=" bo.callbpel" %>
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>FEATT - I30</title>
    </head>
    <body>
    <%
    String input=request.getParameter("dnvalue");
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    out.print("The Input Given to the BPEL Process is : "+input);
    %>
    <BR><BR><BR><BR><BR><BR>
    <%
    out.print("The Reply from BPEL Process is : "+Output);
    %>
    </body>
    </html>
    Java Code:
    package bo;
    import com.oracle.bpel.client.Locator;
    import com.oracle.bpel.client.NormalizedMessage;
    import com.oracle.bpel.client.delivery.IDeliveryService;
    import java.util.Map;
    import java.util.Properties;
    import oracle.xml.parser.v2.XMLElement;
    /*import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletConfig;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest ;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession; */
    //import java.util.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;
    public class callbpel {
         public String Initiate(String value){
              String replyText=null;
              String input = value;
              System.out.println(input);
              String xmlInput= "<ns1:AccessDBBPELProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/AccessDBBPEL\"><ns1:input>"+input+"</ns1:input></ns1:AccessDBBPELProcessRequest>";
              String xml="<ns1:BPELProcess1ProcessRequest xmlns:ns1=\"http://xmlns.oracle.com/BPELProcess1\">";
              xml=xml+"<ns1:input>"+input+"</ns1:input>";
              xml=xml+"</ns1:BPELProcess1ProcessRequest>";
              try{
              Properties props=new Properties();
              props.setProperty("orabpel.platform","ias_10g");
              props.setProperty("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
              props.setProperty("java.naming.provider.url","opmn:ormi://157.227.132.226:6003:home/orabpel");
              props.setProperty("java.naming.security.principal","oc4jadmin");
              props.setProperty("java.naming.security.credentials","oc4jadmin");
              props.setProperty("dedicated.rmicontext", "true");
              Locator locator = new Locator("default", "bpel", props);
              String uniqueBpelId = com.collaxa.cube.util.GUIDGenerator.generateGUID();
              //System.out.println(uniqueBpelId);
              //java.util.Map msgProps = new HashMap();
              System.out.println("After creating the locator object......");
              IDeliveryService deliveryService =(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
              System.out.println("Before creating the NormalizedMessage object......");
              NormalizedMessage nm = new NormalizedMessage();
              System.out.println("After creating the NormalizedMessage object.*.*.*...");
              //msgProps.put("conversationId",uniqueBpelId);
              //nm.setProperty("conversationId",uniqueBpelId);
              nm.addPart("payload", xml);
              System.out.println("Before creating response object......");
              NormalizedMessage res = deliveryService.request("BPELProcess1", "process", nm);
              System.out.println("After calling the BPELProcess1 .*.*.*...");
              Map payload = res.getPayload();
              System.out.println("BPEL called");
              XMLElement xmlEl=(oracle.xml.parser.v2.XMLElement)payload.get("payload");
              replyText=xmlEl.getText();
              System.out.println("Reply from BPEL Process>>>>>>>>>>>>> "+replyText);
              catch (Exception e) {
              System.out.println("Exception : "+e);
              e.printStackTrace();
              return replyText;
    While Creating and Object for the Class callbpel and Whilw Calling that Method
    callbpel p=new callbpel();
    String Output=p.Initiate(input);
    Its throwing an Error:
    Error Occured is:
    After creating the locator object......
    Before creating the NormalizedMessage object......
    After creating the NormalizedMessage object.*.*.*...
    Before creating response object......
    Apr 24, 2008 9:12:00 AM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NoClassDefFoundError: javax/ejb/EJBException
         at com.oracle.bpel.client.util.ExceptionUtils.handleServerException(ExceptionUtils.java:76)
         at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:254)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
         at bo.callbpel.Initiate(callbpel.java:55)
         at org.apache.jsp.output_jsp._jspService(output_jsp.java:55)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
         at java.lang.Thread.run(Unknown Source)
    For Running JSP i am Using Eclipse 3.2.0 and apache-tomcat-5.5.25
    Please Provide me a Solution......
    Thanks in Advance.....
    Regards,
    Suresh K

    A JSP is not the same as a Java application. A Java application has package statment, import statements, try/catch block, a JSP doesn't.

  • An unknown error occurred while using remote from iPhone to iTunes on Mac

    I have STF for this answer, but am probably using the wrong words.  I have an iPhone 3Gs with a remote app on it.  I have several things going on.
    I have a mini-mac running iTunes 10.4.  This computer runs both my music for the house as well as my Apple TV.  When I use the Remote App lately for playing and controling music, and I tap on a song within an album, I get this error.  "An unknown error occurred.  Please check your library and try again".  I am having miserable luck (basically no luck) finding or playing the music in my iTunes.
    Then an error pops up after this.  "Remote can't connect to your iTunes library.  Check your network settings and try again."
    Recently (about 5-6 days ago), my Network Gateway crashed.  This was a Linux box running Gateway software. (ClarkConnect).  Since the disk was hosed, I replaced it with a fairly new (8-10 month old) Apple Airport Extreme (version 7.5.2).  I have set this up to port forward and dispense DHCP within my house and wireless network.  Is it possible that something needs to be set additionally on this to allow remote connections to iTunes from my iPhone.  I should also say that my iPad does this just fine using the same Remote App.

    I am getting this error whilst attempting to move NEF (Nikon RAW files) either between folders on the same hard-drive or between hard-drives (which are incorporated into my Lightroom catalogue).
    Whenever I receive this error, a strange (locked) file appears in the directory/folder to which I intended to move the file and on examining this file in the terminal I can see that it contains the following error message: "cannot execute binary file...logout". The filename of this strange file is usually very random such as 470F00FF-9FBC-4517-84BF-26E52251B2B9-449-0000020C6A4DD5FD
    I do not have any problems with missing sidecars and always select "save metadata to files" before attempting to move the files...can anyone figure this out?

  • Mac - 10.11 - El Capitan - Error occurs while using Spotify

    While using Spotify on the mac (10.11 Dev preview) an error pops up with the following stack trace:  Exception Name: NSInvalidArgumentException
    Description: -[SPMediaKeyTap grab]: unrecognized selector sent to instance 0x7f98434166a0
    User Info: (null)
    0 CoreFoundation 0x00007fff87c07b35 __exceptionPreprocess + 165
    1 libobjc.A.dylib 0x00007fff8275646a objc_exception_throw + 48
    2 CoreFoundation 0x00007fff87c0ab1d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3 CoreFoundation 0x00007fff87b4658a ___forwarding___ + 1002
    4 CoreFoundation 0x00007fff87b46118 _CF_forwarding_prep_0 + 120
    5 Spotify 0x000000010af10b67 _ZThn56_N5boost16exception_detail19error_info_injectorINS_6system12system_errorEED0Ev + 37623
    6 Spotify 0x000000010af10cf3 _ZThn56_N5boost16exception_detail19error_info_injectorINS_6system12system_errorEED0Ev + 38019
    7 Spotify 0x000000010af10dea _ZThn56_N5boost16exception_detail19error_info_injectorINS_6system12system_errorEED0Ev + 38266
    8 Spotify 0x000000010af10530 _ZThn56_N5boost16exception_detail19error_info_injectorINS_6system12system_errorEED0Ev + 36032
    9 HIToolbox 0x00007fff8763c77e _ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec + 1231
    10 HIToolbox 0x00007fff8763bbe4 _ZL30SendEventToEventTargetInternalP14OpaqueEventRefP20OpaqueEventTargetRefP14HandlerCallRec + 404
    11 HIToolbox 0x00007fff8763ba43 SendEventToEventTargetWithOptions + 43
    12 HIToolbox 0x00007fff876cc13c HIToolboxLSNotificationCallbackAllASNsFunc + 298
    13 LaunchServices 0x00007fff918b7102 ___LSScheduleNotificationFunction_block_invoke_2 + 47
    14 CoreFoundation 0x00007fff87b19f3c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    15 CoreFoundation 0x00007fff87b0c9b5 __CFRunLoopDoBlocks + 341
    16 CoreFoundation 0x00007fff87b0c712 __CFRunLoopRun + 2274
    17 CoreFoundation 0x00007fff87b0bbc8 CFRunLoopRunSpecific + 296
    18 HIToolbox 0x00007fff87665b4d RunCurrentEventLoopInMode + 235
    19 HIToolbox 0x00007fff876658df ReceiveNextEventCommon + 432
    20 HIToolbox 0x00007fff87665717 _BlockUntilNextEventMatchingListInModeWithFilter + 71
    21 AppKit 0x00007fff8bb5d972 _DPSNextEvent + 927
    22 AppKit 0x00007fff8bf3f234 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 324
    23 AppKit 0x00007fff8bb53297 -[NSApplication run] + 682
    24 Chromium Embedded Framework 0x000000010c4e3831 cef_time_delta + 359761
    25 Chromium Embedded Framework 0x000000010c4e300c cef_time_delta + 357676
    26 Chromium Embedded Framework 0x000000010c5346b3 cef_time_delta + 691155
    27 Chromium Embedded Framework 0x000000010c5212ed cef_time_delta + 612365
    28 Spotify 0x000000010b5b65f9 _ZNSt3__16vectorI12CefPageRangeNS_9allocatorIS1_EEE21__push_back_slow_pathIS1_EEvOT_ + 40873
    29 Spotify 0x000000010af04bce _ZNSt3__18multimapI13CefStringBaseI20CefStringTraitsUTF16ES3_NS_4lessIS3_EENS_9allocatorINS_4pairIKS3_S3_EEEEE16__construct_nodeIRA28_KcRA2_SD_JEEENS_10unique_ptrINS_11__tree_nodeINS_12__value_typeIS3_S3_EEPvEENS_21__map_node_destructorINS6_ISN_EEEEEEOT_OT0_DpOT1_ + 26206
    30 Spotify 0x000000010adf07c9 Spotify + 30665
    31 Spotify 0x000000010adf07b4 Spotify + 30644  The application continues running if I just click Continue -- but the error can appear continually and often while using the application.

    Hi mire3212, not so much a solution (sorry), but I believe that El Capitan is actually too new for Spotify at this point. I'm not entirely sure, so hopefully someone will be able to confirm/deny this, but if I am right, then it's just a matter of time as to when Spotify will be updated, and that should take care of the issue.  

  • Error occured while executing WebSQL statement in Windows (Phone) 8.1

    I am debugging Apache Cordova application in Visual Studio 2013.4. The application works fine in Ripple and Android emulator, however, when I try to debug on Windows x64 or Windows Phone (device) I get following error:
    On this line: https://github.com/MSOpenTech/cordova-plugin-websql/blob/17015eb938d902eeb6018c03e438658103b28c17/www/windows/SqlTransaction.js#L105
    Unhandled exception at line 105, column 9 in ms-appx://io.cordova.myapp.../www/plugins/com.msopentech.websql/www/windows/SqlTransaction.js
    0x800a139e - JavaScript - runtime error [object Object]
    Here is my code inside index.html:
    <script type="text/javascript">
    document.addEventListener("deviceready", onDeviceReady, false);
    var db = null;
    function onDeviceReady() {
    var dbSize = 5 * 1024 * 1024;
    // 5MB
    db = window.openDatabase("lilka", "1.0", "Lilka hybrid db", dbSize)
    if (db) {
    populateDatabase();
    function populateDatabase() {
    db.transaction(function(tx) {
    tx.executeSql("CREATE TABLE IF NOT EXISTS Product (Id INTEGER, Name TEXT)", [], onSuccess, onError);
    tx.executeSql("INSERT INTO Product(Id, Name) values (1, 'testvalue')", [], onSuccess, onError);
    tx.executeSql('SELECT * FROM Product', [], function(tx, results) {
    var len = results.rows.length,
    i;
    for (i = 0; i < len; i++) {
    alert(results.rows.item(i).Name);
    </script>
    Note: I am using
    WebSQL plugin from MS Open Tech.

    Please refer to reply posted on
    https://github.com/MSOpenTech/cordova-plugin-websql/issues/19.
    -Ellen

  • Error occured while using checkInFileStream of CIS

    Hi,
    I am having problem using the CIS in client mode. I am trying to use the CheckIn api. I am unable to find the problem. Following are the details:
    FLOW: Custom application – client Api – cis-server(Deployed in oracle application server) – content server.
    The part of cis-server -- content server works. I have tested the chekin being successful using the web application http://localhost:8888/cis-admin/ucpmbrowsecategory.do?category=active
    But the Custom application – Client Api – cis-server part does not work for me
    Following is the code for CheckIn along with the exception trace:
    public String checkIn() {
    System.out.println("ECM1Service :: checkIn :: Started");
    String contentId ="";
    try {
    Properties properties = new Properties();
    properties.setProperty(ICISApplication.PROPERTY_CONFIG_TYPE, "client");
    properties.setProperty(ICISApplication.PROPERTY_CONFIG_CLIENT_CONNECTION, "jndi");
    properties.setProperty("jndi."+Context.INITIAL_CONTEXT_FACTORY,ConfigUtils.getEntry("jndiInitialContextFactory"));
    properties.setProperty("jndi."+Context.PROVIDER_URL, ConfigUtils.getEntry("jndiProviderUrl"));
    properties.setProperty("jndi."+Context.SECURITY_AUTHENTICATION, ConfigUtils.getEntry("jndiSecurityAuthentication"));
    properties.setProperty("jndi."+Context.SECURITY_PRINCIPAL,ConfigUtils.getEntry("jndiSecurityPrincipal"));
    properties.setProperty("jndi."+Context.SECURITY_CREDENTIALS, ConfigUtils.getEntry("jndiSecurityCredentials"));
    ICISApplication client = CISApplicationFactory.initialize(properties);
    //Connect
    System.out.println("ECM1Service :: checkIn :: Connect Started");
    ISCSDocumentCheckinAPI api = client.getUCPMAPI().getActiveAPI().getDocumentCheckinAPI();
    ICISTransferStream transferStream = client.getUCPMAPI ().createTransferStream();
    transferStream.setFile(new File ("c:\\fileStreamTest.txt"));
    //getSCSContext
    ISCSContext context = client.getUCPMAPI ().getActiveAPI ()._createSCSContext ();
    context.setUser ("sysadmin");
    context.setCrendentials("idcdev");
    context.setAdapterName ("ecm");
    //getActiveContent
    ISCSContent activeContent = (ISCSContent) client.getUCPMAPI ().createObject(ISCSContent.class);
    ISCSContentID contentID = (ISCSContentID) client.getUCPMAPI ().createObject(ISCSContentID.class);
    contentID.setContentID("TEST_1");
    AppLog.debug("ECM1Service :: checkIn :: contentID"+contentID.getContentID());
    activeContent.setContentID (contentID);
    activeContent.setTitle ("TEST_1");
    activeContent.setType ("Test");
    activeContent.setSecurityGroup ("Public");
    activeContent.setSecurityAccount("fiscalAssistantOnly");
    //Execute
    System.out.println("ECM1Service :: checkIn :: Execute Started");
    ISCSDocumentCheckinResponse result = api.checkinFileStream (context, activeContent, transferStream);
    System.out.println("ECM1Service :: checkIn :: Execute Started after");
    String message = result.getMessage ();
    ICISID icisId = result.getIdentifier();
    contentId = icisId.getPropertyAsString("dDocName");
    System.out.println("ECM1Service :: main :: message: "+message);
    System.out.println("ECM1Service :: main :: icisId: "+icisId.getPropertyAsString("dDocName"));
    System.out.println("ECM1Service :: checkIn :: Execute Completed");
    } catch (Exception e) {
    e.printStackTrace ();
    System.out.println("ECM1Service :: checkIn ::Completed");
    return contentId;
    EXCEPTION:
    INFO [main] (AppLog.java:40) - ECMService :: checkIn :: Execute Started
    [2008-08-30 15:11:20,234] [main] DEBUG (cis.profiler) - <Timer SectionName="invokeCommand" ThreadName="main" Begin="1220123480234" Desc="" />
    [2008-08-30 15:11:20,234] [main] DEBUG (cis.profiler) - <Timer SectionName="FacadeExecuteCommand" ThreadName="main" Begin="1220123480234" Desc="active.document.checkin.checkinFileStream" />
    [2008-08-30 15:11:21,734] [main] ERROR (com.stellent.cis.server.filetransfer.impl.ClientResourceHandler) - Error parsing XML
    org.dom4j.DocumentException: Error on line 9 of document : <Line 9, Column 46>: XML-20190: (Fatal Error) Whitespace required. Nested exception: <Line 9, Column 46>: XML-20190: (Fatal Error) Whitespace required.
         at org.dom4j.io.SAXReader.read(SAXReader.java:355)
         at org.dom4j.io.SAXReader.read(SAXReader.java:271)
         at org.dom4j.DocumentHelper.parseText(DocumentHelper.java:215)
         at com.stellent.cis.server.filetransfer.impl.ClientResourceHandler.uploadFile(ClientResourceHandler.java:242)
         at com.stellent.cis.server.filetransfer.impl.ClientResourceHandler.publishResource(ClientResourceHandler.java:155)
         at com.stellent.cis.server.filetransfer.SCSContentTransferStream.writeObject(SCSContentTransferStream.java:259)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
    The message indicates that there is a parse error with the a xml file but I am unable to figure which xml file??
    My adapaterconfig.xml file is as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <config>
    - <properties>
    <property name="webPath">http://localhost:8888/cis-server</property>
    </properties>
    <jndi />
    - <adapter default="true" name="ecm" type="scs">
    - <config>
    <property name="port">xxxx</property>
    <property name="connectionTimeout">20000</property>
    <property name="type">socket</property>
    <property name="persistentConnection">false</property>
    <property name="host">ecmserver.xxx.com</property>
    <property name="eventPollingEnabled">true</property>
    <property name="cacheEnabled">true</property>
    </config>
    <beans template="classpath:/META-INF/resources/adapter/adapter-services-scs.jxml" />
    </adapter>
    </config>
    Please let me know pointers to this problem.
    Thanks in advance.
    Aparna
    Edited by: user537651 on Aug 30, 2008 12:56 PM

    Disabling the event polling has helped to some extent. I did not have any Command cache properties set and had event polling enabled. This came by default. Oracle support rep has told that he had seen miscellaneous errors with enabling the event poll while the chache properties are not set.
    This has helped when I deploy cis-admin application to the Oracle 10g app server on a windows machine but again, when I do the same on another machine i.e. a unix machine (I doubt if operating system would be the cause) it did not work.
    Thanks,
    Aparna Raj Golla

  • Topic: error occuring while use jsp

    code:
    Parsing of JSP File '/view.jsp' failed:-------------------------------------------------------------------------------- /view.jsp(18): "mybean" is not a defined bean variable on this pageprobably occurred due to an error in /view.jsp line 18:value="<jsp:getProperty name="mybean" property="firstname"/>"/>
    this is the error i am getting while accesing the view.jsp.
    here below is my view.jsp and mybean.java codes.
    view.jsp
    code:
    <jsp:useBean id="mybean" class="mvc.beans.mybean" scope="request"/ ><html><head><title>MVC View</title></head><body><h2>MVC Architecture View<h2><form method="post" action="myservlet"><table> <tr> <td>     First Name:     </td> <td>     <input type="text"           name="form first name"                    value="<jsp:getProperty name="mybean" property="firstname"/>"/>                                   </td>     </tr>      <tr>     <td>          Last Name:          </td>          <td>          <input type="text"               name="form last name"                    value="<jsp:getProperty name="mybean" property="lastname"/>"/>     </td>     </tr>      <tr>     <td>          E-mail:          </td>          <td>          <input type="text"               name="form mail"                    value="<jsp:getProperty name="mybean" property="email"/>"/>     </td>     </tr>      <tr>     <td>     <input type="submit"          value="submit"/>          <td>     <tr> </table></form></body>      <pre>     <jsp:getProperty name="mybean" property="message"> </pre></html>
    mybean.java
    code:
    package mvc.beans; public class mybean{ private String firstname; private String lastname; private String email;  public String getFirstname()     {       return fixNull(this.firstname);    } public String getLastname()     {      return fixNull(this.lastname);    } public String getEmail()     {       return fixNull(this.email);    } public void setFirstname(String firstname)     {      this.firstname=firstname;     } public void setLastname(String lastname)     {      this.lastname=lastname;     } public void setEmail(String email)     {       this.email=email;    } private String fixNull(String in){        return (in == null) ? "" : in;    }      public String getMessage()     {      return "\nFirst Name:" +  getFirstname() + "\n"              +"Last Name :" +  getLastname()  + "\n"                      +"email     :" +  getEmail()     + "\n";     } };
    please clarrify my error.

    Are u putting the bean in the request scope????

  • Error occured while using DispatchAction Class

    I have a jsp file which has three submit buttons, with same name.
    If i click one of those buttons, it should execute a corresponding method from a class that extends the DispatchAction class.
    But when i click it throws method not found.
    The exact errors are
    error 1-->
    57d5900b DispatchActio E org.apache.struts.actions.DispatchAction Action[dispatchtest] does not contain method named execute1
    error 2-->
    57d5900b DispatchActio E org.apache.struts.actions.DispatchAction TRAS0014I: The following exception was logged java.lang.NoSuchMethodException: DispachActionTestClass.execute1(org.apache.struts.action.ActionMapping, org.apache.struts.action.ActionForm, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
    wat could be possibly the mistake.

    This shuold be the first check:
    You shoud be having three different methods for three different actions in the class which extends dispatchAction.
    Something like this:
    Submit1 -- ActionMapping1 -- DispatchActionClass --> Execute1()
    Submit2 -- ActionMapping2 -- DispatchActionClass --> Execute2()
    Submit3 -- ActionMapping3 -- DispatchActionClass --> Execute3()
    Let me know if this does not help

  • Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement: there has been an error occurred while connecting to Apple's online store try again

    Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement:
    there has been an error occurred while connecting to Apple's online store try again

    Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement:
    there has been an error occurred while connecting to Apple's online store try again

  • A fatal error occurred while creating an SSL client credential. The internal error state is 10011.

    Need help.  I have my pilot lync 2013 pool up (in coexistence with 2010 production environment) and can log into Lync 2013 environment with a lync 2010 client but am not able to with a lync 2013 client.  It just prompts for password but will not
    take it. I'm sseeing this on my front end server multiple times:
    A fatal error occurred while creating an SSL client credential. The internal error state is 10011.
    Came across this http://www.logicspot.net/index.php?id=50 and tried disabling TLS 1.2, which I did and verified but yet the issue still exists.
    All my certs are good coming from internal CA.  My signin logs show below but keep in mind, this works just fine if using a 2010 lync client to my lync 2013 servers.  Issue only occurs when trying to connect using a lync 2013 client.
    1 Login: FAIL (hr = 0x1) 
    this request needs authentication, trying webticket from: https://domain.com/WebTicket/WebTicketService.svc
    1.1 Get-NewWebTicket: FAIL (hr = 0x1) 
    CLogonCredentialManager::QueryForSpecificCreds() Credential user 0x069B64A0 id=15 querying for specific credentials, credSuccess=2, targetName=Microsoft_OC1:[email protected]:specific:LAD:1
    1.1.1 ExecuteWithMetadataInternal: FAIL (hr = 0x3d0000) 
    Executing wws method with windows auth auth, asyncContext=0A4FC348,
     context: WebRequest context@ :173931816
      MethodType:4
      ExecutionComplete? :1
      Callback@ :0A5A1864
      AsyncHResult:80f10041
      TargetUri:https://domain.com/WebTicket/WebTicketService.svc
      OperationName:http://tempuri.org/:IWebTicketService
     Error:
    There was an error communicating with the endpoint at 'https://domain.com/WebTicket/WebTicketService.svc'.
    The server returned HTTP status code '401 (0x191)' with text 'Unauthorized'.
    The requested resource requires user authentication.
    1.1.2 ExecuteWithWindowsOrNoAuthInternal: PASS
    1.1.3 ExecuteWithWindowsOrNoAuthInternal: FAIL (hr = 0x3d0000) 
    Executing wws method with windows auth auth, asyncContext=0A4FC348,
     context: WebRequest context@ :173931816
      MethodType:4
      ExecutionComplete? :1
      Callback@ :0A5A1864
      AsyncHResult:80f10041
      TargetUri:https://domain.com/WebTicket/WebTicketService.svc
      OperationName:http://tempuri.org/:IWebTicketService
     Error:
    There was an error communicating with the endpoint at 'https://domain.com/WebTicket/WebTicketService.svc'.
    The server returned HTTP status code '401 (0x191)' with text 'Unauthorized'.
    The requested resource requires user authentication.
    1.1.4 ExecuteWithWindowsOrNoAuthInternal: FAIL (hr = 0x3d0000) 
    Discovery task(0A4FF830) sent to URL http://domain.com completed with hr=0x80f10045
    1.1.5 ExecuteWithWindowsOrNoAuthInternal: FAIL (hr = 0x3d0000) 
    Executing wws method with windows auth auth, asyncContext=0A4FC348,
     context: WebRequest context@ :173931816
      MethodType:4
      ExecutionComplete? :1
      Callback@ :0A5A1864
      AsyncHResult:80f10041
      TargetUri:https://domain.com/WebTicket/WebTicketService.svc
      OperationName:http://tempuri.org/:IWebTicketService
     Error:
    There was an error communicating with the endpoint at 'https://domain.com/WebTicket/WebTicketService.svc'.
    The server returned HTTP status code '401 (0x191)' with text 'Unauthorized'.
    The requested resource requires user authentication.
    1.1.6 ExecuteWithWindowsOrNoAuthInternal: FAIL (hr = 0x3d0000) 
    CLogonCredentialManager::QueryForSpecificCreds() Credential user 0x069B64A0 id=15 querying for specific credentials, credSuccess=2, targetName=Microsoft_OC1:[email protected]:specific:LAD:1
    Rich

    Hi,
    Please check the server role and Web Services for Internet Information Services (IIS) are set correctly.
    For the detailed IIS configuration, please check:
    http://technet.microsoft.com/en-us/library/gg412871.aspx
    As Lync client 2013 attempt to query in order to perform autodiscover of the Lync registration server. First
    lyncdiscoverinternal.<sipdomain> Host (A) record and then
    lyncdiscover.<sipdomain> Host (A) record. If neither of these records are resolvable then the legacy DNS SRV and A record fall-back process is used. So make sure you have add the two A record in DNS server.
    More details:
    http://blog.schertz.name/2012/12/lync-2013-client-autodiscover/
    Note: Microsoft is providing this information as a convenience to you. The sites are not controlled by Microsoft. Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please make
    sure that you completely understand the risk before retrieving any suggestions from the above link.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Error 4014 Severity 16 State A fatal error occurred while reading the input streamfrom the network

    We encounter following error intermittently Error 4014 Severity 20 State 16 , A fatal error occurred while reading the input stream from the network
    I have checked the RING_BUFFER_CONNECTIVITY from sys.dm_os_ring_buffers, we are able to find the remote_host IP where connections are being closed/killed, the error being logged in sys.dm_os_ring_buffers, comes from multiple remote_host, we have raised
    to O/s and Networking Team they seem to have no clue, why this error occurs
    Server: Virtual Machine
    Operating System: WINDOW 2008 R2 SP1
    MSSQL 2008 STD ED SP3 10.0.5850.0
    Database mirroring is configured for the application database.
    Antivirus enable on the database server
    How do we find the cause for this error being logged in SQL server logs, is this error due to SQL database mirroring or memory issue?
    What needs to be checked on the O/s and Network, I have been checking on the internet and everywhere it is pointing to NIC drivers or security patches
    Also in the system events following error was being logged, but after restarting the vm service this error has not re-occurred
    A timeout (30000 milliseconds) was reached while waiting for a transaction response from the VMTools service
    Kindly suggest on Error 4014 Severity 20 State 16, A fatal error how to resolve
    [email protected]

    Hello,
    Could you try to use Network Monitor or WireShark to examine if the connections resets are coming from a client computer
    or from the host where SQL Server is installed?
    Network Monitor can be downloaded from the following link:
    http://www.microsoft.com/en-us/download/details.aspx?id=4865
    If you use Network Monitor trace you will identify connection resets by looking for “TCP: Flags=,,R.A” at the description column on the Frame Summary. Once you find the flag, the Source column will tell you the identity of the host resetting the connection,
    maybe is not the SQL Server host.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • A fatal error occurred while creating an SSL client credential. The internal error state is 10013.

    Hi All
    I am seeing the below event appearing in the system log on all our Exchange 2013 servers regularly. I am not seeing any connectivity issues between any clients and the servers and no other issues have been reported at this stage.
    Log Name:      System
    Source:        Schannel
    Date:          10/04/2015 9:21:17 AM
    Event ID:      36871
    Task Category: None
    Level:         Error
    Keywords:     
    User:          SYSTEM
    Computer:     
    Description:
    A fatal error occurred while creating an SSL client credential. The internal error state is 10013.
    I am not sure if its related to the public certificate we are using or if its related to the one provided from the local CA.I have searched and found other links that suggest it could be related to SSL versions being disabled etc.
    All servers are running Windows 2012 R2 Datacenter. The Exchange CAS servers do also sit behind a pair of F5 BIG IP Load Balancers 
    Any suggestions on where to look?
    Thanks

    Hi,
    According to the event log, the issue is related to Schannel instead of Exchange.
    Please try the following steps:
    1.In Control Panel, click Administrative Tools, and then double-click Local Security Policy.
    2.In Local Security Settings, expand Local Policies, and then click Security Options.
    3.Under Policy in the right pane, double-click System cryptography: Use FIPS compliant algorithms for encryption, hashing, and signing, and then click Enabled.
    4. Ran gpupdate /force
    If it doesn’t work, please go to C:\ProgramData\Microsoft\Crypto\RSA and grant "Network Services" Read permission to "MachineKeys" folder. Then restart server to have a try.
    Here is a similar thread for your reference:
    https://social.technet.microsoft.com/Forums/lync/en-US/e70a8dbc-6f48-4fde-a93b-783554344822/a-fatal-error-occurred-when-attempting-to-access-the-ssl-client-credential-private-key?forum=ocscertificates
    Regards,
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
    Winnie Liang
    TechNet Community Support

  • Error while executing SSIS package - Error: 4014, Severity:20, State: 11. A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)

    Hi,
    We are getting the following error when running our SSIS packages on Microsoft SQL Server 2012 R2 on Windows Server 2008 R2 SP1:
    Error: 4014, Severity:20, State: 11.   A fatal error occurred while reading the input stream from the network. The session will be terminated (input error: 109, output error: 0)
    SQL Server Data Tools and SQL Server Database Engine reside on the same server.
    We tried the following:
    Disabling TCP Chimney Offload
    Installed Windows Server 2008 SP1
    Splitting our SSIS code into multiple steps so it is not all one large continuous operation
    The error occurs during a BulkDataLoad task.
    Other options we are investigating with the engineering team (out-sourced, so delayed responses):
    Firewall configurations (everything is local, so this should not make a difference)
    Disabling the anti-virus scanner
    Are there other things we can try?
    Any insight is greatly appreciated.
    Thanks!

    Hi HenryKwan,
    Based on the current information, the issue can be caused by many reasons. Please refer to the following tips:
    Install the latest hotfix based on your SQL Server version. Ps: there is no SQL Server 2012 R2 version.
    Change the MaxConcurrentExecutables property from -1 to another one based on the MAXDOP. For example, 8.
    Set "RetainSameConnection" Property to FALSE on the all the connection managers.
    Reference:
    https://connect.microsoft.com/SQLServer/feedback/details/774370/ssis-packages-abort-with-unexpected-termination-message
    If the issue is still existed, as Jakub suggested, please provide us more information about this issue.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Workflow Activity "Lookup Value" returns An error occured while enumerating the filter using [//WorkflowData/customvalue]

    I want to generate an Accountname using EmployeeID, FirstName and LastName via a workflow.
    I'm using the Granfeldt Workflow Activity Library (https://fimactivitylibrary.codeplex.com/)
    I'm using the FIM Powershell Workflow Activity (https://fimpowershellwf.codeplex.com/)
    Steps:
    Passing the EmployeeID, FirstName and LastName to the powershell Activity, generating a logonid based on logic.
    Add-PSSnapin FIMAutomation
    $EmployeeID = $fimwf.WorkflowDictionary.EmployeeID
    $Forename = $fimwf.WorkflowDictionary.Firstname
    $Lastname = $fimwf.WorkflowDictionary.Lastname
    'logic creating a custom logonid here
       ==> This works
    Returning data back to the workflow via that powershell script:
    $fimwf.WorkflowDictionary.Add('NewAccountName',$newlogonid)
       ==> This works
     Using Lookup Value Activity to read the Workflow data and update the [//Target/AccountName] fails.
    This gives an error:
           An error occurred while enumerating the filter 'string' .
    (where string is the actual generated userid that I've got back from the powershell script. Example dab2563)
    I tried with only [//WorkflowData], then this gives the error:
          Index was outside the bounds of the array.
    Any hints to solve this?    
    Kind regards,
    David

    The Lookup Activity is for looking up an object in the FIM Service. Seems like thats not what you're trying to accomplish.
    For updating the target of the workflow, just use the built-in Function Evaluator. The Lookup WF was not built for that and it is failing because you have not specified a valid XPAth lookup filter, such as /Person[AccountName='BillG']
    Regards, Soren Granfeldt
    blog is at http://blog.goverco.com | facebook https://www.facebook.com/TheIdentityManagementExplorer | twitter at https://twitter.com/#!/MrGranfeldt

Maybe you are looking for

  • Cannot install iTunes 10.6.3 to windows 7 64 bit

    While attempting to install iTunes 10.6.3 to a new computer that hasWindows 7 64 bit os, I get a message that states "This installation package could not be opened. Verify that the package exists and that you can access it, or contact the application

  • JViewport Resize problem -- Urgent!

    I am trying to make a program that allows the user to dynamically resize a scrollable JPanel. I have added resize buttons that work well. The JScrollPane works well, but when the JViewport's View is set to the bottom right corner of the JPanel, and t

  • I am having problems with Safari

    When I went to open one of my websites.  I was redirected to a "private" website for the same company in which I could not sign on to my account. I use this website a couple times a month and this is the first time this has happened in the past 3 yea

  • CRM 7.0 Webservice Tool error

    Hello friends, I have an issue : I want to use the Webservice Tool to provide data for the Document Template Designer. I copied a standard Webservice to ZMYWEBSERVICE. When I tested my Webservice Object by completing the wizard  after pressing Produc

  • Monitoring Used (%) space for tablespaces

    Hi everyone, I am currently using: Redhat Linux ES 5 2.6.18 and also Oracle 10g Release 2 for Linux x86 R10.2.0.3 While monitoring my Tablespaces using OEM Database Control, I notice that two tablespaces were almost full. [SYSAUX] - Size: 290MB , Use