Problem running JSP program on OAS 4.0.8.1 with JSP patch

Hi all
I've been running a JSP application on OAS 4.0.8.1 for a month now, but a week ago, when I updated a Java package on the server, the application will no longer run. The simple JSP pages with no bean-tags runs fine, but the ones with bean-tags doesn't work anymore.
This is the error message:
Request URI:/jsp/sag/login.jsp
Exception:
java.lang.VerifyError
at java.lang.ClassLoader.resolveClass(Compiled Code)
at oracle.jsp.app.JspClassLoader.loadClass(Compiled Code)
at java.lang.ClassLoader.loadClass(Compiled Code)
at oracle.jsp.app.JspAppLoader.instantiatePage(Compiled Code)
at oracle.jsp.app.JspAppLoader.reloadPage(Compiled Code)
at oracle.jsp.app.JspAppLoader.loadPage(Compiled Code)
at oracle.jsp.app.JspAppLoader.getPage(Compiled Code)
at oracle.jsp.app.JspApplication.dispatchRequest(Compiled Code)
at oracle.jsp.JspServlet.doDispatch(Compiled Code)
at oracle.jsp.JspServlet.service(Compiled Code)
at javax.servlet.http.HttpServlet.service(Compiled Code)
at oracle.OAS.servlet.servletrunner.exec(Compiled Code)
I've read on java.sun.com that verifyerrors normally is due to bad package-files, but I've rebuilt the package at least 10-times now, so thats probably not it. What could it be?
The application runs fine in JDeveloper 3.1
Thanks on advance,
Christian Holm

Hi,
I am trying to run JSPs on OAS 4.0.8.1.
I have installed JSP patch, downloaded form olab.com
I am not able to execute JSPs. I am getting 2 different problems.
1. If I call the JSP directly from browser, Netscape will ask for save option, it won't execute.
2. If I call the JSP from another page with submit button, I am getting the following error :
The requested access method is not allowed for that object.
Same error for any JSP.
The same problem for all the samples available with JSP patch.
Hi chrholm,
I already tested for 1 month, so
could you please help me to configure OAS 4.0.8.1 for JSPs.
Could you please send me mail : [email protected]
Any help appreciated.
Thanks,
Naidu
null

