Opening URL Connection

Hi all,
I'm having a problem when connecting to a URL that is non-esisting using a while loop to catch the exception but no exception is being thrown.
while(myConn == null || !found)
try
myConn = url.openConnection();
} //IOException
catch (Exception Expt)
System.out.println("Cannot open URL connection");
java.lang.Thread.sleep(3000);
myConn = null;
continue;
Cheers
JavaJimmyD

    BufferedReader inp = null;
    try {
      URL url = new URL(urlString);
      URLConnection conn = url.openConnection();
      conn.setDoInput(true); // or setDoOutput(true)
      /* really open connection */
      conn.connect(); // establish connection
      inp = new BufferedReader(
              new InputStreamReader(conn.getInputStream()));
      String result = inp.readLine(); // or your stuff
      inp.close();  // close connection
      inp = null;
    catch (MalformedURLException ue) {}
    catch (Exception e) {}
    finally {
      try { if (inp != null) inp.close(); } catch(IOException e) {}
    }

Similar Messages

  • Opening url connection in background

    Hello all,
    I have a requirement where the user clicks on a link to an external site and after some background authentication with that site the user should be redirected there.
    On clicking the link, a new window should pop up which is a dummy portal page and says 'Connecting you to the site...'. In the background, I want to exchange some data with that site. i.e I pass some parameters to the site and get a key back. Finally, the user should be redirected to that site with this key as a parameter in the same window.
    I would prefer to use PL/SQL portlet API for this.
    Could you please share you experiences.
    Thanks in advance.

    Glad you fixed it Mousekitty!
    Locking this question. Please ask a new question if you run into further issues.

  • Connection refused--while executing (HttpConnection) Connector.open(url);

    Hi,
    i'm using netbeans mobility 5.0
    as i was new to this mobile programming i'm getting the output as "Connection Refused"
    plz plz plz plz....... help me out from this problem
    here is my code..
    code:_
    import javax.microedition.midlet.*;
    import javax.microedition.lcdui.*;
    import javax.microedition.io.*;
    import java.io.*;
    public class FileViewer extends MIDlet implements CommandListener
    private Display display; // Reference to Display object
    private TextBox tbViewer; // View file contents in a textbox
    private Command cmView; // Command to view file
    private Command cmExit; // Command to exit
    private String url = "http://www.corej2me.com/midpbook_v1e1/scratch/fileViewer.hlp";
    public FileViewer()
    display = Display.getDisplay(this);
    // Define commands
    cmView = new Command("View", Command.SCREEN, 2);
    cmExit = new Command("Exit", Command.EXIT, 1);
    tbViewer = new TextBox("Viewer", "", 250, TextField.ANY);
    tbViewer.addCommand(cmView);
    tbViewer.addCommand(cmExit);
    tbViewer.setCommandListener(this);
    public void startApp()
    display.setCurrent(tbViewer);
    private void viewFile() throws IOException
    HttpConnection http = null;
    InputStream iStrm = null;
    try
    http = (HttpConnection) Connector.open(url);
    // Client Request
    // 1) Send request method
    http.setRequestMethod(HttpConnection.GET);
    // 2) Send header information (this header is optional)
    http.setRequestProperty("User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0");
    // 3) Send body/data - No data for this request
    // Server Response
    // 1) Get status Line
    System.out.println("Msg: " + http.getResponseMessage());
    System.out.println("Code: " + http.getResponseCode());
    // 2) Get header information
    if (http.getResponseCode() == HttpConnection.HTTP_OK)
    // 3) Get data (show the file contents)
    iStrm = http.openInputStream();
    int length = (int) http.getLength();
    if (length > 0)
    byte serverData[] = new byte[length];
    iStrm.read(serverData);
    tbViewer.setString(new String(serverData));
    finally
    if (iStrm != null)
    iStrm.close();
    if (http != null)
    http.close();
    public void pauseApp()
    public void destroyApp(boolean unconditional)
    public void commandAction(Command c, Displayable s)
    if (c == cmView)
    try
    viewFile();
    catch (Exception e)
    System.out.println(e.toString());
    else if (c == cmExit)
    destroyApp(false);
    notifyDestroyed();
    output*
    build.xml(debug)*
    some....
    Application descriptor does not declare any MIDlet. Direct execution is not allowed.
    Generated "C:\Documents and Settings\Lakshmi Narayan J\jlnexample\dist\jlnexample.jar" is 2655 bytes.
    post-jar:
    debug:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\src\.timestamp
    Starting emulator in debug server mode on port 1469
    com.sun.kvem.midletsuite.InvalidJadException: Reason = 22
    The manifest or the application descriptor MUST contain the attribute: MIDlet-1
    nbdebug:
    KdpDebugTask connecting to debugger 1 ..
    KdpDebugTask connecting to debugger 2 ..
    KdpDebugTask connecting to debugger 3 ..
    KdpDebugTask connecting to debugger 4 ..
    KdpDebugTask connecting to debugger 5 ..
    Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:306: The following error occurred while executing this line:
    C:\Documents and Settings\Lakshmi Narayan J\jlnexample\nbproject\build-impl.xml:311: Connecting JPDA Debugger to emulator timed out after 5 attempts and 31 seconds.
    BUILD FAILED (total time: 43 seconds)
    Debugger console:
    Attaching to localhost:1469
    Connection refused.
    Edited by: LAKSHMI_NARAYAN_J on Jun 23, 2008 9:54 AM

    It's called potential deadlock. The emulator blocks your app 'cause any connection and commandAction needs its own thread. So I suggest use a new thread with this http connection then your program will be run successful.

  • Close URL Connection netstat

    hello all,
    I hope you can help me.
    Please have a look at my code below
    I open an URL Connection but I can't close it.
    If i type in a DOS Box netstat I see a lot of connection.
    Now my question is how can I close the connection.
    m_http.disconnect() seems not to work.
    public class Unbenannt1 extends Applet
      Button button1 = new Button();
      private HttpURLConnection m_http = null;
      private URL m_MyAlarmURL = null;
      private URLConnection m_MyURLConnection = null;
      private long m_TimeAlarmXML = 0;
      private boolean m_TimeUpdate = true;
      /**Das Applet initialisieren*/
      public void init()
        String a_str = "http://"+ getCodeBase().getHost() + "/x.xml";
        try
          m_MyAlarmURL = new URL( a_str );
        catch ( MalformedURLException ie )
        try
          jbInit();
        catch(Exception e)
          e.printStackTrace();
      /**Initialisierung der Komponenten*/
      private void jbInit() throws Exception
        button1.setLabel("button1");
        button1.setBounds(new Rectangle(27, 28, 78, 27));
        button1.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            button1_actionPerformed(e);
        setLayout(null);
        setBackground(java.awt.Color.lightGray);
        setSize(426,266);
        this.add(button1, null);
      void button1_actionPerformed(ActionEvent e)
        int a_int = 0;
        try
            m_MyURLConnection = m_MyAlarmURL.openConnection();
            m_http = (HttpURLConnection)m_MyURLConnection;
            m_http.setRequestMethod( "HEAD" );
            m_http.setUseCaches(false);
            m_http.connect();
            a_int = m_http.getResponseCode();
            m_http.disconnect();
            m_http = null;
            m_MyURLConnection = null;
            System.gc();
          catch ( java.io.IOException ioe  )
            a_int = 404;
    }Thanks a lot
    Prediger

    Usually those connections linger around for some time, and will then be closed by the OS once a certain timeout has been reached. I don't know how to change that timeout, though.
    Btw: the docs don't claim that the connection will be closed. The description for disconnect() is "Indicates that other requests to the server are unlikely in the near future"
    If you still see the connection after a while, then something is wrong, but I've seen connections like that hang around for several minutes even after the JVM was terminated.
    Thomas

  • Error while opening JDBC connection in external WLS

    Hi
    I created the ADF application on Jdev11.1.1 version.i deployed the application on External WLS 10.3.i got deployment successfull.but when testing from browser,i got the following error.
    Messages for this page are listed below.
    Error     
    Error while opening JDBC connection.
    Error     
    ORA-01005: null password given; logon denied
    Error     
    Unexpected exception caught: java.lang.NullPointerException, msg=null
    For testing in Browser i am giving
    http://localhost:7001/department_Application-viewcontroller-context-root/faces/Depvue1.jspx
    In external WLS i created the JDBC datasorce connection in WLS domain successfully.i followed the steps given in deployment chapter of Oracle® Fusion Middleware Fusion Developer's Guide for Oracle Application Development Framework 11g Release 1 (11.1.1)
    Anyone tell me i went wrong.

    Hi frank,
    i got what you told me in previous reply.
    In Jdev IDE ,I edited the local AM configurations by changing the JDBC URL to Datasource.
    again i created the new EAR file for the app and i deployed it successfully on the external WLS10.3
    now when i am running the app from external WLS,
    i am getting the following error.
    Messages for this page are listed below.
    JNDI failure. Unable to lookup Data Source at context java:comp/env/jdbc/Connection1DS
    Error
    Error
    Unable to resolve 'jdbc.Connection1DS'. Resolved 'jdbc'
    Error
    Unexpected exception caught: java.lang.NullPointerException, msg=null
    in External Wls my JDBC Datasource name is" JDBC Data Source-1",JNDI Name :"jdbc/jdbcds".
    In Jdev , JDBC Datasource name of AppModule local is : java:comp/env/jdbc/Connection1DS
    <strong>Here How to override the local JdbcDS name in Jdev11g with the JDBC Datasource name existing in the external WLS .
    </strong>
    While running the Application ,it is going for the JDBC Datasource Name given in JdevIDE.
    Can you tell me where i have to change to run application successfully from WLS.
    Edited by: sj0609 on Oct 29, 2008 4:45 PM

  • JBO-26061: Error while opening JDBC connection how to debug in project

    Hi,
    Am using adf 11.1.1.5 jdev
    Can any one guide me . how can i debug and find out exactly where jdbc error is occurring .How to track down the error as am new to project .
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    javax.faces.FacesException: javax.servlet.ServletException: OracleJSP error:
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:415)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at oracle.adfinternal.view.faces.config.rich.RecordRequestAttributesDuringDispatch.dispatch(RecordRequestAttributesDuringDispatch.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
         at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
         at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:469)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:140)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.servlet.ServletException: OracleJSP error:
    oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jsp.runtimev2.JspReportUtil.reportException(JspReportUtil.java:181)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:737)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:442)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
         at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:503)
         at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:50)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspIterationTagNode.executeHandler(OracleJspIterationTagNode.java:45)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:422)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
         at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:444)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
         at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:442)
         at oracle.adfinternal.view.faces.taglib.region.IncludeTag.doEndTag(IncludeTag.java:232)
         at oracle.adfinternal.view.faces.taglib.region.PageTemplateTag.doEndTag(PageTemplateTag.java:162)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:62)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspClassicTagNode.evalBody(OracleJspClassicTagNode.java:87)
         at oracle.jsp.runtime.tree.OracleJspBodyTagNode.executeHandler(OracleJspBodyTagNode.java:58)
         at oracle.jsp.runtime.tree.OracleJspCustomTagNode.execute(OracleJspCustomTagNode.java:261)
         at oracle.jsp.runtime.tree.OracleJspNode.execute(OracleJspNode.java:89)
         at oracle.jsp.runtimev2.ShortCutServlet._jspService(ShortCutServlet.java:89)
         at oracle.jsp.runtime.OracleJspBase.service(OracleJspBase.java:29)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:422)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:802)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:726)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:524)
         at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253)
         at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
         ... 53 more
    Caused by: oracle.jbo.DMLException: JBO-26061: Error while opening JDBC connection.
         at oracle.jbo.server.DBTransactionImpl.establishNewConnection(DBTransactionImpl.java:1030)
         at oracle.jbo.server.DBTransactionImpl.initTransaction(DBTransactionImpl.java:1170)
         at oracle.jbo.server.DBTransactionImpl.initTxn(DBTransactionImpl.java:6823)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:301)
         at oracle.jbo.server.DBTransactionImpl2.connectToDataSource(DBTransactionImpl2.java:332)
         at oracle.jbo.common.ampool.DefaultConnectionStrategy.connect(DefaultConnectionStrategy.java:203)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolConnect(ApplicationPoolMessageHandler.java:592)
         at oracle.jbo.server.ApplicationPoolMessageHandler.doPoolMessage(ApplicationPoolMessageHandler.java:422)
         at oracle.jbo.server.ApplicationModuleImpl.doPoolMessage(ApplicationModuleImpl.java:8995)
    Edited by: user9010551 on Apr 24, 2013 5:52 AM

    Can you provide some background information please?
    Does this happen when you run the app from within jdev or on a stand alone server?
    Have you checked that the jdbc connection you used to build the app is correct (username, password and other connection data)?
    Is this an ADF rich faces application?
    Do you use jdbc url or jdbc data source?
    Timo

  • How to make pool of  url connections in wls?

    Hi, i have a project in which i have to make a http post to multiple web
              servers to retrieve
              XML files in response to user requests. Right now i just open the
              url for each request.
              Is there any way to pool URL connections in weblogic
              thanks
              wasiq
              

    Are u using Custom Connection Pool or some App Servers Conn Pool for LDAP Connection?
    If you are opening LDAP Connection in your program code and wondering how to monitor, then it needs to be done on the LDAP Server side. Not from the application.

  • Problem using setRequestProperty on a url connection, how can I fix it?

    From what I've read on it I thought I did everything the right way. I'm just starting out with the networking aspect of Java. What I'm trying to do is download only a portion of a file. For right now I'm just worried about downloading the end of a file starting from a value I enter manually. I read that I should use the setRequestProperty to set the start position of the file I'm download. For some reason it isn't working for me. It's still download the entire file. Can anyone give me some insight into what I'm doing wrong? I've commented what I think is happening in each line of the code, if someone could verify where I'm correct and where I'm wrong at that would be helpful too. Thank you.
    import java.io.*;
    import java.net.*;
    public class FileDownload2 {
         public static void download() {
              OutputStream out = null;
              RandomAccessFile file = null;
              URLConnection conn = null;
              InputStream  in = null;
              try {
                            URL url = new URL(""); //create a new url
                   conn = url.openConnection();//set url up to be opened
                   conn.setRequestProperty("Range", "921600-"); // send a header-request
                   in = conn.getInputStream(); //open the connection to the file
                   byte[] buffer = new byte[1024];//create a buffer to hold bytes from the file
                    out = new FileOutputStream("test");//create a new file to write the bytes to
                   int numRead;
                   long numWritten = 0;
                   while ((numRead = in.read(buffer)) != -1) {
                        out.write(buffer, 0, numRead);
                        numWritten += numRead;//while there is still data read from the buffer and write the bytes to the file
              } catch (Exception exception) {
                   exception.printStackTrace();
              } finally {
                   try {
                        if (in != null) {
                             in.close();//close the inputstream
                        if (out != null) {
                             out.close();//close the file
                   } catch (IOException ioe) {
         public static void main(String[] args) {
                   download();//call method download
    }Edited by: Secondtimearound on May 3, 2008 9:05 AM

    Thanks! I ended up finding that on my own. I'll still give you the points if you want them because you gave the right answer. LOL I do have another question though. I only want to download part of a file and it seems to work fine with .mp3 files, I'm guessing because they were designed to play from any part of the file. However, when the program downloads only a part of a video file the video won't show. Sometimes the audio will still download that goes along with the video file. I read in another forum that the reason p2p programs can preview a video file is because they download the begining and end of the file. My question is, how can determine how much of the beginning and end of the file needs to be downloaded in order for the video file to play? I'm guessing there's some type of header file in the video but how to I download just that first? Then, I'm thinking I would have to use threads to download the different parts then combine them or something. I'm not sure. Any help would be appreciated. Thanks.

  • FormsGraph: open HTTP connection failed

    I have the forms 9i demos installed and they work fine. However when I put my own form into the bigraph\forms directory and try to run it, the form itself runs but I have no chart. The implementation class is the same as in the FormsGraph demo.
    I have copied the [bigraph] config information in forms90demo.cfg to my own config, changing only the fmx name and the userid. However, the java console shows
    ..java.lang....open HTTP connection failed
    followed by a number of java classes.
    What could be going wrong?
    Adrian

    Frank, this is from the java console
    proxyHost=null
    proxyPort=0
    connectMode=HTTP, native.
    Forms Applet version is : 90290
    java.lang.ClassNotFoundException: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClassInternal(Unknown Source)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at oracle.forms.handler.UICommon.instantiate(Unknown Source)
         at oracle.forms.handler.UICommon.onCreate(Unknown Source)
         at oracle.forms.handler.JavaContainer.onCreate(Unknown Source)
         at oracle.forms.engine.Runform.onCreateHandler(Unknown Source)
         at oracle.forms.engine.Runform.processMessage(Unknown Source)
         at oracle.forms.engine.Runform.processSet(Unknown Source)
         at oracle.forms.engine.Runform.onMessageReal(Unknown Source)
         at oracle.forms.engine.Runform.onMessage(Unknown Source)
         at oracle.forms.engine.Runform.sendInitialMessage(Unknown Source)
         at oracle.forms.engine.Runform.startRunform(Unknown Source)
         at oracle.forms.engine.Main.createRunform(Unknown Source)
         at oracle.forms.engine.Main.start(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    and this is the forms90demo.cfg, which I have
    modified to make sure I hadn't missed anything
    for FormsGraph capabilities
    (I have stripped out the other named configs)
    # Forms 9i Samples and Demos Configurations
    # Generic settings for the Demos and Samples
    # SYSTEM PARAMETERS
    # These have fixed names and give information required by the Forms
    # Servlet in order to function. They cannot be specified in the URL query
    # string. But they can be overriden in a named configuration (see below).
    # Some parameters specify file names: if the full path is not given,
    # they are assumed to be in the same directory as this file. If a path
    # is given, then it should be a physical path, not a URL.
    baseHTML=demo90base.html
    baseHTMLie=demo90baseie.html
    baseHTMLJInitiator=demo90basejini.html
    HTMLdelimiter=%
    # WorkingDirectory defaults to <oracle_home>/forms90 if unset.
    workingDirectory=
    envFile=forms90demo.env
    # The next parameter specifies how to execute the Forms applet under
    # Microsoft Internet Explorer 5.x.
    # The Demos want to use JInitiator as we ahve many demos that need a 1.3 JVM
    IE=JInitiator
    # These settings support running and debugging a form from the Builder:
    otherparams=debug=%debug% buffer_records=%buffer% debug_messages=%debug_messages% array=%array% query_only=%query_only% quiet=%quiet% render=%render% host=%host% port=%port% record=%record% tracegroup=%tracegroup% log=%log% term=%term%
    debug=no
    buffer=no
    debug_messages=no
    array=no
    query_only=no
    quiet=yes
    render=no
    host=
    port=
    record=
    tracegroup=
    log=
    term=
    # Values for the Forms applet parameters:
    serverURL=/forms90demo/l90servlet
    codebase=/forms90demo/java
    imageBase=DocumentBase
    formsMessageListener=
    recordFileName=
    serverApp=default
    # General Shared settings which define the Look and feel of the Demos
    width=675
    height=480
    separateFrame=false
    splashScreen=no
    lookAndFeel=oracle
    colorScheme=blue
    background=/forms90demo/images/blue.gif
    logo=/forms90demo/images/Forms9i.gif
    # Other settings
    scripting=false
    # Default JARs
    archive=f90all.jar,/forms90demo/jars/demo90.jar
    archive_jini=f90all_jinit.jar,/forms90demo/jars/demo90.jar
    archive_ie=f90all.cab,/forms90demo/jars/demo90.cab
    # Jinitiator and iAS general settings
    # Number of times client should retry if a network failure occurs. Only
    # change after having read the documentation.
    networkRetries=0
    # 4) Parameters for JInitiator (used with Windows clients)
    # Page displayed to Netscape users to allow them to download JInitiator.
    # If you create your own page, you should set this parameter to point to it.
    jinit_download_page=/forms90demo/jinitiator/us/jinit_download.htm
    # Parameters related to the version of JInitiator.
    jinit_classid=clsid:CAFECAFE-0013-0001-0013-ABCDEFABCDEF
    jinit_exename=jinit.exe#Version=1,3,1,13
    jinit_mimetype=application/x-jinit-applet;version=1.3.1.13
    # EM config parameter
    # Set this to "1" to enable Enterprise Manager to track Forms processes
    em_mode=0
    [qt]
    userid=capel/james@bond
    form=portfoliomanager.fmx
    #width=960
    #height=1200
    #baseHTML=qtbase.htm
    #baseHTMLjinitiator=qtbasejini.htm
    #baseHTMLjpi=qtbasejpi.htm
    #baseHTMLie=qtbaseie.htm
    archive=f90all_jinit.jar,/forms90demo/jars/demo90.jar,/forms90demo/jars/FormsGraph.jar
    archive_jini=f90all_jinit.jar,/forms90demo/jars/demo90.jar,/forms90demo/jars/FormsGraph.jar
    #background=NO
    #look-and-feel=Generic
    #logo=NO
    imagebase=codebase
    # End
    Even when I replace graph90.fmx in the [bigraph] named configuration with my portfoliomanager.fmx I still get these errors. This leads me to think there is something wrong with the form itself. The demos work fine.

  • Need solution for opening multiple connection to server in parallel

    Hi..
    I have used URL and URLConnectin classes to open connection to server,
    and i used URLConnection.getInputStream( ) to download HTML pages.
    Now my requirement is to open more than one connecton to single HTML document and download the file in parallel.
    for example, if the HTML file size is 60KB..then i open three connection and
    connection 1 downloads first 20KB
    connection 2 downloads second 20KB
    connection 3 downloads final 20KB
    all the above should be done in parallel....by threading or else..
    first of all i want to know is it possible to do the above in java?
    anybody having solution for the above requirement?
    venu

    hi,
    i too have the same problem
    actually i am designing a download manager ,and had the same problem
    that how to put multiple threads for doing it ,,,,
    have u got solution for it..
    if so please help me..
    my mail id is [email protected]
    i want help in designing the download manager
    can any one help me out plzzzzzzzzzzzzzz
    bye

  • What do I need to open a connection from the Linux box to the Oracle server

    Hi all,
    I want to access oracle database from java application running on Linux.
    The database is installed on a Window 2000 machine. What do I need to install before I can open a connection from the Linux box to the Oracle server on Windows 2000 ?
    Do I need Oracle Client ?
    Thanks,
    Quoi

    Hi Quoi,
    http://myjdbc.tripod.com/basic/jdbcurl.html
    Talks abt how to write a jdbc url and the jar + config required to connect to db. Also has a sample program to connect.
    Regards
    Elango.

  • Error opening url 'file: What does it mean?

    When I test some of my as3 movies a new window opens and I can test the file. Yet when I test other movies I get an (error opening url 'file message.) What causes that? It seems to me that if a movie plays it should also test in a new window.

    It doesn' work. I only got the one file open. The swf file won't open at
    all. The fla file won't test. But when I debug the fla file the flash player
    debugger opens the movie in a new window and I get this message in the
    output window: "Attempting to launch and connect to Player using URL
    /Users/schweideltyson/Desktop/Circle.swf"
    SWF Users:schweideltyson:Desktop:Circle.swf - 2887 bytes after
    decompression
    Could it be my flash player is not working properly? I wish I knew.

  • HttpsURLConnection URL connection issue

    Hi All,
    I need to create URL connection with HTTPS URL. I can run Main java class successfully in machine which hosted in SAP Java server, but fail to run integrate it with e-commence application. When depployed in to SAP Java server cannot open HttpsURLConnection and always return CalssCastexception. However same code run as Java Main class
    Is this can be a (SSL) Handshake? or is this SSL issue?
    MyCode:
    String httpsURL = "https://encrypted.google.com/";
        URL myurl = new URL(httpsURL);
        HttpsURLConnection con = (HttpsURLConnection)myurl.openConnection();
        InputStream ins = con.getInputStream();
        InputStreamReader isr = new InputStreamReader(ins);
        BufferedReader in = new BufferedReader(isr);
        String inputLine;
        while ((inputLine = in.readLine()) != null) {
          System.out.println(inputLine);
        in.close();
    Thank You

    This is purely ssl issue. You can try adding the below logic first.. This code basically sets ssl properties for us.
    import java.security.Security;
    Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
    Properties properties = System.getProperties();
    String handlers = System.getProperty("java.protocol.handler.pkgs");
    if (handlers == null) {
        // nothing specified yet (expected case)
        properties.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
    else {
        // something already there, put ourselves out front
        properties.put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol|".concat(handlers));     
    System.setProperties(properties);
    Below you start your code....

  • Error when opening RFC Connection

    Hello SAPers,
    I have configured PDA in my ECC6.0 --- XI (ABAP+JAVA) Which was successful.
    In my Web Dyno Pro Content Administrator
    I have performed the JCO Destinations test which was successful
    when I go to the URL
    http://server:port/webdynpro/dispatcher/sap.com/isisrsrsmenapp/MainApp
    entered the store number
    In the next menu
    Inventory Lookup when I enter the Article number and press Go Button
    It is giving me error " Error when opening RFC Connection "
    Rest of them working perfectly...
    Do I need to do any configuration In Visual Admin?
    Could anyone advice
    Thanks In Advance
    HariKrishna

    Thanks it got solved it was an error in RFC, I have changed the RFC now it is working fine
    Thanks
    Hari

  • Url connections

    When I try to open a connection calling the CONNECTION method of the URlConnection class, it doesn't work and stucks until trhowing a TimeOut Exception. It doesn't matter which URL I try to connect to, it never works. I get an URlConnection object by invoking the "openConnection" method of an URL object. Can someone suggest me a solution?
    Thanks.
    Fabio

    My internet connection works properly, even though it has some limitations, since I have to pass through my company firewall for accessing internet sites. For example, I cannot open Ftp connections with external Ftp servers.
    I think that connections to external sites should be treated in the same way, even if they're made by the browser or bye Java applications. Am I right or not? And could you suggest me a way to check it, please?
    Thank you anyway ofr your suggestion.
    Fabio

Maybe you are looking for