Basic stream/file/socket closing question

If you create a stream, it's generally considered good practice to call close() on that stream once you're done with it. the same for files and sockets. My question is what happens if I don't keep a reference to the object that needs closing. For example:
BufferedInputStream bis = new BufferedInputStream(new FileInputStream(new File("myfile.txt")));Clearly, I can close() bis. But does doing so close the FileInputStream, and the File? OR, will those remain open until the garbage collecter gets around to closing them. If not, is it considered good practice to keep references around for the sole purpose of explicitly closing the resource so you don't have to wait for garbage collection?
Finally, is it necessary to close() sockets/files/streams prior to calling System.exit()? It would save me a great deal of code in my exception handlers if I could simply exit() without explicitly freeing the resources I've opened prior to hitting the exception.
Thanks.

You should only need to call close on bis. That method call should take care of calling close on the underlying stream.

Similar Messages

  • SQLException: Io exception: socket closed: Bad file number;

    Hi,
    My server application connects oracle 8i using thin driver.
    My code opens a connection and create a statement object:
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    Connection connection = DriverManager.getConnection(url, username, password);
    connection.setAutoCommit(false);
    Statement statement = connection.createStatement();
    After a few hours it runs just fine I get the following error:
    java.sql.SQLException: Io exception: socket closed: Bad file number;
    The code line that couses this exception is:
    statement.executeQuery("my SQL query");
    after this there are more errors:
    ;java.sql.SQLException: Protocol violation;
    (in code line: connection.execCommit())
    and than a repeated exception of :
    java.sql.SQLException: Io exception: Broken pipe;
    Does anyone knows a solution? (is the problem in my code or in the oracle account?)
    Thank!!!

    Which package you are using? if you don't have
    classes12.zip, try again by including that package in
    the classpath. If you are already using classes12.zip
    then try by including nls_charset12.zip in the
    classpath.
    You can get these packages in Oracle (otn) website.
    SudhaThanks!
    I had classes12.zip in my classpath, but my classpath also had: classes111.zip
    so i removed classes111.zip from the classpath and as far as now,
    the problem did not occur again!
    (i also added nls_charset12.zip just to be sure)
    Lilach

  • Using FCE with 7500 iMovie DV Stream files: best approaches?

    I have about 50 hours of irreplaceable DV footage, of the first 5+ years of my children's lives. I saved all this footage to hard disk over these past 5 years using whatever the latest version of iMovie was at the time, so I have around 7500 DV stream clips created in iMovie 2, 3, 4, and HD. There has been no editing, no titles, no transitions. Just 50 untouched iMovie projects sitting for years on several FireWire disks.
    First question: Which format of digital video is currently more universally compatible and accessible by software: DV Stream (like iMovie uses) or DV-NTSC (like FCE uses)? I'd like my unedited video to be stored in a format that has a decent chance of being around for a while. (Which format is the Betamax, and which is VHS?)
    Anyway, the time has finally come to start editing this monumental volume of material. I want to leave iMovie, and learn to use FCE because iMovie is still buggy, FCE is more powerful, and -- here are the key words -- because FCE has 'RT Extreme" and "seamless iMovie import."
    The challenge, and the reason I need your advice, is now how to bring these 7500 iMovie DV stream files into FCE, in such a way so RT Extreme really works when editing these clips and the transition to FCE is really "seamless." Seamlessness is not the feeling I get when I've read several threads in this forum that address sticky problems arising when trying to work on iMovie projects using FCE.
    My hope was I could avoid such problems by somehow "importing" each iMovie DV stream clip into FCE and "converting" them to FCE's DV-NTSC format. Then my intention was to save the new DV-NTSC clips to disk and delete the iMovie clips, so I could then work entirely in FCE without any difficulty. IMO, this would be "seamless." As I'm reading through this forum I'm getting the sinking feeling that this is not possible.
    So, QUESTION 2: How best to proceed, when I have 50 iMovie projects, saved using iMovie 2, 3, 4, and HD, with around a total of 7500 DV Stream clips, so as to avoid glitches and delays in the transition, and to preserve features of FCE such as RT Extreme?
    If there are no good options, I suppose one possibility is to re-capture all the video from the original camcorder tapes again, using FCE instead of iMovie. This would be worthwhile especially if the answer to my first question is DV-NTSC. What do you think?
    Besides having to spend 50 hours re-capturing all the video I have on tape, there are other potential difficulties with this. First off, at least one of my original tapes has been "eaten" by my Canon camcorder when the rewind mechanism failed and I only have the DV stream data for that tape. Maybe I could record the affected clips back to tape, then capture them into FCE? Is this a plausible solution?
    Second, these tapes have been sitting around for more than 5 years, without exercising them or doing anything special to keep the data in good shape. What if some of the tapes have drop-outs or other problems? I'd have to go back to my DV Stream data, and I'm back in the same boat.
    I would appreciate any advice/feedback you can offer.

    Tom,
    Thanks a lot for your valuable reply.
    You wrote, "If the project does not import, you'll need to crack open the iMovie project, extract the clips from inside the project folder or package, and import them into FCE."
    This may be a basic operation, but as I don't yet have any working knowledge of FCE, how do you import these clips once you've found them in the package? And if you do that, is a copy made of those clips, or does FCE just remember where they are? If copies are made, are they still in DV Stream format or DV-NTSC/QT?
    For the clip that's been eaten, can I export that clip (using iMovie) to a new DV tape in my camcorder, then import that DV into FCE? If so, would that material then have clip timecode embedded in the QT file, or not? Is that a bad idea for any reason?
    You mentioned some setups with the Canon cameras have been problematic. I have a Canon GL2. I doubt anyone outside of Apple knows yet if it will be a problem with my setup: a PowerMac G5 Quad, with FCE pre-installed. I don't think the Quads have shipped yet.
    Thanks again, and I look forward to your reply to these questions.
    BTW, have you written a book on FCE HD? I didn't see one on Amazon.

  • What are the basic .jar files to be set in web dynpro project classpath

    Hi,
    I am having a problem while customizing the ESS. I used DTR, DC and imported configuration. After that, I created project from one of the DC(say ess/jp/addr). Later when I open an iView from any Web Dynpro component, I am getting lot of errors without even making any modifications.
    I closed the project and reopened it and reload & rebuilt, but it doesn't solved my problem. In my classpath settings I couldn't find any jar files except the jre_lib. Could you please let me know what are the basic jar files we have to set in classpath and where to get them from. We are using NWDS 7.0.06 version.
    Can you please let me know how to solve this or any other way to work around this.
    It's an urgent to be fixed as early as possible, plz help me out.
    Thanks & Regards,
    Raj

    Hi Julien,
    Thanks for your reply.
    We imported the the specified SCAs in our track.
    we are getting the following errors.
    Kind Status Priority Description Resource In Folder Location
    Error The import com.sap.xss.per cannot be resolved CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 18
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument fpm of the method loadConfiguration CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 113
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument currentPerspective of the method getNextPerspective CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 127
    Error com.sap.pcuigp cannot be resolved (or is not a valid return type) for the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    Error com.sap.pcuigp cannot be resolved (or is not a valid type) for the argument perspective of the method getCAPState CcPerAddressInterface.java NS1_XSSTR_Dessusaddrsap.com/gen_wdp/packages/com/sap/xss/hr/per/us/address/cc line 137
    we manually set below .jar files in classpath settings.
    pcuixssfpm.jar
    pcuixssutils.jar
    logging.jar
    essper.jar
    Is there any alternative to work around.
    Thanks & Regards,
    Raj

  • SQL loader and stream files with new line '

    I have been trying unsuccessfully to load EDI files using SQL loader. The problem
    is that the lines are terminated by ' and when I use the stream file option it does
    not recognise the line terminator given. As I understand it from the documentation
    this should work - but it does not. I have also used the Hex option with no better
    result. Does anyone have any ideas ?
    I can and have used tr "[']" "[\n]" in Unix to convert the ' to newlines - I just
    wonder am I missing something in SQL loader which will allow me to do this ?
    This is the sql loader control file
    LOAD DATA
    INFILE 'WS860685.MFD' "Str ''' "
    BADFILE 'WS860685.bad'
    DISCARDFILE 'WS860685.dsc'
    INTO TABLE "DUND1"."EDI_LOADED_TEMP"
    REPLACE
    FIELDS TERMINATED BY '+'
    TRAILING NULLCOLS
    (L1,
    L2,
    L3,
    L4,
    L5,
    L6,
    L7,
    L8,
    L9,
    L10,
    L11,
    L12,
    L13,
    L14,
    L15,
    L16,
    L17,
    L18,
    L19,
    L20,
    L21,
    L22,
    L23,
    L24,
    L25,
    L26,
    L27,
    L28,
    L29,
    L30,
    L31,
    L32,
    L33,
    L34,
    L35,
    L36,
    L37,
    L38,
    L39,
    L40,
    LNO)
    Heres a sample of the data
    UNB+UNOA:2+5398888501357+5398888501838+080306:0737+395+ DESADV+++1'UNH+0001+DESADV:D:93A:UN:EAN004'

    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:6020061915147
    answers this question perfectly

  • Error on content write: Socket closed

    Since a week or so we are getting the following stack trace on our WebCenter Portal (11.1.1.6.3). There are several content presenters on it, and so far I've not found out yet where the problem originates from. Has anyone experienced the same, or perhaps any pointers?
    <Aug 24, 2012 3:10:13 PM CEST> <Error> <oracle.webcenter.content.internal.http.HttpServiceImpl> <WCS-11001> <Error on content write: Socket closed
    oracle.webcenter.content.internal.http.InternalServerErrorException: Aug 24, 2012 3:10:13 PM oracle.webcenter.content.internal.http.HttpServiceExceptionFactory getException
    ALL: Error on content write: Socket closed
    at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.getException(HttpServiceExceptionFactory.java:191)
    at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:707)
    at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:685)
    at oracle.webcenter.content.internal.http.HttpServiceExceptionFactory.createInternalServerError(HttpServiceExceptionFactory.java:664)
    at oracle.webcenter.content.internal.http.Entity.sendResponse(Entity.java:205)
    at oracle.webcenter.content.internal.http.HttpServiceImpl.doGetOrHead(HttpServiceImpl.java:322)
    at oracle.webcenter.content.internal.http.HttpServiceImpl.service(HttpServiceImpl.java:179)
    at oracle.webcenter.content.http.GetHandlerServlet.service(GetHandlerServlet.java:225)
    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:301)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.wcps.client.PersonalizationFilter.doFilter(PersonalizationFilter.java:75)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.webcenter.content.integration.servlets.ContentServletFilter.doFilter(ContentServletFilter.java:168)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.share.http.ServletADFFilter.doFilter(ServletADFFilter.java:62)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:179)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:119)
    at java.security.AccessController.doPrivileged(Native Method)
    at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:315)
    at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:442)
    at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:103)
    at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:171)
    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:139)
    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:3730)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
    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:2273)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
    >

    We have a content presenter which loads a video file from the content server. It looks like the socket is unexpectedly closed at some point if the video is paused or stopped for some reason.

  • Save Report to File.vi closing file problems

    I have a while loop running in which I generate data. At the end of a sequence in the while loop, I create an HTML report and save the report file to disk. My problem is that the next time the while loop generates data and goes to save the new HTML report, I get a file permission error (Error 8) in the delete file subvi. I use the delete file subvi so that I can programmatically replace the HTML report file. I believe that the problem is in the "Save Report to File.vi" in that it does not close the file after it writes it. Any comments?

    Unfortunately i couldn't open your example as i only have LV 6.0, but i looked at the 'Save report to File.vi' in LV 6.0 and it basically only contains a 'Write characters to file.vi' for file handling. In LV 6.0 this vi does contain a 'Close file+.vi' which has an input called 'close when? (now:T)'. Make sure this is wired as True (default) and the file will close, and you should be able to delete the file (as long as the delete event occurs afterwards (make sure it is wired in sequence). In the LV help, it says the reason for the 'Write characters to file.vi' only closing if you tell it to (set as default) or if there is an error is so you can continually use it in a loop, writing characters to file, without closing, and then send a command to close
    it only on the last loop, or if there is an error. Therefore i dont think it is a bug, but i think there should be a wire for it on the 'Write characters to file.vi'.
    I hope this helps you..
    Kim

  • Socket Closed error please help us finding a fix for the same

    Hi everyone,
    I have a web application deployed on Weblogic 10.3.4.0. In the application there is hyperlink to download a resouce (say an PDF document). Upon clicking the link, IE shows the Open/Save/Cancel dialog box. If the Open/Save/Cancel dialog box is not acted upon by the user within 1 min after it pops up, Weblogic is closing the socket. This causes IE to only download a part of the file say 784 KB or something. Whereas the entire file maybe 1MB in size. Please help in fixing this issue ASAP.
    Thanks in Advance
    java.net.SocketException: Socket closed
    at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:99)
    at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
    at weblogic.servlet.internal.ChunkOutput.writeChunkTransfer(ChunkOutput.java:525)
    at weblogic.servlet.internal.ChunkOutput.writeChunks(ChunkOutput.java:504)
    at weblogic.servlet.internal.ChunkOutput.flush(ChunkOutput.java:382)
    at weblogic.servlet.internal.CharsetChunkOutput.flush(CharsetChunkOutput.java:249)
    at weblogic.servlet.internal.ChunkOutput.checkForFlush(ChunkOutput.java:469)
    at weblogic.servlet.internal.CharsetChunkOutput.implWrite(CharsetChunkOutput.java:396)
    at weblogic.servlet.internal.CharsetChunkOutput.write(CharsetChunkOutput.java:198)
    at weblogic.servlet.internal.ChunkOutputWrapper.write(ChunkOutputWrapper.java:139)
    at weblogic.servlet.internal.ServletOutputStreamImpl.write(ServletOutputStreamImpl.java:169)
    at com.teja.systemi.util.AroundData.copyStream(AroundData.java:311)
    at com.teja.systemi.client.servlet.servant.Newdownloadsingle.producePageData(Newdownloadsingle.java:108)
    at com.teja.systemi.client.servlet.servant.BaseViewController.serve(BaseViewController.java:542)
    at com.teja.systemi.client.servlet.FrontController.doRequest(FrontController.java:226)
    at com.teja.systemi.client.servlet.FrontController.doPost(FrontController.java:128)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    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:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Edited by: 910597 on Jan 27, 2012 2:15 AM

    What do you mean by "moo" ?
    Huh? You don't know about the moo? Are you livin' in a barn or sumthin'
    Sorry, corny joke.
    Seriously--if you haven't heard about the moo, then check out the MacBook forums. Nearly every third or fourth post is about the mooing problem.
    My own MacBook moos, but it's not so bad that it makes me upset. I understand, though, that others have it much worse.
    Black Macbook; Mini 1.5GHz (Late 2005); Mini 1.4GHz; PB G4 1GHz; PB Lombard; PB 2400; PMac G3; Blueberry iMac; iPod nano 4GB; and a talking Bill King bobblehead doll--Holy Toledo!

  • Is there a setting such that the application closes (quits) when the (last) file is closed? Why does the application remain active when there are no files for it open?

    I honestly did try to find my own answer, but cannot.  Not sure why a simple question would have its answer so difficult to find. I'd just like the application to simply close after the last file is closed.  It seems strange to have the application remain active.  Thanks for your help.

    It's also a bit strange that even though I searched throughout the community for questions like this......so that I wouldn't take up space for something already discussed........that immediately after I posted my question, the "
    More Like This" side window comes up that describes questions just like mine. 
    So, sorry to have bothered anyone with having to read another duplicate question.  I see that the answer to my first question is "No", and there's likely not a good answer for "Why".
    Thanks anyway.

  • Stream-Mode Sockets

    Hi, I am working through a pradtice paper. I need to learn something for tomorrows exam.
    Here is the Question
    2b) Write detailed Java pseudo code fragments using stream-mode sockets. The code should reflect the following scenario:
    •     the server listens on a particular socket
    •     the client requests for a connection;
    •     the server accepts the connection request;
    •     the server sends the message “Send me a line of text” to the client;
    •     the client receives the message;
    •     The client sends the string “here is a line of text.”
    •     The server receives the line
    •     The server changes the text into upper case
    •     The server sends the changed text back.
    •     The client receives the changed text.
    Although your code does not need to be syntactically correct, it needs to be detailed enough to show the correct understanding of how the host addresses and port numbers are related to the sockets; it needs to show the correct use of classes and methods.
    So Far I have found thins:
    Client:
    package NetworkProgramming;
    import java.io.*;
    import java.net.*;
    public class Client2 {
    public static void main(String[] args) throws Exception {
    Client2 myCli = new Client2();
    myCli.run();
    public void run() throws Exception {
    Socket mySkt = new Socket("localhost", 9999);
    PrintStream myPS = new PrintStream(mySkt.getOutputStream());
    myPS.println("Hello Server");
    BufferedReader myBR = new BufferedReader(new InputStreamReader(mySkt.getInputStream()));
    String temp = myBR.readLine();
    System.out.println(temp);
    Server:
    package NetworkProgramming;
    import java.io.*;
    import java.net.*;
    public class Server2 {
    public static void main(String[] args) throws Exception {
    Server2 myServ = new Server2();
    myServ.run();
    public void run() throws Exception {
    ServerSocket mySS = new ServerSocket(9999);
    Socket SS_accept = mySS.accept();
    BufferedReader SS_BR = new BufferedReader(new InputStreamReader(SS_accept.getInputStream()));
    String temp = SS_BR.readLine();
    System.out.println(temp);
    if (temp != null) {
    PrintStream SSPS = new PrintStream(SS_accept.getOutputStream());
    SSPS.println("got Something");
    Is this the right stuff?
    How can i implement the parts in the question into this. like the sending messages, change to upper case etc.
    Many thanks for your help.

    1. When posting code, use code tags so it will be readable: http://forums.oracle.com/forums/ann.jspa?annID=1429
    2. You'll find you get better responses if you ask a more specific question and show your attempt to solve the problem yourself, as opposed to just pasting your assignment and some code you "found" and then asking, "How do I do the rest of this?"

  • New root certificates cause socket closed error

    We have planning 9.3.1 services with ldap authentication. When we replaced our root certificates in dev we began getting errors. Mostly everything works, but after some inactivity a good log in will be flagged as an invalid user and throw the following exceptions:
    2010-03-29 07:43:48,141 [[ORB=_it_orb_id_1,Pool=1]::id-3] WARN com.hyperion.css.spi.impl.ldap.LDAPProvider.authenticate(Unknown Source) - javax.naming.ServiceUnavailableException: ldaps.lirr.org:636; socket closed; remaining name ''
    2010-03-29 07:43:48,141 [[ORB=_it_orb_id_1,Pool=1]::id-3] WARN com.hyperion.css.CSSAPIImpl.authenticate(Unknown Source) - com.hyperion.css.CSSAuthenticationException: Failed to authenticate user tlbarat against provider Novel1     Error Code: 2
    NestedException:
    javax.naming.ServiceUnavailableException: ldaps.lirr.org:636; socket closed; remaining name ''
    Does anyone know what we could be doing wrong? We changed to a load balanced virtual server. Could this have caused our issue? We tried setting java option -Dsun.net.inetaddr.ttl=0 but it didn't work. We need to move the change to prod next week. Any insight would be appreciated.

    The socket is being closed by the receiver, since it feels that the end of HTTP body stream has been reached. This could happen due to a number of reasons and cannot be directly discerened from your code.
    Does changing the buffer size help?
    Ironluca

  • InitialDirContext Throwing ServiceUnavailableException socket closed

    Any assistance is appreciated.
    Problems occurring when multiple DirContext instances are created. Attempting to make a SSL connection to Active Directory on port 636. A single successful context can be established in the below code. However, a second instantiation of InitialDirContext(env) results in a javax.naming.ServiceUnavailableException: [domain]:636; socket closed error. Multiple contexts are desired to establish a connection pool.
    A few items to note. Establishing four unsecure DirContext on port 389 works successfully. I can establish a DirContext on port 636, use the context, close the context then establish new contexts without a problem. A server certificate was imported to the C:\j2sdk1.4.2_11\jre\lib\security\cacerts file. Testing on a local computer. Below is sample code:
    public static void main(String[] args) {
        try {
            System.setProperty("javax.net.debug","all");
            // Set up the environment for creating the initial context
            Hashtable env = new Hashtable();
             env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
            env.put(Context.SECURITY_PRINCIPAL, "[USER DN]");
            env.put(Context.SECURITY_CREDENTIALS, "[PWD]");
            //NON SSL
            //env.put(Context.PROVIDER_URL, "ldap://[server]:389");
            //SSL
            env.put(Context.PROVIDER_URL, "ldap://[server]:636");
            env.put(Context.SECURITY_PROTOCOL, "ssl");
            env.put(Context.SECURITY_AUTHENTICATION, "simple");
            // Create the initial context
            DirContext ctx = null;
            DirContext ctx2 = null;
            DirContext ctx3 = null;
            DirContext ctx4 = null;
            try {
                //Works every time...
                ctx = new InitialDirContext(env);
            } catch (NamingException e) {
                e.printStackTrace();
            try {
            //Fails on port 636, works on port 389
            ctx2 = new InitialDirContext(env);
            } catch (NamingException e) {
                e.printStackTrace(); 
            try {
            //Works on port 636 (after 2nd attempt fails) and port 389
            ctx3 = new InitialDirContext(env);
            } catch (NamingException e) {
                e.printStackTrace();
            try {
            //Fails on port 636, works on port 389
            ctx4 = new InitialDirContext(env);
            } catch (NamingException e) {
                e.printStackTrace();
            Attributes attrs = ctx.getAttributes("[A USER DN]");
            System.out.println("Total attributes returned: " + attrs.size());
            try {
                ctx.close();
                ctx2.close();
                ctx3.close();
                ctx4.close();
            } catch (NamingException e) {
                e.printStackTrace();
        } catch (Exception ex) {
            ex.printStackTrace();
        System.exit(0);
    }The java debug statements at the second exception:
    Thread-1, WRITE: TLSv1 Handshake, length = 121
    Thread-1, received EOFException: ignored
    Thread-1, called closeInternal(false)
    Thread-1, SEND TLSv1 ALERT:  warning, description = close_notify
    Plaintext before ENCRYPTION:  len = 18
    0000: 01 00 0F 78 84 EE 16 24   F6 99 B0 83 52 14 FF 86  ...x...$....R...
    0010: 29 3C                                              )<
    Thread-1, WRITE: TLSv1 Alert, length = 18
    Thread-1, called close()
    Thread-1, called closeInternal(true)Again, any assistance is appreciated.

    Multiple contexts are desired to establish a connection pool.The JNDI LDAP provider already does connection pooling so you don't need multiple initial contexts at all.

  • How do I get rid of the flashing file with a question mark in it?

    I wanted to start clean on my MacBook Pro osx 10.9.4. So I did the command r and erased what I thought was the right one. I restarted my computer and did the command r again and what came up was internet recovery. It can't find my internet because it's WEP and I don't know to change it to wpa. So I restarted my computer again and I didn't do the command r but just let it load itself to see what would happen and all I get is a flashing file with a question mark. I don't know what to do. Someone please help me.

    Do you get this display?
    If so, you have to select an Internet connection.  Do not expect quick response time in this mode.  All activities in this mode will be lengthy.
    Ciao.

  • I need to reinstall my operating system for 10.5 after seeing a file folder and question mark flashing on my start up screen. Can anyone help me with this?

    I need to reinstall my operating system for 10.5 after seeing a file folder and question mark flashing on my start up screen. Can anyone help me with this?

    Hello,
    That means it can find the Hard Drive, or can't find the things needed for booting.
    See if DU even sees it.
    "Try Disk Utility
    1. Insert the Mac OS X Install disc, then restart the computer while holding the C key.
    2. When your computer finishes starting up from the disc, choose Disk Utility from the Installer menu at top of the screen. (In Mac OS X 10.4 or later, you must select your language first.)
    *Important: Do not click Continue in the first screen of the Installer. If you do, you must restart from the disc again to access Disk Utility.*
    3. Click the First Aid tab.
    4. Select your Mac OS X volume.
    5. Click Repair Disk, (not Repair Permissions). Disk Utility checks and repairs the disk."
    http://docs.info.apple.com/article.html?artnum=106214
    Then try a Safe Boot, (holding Shift key down at bootup), run Disk Utility in Applications>Utilities, then highlight your drive, click on Repair Permissions, reboot when it completes.
    (Safe boot may stay on the gray radian for a long time, let it go, it's trying to repair the Hard Drive.)

  • Remote desktop connection manager on windows 8.1, can't connect to windows server 2012 R2, Socket closed

    remote desktop connection manager on windows 8.1, can't connect to windows server 2012 R2, Socket closed each time i try to open remote connection to the server,
    does remote desktop connection manager V2.2 not compatible with windows 8.1, and if so, is there are any other compatible versions
    or what's the problem,
    Mahmoud Sabry IT System Engineer

    this issue maybe will be fix by latest version, we still waiting for it
    maybe your issue can be fix using this methods
    https://social.technet.microsoft.com/Forums/windowsserver/en-US/61f218a5-5ef8-49da-a035-90cdd64fc9a0/problem-with-remote-desktop-connection-manager-error-3334?forum=winserverTS
    http://shawn.meunier.com/?p=1#comment-43

Maybe you are looking for

  • Org.xml.sax.SAXParseException: Document root element "taglib", must match D

    hi using tomcat 4 and jdf1.5 i am getting bellow error org.xml.sax.SAXParseException: Document root element "taglib", must match DOCTYPE root "null".

  • My mainboard number is not listed in dv3 manual pdf

    hello, i have hp dv3 4150st.  my motherboard part number is 628187-001 but i cant find it in dv3 pdf manual  http://h10032.www1.hp.com/ctg/Manual/c02639565.pdf why cant i see it in manual? where can i see it? Regards.

  • Contact Sync Insue

    I have a problem syncing my contacts in my new iphone 4S with latest software update to my gmail account.  I used the CardDAV account to do it.  It seemed to work fine but has one issue.  When I update or add a contact on my gmail account on the web

  • ATI Mach64 Video drivers for PowerMac 4400

    Hi! I have one of these machines that I just put in an ATI Mach64 PCI video card and was wondering about drivers for this card. Do I need to find and install them or does OSX 8.1 already have them? I am from a Windows world so bear with me. Thanks! D

  • Update table with BC4J results in ORA-1002: fetch out of sequence

    In our BC4J application, any table updates result in an ORA-1002: fetch out of sequence error message. The code looks something like this: EmpViewImpl voEmp = getEmpView (); voEmp.setWhereClause ("id = :0"); voEmp.setWhereClauseParam (0, iEmpId); voE