Similar Messages

  • Any problems running a program compiled with SDK 1.4.2_14 with JRE 1.4.2_08

    Hi,
    Would there ever be a problem running a program compiled in Java 1.4.2_13 with JRE 1.4.2_08?
    Why or why not? No guesses please.
    Thanks

    No such hope. The alternative to testing is to review changes made to each version leading up to 14. This is spelled out in each version's Release Document. There are a lot of changes. Most will not affect your program. Each change is relatively well described, but your problem will be to decide if your program will be affected by the change.
    Or, do nothing, hope like hell that nothing breaks, and have an up-to-date copy of your resume.
    If someone came to me saying a program couldn't be tested, I'd have serious concerns for that person's future.

  • Problem running my program only after making an executable jar...

    Hi everyone,
    I am having trouble running my program after creating an executable jar. The program runs fine until
    it is supposed to open a specific JFrame. I get the following error message as soon as the frame tries
    to open:
    Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.apache.xerces.parsers.SAXParser.<init>(Lorg/apache/xerces/xni/parser/XMLParserConfigurat
    ion;
    Has anyone ever seen this before?
    The strange thing is, this does not happen when I build and run the project under Eclipse.
    Any help or tips would be appreciated!
    Chris

    Roosh wrote:
    The strange thing is, this does not happen when I build and run the project under Eclipse.
    Any help or tips would be appreciated!Make sure you are using the same version of Java as you use with Eclipse.

  • Please help, jsp page wants missing ";" but not to good with jsp?

    I have a JSP page called ftplogin.jsp
    I want the jsp page to call a ftpbean.
    It will pass server, username and login into the ftpbean.
    It will then set the directory and finaly retrieve a a document from it.
    The ftpbean works but my jsp page doesn't. Please help with compilation problem?????
    Please also tell me if the syntax of accessing the bean is correct?
    <!-- ftplogin.jsp -->
    <html>
    <head>
    <title> FTP Login </title>
    </head>
    <body>
    <%@ page import= "ftp.* " %>
    <jsp:useBean class="ftp.FtpBean" id="ftpbean" scope="session" />
    <%
    try
    String servername = request.getParameter("serverName");
    String username = request.getParameter("username");
    String password = request.getParameter("password");
    ftpbean.ftpConnect(servername, username, password);
    catch(Exception e)
    %>
    Sorry but your must have entered an incorrect login ingotmation.
    You are not allowed to login.
    Please leave the ftp portal.
    <%
    %>
    <h1> Welcome to the FTP Login. </h1>
    <FORM ACTION="ftplogin.jsp" METHOD=post>
    Please login
    Enter name of server:
    <input type="text" name="servername"><br>
    Enter user name?
    <input type="text" name="username"><br>
    Enter password
    <input type="text" name="password"><br>
    <input type="submit" name="Submit info">
    </FROM>
    <%=
    try
    // set the directory
    ftpbean.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
    catch(Exception e)
    System.out.println(e);
    %>
    <%=
    try
    // Get the binary file '????' and save it to hard disk
    // the name will be 'local_file_name' .
    ftpbean.getBinaryFile("accessbean.jsp", "local_file_name", this);
    catch(Exception e)
    System.out.println(e);
    %>
    <%=
    try
    ftpbean.close();
    catch(Exception e)
    System.out.println(e);
    %>
    </body>
    </html>
    Location: /myJSPs/jsp/grid-portal-project/ftplogin.jsp
    Internal Servlet Error:
    org.apache.jasper.JasperException: Unable to compile Note: sun.tools.javac.Main has been deprecated.
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:110: Missing term.
    out.print(
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:110: ')' expected.
    out.print(
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:120: Missing term.
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:120: ';' expected.
    ^
    C:\tomcat\jakarta-tomcat-3.3.1\work\DEFAULT\myJSPs\jsp\grid_0002dportal_0002dproject\ftplogin_1.java:121: Invalid expression statement.
    ^
    5 errors, 1 warning
         at org.apache.tomcat.facade.JasperLiaison.javac(JspInterceptor.java:898)
         at org.apache.tomcat.facade.JasperLiaison.processJspFile(JspInterceptor.java:733)
         at org.apache.tomcat.facade.JspInterceptor.requestMap(JspInterceptor.java:506)
         at org.apache.tomcat.core.ContextManager.processRequest(ContextManager.java:968)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:875)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)

    Please note I have solved the compilation problem.
    But now getting runtime error. Here is the error:
    Error: 500
    Location: /myJSPs/jsp/grid-portal-project2/ftplogin.jsp
    Internal Servlet Error:
    javax.servlet.ServletException
         at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:460)
         at jsp.grid_0002dportal_0002dproject2.ftplogin_1._jspService(ftplogin_1.java:128)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)
    Root cause:
    java.lang.NullPointerException
         at java.net.Socket.(Socket.java:282)
         at java.net.Socket.(Socket.java:118)
         at ftp.FtpBean.ftpConnect(FtpBean.java:323)
         at ftp.FtpBean.ftpConnect(FtpBean.java:293)
         at jsp.grid_0002dportal_0002dproject2.ftplogin_1._jspService(ftplogin_1.java:91)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java)
         at org.apache.tomcat.facade.ServletHandler.doService(ServletHandler.java:574)
         at org.apache.tomcat.core.Handler.invoke(Handler.java:322)
         at org.apache.tomcat.core.Handler.service(Handler.java:235)
         at org.apache.tomcat.facade.ServletHandler.service(ServletHandler.java:485)
         at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:917)
         at org.apache.tomcat.core.ContextManager.service(ContextManager.java:833)
         at org.apache.tomcat.modules.server.Http10Interceptor.processConnection(Http10Interceptor.java:176)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:494)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:516)
         at java.lang.Thread.run(Thread.java:536)
    Here is my directory structure for ".jsp" and ".html" pages:
    C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\jsp\grid-portal-project2
    Here is my directory structure for java classes,
    C:\tomcat\jakarta-tomcat-3.3.1\webapps\myJSPs\WEB-INF\classes
    ftp
    ftp\FtpBean.java
    ftp\FtpBean.class
    Here is the modified source code:
    <html>
    <head>
    <title> FTP Login </title>
    </head>
    <body>
    <%@ page import= "ftp.* " %>
    <jsp:useBean class="ftp.FtpBean" id="ftpbean" scope="session" />
    <%
               String servername = request.getParameter("serverName");
               String username   = request.getParameter("username");   
               String password   = request.getParameter("password");
               ftpbean.ftpConnect(servername, username, password);
    %>
    <h1> Welcome to the FTP Login. </h1>
    <FORM ACTION="ftplogin.jsp" METHOD=post>
    Please login
    Enter name of server:
    <input type="text" name="servername"><br>
    Enter user name?
    <input type="text" name="username"><br>
    Enter password
    <input type="text" name="password"><br>
    <input type="submit" name="Submit info">
    </FORM>
      <% 
               ftpbean.setDirectory("/home/eland/u6/k3074/w0109699/simple-bean");
      %>
      <%
               ftpbean.getBinaryFile("accessbean.jsp", "local_file_name");
      %>
      <%
                ftpbean.close();
      %>
    </body>
    </html>

  • Problem running fullscreen programs under DWM...

    I'm having trouble getting programs to run in fullscreen in DWM on my laptop.  The issue is when the program changes the screen resolution.  If a program is set to run at the same resolution as my system, there's no problem.  But, when a program has to change the resolution, it changes the resolution but the program doesn't gain focus, so all I see is a magnified version of my WM, and in some cases some of the program's window.  When I exit fullscreen or the program, my WM gets set back to the correct resolution.  I have the same problem whether the tag is set to float, tiling, or monocle.
    I don't have a custom xorg.conf and my native resolution is automatically detected, so I don't use anything to set it.  I'm using the open source ATI video driver.
    I can't seem to find any solutions to this online...Any help would be highly appreciated.
    Last edited by rzrscm (2013-11-02 01:51:01)

    jasonwryan wrote:Can you elaborate on these programs that change your resolution?
    DOSBox and ZSNES...I also ran a fullscreen program I wrote in SDL first in my native resolution and then half my native resolution to troubleshoot, and that's how I came to the conclusion that the problem has to do with the programs changing the resolution.

  • Problems running external programs from java

    Hello.
    I wrote a pair of perl scripts and a GUI in java to run them. The first perl script just read the files in one directory makes some changes to the names of the files and then group all this files in a set of new directories. The other perl scripts takes all this new files and calls BLAST sequence alignment program and perform some alignments among these sequences. I tested this scripts and they work fine.
    The problem comes when I try to run them for the JAVA GUI. I use RunTime and when I need to run the first perl script it all works well, but when The call to the second perl script is made the program fisishes without doing anything at all. I found out that the problem is that when running the script from the Java GUI it's not able to find BLAST program. So I guess that Java is not really starting a terminal session and it doesn't read my bash_profile to find out the path to my programs.
    So, my question is if anyone knows a method to tell Java to load all this paths in the bash_proflie file so all of my scripts work???.
    I have no idea is this can be done and how so any advice would be really wellcome.
    By the way, my java version is 1.4.2 and my OS is Mac OS X 10.3
    Thanks a lot , Julio

    Invoke /bin/sh -c and give it your program's full path with.
    (To understand what I've written, maybe reading
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html
    http://mindprod.com/jgloss/exec.html
    and
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
    (especially the exec(String[] cmdarray) method)
    might help)
    -T-

  • Problems Running Java Programs

    I usually use Forte for Java to run and compile my java programs, but now I am trying to compile and run using the command line. When I compile something it runs fine. However when I attempt to run something it gives me a NoClassDefFound Error. For example when I have this program in package greetings.
    D:\JDK_Forte\forte4j\Development>javac greetings\Hello.java
    D:\JDK_Forte\forte4j\Development>java greetings.Hello
    Exception in thread "main" java.lang.NoClassDefFoundError: greetings/Hello
    So it compiles fine but does not run. Is something possibly not set up correctly? I don't know what could be wrong. Thanks for any help you can give.

    try
    D:\JDK_Forte\forte4j\Development>java -classpath .
    greetings.HelloI tried that and I got this error don't know if this helps at all....
    D:\JDK_Forte\forte4j\Development>java -classpath . greetings.Hello
    Exception in thread "main" java.lang.NoClassDefFoundError: greetings/Hello (wron
    g name: Hello)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)

  • Problem running Java programs

    Hello,
    Have recently re-formatted my hard drive and re-installed Windows XP. I have installed the 1.4.2_03 SDK and any Java program I run just shows a grey window, with the toolbar as usual on top. I have un-installed it and re-installed it, and even tried installing the 1.5.0 beta, but it still keeps happening. Even the Jav Control Panel just shows the grey window.
    Does anyone know how to fix this? Or have any suggestions I may try?
    Thanks.

    This is a fresh install of XP. But if I can't figure it out soon, I'll probably re-format and re-install again.

  • T530 has problems running several programs

    Earlier this week, my internet browser (firefox) started running like something was hogging my memory and  I had installed a dozen toolbars installed. Neither of these occurred. While FF *does* tend to be a memory hog, it's not near what this system is capable of handling.
    Every few minutes firefox will freeze up and 'Not Respond' for about five to ten seconds. Another application, yahoo messenger, has also stopped working completely. Other programs are afflicted, but not to this extent. Chrome, windows explorer (not internet exp. WINDOWS) will occasionally cough up if Firefox is panicking for some reason.
    I've clean installed all the major afflicted programs, and have run my virus scanner, malwarebytes, and ccleaner.
    Couple other things: 'Lenovo Communications Utility' no longer wants to work , and neither does the fingerprint scanner, and sometimes it takes entirely too long to recognize that I plugged in an external (if it ever does).
    Win7 Pro
    16 gigs ram
    i5 3220

    Dear Ashish,
    I've completed till the 4th step as below (available at this link <http://forums.xilinx.com/t5/Installation-and-Licensing/Vivado-License-Manager-will-not-allow-me-to-return-license/td-p/527697>:
    Now run the command: installanchorservice.exe xilinxd.exe Vivado-Software (from C:\Xilinx\Vivado\2014.3\bin\unwrapped\win64.o)
    I mean after the above command I got the output as shown in the attachment.
    But even after that I am not able to return the license to xilinx as nothing listed in that window.
    After this what to do?
    Regards
     

  • How to run jsp program

    is i can able to run my jsp program by using appache server..

    To get JSP working in Apache HTTP Server you have to install Apache Tomcat.
    You can either choose to run JSP's solely on Apache Tomcat, or to use mod_jk2 to link Apache HTTP Server with Apache Tomcat so that the Apache HTTP Server can forward the JSP requests to the Apache Tomcat engine, because the Apache HTTP Server really doesn't know how to compile/run JSP's.

  • Getting an error when running my program but it compiles.

    Hey guys, I'm having a problem running the program. Everything compiles correctly, but then I get the error code linked below. Everything I think is correct here. Any ideas? I posted CinReader as well in case you wanted to try compiling and running it yourself.
    Thanks
    public class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    public class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    import java.io.*;
    import java.util.*;
    public class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i<errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;

    Ok, here's what I did using the JSE 8.1 IDE.
    1) I copied your code into a .java file named "TextShuffleGame".
    It generated about half a dozon errors.
    There are three classes in the program:
    TextShuffleLevel
    TextShuffleGame
    CinReader
    Each of these classes is declared "public" and I got the same error message on each one:
    "class ... is public, should be declared in a file name ... .java"
    so, I...
    2) tried changing them to "private".
    It then said: "modifier private not allowed here".
    so, I...
    3) deleted the modifiers for these three classes and left them as just class. No errors.
    The next two errors had to do with the two import statements:
    "import java.io.*;" and "import java.util.*;".
    It said: "'class' or 'identifier' expected" for both. So, I...
    4) moved them to the top of the source file.
    Didn't help at first. So, I...
    5) fiddle around with them a bit.
    I tried "java.io;" and "java.util;" and then "java.*;" by itself. Still got errors. So, I put them back as you had them and for some mysterious reason, my editor decided they were fine. oO
    This also corrected the last errors in the "CinReader" class. Here is the error-free code I now have in my "TextShuffleGame.java" file:
    import java.io.*;
    import java.util.*;
    class TextShuffleLevel
         private String jumble;
         private String [] matchString;
         public TextShuffleLevel ()
              jumble = "dunops";
              matchString = new String[5];
              matchString[0] = new String("abound");
              matchString[1] = new String("bound");
              matchString[2] = new String("undo");
              matchString[3] = new String("band");
              matchString[4] = new String("bond");
         public TextShuffleLevel (int whichDefaultLevel)
              if (whichDefaultLevel == 1)
                   jumble = "dunops";
                   matchString = new String[5];
                   matchString[0] = new String("abound");
                   matchString[1] = new String("bound");
                   matchString[2] = new String("undo");
                   matchString[3] = new String("band");
                   matchString[4] = new String("bond");
              else if (whichDefaultLevel == 2)
                   jumble = "srcaso";
                   matchString = new String[11];
                   matchString[0] = new String("across");
                   matchString[1] = new String("crass");
                   matchString[2] = new String("cross");
                   matchString[3] = new String("scars");
                   matchString[4] = new String("soars");
                   matchString[5] = new String("arcs");
                   matchString[6] = new String("soar");
                   matchString[7] = new String("scar");
                   matchString[8] = new String("oars");
                   matchString[9] = new String("cars");
                   matchString[10] = new String("orcs");
              else
                   jumble = "eplcis";
                   matchString = new String[19];
                   matchString[0] = new String("splice");
                   matchString[1] = new String("spiel");
                   matchString[2] = new String("plies");
                   matchString[3] = new String("slice");
                   matchString[4] = new String("clips");
                   matchString[5] = new String("epics");
                   matchString[6] = new String("spice");
                   matchString[7] = new String("epic");
                   matchString[8] = new String("lice");
                   matchString[9] = new String("slip");
                   matchString[10] = new String("clip");
                   matchString[11] = new String("pile");
                   matchString[12] = new String("lisp");
                   matchString[13] = new String("pies");
                   matchString[14] = new String("isle");
                   matchString[15] = new String("lips");
                   matchString[16] = new String("lies");
                   matchString[17] = new String("ices");
                   matchString[18] = new String("pics");
         public TextShuffleLevel (String newJumble, String [] newMatchString)
              jumble = newJumble;
              matchString = newMatchString;
         /* This is the nasty one */
         public boolean findMatch (String matchTry)
              boolean foundMatch = false;
              for (int i=0; i<matchString.length; i++)
                   if (matchTry.equalsIgnoreCase(matchString))
                        foundMatch = true;
                        break;
              return foundMatch;
         public void setJumble (String newJumble)
              jumble = newJumble;
         public void setMatchStrings (String [] newMatchString)
              matchString = newMatchString;
         public String getJumble ()
              return jumble;
         public int getJumbleLength ()
              return jumble.length();
         public int getNumberOfMatches ()
              return matchString.length;
         public String[] getMatchString ()
              return matchString;
    class TextShuffleGame
         private int playerLevel = 1; // start them on level 1
         private CinReader reader;
         private TextShuffleLevel l1;
         private TextShuffleLevel l2;
         private TextShuffleLevel l3;
         private TextShuffleLevel onTheFly;
         public TextShuffleGame ()
              reader = new CinReader();
              // Using Statically Set Levels
              l1 = new TextShuffleLevel(1);
              l2 = new TextShuffleLevel(2);
              l3 = new TextShuffleLevel(3);
              // this one allows for a 'custom' level
              String fly[] = {"tea","at", "ate"};
              onTheFly = new TextShuffleLevel("eta", fly);
         //Setup for levels
         public void go ()
              boolean quit = false;
              char choice = 'z';
              int lastLevel = 0;
              while (quit == false)
                   lastLevel = playerLevel;
                   if (playerLevel == 1)
                        play(l1);
                   else if (playerLevel == 2)
                        play(l2);
                   else if (playerLevel == 3)
                        play(l3);
                   else
                        play(onTheFly);
                   if (lastLevel == playerLevel)
                        System.out.print("Play the level again");
                   else
                        System.out.print("Play next level");
                   System.out.print("(y/n)? ");
                   choice = reader.readChar();
                   if (choice == 'N' || choice == 'n')
                        quit = true;
         //Playing each level the same
         public void play (TextShuffleLevel theLevel)
              int numGuesses = 0;
              int numCorrect = 0;
              String userString = "";
              System.out.println("What " + theLevel.getJumbleLength() + "-letter words can you get out of " +
                                                 theLevel.getJumble() + "?\n");
              while (numGuesses < 5 && numCorrect < theLevel.getNumberOfMatches())
                        System.out.print("Enter a string: ");
                        userString = reader.readString();
                        if (theLevel.findMatch(userString) == true)
                             System.out.println("Great! A match!");
                             numCorrect = numCorrect + 1;
                        else
                             System.out.println("Drat... not a match");
                             numGuesses = numGuesses + 1;
              if (numCorrect == theLevel.getNumberOfMatches())
                   System.out.println("Terrific! You are ready to try a harder jumble");
                   playerLevel = playerLevel + 1;
         /* FOR TESTING ONLY -- TO BE REMOVED FOR RELEASE */
         public static void main (String [] args)
              TextShuffleGame tsg = new TextShuffleGame();
              tsg.go();
    class CinReader
         private static final int INT_MESSAGE = 0;
         private static final int DOUBLE_MESSAGE = 1;
         private static final int CHAR_MESSAGE = 2;
         private static final int STRING_MESSAGE = 3;
         private static final int BOOLEAN_MESSAGE = 4;
         private static final String DEFAULT_ERROR_MESSAGE = "Please reenter. ";
         private String prompt = "> ";
         private String [] errorMessages;
         public CinReader ()
              prompt = "> ";
              setDefaultMessages();
         public CinReader (String newPrompt)
              prompt = newPrompt;
              setDefaultMessages();
         public CinReader (String newPrompt, String [] newErrorMessages)
              prompt = newPrompt;
              if (newErrorMessages != null)
                   setErrorMessages(newErrorMessages);
              else
                   setDefaultMessages();
         public void setPrompt (String newPrompt)
              prompt = newPrompt;
         public void setErrorMessages (String [] newErrorMessages)
              if (newErrorMessages != null)
                   int diff = errorMessages.length - newErrorMessages.length;
                   // NEED A MINIMUM OF 5 ERROR MESSAGES TO AVOID ERRORS
                   if (diff > 0)
                        errorMessages = new String[5];
                        for (int i=0; i<5; i++)
                             if (i < newErrorMessages.length)
                                  errorMessages[i] = new String(newErrorMessages[i]);
                             else
                                  errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
                   else
                        errorMessages = newErrorMessages;
         public void setErrorMessage (int idx, String msg)
              if (idx >= 0 && idx < errorMessages.length)
                   errorMessages[idx] = msg;
         public void setErrorMessageString (String msg)
              errorMessages[STRING_MESSAGE] = msg;
         public void setErrorMessageInt (String msg)
              errorMessages[INT_MESSAGE] = msg;
         public void setErrorMessageDouble (String msg)
              errorMessages[DOUBLE_MESSAGE] = msg;
         public void setErrorMessageChar (String msg)
              errorMessages[CHAR_MESSAGE] = msg;
         public void setErrorMessageBoolean (String msg)
              errorMessages[BOOLEAN_MESSAGE] = msg;
         public String readString()
              char theChar = 'x';
              String result = "";
              boolean done = false;
              while (!done)
                   theChar = nextChar();
                   if (theChar == '\n')
                        done = true;
                   else if (theChar == '\r'){}
                   else
                        result = result + theChar;
              return result;
         public String readString (boolean allowEmpty)
              String result = readString();
              if (!allowEmpty)
                   while (result.length() == 0)
                        System.out.println("Empty input not allowed. " + errorMessages[STRING_MESSAGE]);
                        System.out.print(prompt);
                        result = readString();
              return result;
         public String readString (int charLimit)
              String result = readString();
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public String readString (boolean allowEmpty, int charLimit)
              String result = readString(allowEmpty);
              if (result.length() > charLimit)
                   result = result.substring(0, charLimit);
              return result;
         public int readInt()
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public int readInt(int min, int max)
              String inputString = "";
              int number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Integer.valueOf(inputString).intValue());
                        if (number < min || number > max)
                             System.out.println("Please enter an integer between " + min + " and " + max);
                        else
                             done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[INT_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public double readDouble()
              String inputString = "";
              double number = 0;
              boolean done = false;
              while (!done)
                   try
                        inputString = readString();
                        inputString = inputString.trim();
                        number = (Double.valueOf(inputString).doubleValue());
                        done = true;
                   catch (NumberFormatException e)
                        System.out.println("Input is not an integer. " + errorMessages[DOUBLE_MESSAGE]);
                        System.out.print(prompt);
              return number;
         public char readChar()
              boolean done = false;
              String inputString = "";
              char nonWhite = 'x';
              while (!done)
                   inputString = readString();
                   inputString = inputString.trim();
                   if (inputString.length() != 1)
                        System.out.println("Input must be a single character. " + errorMessages[CHAR_MESSAGE]);
                        System.out.print(prompt);
    else
    nonWhite = (inputString.charAt(0));
    done = true;
              return nonWhite;
         public char readChar (String range)
              char theChar = 'x';
              boolean done = false;
              while (!done)
                   theChar = readChar();
                   for (int i=0; i<range.length(); i++)
                        if (theChar == range.charAt(i))
                             done = true;
                             break;
                   if (!done)
                        System.out.print("Invalid input. Please enter one of the following -> ");
                        for (int i=0; i<range.length(); i++)
                             System.out.print(range.charAt(i) + " ");
                        System.out.print("\n" + prompt);
              return theChar;
         public boolean readBoolean()
              boolean done = false;
              String inputString = "";
              boolean result = false;
              while (!done)
                   inputString = readString(false);
                   inputString = inputString.trim();
                   if (inputString.equalsIgnoreCase("true") || inputString.equalsIgnoreCase("t"))
                        result = true;
                        done = true;
                   else if (inputString.equalsIgnoreCase("false") || inputString.equalsIgnoreCase("f"))
                        result = false;
                        done = true;
                   else
                        System.out.println("Input must be [t]rue or [f]alse. " + errorMessages[BOOLEAN_MESSAGE]);
                        System.out.print(prompt);
              return result;
         private void setDefaultMessages ()
              errorMessages = new String[5];
              for (int i=0; i < errorMessages.length; i++)
                   errorMessages[i] = new String(DEFAULT_ERROR_MESSAGE);
         private char nextChar()
              int charAsInt = -1;
              try
                   charAsInt = System.in.read();
              catch(IOException e)
                   System.out.println(e.getMessage());
                   System.out.println("Fatal error. Exiting program.");
                   System.exit(0);
              return (char)charAsInt;
    Hope that helps.

  • Java/lang/NoClassDefFoundError when trying to run my program in Eclipse

    I have a problem when using Eclipse. I can compile my classes in Eclipse without problems, but when I try to run the main class I get the following error message:
    Error occurred during initialization of VM
    java/lang/NoClassDefFoundError: java/lang/Object
    I have the same classpath setup when compiling and running the program. I am using JDK 1.3.1 and also have no problem running the program using javaw from a command prompt.
    Please answer if you have encountered this problem or have any idea what the problem might be.

    I start Eclipse using the exe file eclipse.exe with no special arguments.
    I use a JRE installed in e:\jdk1.3.1_01 so on the JRE page in the launch dialog box I have added a JRE with e:\jdk1.3.1_01\jre as the JRE home directory. This means that the JRE system library contain e:\jdk1.3.1_01\jre\lib\rt.jar. On the classpath page this JAR file is also listed as well as some other JAR files I use in my project.

  • Problem running car demo jwsdp-1.3,Tomcat 5.0

    Hello. I am having problems running the car demo on the jwsdp-1.3 with Tomcat 5.0.
    I get the following error message:
    "A jar file containing the Servlet 2.3 and JSP1.2 classes is required to compile
    carstore. Please define the property servlet.jar in your build.properties file and ensure
    that the file exists."
    I replaced the jsf EA 4 with the beta, and cleared out the cache in catalina as per the
    installation documents. I am probably missing something here. I checked my path,
    (I am using windows xp) and made sure the jsf directory was in the path.
    Any help would be greatly appreciated. Thanks in advance.
    regards,
    cyuno

    Thanks for your response.
    I changed the path to the tomcat 5.0 that came with the jwsdp-1.3.
    However, I am still getting the same error message. I have checked the build.properties file, the path, the path where ant is located, and the path is pointing to the jwsdp-1.3 directory.
    I have been working with the examples in the java web services tutorial, and for the most part have not had any problems running the examples using the jwsdp-1.3, ant and tomcat 5.0(except for CH 11, on the jaxb examples)
    Thanks again for your help
    regards,
    cy unpingco

  • I uninstalled Adobe Air and Adobe Reader and now I cannot reinstall them on the Adobe web site. I go thru the steps on Adobe site and never get a popup to RUN any programs.

    I uninstalled Adobe Air and Adobe Reader and now I cannot reinstall them on the Adobe web site. I go thru the steps on Adobe site and never get a popup to RUN any programs.

    Then there is something seriously wrong with either your
    browser
    Windows
    Internet connection
    I have just downloaded that installer (on Windows 7, using Pale Moon), and the download completed within less than 10 seconds.  And I am some 10,000km away from the Adobe download servers.
    Can you try a different browser?
    Can you download anything to your computer, e.g. from Microsoft?

  • Access control with JSP

    We have been working with a design company to design our website HTML. However, a portion of these HTML files need to be password protected, all of these files are stored in one particular folder called "/tools". The problem here is that these files should only be accessible if the user has logged into the site, and the design firm has given all of these files an .html extension, which means that they will not be able to run embedded JSP code.
    From what I understand, if I want to create access control in these .html files I will need to rename them all to .jsp and then update all the links to these files to use the .jsp extension. But the design firm is telling me that their other clients never needed to do this and were able to use JSP to control access to the folder itself. They said that it is possible using JSP to prevent access to a particular folder on the webserver, and that anybody without a valid login or session who tries to access the files in the folder can be redirected to the login page. All of this can be achieved without having to insert JSP code into the password-protected HTML files and renaming them with a .jsp extension. Is this true? We want to avoid doing this because there are a lot of HTML files and links that will need to be changed if we rename the files to .jsp.
    I'm still a relative beginner with JSP and have never heard of any functionality which allows JSP to stop a browser from accessing a particular folder on the server. Am I missing something here? Is there really a better way of doing this without using JSP code?
    I have thought about putting the folder in an offline location and then using a controller JSP/servlet to check the user's login status and then read & display the HTML file from the offline folder. But I am not sure if this is really an efficient way of doing this.
    Any suggestions?
    Thanks,
    Phil

    You can set up a servlet filter in the web.xml. That lets you intercept every single request to certain areas of the app, and modify/redirect it if necessary.
    Example: This sets up a filter that runs on all requests to the "/tools" directory:
    In web.xml:
       <filter>
         <filter-name>testFilter</filter-name>
         <filter-class>com.TestFilter</filter-class>
       </filter>
       <filter-mapping>
         <filter-name>testFilter</filter-name>
         <url-pattern>/tools/*</url-pattern>
       </filter-mapping>And an example java class of a filter. This one just logs the request URI.
    package com;
    import java.io.IOException;
    import javax.servlet.Filter;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    public class TestFilter implements Filter{
         public void init(FilterConfig arg0) throws ServletException {}
         public void destroy() {}
         public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
              if (request instanceof HttpServletRequest){
                   HttpServletRequest req = (HttpServletRequest)request;
                   System.out.println("Servicing request for " + req.getRequestURI());
                   chain.doFilter(request, response);
    }

Maybe you are looking for

  • Please help: Premiere has slowwed to a crawl.

    Hi, I am a photographer and video editor. I built my computer about 15 months ago to work with CS5 and the Mecury Playback Engine. In the past few months it has been slowing down at an alarming rate. Over the holidays I created a video montage of pic

  • XML output doesn't have some psecial characters

    Hi All , I am using RDF as my data definition from which i generate some special characters. When this RDF is deployed in APPS it doen't generate any character: Folowing is a part of xml being generated. <?xml version="1.0" encoding="UTF-8"?> <!-- Ge

  • Install SQL Developer 1.2 or 1.5

    I downloaded and installed Version 1.5 and later 1.2. when I try to connect to a server in my company, I get the error "lo exception network adapter could not establish the connection" Vendor Code 17006. No one here know what to do with this error. A

  • Copy Input Ready Query Variables into Planning Sequence

    Hi all,        We have the following scenario. We developed a model using Web Template. The model has an input ready query and a Panning sequence associated with it. Both of them using the same Planning Filter that has a input variable for Profit Cen

  • Bug in which Premiere does not allow publishing of videos to YouTube over 15 minutes.

    When I try to publish a video to YouTube over 15 minutes I get this error: "The video duration exceeds the maximum duration supported by the destination.  Please reduce the duration of video and try again."  Clearly YouTube's policies change over tim