Corrupted java.io.stream.CorruptedException in servlet

I am getting
Corrupted java.io.stream.CorruptedException in servlet
while reading data from JApplet.
The error description is
Caught EOF Exeption while reading the streamheader.
Kindly let me know if anybody has got a solution to this.
regards

are you passing serialized objects through the i/o stream? If you're code is sending serialized objects they may be reconstructed incorrectly by the recipiant. When reading the input stream, its likely your JAplet is misinterpreting the object it recieves, resulting in a 'corrupted' exception. If this is the case, make sure your JAplet is constructing the correct type of object from its input.
not much help really, but better than nothing I guess.
rob

Similar Messages

  • Java.lang.NullPointerException at weblogic.servlet.logging.LogManagerHttp.log(LogManagerHttp.java:292)

              Hi,
              intermittently we are seeing this exception in the server log files on weblogic 6.1
              sp2, I was wondering what the cause is:
              java.lang.NullPointerException
                   at weblogic.servlet.logging.LogManagerHttp.log(LogManagerHttp.java:292)
                   at weblogic.servlet.internal.HttpServer.log(HttpServer.java:835)
                   at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1002)
                   at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2209)
                   at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
                   at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

    Did your C:\Lighthammer\Security\userdata\IlluminatorUsers.xml or other files in this directory get corrupted somehow?
    If you've rebooted the box or bounced the ServletExec-xMII service, do you see anything in the SYSTEM level messages that are forced during the initialization sequence in either the Lighthammer General log or the LHSecurity General log that would give any indications to the problem?
    Regards,
    Jeremy

  • FOP + servlet, external graphic streamed from another servlet

    Howdy,
    I currently have a servlet that assembles fragments of XHTML into a single document and then either sends it as straight XHTML or transforms it into Formatting Objects using XSLT. The FO are then used to generate a PDF file.
    The rub is with the external graphic src attribute in the FO. The image data has to be streamed using a servlet and while a relative URL works fine for sending straight HTML, FOP can't find the servlet specified in the translated external graphic src attribute.
    The first problem is that I do not know how to get the current URL from the servlet context or some other source. I would rather not hard code this value for obvious reasons but if I can obtain it from the servlet it will be easy to prepend it to the graphic src attributes.
    The second problem is that when I achieve this, I'm sure FOP will throw a wobbly because it can't determine the image type from the URL. I'm thinking that this can be fixed by adding the appropriate image extension to the servlet name in the URL then messing about with servlet mapping in Tomcat. The first problem is my biggest concern right now.
    Has anyone met this problem before or know of a standard way around it? Any suggestions would be greatly appreciated.
    Cheers.

    I can only try and move it there with my Jedi mind power...rather than commit the ultimate sin of crossposting.

  • Java.lang.NullPointerException in a servlet

    I'm having a problem, and need help as quick as I can get it.
    I'm coding a program that takes input from an HTML file, gives it to a servlet, which processes the information and spits it back out to the web browser in HTML.
    I'm using NetBeans 3.6 with Java 1.5.0.
    The error that TomCat is giving me is:
    java.lang.NullPointerException
         java.util.Hashtable.get(Hashtable.java:333)
         org.apache.tomcat.util.http.Parameters.getParameterValues(Parameters.java:231)
         org.apache.tomcat.util.http.Parameters.getParameter(Parameters.java:276)
         org.apache.coyote.tomcat5.CoyoteRequest.getParameter(CoyoteRequest.java:1094)
         org.apache.coyote.tomcat5.CoyoteRequestFacade.getParameter(CoyoteRequestFacade.java:312)
         org.netbeans.modules.web.monitor.server.MonitorRequestWrapper.getParameter(MonitorRequestWrapper.java:177)
         edu.usf.CCC.doPost(CCC.java:57)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:305)I don't understand why it's giving me the NullPointerException at the first "request.getParamter(name)" line, but it is.
    Any Suggestions?
    My servlet code:
    package edu.usf;
    import java.net.*;
    import java.lang.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.util.*;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import java.io.IOException;
    import java.io.PrintWriter;
    public class CCC extends HttpServlet {
      float drive_cost = 0.00f;
      float engine_cost = 0.00f;
      float sunroof_cost = 0.00f;
      float brakes_cost = 0.00f;
      float interior_cost = 0.00f;
      float style_cost = 0.00f;
      float roofrack_cost = 0.00f;
      String name,style,engine,drive,brakes,interior,sunroof,roofrack,basecost,totalcost;
      String namevar,stylevar,enginevar,drivevar,brakesvar,interiorvar,sunroofvar,roofrackvar,basecostvar,totalcostvar;
      String namastr,stylestr,enginestr,drivestr,brakesstr,interiorstr,sunroofstr,roofrackstr,basecoststr,totalcoststr;
      String name_field,style_option,engine_option,brakes_option,drive_option,interior_option;
      float base_cost = 15000.00f;
      float total_cost = base_cost;
      //static final String CONTENT_TYPE = "text/html";
      public void init() throws ServletException {
      protected void doPost(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException {
      response.setContentType( "text/html" );
      PrintWriter out = response.getWriter();
      namevar = request.getParameter(name);
      stylevar = request.getParameter(style);
      enginevar = request.getParameter(engine);
      drivevar = request.getParameter(drive);
      brakesvar = request.getParameter(brakes);
      interiorvar = request.getParameter(interior);
      sunroofvar = request.getParameter(sunroof);
      roofrackvar = request.getParameter(roofrack);   
      //Time to do some work
      //Check to see what style of car was selected.
      { if ( stylevar.equals("hatch") )
          {style_option = "Hatchback";
          style_cost = 0.00f;}
         if ( stylevar.equals("sedan") )
          {style_option = "Sedan";
          style_cost = 800.00f;}
         if ( stylevar.equals("wagon") )
          {style_option = "Wagon";
          style_cost = 1400.00f;}
      //Drivetrain calculation time
        { if ( drivevar.equals("2") )
          {drive_option = "2-Wheel Drive";
           drive_cost = 0.00f;}
          else if (drivevar.equals("4") )
           drive_option = "4-Wheel Drive";
           drive_cost = 7000.00f;}
       //Engine calculation time
        { if ( enginevar.equals("4"))
          {engine_option = "4-Cylinder";
           engine_cost = 0.00f;}
          else if ( enginevar.equals("6"))
          {engine_option = "6-Cylinder";
           engine_cost = 2200.00f;}
       //Brake calculation time
        { if ( brakesvar.equals("s") )
           {brakes_option = "Standard";
            brakes_cost = 0.00f;}
          else if ( brakesvar.equals("a") )
            {brakes_option = "Anti-Lock";
             brakes_cost = 900.00f;}
       //Sunroof calculation time
        { if ( sunroofvar.equals("1") )
            sunroof_cost = 800.00f;
       //Interior calculation time
        { if ( interiorvar.equals("deluxe"))
          {interior_option = "Deluxe";
          interior_cost = 0.00f;}
        { if ( interiorvar.equals("luxury") )
          {interior_option = "Luxury";
          interior_cost = 800.00f;}
        { if ( interiorvar.equals("executive") )
          {interior_option = "Executive";
          interior_cost = 1400.00f;}
       //Roofrack calculation time
        { if ( roofrackvar.equals("1") )
            roofrack_cost = 200.00f;
       //Total cost calculation time
          total_cost = style_cost + drive_cost + engine_cost +  brakes_cost +
                    sunroof_cost + interior_cost + roofrack_cost;
    //OUTPUT HTML SECTION
        //Print up HTML Header section
        out.println("<html>");
        out.println("<head><title>Tri-C: Results</title></head>");
        out.println("<body bgcolor=\"#FFFFFF\">");
        out.println("<center>");
        out.println("<p>Tri-C: ResultsCar Calculation</p>");
        out.println("<table border=1>");
        out.println("<tr><td> </td><td>Option</td><td>Cost</td></tr>");
        //Print up name
        namastr = ("<tr><td>Name:</td><td>" + name + "</td></tr>");
        out.println(namastr);
        out.println("<tr><td> </td><td> </td><td> </td></tr>");
        //Print up Base Cost
        basecoststr = ("<tr><td>Base Cost:</td><td> </td><td>$" + base_cost + "</td></tr>");
        out.println(basecoststr);
        //Print up Style selection
        stylestr = ("<tr><td>Style:</td><td>" + style_option + "</td><td>$" + style_cost + "</td></tr>");
        out.println(stylestr);
        //Print up Engine selection
        enginestr = ("<tr><td>Engine:</td><td>" + engine_option + "</td><td>$" + engine_cost + "</td></tr>");
        out.println(enginestr);
        //Print up Drivetrain selection
        drivestr = ("<tr><td>Drivetrain:</td><td>" + drive_option + "</td><td>$" + drive_cost + "</td></tr>");
        out.println(drivestr);
        //Print up Brakes selection
        brakesstr = ("<tr><td>Brakes:</td><td>" + brakes_option + "</td><td>$" + brakes_cost + "</td></tr>");
        out.println(brakesstr);
        //Print up Sunroof Selection
        sunroofstr = ("<tr><td>Sunroof:</td><td> </td><td>$" + sunroof_cost + "</td></tr>");
        out.println(sunroofstr);
        //Print up Interior Selection
        interiorstr = ("<tr><td>Interior:</td><td>" + interior_option + "</td><td>$" + interior_cost + "</td></tr>");
        out.println(interiorstr);
        //Print up Roofrack Selection
        roofrackstr = ("<tr><td>Roofrack:</td><td> </td><td>$" + roofrack_cost + "</td></tr>");
        out.println(roofrackstr);
        //Print up Total Cost section
        out.println("<tr><td> </td></tr>");
        totalcoststr = ("<tr><td>Total Cost:</td><td> </td><td>$" + total_cost + "</td></tr>");
        out.println(totalcoststr);
        //Print up HTML Footer section
        out.println("</table>");
        out.println("</body>");
        out.println("</html>");
    And here is the HTML file that calls it:
    <html>
    <head>
    <title>Tri-C: Car Cost Calculator</title>
    </head>
    <body background="#000000">
    <form action="CCC" method="post">
    <center>
    <table border=1>
    <tr><td>Enter your name:</td><td><input type="text" name="name" /></td></tr>
    <tr><td> </td><td> </td></tr>
    <tr><td>Style:</td><td><SELECT name="style">
    <OPTION SELECTED value="hatch">Hatchback</OPTION>
    <OPTION value="sedan">Sedan (+$800.00)</OPTION>
    <OPTION value="wagon">Wagon (+$1400.00)</OPTION>
    </SELECT></td></tr>
    <tr><td>Drivetrain:</td><td>
    <input type="radio" name="drive" value="2">2-Wheel Drive</input><br>
    <input type="radio" name="drive" value="4">4-Wheel Drive (+$7000.00)</input>
    </td></tr>
    <tr><td>Engine:</td><td>
    <input type="radio" name="engine" value="4">4-Cylinder</input><br>
    <input type="radio" name="engine" value="6">6-Cylinder (+$2200.00)</input>
    </td></tr>
    <tr><td>Brakes:</td><td>
    <input type="radio" name="brakes" value="0">Standard</input><br>
    <input type="radio" name="brakes" value="1">Anti-Lock (+$900.00)</input>
    </td></tr>
    <tr><td>Sunroof:</td><td>
    <input type="checkbox" name="sunroof" value="1">Add Option (+$800.00)</input>
    </td></tr>
    <tr><td>Interior:</td><td><SELECT name="interior">
    <OPTION SELECTED value="deluxe">Deluxe</OPTION>
    <OPTION value="luxury">Luxury (+$800.00)</OPTION>
    <OPTION value="executive">Executive (+$1400.00)</OPTION>
    </SELECT></td></tr>
    <tr><td>RoofRack:</td><td>
    <input type="checkbox" name="roofrack" value="1">Add Option (+$200.00)</input>
    </td></tr>
    <tr><td></td><td><input type="SUBMIT" value="Process">    <input type="reset" name="Clear Form"></td></tr>
    </form>
    </body>
    </html>

    It's because name is null. You declared it but didn't initialize it, so it's null. What did you expect to happen there?
    By the way, declaring instance variables in a servlet class is a bad practice. If you get two requests at the same time, they both share the same instance of the servlet so they are both accessing and updating the same variables. Make them local variables in your doPost() method and you should not have that problem.

  • Java socket streams messing up

    iv wrote a games server and it uses java socket streams to send the messages back and forth between the game clients and the game server it self
    this all works great but when running and over about 5min its send over 1000 packets BUT
    it will crash iv found the reason is down to when reading the packets my parser is reading wrong part and grabbing a String part when it should be a INT
    now it should NEVER be reading this part of the packet so i put a trace on the packets coming in and ran it every packet was been read in perfect THEN just befor the crash TWO packets were merged together stright out from the socket stream this is y my packet reader was getting confused
    what im asking is can this happen in java sockets ? i thought they were bufferered so no matter how fast you send data it would always read it out in the same order ?? not sure how its merging these to packets
    is this possible of is my reader got an error in it altho works 95% of the time ??

    or do you have multiple buffered streams created from the same socket?

  • Servlet failed with Exception java.lang.LinkageError: Class javax/servlet/ServletConfig

              Hi
              I registered a web app with Weblogic 5.1 in the weblogic.properties file. I try
              to run the web app from my browser typing http://localhost:7001/xxx(Webapp name)
              and a jsp page. Following is the error I get. It would be helpful if some one
              could point me to a fix for this problem
              Tue May 01 13:56:41 CDT 2001:<I> <ServletContext-omxclient> Generated java file:
              D:\weblogic\myserver\omxclient\_tmp_war\jsp_servlet\_omx\_login.java
              Tue May 01 13:56:43 CDT 2001:<E> <ServletContext-omxclient> Servlet failed with
              Exception
              java.lang.LinkageError: Class javax/servlet/ServletConfig violates loader constr
              aints
              at jsp_servlet._omx._login._jspService(_login.java:59)
              at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:105)
              at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              pl.java:123)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:742)
              at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              textImpl.java:686)
              at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              ContextManager.java:247)
              at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              a:361)
              at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              

              Sorry, I didn't look very closely - the exception is for
              javax.servlet.ServletConfig - should be in weblogicaux.jar.
              Is there anything wrong with it? What service pack are you
              using? Could be a problem with weblogic.policy.
              mike
              >>java.lang.LinkageError: Class javax/servlet/ServletConfig
              "KC" <[email protected]> wrote:
              >
              >Hi Mike
              >The login.jsp page just contains a javascript function and two text boxes
              >in it.
              >Will try making changing it. If that is not the issue could you let me
              >know of
              >any other issues.
              >
              >"mreiche" <[email protected]> wrote:
              >>
              >>I would guess that login.jsp is a very large JSP and that
              >>the generated service method is too large for the classloader's
              >>liking. Try making it smaller.
              >>
              >>Mike
              >>
              >>
              >>"KC" <[email protected]> wrote:
              >>>
              >>>Hi
              >>>I registered a web app with Weblogic 5.1 in the weblogic.properties
              >>file.
              >>>I try
              >>>to run the web app from my browser typing http://localhost:7001/xxx(Webapp
              >>>name)
              >>>and a jsp page. Following is the error I get. It would be helpful if
              >>>some one
              >>>could point me to a fix for this problem
              >>>
              >>>Tue May 01 13:56:41 CDT 2001:<I> <ServletContext-omxclient> Generated
              >>>java file:
              >>> D:\weblogic\myserver\omxclient\_tmp_war\jsp_servlet\_omx\_login.java
              >>>Tue May 01 13:56:43 CDT 2001:<E> <ServletContext-omxclient> Servlet
              >>failed
              >>>with
              >>>Exception
              >>>java.lang.LinkageError: Class javax/servlet/ServletConfig violates
              >loader
              >>>constr
              >>>aints
              >>> at jsp_servlet._omx._login._jspService(_login.java:59)
              >>> at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
              >>> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>>pl.java:105)
              >>> at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
              >>>pl.java:123)
              >>> at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              >>>textImpl.java:742)
              >>> at weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletCon
              >>>textImpl.java:686)
              >>> at weblogic.servlet.internal.ServletContextManager.invokeServlet(Servlet
              >>>ContextManager.java:247)
              >>> at weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.jav
              >>>a:361)
              >>> at weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:261)
              >>>
              >>> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
              >>>
              >>>
              >>
              >
              

  • Whether java component (Not ejb, not servlet) can be deployed in App Server and get the services provided by App Server

    As I mentioned in subject, I am just wondering Whether the java component (Not
    ejb, not servlet) can be deployed in App Server and get the services provided
    by App Server or not?

    Nevermind folks - I got it to work. All my configuration was correct; I had other issues with the ejb-jar file that the verifier informed me of (my previous deployments were with the verifier turned-off).

  • Standard Java class communicating with a servlet

    Hey,
    I am trying to access a standard java classes member via a servlet class however the data is never received even though the member is visible on compilation. is there something Im doing wrong ?
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
    //lots more stuff
    public class wah extends HttpServlet{
            public void doGet( HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException{
                    doPost(request, response);
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPost
    }

    Don't post all your code. Instead, make a simplified version of the code that demonstrates what your problem is and that we could compile and see what is going on. Make it as simple as possible but still demonstrating the problem.
    Who knows, when you make the SSCCP (small, self contained, compileable program) you will find your mistake as well.
    But without seeing any code all I can say is that the date you are accessing in the list has not been made available when you try to get it from the servlet. Perhaps the servlet call is blocking the other threads from accessing the list to put data into it, perhaps the other threads haven't begun working yet, perhaps the list you give to the servlet isn't the same list (but instead a copy of the list) that the data is being entered into, or many other reasons.
    One thing I would assume you need to do, since the Servlet is the data consumer, you need to make sure the data has been entered before the servlet tries to read it. The best way to do that is to put a wait() in the servlet code so that it knows it can't do anything until the producers are finished. Then the producers would add a notify() to tell the servlet to go ahead and display the data.
    So some modification might be:
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
            //marker to let servlet know that it can consume data
            private static boolean done = false;
            //producers call this method when list is ready for use
            static void setReadyToConsume() { done = true; }
            //servlet calls this to check if the list is ready
            public static boolean isReadyToConsume() { return done; }
    //lots more stuff
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                           //Hold off trying to use list until list is ready
                            while (!Start.isReadyToConsume()) {
                                  try {
                                          Start.plugList.wait();
                                  } catch (InterruptedException ie) {
                                          log("Waiting for Plugs to be ready interrupted.  Continuing to wait.");
                                          log(ie.getMessage(), ie);
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPostAnd don't forget to add a Start.plugList.notify() or Start.plugList().notifyAll() in the producer code after it calls the setReadyToConsume() method.

  • Java.io.FileNotFoundException: no resource '/servlet/  (JBuilder7 and Weblogic7)

    Hi!
    I have been trying to make jBuilder7 Enterprise and WebLogic 7 Enterprise work
    together for many days with no success. My problem is actually identical to one
    issue recently posted on this user group:
         From: CMPUser ([email protected])
         Subject: Re: JB7+WL7 :Fail to run EJB and JSP in the same project
         Date: 2002-09-20 10:40:48 PST
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3d8b5b77%241%40newsgroups.borland.com
    All I am trying to do is to use the Wizard to build a very simple Servlet. I am
    following the intructions described in the following document:
         http://bdn.borland.com/article/images/28943/12289_3jbweblogic.pdf.
    Once the project is created, I get the following error message when I try to run
    it:
         <Oct 13, 2002 6:42:48 PM EDT> <Notice> <WebLogicServer> <000331> <Started WebLogic
    Admin
         Server "myserver" for domain "mydomain" running in Development Mode>
         <Oct 13, 2002 6:42:49 PM EDT> <Error> <HTTP> <101018> <[ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=)]
    Servlet
         failed with ServletException javax.servlet.UnavailableException: ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=):
         The server myserver is temporarily suspended
         java.io.FileNotFoundException: no resource '/servlet/borland.demo.web.TestServlet'
    Apparently WebLogic can not find the generated Servelet. Remember: all I am trying
    to do is run a Servlet generated by the JBuilder wizard. Nothing else!
    In my attempt to resolve the problem I tried moving the java file within the same
    directory as the .shtml file. I also changed the Servlet section of the
    .shtml from:
         <servlet
         codebase=""
         code="borland.demo.web.TestServlet.class"
         >
    to
         <servlet
         codebase=""
         code="TestServlet.class"
         >     
    I still get an error but the error message has changed. Unfortunatelly the exception
    message does not provide much insight into the cause of the problem. All
    I know is that I get an servlet.UnavailableException:
         <[ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=)] Servlet
    failed with ServletExceptionjavax.servlet.UnavailableException:
         ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=): The server
    myserver is temporarily suspended     at
         weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3077)
    at
         weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at
         weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>
    Could someone please help me solve this? What should I look for? How do I go about
    resolving this?
    I thank you in advance for your time.
    Olga.

    Hi!
    I have been trying to make jBuilder7 Enterprise and WebLogic 7 Enterprise work
    together for many days with no success. My problem is actually identical to one
    issue recently posted on this user group:
         From: CMPUser ([email protected])
         Subject: Re: JB7+WL7 :Fail to run EJB and JSP in the same project
         Date: 2002-09-20 10:40:48 PST
    http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&selm=3d8b5b77%241%40newsgroups.borland.com
    All I am trying to do is to use the Wizard to build a very simple Servlet. I am
    following the intructions described in the following document:
         http://bdn.borland.com/article/images/28943/12289_3jbweblogic.pdf.
    Once the project is created, I get the following error message when I try to run
    it:
         <Oct 13, 2002 6:42:48 PM EDT> <Notice> <WebLogicServer> <000331> <Started WebLogic
    Admin
         Server "myserver" for domain "mydomain" running in Development Mode>
         <Oct 13, 2002 6:42:49 PM EDT> <Error> <HTTP> <101018> <[ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=)]
    Servlet
         failed with ServletException javax.servlet.UnavailableException: ServletContext(id=824316,name=JBuilder_DefaultWebApp,context-path=):
         The server myserver is temporarily suspended
         java.io.FileNotFoundException: no resource '/servlet/borland.demo.web.TestServlet'
    Apparently WebLogic can not find the generated Servelet. Remember: all I am trying
    to do is run a Servlet generated by the JBuilder wizard. Nothing else!
    In my attempt to resolve the problem I tried moving the java file within the same
    directory as the .shtml file. I also changed the Servlet section of the
    .shtml from:
         <servlet
         codebase=""
         code="borland.demo.web.TestServlet.class"
         >
    to
         <servlet
         codebase=""
         code="TestServlet.class"
         >     
    I still get an error but the error message has changed. Unfortunatelly the exception
    message does not provide much insight into the cause of the problem. All
    I know is that I get an servlet.UnavailableException:
         <[ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=)] Servlet
    failed with ServletExceptionjavax.servlet.UnavailableException:
         ServletContext(id=4211180,name=JBuilder_DefaultWebApp,context-path=): The server
    myserver is temporarily suspended     at
         weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3077)
    at
         weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2544)
    at
         weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>
    Could someone please help me solve this? What should I look for? How do I go about
    resolving this?
    I thank you in advance for your time.
    Olga.

  • Looking for some help on Java IO Streams

    Need to find a example or how to on:
    Java IO Streams
    using a scanner to find files with
    FileInputSeteam ...("c:\\data.in")
    did that make sense
    sandyR

    What about the API page for Scanner: http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    And the IO tutorial: http://java.sun.com/docs/books/tutorial/essential/io/index.html (which also discusses Scanner).

  • How to parse a XML stream sent to servlet with PUT method

    Hi,
    I have to interface my servlet app with other apps communicating with XML.
    This way, My servlet will receive a XML stream in the http request, parse it and send back a XML message.
    What I've done is :
    An html page to send a XML File with a put method :
    <form enctype="multipart/form-data" method="PUT" action="http://localhost:8080/MyApp/servlet/TestUploadServlet">
         <input type="file" size="20" name="FileToUpload" value="Select File">
         <input type="submit" name="UploadFile" value="Upload">
         <input type="reset" value="Reset">
    </form>
    A servlet TestUploadServlet with :
    SAXParser parser = new SAXParser( );
    Trace.traceLine( "SAXParser" );
    parser.setContentHandler (this);
    try {
    parser.parse( new InputSource( requete.getInputStream() ) );
    catch (SAXException e) {
    Trace.traceLine( e.getMessage() );
    catch (IOException e) {
    Trace.traceLine( e.getMessage() );
    and the methods startElement, stopElement and other to work with the elements detected by the parser (already used by other programs parsing local xml files).
    And it doesn't work.
    is the html code is a good way to send a file in the http Put method ?
    is the parser.parse( new InputSource( requete.getInputStream() ) ); a good method to read the stream ?
    please help.

    I think the problemn comes from the method used to send the <XML> stream.
    Using an html form doesn't seem to be a good method.
    I tried several methods or examples found and none of them seems to work.
    here is another example in the servlet side :
    public void doPost(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    ServletOutputStream output = res.getOutputStream();
    output.println("ContentType: " + req.getContentType() + "<BR>");
    int content_length = req.getContentLength();
    output.println("ContentLength: " + content_length + "<BR>");
    if(content_length > 0) {
    output.println("Content: ");
    ServletInputStream input = req.getInputStream();
    byte [] buffer = new byte[1024];
    int nb;
    while((nb=input.read(buffer))!= -1) {
    output.write(buffer,0,nb);
    Can somebody tell me how to write a java code sending a http request with the content of a file in the content of the request ?

  • How to invoke a jsp page from java which does not use Servlets?

    Hello,
    I am working in Documentum. I am trying to invoke a jsp page from another java page which does not use Servlets.
    I tried doing this by just instantiating the java class related to the jsp page from my present java class.In my java class related to the jsp page, I have defined onInit() and onRender() methods.
    Now, I am trying to call the jsp page from my present java class by just instantiating the java class related to the jsp page. This throws a java.lang.NullPointerException.
    Any comments or suggestions on this.Any help would be appreciated.
    Thanks,
    Ranjith M.V

    RanjithM.V wrote:
    Hello,
    Thanks for the reply. One important thing I forgot to mention. I am also using xml component.And?
    As this is the standard way used for coding in Documentum, I do not want to use Beans.Well, JSP's should, in and of themselves, contain no functional code. It should all be only display.
    Without that is it not possible?What did I say? I said,
    masijade wrote:
    It is possible, but I very, very, very, much doubt, that it would be worth the effort.And, if you don't know how, a forum is not truely going to be able to help you implement it (at least not in less than a few years time, at which point it would be outdated).
    >
    Appreciate your understanding and help.
    Thanks,
    Ranjith M.V

  • Java Stored Procedure calling HTTP Servlet in Weblogic

    I am currently working on an e-commerce application for a brick-n-mortar electronics store. The store currently has an Oracle database that contains all of the products the store sells. The e-commerce site will have a separate Oracle database. Both database are Oracle 9i release 2 databases. The e-commerce site will be using BEA's Weblogic as its application server. I need to move data from the store db into the e-commerce db. The actual moving of the data is not the issue. The issue comes from needing to call several methods on a Stateless Session EJB, loaded on the Weblogic server, to perform backend processing. I wanted to make a JNDI call from a Java Stored Procedure but with Release 2, this option is no longer supported. The release notes (http://otn.oracle.com/tech/java/htdocs/9idb2_java.html) indicated that the JVM now supports calling out to Servlets using HTTP Client from a Java Stored Procedure.
    Has anyone done this? Is there any sample code available?
    Thanks for any help.

    I am currently working on an e-commerce application for a brick-n-mortar electronics store. The store currently has an Oracle database that contains all of the products the store sells. The e-commerce site will have a separate Oracle database. Both database are Oracle 9i release 2 databases. The e-commerce site will be using BEA's Weblogic as its application server. I need to move data from the store db into the e-commerce db. The actual moving of the data is not the issue. The issue comes from needing to call several methods on a Stateless Session EJB, loaded on the Weblogic server, to perform backend processing. I wanted to make a JNDI call from a Java Stored Procedure but with Release 2, this option is no longer supported. The release notes (http://otn.oracle.com/tech/java/htdocs/9idb2_java.html) indicated that the JVM now supports calling out to Servlets using HTTP Client from a Java Stored Procedure.
    Has anyone done this? Is there any sample code available?
    Thanks for any help. Hi,
    sorry we have not yet formally documented this but here is a code snippet
    Kuassi
    /* HttpCallout - simple test to callout to static pages from Java Stored
    Procedures */
    import java.io.IOException;
    import java.io.InputStream;
    import HTTPClient.HTTPConnection;
    import HTTPClient.HTTPResponse;
    import HTTPClient.AuthorizationInfo;
    public class HttpCallout {
    public static void main(String[] argv) throws InterruptedException {
    HttpCallout t = new HttpCallout(argv);
    t.run();
    private String[] argv ;
    HttpCallout(String[] argv) {
    this.argv = argv;
    void initSSL() {
    public void run() {
    try {
    if ( argv.length == 0 ) {
    System.out.println("HttpCallout " +
    "protocol " +
    "host " +
    "port " +
    "page ");
    return;
    // process arguments
    int argc = 0;
    String protocol = argv[argc++];
    String host = argv[argc++];
    int port = Integer.parseInt(argv[argc++]);
    String page = argv[argc++];
    // Debugging - don't set for now
    // System.setProperty("HTTPClient.log.mask", "3");
    // noop
    initSSL();
    // Grab HTTPConnection
    HTTPConnection con = new HTTPConnection(protocol, host, port);
    con.setTimeout(20000);
    con.setAllowUserInteraction(false);
    // Grab Response
    HTTPResponse rsp = con.Get(page);
    byte[] data = rsp.getData();
    if ( data == null ) {
    System.out.println("no data");
    } else {
    System.out.println("data length " + data.length);
    System.out.println(new String(data));
    catch ( Throwable ex ) {
    ex.printStackTrace();

  • Java.lang.NullPointerException with Tomcat  Servlet

    Hi,
    I have got in my database the year as a number (Integer) like 1973 whatever, and in my servlet i get the yearFrom and the yearTo. Then parse them into an integer but I get java.NullPointerException and I dunno why???
    Then I put them in my SQL statement:
    ageFrom = Integer.parseInt(strAgeFrom);
    ageTo = Integer.parseInt(strAgeTo);
    String SQL = "SELECT * FROM People where YearBirth >= " + ageFrom + "  AND YearBirth <= " + ageTo + " AND Gender like '%" + seekFor + "%' AND Interests like '%" + interest + "%' AND Address2 like '%" + suburb + "%';";Thank you

    Hi,
    I have got in my database the year as a number
    (Integer) like 1973 whatever, and in my servlet i get
    the yearFrom and the yearTo. Then parse them into an
    integer but I get java.NullPointerException and I
    dunno why???
    Then I put them in my SQL statement:
    ageFrom = Integer.parseInt(strAgeFrom);
    ageTo = Integer.parseInt(strAgeTo);
    String SQL = "SELECT * FROM People where YearBirth >=
    " + ageFrom + "  AND YearBirth <= " + ageTo + " AND
    Gender like '%" + seekFor + "%' AND Interests like
    '%" + interest + "%' AND Address2 like '%" + suburb +
    "%';";Thank youThat's simply because your strAgeFrom, strAgeTo return NULL.
    If it's possible that you'll get NULL values from those fields, you should do some data validation before using Integer.parseInt().
    Good luck :D

  • Java Video Streaming

    Hello
    I try to get an overview of what's possible according to video streaming in sun's wonderland. The goal is to stream prerecorded videos, stored on a webserver (not necessarily on the same machine like the wl-server ) into our wonderland embedded swing application.
    My first investigation shows me, that I have the following possibilities to stream videos in Java:
    - Java Media Framework (JMF)
    - JVLC (VideoLAN Java API)
    - Quicktime Streaming API (only quicktime movies)
    -> http://www.onjava.com/pub/a/onjava/2005/01/12/strmng_qtj.html
    - Red5 Java Client (only flash movies):
    -> http://www.actionscript.org/resources/articles/617/1/Streaming-and-database-connection-with-red5-media-server/Page1.html
    - Mplayer Java Client:
    -> http://beradrian.wordpress.com/2008/01/30/jmplayer/
    So what do you suggest me? What's the best way? Are there any code-examples for streaming videos from a webserver to a local java-client using JMF?
    Thanks for your help.
    Kind regards,
    Peter
    Edited by: blood_on_ice on Mar 23, 2009 12:44 AM

    Thanks for your answer...
    >
    The "best" way? Considering you're using a Swing application, your best bet is probably going to be JMF. JavaFX has support for playing videos, but I'm not sure if they have support for RTP streams or progressive downloads or anything.
    If you wanted to go the extra mile, you could look into embedding a Silverlight or Flash player into your Swing application. Silverlight is pretty cool because it's HD capable...>
    Yes I have to develop the video streaming in a swing non-top-level Swing JComponent (such as a JPanel) because this is a wonderland restriction...I don't know JavaFX yet, is it possible to build a JavaFX app inside such a non-top-level Swing component? Embedding silverlight in a java-app isn't a really good idea I think...
    Further recherches shows me, that I need on-demand video streaming with the ability to start, stop, play, pause etc. the video which is stored for example on a webserver. This is possible throught RTSP or HTTP according to: [http://www.remlab.net/op/vod.shtml|http://www.remlab.net/op/vod.shtml] ...when I use rtsp, I need a streaming-server like vlc, for http i just need my video stored on a webserver.
    So what do I have for possibilities to stream such a video in a java client (non-top-level Swing JComponent) with RTSP or HTTP?
    I've tried following rtp-code-example: [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html|http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/AVReceive.html]
    but it didn't work...I started my vlc-streaming server this way:
    cvlc -vvv movie.mpg --sout '#rtp{dst=192.168.1.33,port=1234,sdp=http://localhost:8080}'but the output of the rtp-code-example shows the following:
    run:
    - Open RTP session for: addr: 127.0.0.1 port: 8080 ttl: 1
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
      - Waiting for RTP data to arrive...
    With vlc http://127.0.0.1:8080 i receive the stream...
    But I couldn't find an example of how I can get an rtsp-stream or a http-stream in jmf...
    Thanks for your help.
    Kind regards,
    Peter
    Edited by: blood_on_ice on Mar 23, 2009 8:59 AM
    Edited by: blood_on_ice on Mar 23, 2009 9:00 AM

Maybe you are looking for

  • What's going on in existing html page when I add animations?!!

    I am working in Dreamweaver CC on a windows 7 pc, also working in Edge Animate. I am in an existing site, and I followed the tutorials for opening an existing html file (page) and animating two elements on the page.  I did not create a separate file

  • How to modify column width in sql output

    hi when i display phone number in the output in sql plus it is displaying as follows: SQL> select mobile_no from purchase_history; MOBILE_NO 9.1971E+11 how to correct it.....i tried with column format..but its still not working....

  • Using firefox 37 it auto refreshes when I enter @ why

    os is win xp Have two issues a Everytime i enter @ or the _ symbol while logging into any website the page auto refreshes and I am not able to login this problem is also encountered in ie 8 b Also a default yahoo search tab opens up everytime I start

  • Homepage Framework - XSS Menu diffrent Systems

    Hello, is it possible to have the application XSSMenu (Homepage framework) from 2 diffrent SAP Systems in one portal? I´ve tried to use the parameter sap-wd-arfc-useSys and created the additional JCo destinations - but now i get an error "Accessing S

  • Retrieve portal url dynamically.

    Hi, Could anybody pls let us know how to identify the portal Url dynamically using a function module or SAP Table? We want to put this URL in the notification e-mail so it is dynamic when the object is moved to Quality and production systems. Thanks