Results 1 to 9 of 9
  1. #1
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default File not found exception on ObjectInputStream

    Hello,

    I am getting a file not found exception on the following line

    ObjectInputStream in = new ObjectInputStream(conn.getInputStream());
    The exception says file not found
    http://server:80//root/rootServlet.c...ver=xxx&DB=xxx

    I get this exception when I try to login to my application.I am confused is this a networks problem,
    IIS, or weblogic issue?
    Its just the starting point for my application.
    The file rootServlet it says not found is present under same location.
    Please any directions what could be the reasons for this issue.

    Thanks,

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    What is conn?
    Why do you think that that input stream is sending a java object?

  3. #3
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for the reply.
    conn is url.Openconnection.
    actually conn.getInputstream gives me the exception.Why am I not able to fetch the inputstream?
    Input stream is sending a java object because,I have the application running on development environment and its working fine
    when I try to move my files to another environment i get this exception

  4. #4
    Join Date
    May 2011
    Location
    Maryland
    Posts
    38
    Rep Power
    0

    Default

    could we see some more of the code? it's hard to locate the problem from that small segment, you may have done something wrong when creaing conn before that..
    also try checking out URLConnection (Java 2 Platform SE v1.4.2)) to see if you can fix it yourself from there

  5. #5
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    So.
    This is a web server you are contacting?
    So why is that address so strange? Shouldn't it be something like http://server:80/myApp/myServlet?etc etc. Or is your app called root?
    Is your webapp set up correctly?
    Have you got a web.xml saying how that servlet maps?
    I'm guessing not unless you are mapping rootServlet.class to your rootServlet class...

  6. #6
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    Thanks for your reply.
    Yes I am contacting Weblogic via IIS .I just gave example of root ,My app is not called root.
    http://server:80//test/testServlet.c...ver=xxx&DB=xxx

    My web app is setup correctly ,its working fine on development environment but not when I move it to another environment.
    My web.xml maps the servlet as follows


    <web-app>
    <servlet>
    <servlet-name>Applet</servlet-name>
    <servlet-class>testServlet</servlet-class>
    </servlet>


    <servlet-mapping>
    <servlet-name>Applet</servlet-name>
    <url-pattern>/testServlet.class</url-pattern>
    </servlet-mapping>
    </web-app>

    Dont know whether this is an IIS issue or weblogic or database connection.How can I come to know that IIS
    is forwarding request to weblogic and there is some problem with datbase connection.

    IIs ->Weblogic->Database

  7. #7
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    So where are you getting the exception?
    What is the full exception plus stack trace?

    Once you know where it's being thrown from then you might be able to show us the code...

    And that is an odd name to give your mapping.

  8. #8
    pink123 is offline Member
    Join Date
    Feb 2011
    Posts
    84
    Rep Power
    0

    Default

    I get the exception as soon as I enter the url mentioned above.I will not be able to give the full exception because because of security
    reasons.It is

    FileNotFoundException: http://server:80//test/testServlet.c...x&Database=xxx IOException in Method()
    .
    .
    .
    .at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unkn own Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAsse rtions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent (Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForHierar chy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarch y(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)

    It is thrown at the point I am trying to get the input stream when I do URLConnecton.getInputstream.
    Is it because some problem in IIS and weblogic communication?As it is not able to read the request from the browser.

  9. #9
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default

    So you are not getting to the servlet at all?
    If that's the case then that web address is wrong.

Similar Threads

  1. Class not found Exception
    By surendra in forum Java Servlet
    Replies: 8
    Last Post: 06-09-2011, 01:52 PM
  2. No Property Editor Found Exception -JSF 1.2
    By venkatcanwin in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 11-18-2010, 07:02 AM
  3. No suitable driver found exception error
    By Crazy Caveman in forum Networking
    Replies: 1
    Last Post: 09-01-2010, 01:03 AM
  4. Replies: 2
    Last Post: 06-01-2010, 03:58 AM
  5. class not found exception while using IKVM to create exe for c#
    By manjunath k reddy in forum New To Java
    Replies: 0
    Last Post: 02-21-2009, 07:05 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •