404 error Exception in thread "main" java.rmi.RemoteException: HTTP �������� 4

I have Install Sun Application Server PE and JWSDP,when I run asant run-sample,an error below:
run-sample:
[echo] Running the simple.TestClient program....
[java] Service URL=http://localhost:8080/securesimple/Ping
[java] 2005-11-11 1:03:11 com.sun.xml.wss.impl.filter.DumpFilter process
[java] ����: ==== Sending Message Start ====
[java] <?xml version="1.0" encoding="UTF-8"?>
[java] <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://xmlsoap.
org/Ping" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.
org/2001/XMLSchema-instance">
[java] <env:Body>
[java] <ns0:Ping>
[java] <ns0:ticket>SUNW</ns0:ticket>
[java] <ns0:text>Hello !</ns0:text>
[java] </ns0:Ping>
[java] </env:Body>
[java] </env:Envelope>
[java] ==== Sending Message End ====
[java] Exception in thread "main" java.rmi.RemoteException: HTTP �������� 4
04: ������ - /securesimple/Ping; nested exception is:
[java] HTTP �������� 404: ������ - /securesimple/Ping
[java] at simple.PingPort_Ping_Stub.ping(PingPort_Ping_Stub.java:146)
[java] at simple.TestClient.main(TestClient.java:34)
[java] Caused by: HTTP �������� 404: ������ - /securesimple/Ping
[java] at com.sun.xml.rpc.client.http.HttpClientTransport.checkResponse
Code(HttpClientTransport.java:302)
[java] at com.sun.xml.rpc.client.http.HttpClientTransport.connectForRes
ponse(HttpClientTransport.java:252)
[java] at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpCl
ientTransport.java:88)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:96)
[java] at simple.PingPort_Ping_Stub.ping(PingPort_Ping_Stub.java:130)
[java] ... 1 more
[java] Java Result: 1

Hi,
Before connecting through your main program, you have to keep ready your catching object. Mean to say first you have to run local method which will be waiting for remote method to catch.
Regards,
Ravi Maheshwari

Similar Messages

  • 404 :Exception in thread "main" java.rmi.RemoteException

    I have Install Sun Application Server PE and JWSDP,when I run asant run-sample,an error below:
    run-sample:
    [echo] Running the simple.TestClient program....
    [java] Service URL=http://localhost:8080/securesimple/Ping
    [java] 2005-11-11 1:03:11 com.sun.xml.wss.impl.filter.DumpFilter process
    [java] ����: ==== Sending Message Start ====
    [java] <?xml version="1.0" encoding="UTF-8"?>
    [java] <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://xmlsoap.
    org/Ping" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.
    org/2001/XMLSchema-instance">
    [java] <env:Body>
    [java] <ns0:Ping>
    [java] <ns0:ticket>SUNW</ns0:ticket>
    [java] <ns0:text>Hello !</ns0:text>
    [java] </ns0:Ping>
    [java] </env:Body>
    [java] </env:Envelope>
    [java] ==== Sending Message End ====
    [java] Exception in thread "main" java.rmi.RemoteException: HTTP �������� 4
    04: ������ - /securesimple/Ping; nested exception is:
    [java] HTTP �������� 404: ������ - /securesimple/Ping
    [java] at simple.PingPort_Ping_Stub.ping(PingPort_Ping_Stub.java:146)
    [java] at simple.TestClient.main(TestClient.java:34)
    [java] Caused by: HTTP �������� 404: ������ - /securesimple/Ping
    [java] at com.sun.xml.rpc.client.http.HttpClientTransport.checkResponse
    Code(HttpClientTransport.java:302)
    [java] at com.sun.xml.rpc.client.http.HttpClientTransport.connectForRes
    ponse(HttpClientTransport.java:252)
    [java] at com.sun.xml.rpc.client.http.HttpClientTransport.invoke(HttpCl
    ientTransport.java:88)
    [java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
    java:96)
    [java] at simple.PingPort_Ping_Stub.ping(PingPort_Ping_Stub.java:130)
    [java] ... 1 more
    [java] Java Result: 1

    Hi,
    Before connecting through your main program, you have to keep ready your catching object. Mean to say first you have to run local method which will be waiting for remote method to catch.
    Regards,
    Ravi Maheshwari

  • Exception in thread "main" java.rmi.NotBoundException: commandService

    Hello,
    I want to deploy two SNs on one machine, and I chose different port(5030,5031), when I run "runadmin", the exceptions happened.
    [sunyao@datanode1:~/oracle_nosql/tools]$ jps -m
    25392 Jps -m
    25145 kvstore-1.2.123.jar start -root KVROOT_2
    23099 kvstore-1.2.123.jar start -root KVROOT
    23265 ManagedService -root KVROOT/mystore/sn2 -store mystore -class RepNode -service rg1-rn2
    25220 ManagedService -root KVROOT_2/mystore2/sn1 -store mystore2 -class Admin -service admin1
    [sunyao@datanode1:~/oracle_nosql/tools]$ java -jar kv-1.2.123/lib/kvstore-1.2.123.jar ping -port 5030 -host datanode1
    SNA at hostname: datanode1 registry port: 5030 has no available Admins or RNs registered.
    [sunyao@datanode1:~/oracle_nosql/tools]$ java -jar kv-1.2.123/lib/kvstore-1.2.123.jar runadmin -port 5030 -host datanode1
    Exception in thread "main" java.rmi.NotBoundException: commandService
    at sun.rmi.registry.RegistryImpl.lookup(RegistryImpl.java:106)
    at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:386)
    at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
    at sun.rmi.transport.Transport$1.run(Transport.java:159)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
    at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
    at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
    at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
    at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
    at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
    at oracle.kv.impl.util.registry.RegistryUtils.getAdmin(RegistryUtils.java:197)
    at oracle.kv.impl.admin.client.KVAdmin.connect(KVAdmin.java:883)
    at oracle.kv.impl.admin.client.KVAdmin.main(KVAdmin.java:2131)
    at oracle.kv.impl.util.KVStoreMain$6.run(KVStoreMain.java:188)
    at oracle.kv.impl.util.KVStoreMain.main(KVStoreMain.java:319)

    hi ,
    I have started two admin service in one group:
    but one admin service can't access from 5001, and the log is below:
    [sunyao@datanode1:~/oracle_nosql/tools/KVROOT/mystore/log]$ cat admin2_0.log
    02-09-12 17:48:46:696 CST INFO [admin2] Starting service process: admin2, Java command line arguments: [-XX:+DisableExplicitGC, -Xms96M, -Xmx96M]
    02-09-12 17:48:46:720 CST INFO [admin2] Starting AdminService
    02-09-12 17:48:46:881 CST INFO [admin2] Initializing Admin for store: mystore
    02-09-12 17:48:46:883 CST INFO [admin2] Created new admin environment dir: KVROOT/mystore/sn2/admin2/env
    02-09-12 17:48:46:884 CST INFO [admin2] JVM Runtime maxMemory (bytes): 96468992
    02-09-12 17:48:46:889 CST INFO [admin2] Non-default JE properties for environment: {je.rep.vlsn.logCacheSize=128, je.rep.envUnknownStateTimeout=10 s, je.tree.maxDelta=10, je.log.faultReadSize=4096, je.rep.vlsn.distance=1000000, je.env.runEvictor=true, je.cleaner.minUtilization=40, je.rep.replicaAckTimeout=5 s, je.cleaner.threads=2, je.evictor.lruOnly=false, je.rep.replayMaxOpenDbHandles=100, je.log.writeQueueSize=2097152, je.evictor.criticalPercentage=105, je.log.iteratorReadSize=1048576, je.log.numBuffers=16, je.nodeMaxEntries=128, je.evictor.nodesPerScan=200, je.rep.preHeartbeatTimeoutMs=5000000000, je.checkpointer.bytesInterval=200000000, je.cleaner.lazyMigration=false, je.txn.durability=write_no_sync,write_no_sync,simple_majority, je.cleaner.readSize=1048576, je.rep.txnRollbackLimit=10, je.log.fileCacheSize=2000, je.log.fileMax=1073741824}
    02-09-12 17:48:48:390 CST INFO [admin2] State change event: Thu Feb 09 17:48:47 CST 2012, State: REPLICA, Master: 1
    02-09-12 17:48:48:852 CST INFO [admin2] Shutting down monitor collector
    02-09-12 17:48:48:853 CST INFO [admin2] Replicated environment handle established. Cache size: 57881395, State: REPLICA
    02-09-12 17:48:48:854 CST INFO [admin2] Starting Command service on rmi://datanode1:5000/commandService
    02-09-12 17:48:48:950 CST INFO [admin2] Starting Web service on port 5001
    02-09-12 17:48:49:183 CST INFO [admin2] jetty-7.4.0.v20110414
    02-09-12 17:48:49:350 CST INFO [admin2] Extract jar:file:/home/sunyao/oracle_nosql/tools/kv-1.2.123/lib/kvstore-1.2.123.jar!/war/KVAdminUI/ to /tmp/jetty-0.0.0.0-5001-KVAdminUI-_-any-/webapp
    02-09-12 17:48:50:65 CST INFO [admin2] NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
    02-09-12 17:48:50:120 CST INFO [admin2] started o.e.j.w.WebAppContext{,file:/tmp/jetty-0.0.0.0-5001-KVAdminUI-_-any-/webapp/},jar:file:/home/sunyao/oracle_nosql/tools/kv-1.2.123/lib/kvstore-1.2.123.jar!/war/KVAdminUI
    02-09-12 17:48:50:201 CST INFO [admin2] Started [email protected]:5001 STARTING
    02-09-12 17:48:50:203 CST INFO [admin2] Started AdminService
    02-09-12 17:49:04:408 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 17:49:24:427 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 17:49:28:432 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 17:52:16:974 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 17:52:29:844 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 17:54:03:343 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:00:48:854 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:02:10:25 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:02:55:400 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:02:59:708 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:03:02:127 CST INFO [admin2] Redirect to master at http://namenode:5001
    02-09-12 18:03:05:644 CST INFO [admin2] Redirect to master at http://namenode:5001
    namenode is the hostname of 192.168.7.200, and I can access the admin service from http://192.168.7.200:5001
    and the topology is
    Pinging components of store mystore based upon topology sequence #612
    mystore comprises 300 partitions and 3 Storage Nodes
    Storage Node [sn1] on namenode:5000 Datacenter: Boston [dc1] Status: RUNNING Ver: 11gR2.1.2.123
    Rep Node [rg1-rn1] Status: RUNNING,REPLICA at sequence number: 625 haPort: 5011
    Storage Node [sn2] on datanode1:5000 Datacenter: Boston [dc1] Status: RUNNING Ver: 11gR2.1.2.123
    Rep Node [rg1-rn2] Status: RUNNING,REPLICA at sequence number: 625 haPort: 5010
    Storage Node [sn3] on datanode2:5000 Datacenter: Boston [dc1] Status: RUNNING Ver: 11gR2.1.2.123
    Rep Node [rg1-rn3] Status: RUNNING,MASTER at sequence number: 625 haPort: 5010
    Edited by: 912068 on 2012-2-9 上午2:06
    and when I shutdown namenode SN and admin service , and access 185:5001, the exceptions are belowed:
    Error
    Dismiss
    The Admin instance is unable to service this request, as it is not the master Admin instance. Furthermore, its state is such that it does not know the master Admin's forwarding address.
    Edited by: 912068 on 2012-2-9 上午2:24

  • HELP Needed with this error:   Exception in thread "main" java.lang.NoClass

    Folks,
    I am having a problem connecting to my MSDE SQL 2000 DB on a WindowsXP pro. environment. I am learning Java and writing a small test prgm to connect the the database. The code compiles ok, but when I try to execute it i keep getting this error:
    "Exception in thread "main" java.lang.NoClassDefFoundError: Test1"
    I am using the Microsoft jdbc driver and my CLASSPATH is setup correctly, I've also noticed that several people have complained about this error, but have not seen any solutions....can someone help ?
    Here is the one of the test programs that I am using:
    import java.sql.*;
    * Microsoft SQL Server JDBC test program
    public class Test1 {
    public Test1() throws Exception {
    // Get connection
    DriverManager.registerDriver(new
    com.microsoft.jdbc.sqlserver.SQLServerDriver());
    Connection connection = DriverManager.getConnection(
    "jdbc:microsoft:sqlserver://LAPTOP01:1433","sa","sqladmin");
    if (connection != null) {
    System.out.println();
    System.out.println("Successfully connected");
    System.out.println();
    // Meta data
    DatabaseMetaData meta = connection.getMetaData();
    System.out.println("\nDriver Information");
    System.out.println("Driver Name: "
    + meta.getDriverName());
    System.out.println("Driver Version: "
    + meta.getDriverVersion());
    System.out.println("\nDatabase Information ");
    System.out.println("Database Name: "
    + meta.getDatabaseProductName());
    System.out.println("Database Version: "+
    meta.getDatabaseProductVersion());
    } // Test
    public static void main (String args[]) throws Exception {
    Test1 test = new Test1();

    I want to say that there was nothing wrong
    with my classpath config., I am still not sure why
    that didn't work, there is what I did to resolved
    this issue.You can say that all you like but if you are getting NoClassDefFound errors, that's because the class associated with the error is not in your classpath.
    (For future reference: you will find it easier to solve problems if you assume that the problem is your fault, instead of trying to blame something else. It almost always is your fault -- at least that's been my experience.)
    1. I had to set my DB connection protocol to TCP/IP
    (this was not the default), this was done by running
    the
    file "svrnetcn.exe" and then in the SQL Server Network
    Utility window, enable TCP/IP and set the port to
    1433.Irrelevant to the classpath problem.
    2. I then copied all three of the Microsoft JDBC
    driver files to the ..\jre\lib\ext dir of my jdk
    installed dir.The classpath always includes all jar files in this directory. That's why doing that fixed your problem. My bet is that you didn't have the jar file containing the driver in your classpath before, you just had the directory containing that jar file.
    3. Updated my OS path to located these files
    and....BINGO! (that simple)Unnecessary for solving classpath problems.
    4. Took a crash course on JDBC & basic Java and now I
    have created my database, all tables, scripts,
    stored procedures and can read/write and do all kinds
    of neat stuff.All's well that ends well. After a few months you'll wonder what all the fuss was about.

  • Java.exe error - Exception in thread "main" java.lang.NoClassDefFoundError:

    I've just started to take on java, and some examples from my learning source
    show the
    javac.exe fileincluded.java
    to
    java.exe fileincluded
    method. Although I can compile fine, when I go to run I get a java.exe error - Exception in thread "main" java.lang.NoClassDefFoundError:.
    I thought it was an environment variable problem as I'm running win xp.
    I've gotten the bin directory included, and I've previously had visual studio .net installed
    so the INCLUDE and LIB variables are set to those directories. I've tried to attach the java /lib and /bin directories by ";C:\PROGRAM FILES\JAVA\JDK1.5.0_02\LIB" etc,
    and that didn't work. What can I do to fix this problem?

    I get the I/O exception while reading: D:\Java\HelloApplet (The system cannot find the file specified). I have previously compiled HelloApplet.java into HelloApplet.class using javac.exe
    the two include statements in the sample HelloApplet I'm using are
    import java.applet.*;
    import java.awt.*;
    I also have a ComponentEventTest.java file which I've made into a class with these two
    include statements:
    import java.awt.*;
    import java.awt.event.*;
    I can however compile .java files which have no include statements.
    I take it that my classpath is not set correctly. Like I said earlier, I'm using winxp
    and trying to set the classpath variable under system. I have tried under user too. The path names I've tried setting are C:\Program Files\Java\jdk1.5.0_02\, C:\Program Files\Java\jdk1.5.0_02\lib, C:\Program Files\Java\jdk1.5.0_02\include, and C:\Program Files\Java\jdk1.5.0_02\;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\include.
    How can I correct this? If it's possible, I would like to set a variable in windows
    versus having to type extra commands at the command prompt everytime I try
    to run a java class with java.exe. Any help would be much appreciated

  • Error exception in thread 'main' java.lang.No ClassDefFound Error

    Hi..
    i hope maybe some of u can help me to settle this problem...my problem is when i run this program..this error will appear at command prompt....Exception in thread 'main' java.lang.No ClassDefFound Error.
    How to solve this problem?I need someone to help me..this is my coding..
    import java.io.*;
    class Wang{
    public int ringgit, sen;
    public Wang (int nilaiRinggit, int nilaiSen){
    ringgit=nilaiRinggit;
    sen=nilaiSen;
    System.out.println("Jumlah sen:"+jumlahSen());
    public int jumlahSen ( ) {
    return 100*ringgit + sen;
    class Aplikasi{
    public static void main (String [ ] args) throws IOException {
    Wang wang = new Wang (5, 20);
    System.out.println ("Jumlah wang:RM"+wang.ringgit+"."+wang.sen);
    System.out.println("Sen :"+wang.jumlahSen( ) );
    thank you...

    tq for reply my msg..
    i dont know how to do....can u help me?....teach me
    step by step......to set the classpath...for ur
    info.i'm using win xp...i want to ask u about
    compilation and run....to compile i using javac
    <filename>.java..and to run ... which one true..using
    java <filename>.java or java<filename>?For the javac command, FILEname.java is used. For java command CLASSname is used. Do not use .class or .java. Do use the fully qualified CLASS name. Fully qualified means package name plus the Class name. If you do not specify a package name, then the fully qualified name is just the Class name. Also, all names are case sensitive. MyClass is not equal to myclass.
    Lets say you compile HelloWorld.java so you have a HelloWorld.class file in the directory, C:\myjava. Then, use the commandjava -classpath c:\myjava HelloWorld
    ang how to settle the error exception in thread 'main'
    java.lang.Nosuch method error..You should ALWAYS post the full, exact error message. It is difficult to answer this question without knowing the full error. Which method did Java complain about? Often, this occurs when you try to launch a class as an application but the class does not have a method whose signature is "public static void main(String[] args) "
    You might want to try the tutorial here: http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

  • Error: Exception in thread "main" java.lang.StringIndexOutOfBounds

    I have to write a program that calculates a monthly mortgage payment from a 10,000 loan, decreases the principle, and displays all of the info (principle payment, interest payment, loan balance) for each month. Since all of that info would scroll off the screen, I have to break it down where it will show a few months, prompt user for input to scroll down, and then show the rest of the info. I keep getting this error:
    Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String Index Out Of Range: 0
    at java.lang.String.charAt (Unknown Source)
    at Payment2.main (Payment2.java: 20)
    Here is my code:
    import java.text.*;
    import java.lang.*;
    class Payment2 {
         public static void main(String[] arguments) {
              double LoanAmount = 10000;
              int Term = 3;
              double AnnualInterest = .0575;
              double InterestRate = AnnualInterest/12;
              double MonthlyPayment = (LoanAmount*InterestRate)/(1-(Math.pow(1/(1+InterestRate),(Term*12))));
              String UserInput = "";
              double LoanBalance;
         System.out.println("The amount of the loan is $10,000.");
         System.out.println("The annual interest rate is 5.75%.");
         System.out.println("The term of the loan is 3 years.");
         System.out.println("The average monthly payment is $302.");
         System.out.println("Please press Enter to continue, or Q to quit.");
         if((UserInput.toUpperCase().charAt(0)) != 'Q')
         LoanBalance = LoanAmount;
         int DisplayMonth = 1;
         int DisplayLoop = 0;
         while (DisplayMonth <= (Term*12))
         double InterestPayment = LoanBalance*InterestRate;
         double PrinciplePayment = MonthlyPayment-InterestPayment;
         LoanBalance = (LoanBalance-PrinciplePayment);
         NumberFormat nfo;
         nfo = NumberFormat.getCurrencyInstance();
         String MyFormattedInterest = nfo.format(InterestPayment);
         String MyFormattedPrinciple = nfo.format(PrinciplePayment);
         String MyFormattedBalance = nfo.format(LoanBalance);
         System.out.println("For Month " + DisplayMonth + ":");
         System.out.println("The Monthly Payment is " + MonthlyPayment);
         System.out.println("Interest paid is " + MyFormattedInterest);
         System.out.println("Principle applied is " + MyFormattedPrinciple);
         System.out.println("The new loan balance is " + MyFormattedBalance);
         DisplayMonth++;
         DisplayLoop++;
         if (DisplayLoop == 6)
              System.out.println("Press Enter to scroll down...");
    public static String readLine()
    int ch;
    String r = "";
    boolean StringDone = false;
    while (!StringDone)
    try
    ch = System.in.read();
    if (ch < 0 || (char)ch == '\n') StringDone = true;
    else r = r + (char) ch;
    } // end try
    catch(java.io.IOException e)
    StringDone = true;
    } //end catch
    }// end while
    return r;
    } // end Readline
    PLEASE HELP!!! I would greatly appreciate any tips that anyone can give. Thx
    Ryane

    OK, so I fixed that part, it will run now. But, can't figure out how to keep the screen from scrolling down all the way to the bottom of the list. I need it to stop after 3 months, each time, asking the user to press Enter to scroll down (or any input that will work for this). Any hints on that? Also, when I run the program, I have to press Enter to get it to actually start displaying info. Otherwise, I run it and it just sits there. But when I press Enter, it scrolls and prints all information for the entire loan, 36 months. Here's my updated code. Thx
    class Payment2 {
         public static void main(String[] arguments) {
              double LoanAmount = 10000;
              int Term = 3;
              double AnnualInterest = .0575;
              double InterestRate = AnnualInterest/12;
              double MonthlyPayment = (LoanAmount*InterestRate)/(1-(Math.pow(1/(1+InterestRate),(Term*12))));
              String UserInput = readLine();
              double LoanBalance;
         System.out.println("The amount of the loan is $10,000.");
         System.out.println("The annual interest rate is 5.75%.");
         System.out.println("The term of the loan is 3 years.");
         System.out.println("The average monthly payment is $303.09.");
         if((UserInput.toUpperCase().charAt(0)) != 'Q')
         LoanBalance = LoanAmount;
         int DisplayMonth = 1;
         int DisplayLoop = 0;
         while (DisplayMonth <= (Term*12))
         double InterestPayment = LoanBalance*InterestRate;
         double PrinciplePayment = MonthlyPayment-InterestPayment;
         LoanBalance = (LoanBalance-PrinciplePayment);
         NumberFormat nfo;
         nfo = NumberFormat.getCurrencyInstance();
         String MyFormattedPayment = nfo.format(MonthlyPayment);
         String MyFormattedInterest = nfo.format(InterestPayment);
         String MyFormattedPrinciple = nfo.format(PrinciplePayment);
         String MyFormattedBalance = nfo.format(LoanBalance);
         System.out.println("For Month " + DisplayMonth + ":");
         System.out.println("The Monthly Payment is " + MyFormattedPayment);
         System.out.println("Interest paid is " + MyFormattedInterest);
         System.out.println("Principle applied is " + MyFormattedPrinciple);
         System.out.println("The new loan balance is " + MyFormattedBalance);
         DisplayMonth++;
         DisplayLoop++;
         if (DisplayLoop == 3)
              System.out.println("Press Enter to scroll down...");
    public static String readLine()
    int ch;
    String r = "";
    boolean StringDone = false;
    while (!StringDone)
    try
    ch = System.in.read();
    if (ch < 0 || (char)ch == '\n') StringDone = true;
    else r = r + (char) ch;
    } // end try
    catch(java.io.IOException e)
    StringDone = true;
    } //end catch
    }// end while
    return r;
    } // end Readline
    }

  • Run time error - Exception in thread "main" java.lang.NoClassDefFoundError:

    Can can one help me with this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: TestEnv
    The program is a simple one
    import java.io.*;
    import java.util.*;
    import java.lang.*;
    import java.lang.String.*;
    //A Very Simple Example
    class TestEnv {
    public static void main(String[] args){
    System.out.println("Env is fine");
    Compile the program:
    javac TestEnv.java
    Run the program:
    java TestEnv
    Error: Exception in thread "main" java.lang.NoClassDefFoundError: TestEnv

    Try setting the classpath properly. It seems the runtime evironment is unable to find the compiled class files. Nothing else is wrong.
    --Anil                                                                                                                                                                                                                                                                                           

  • Rapidwiz launch error  Exception in thread main java.lang.UnsatisfiedLink

    i am having the same issue rapid wiz is throwing an error
    please share info of how to install 32 bit rpms on 64 bit   ?
    And these 32 bit rpms also need to be installed to get over the rapidwiz launch error :Exception in thread main java.lang.UnsatisfiedLink
    rpm -Uvh libXau-1.0.5-1.el6.i686.rpm
    rpm -Uvh libxcb-1.5-1.el6.i686.rpm
    rpm -Uvh libX11-1.3-2.el6.i686.rpm
    rpm -Uvh libXext-1.1-3.el6.i686.rpm
    rpm -Uvh libXi-1.3-3.el6.i686.rpm
    rpm -Uvh libXtst-1.0.99.2-3.el6.i686.rpm

    ninjanoodle5 wrote:
    thank you Hussein,
    issue is now resolved
    steps followed :  yum install --setopt=protected_multilib=false  *giveyourpackagename*.i686
    Thanks for the update and for sharing the solution.
    Regards,
    Hussein

  • Export Release Build error - Exception in thread "main" java.lang.Error: Unable to find named traits

    I've been developing an AIR application for Android and iOS. During development, I've run the application (in debug mode) in the desktop simulator as well as on an iPhone 4 and a Nook Tablet.
    However, I recently tried to "Export Release Build" for iOS and hit the following error: (I've stripped out the package and class information in the error message below)
    !ENTRY com.adobe.flexbuilder.project 4 43 2012-04-06 13:09:15.516
    !MESSAGE Error occurred while packaging the application:
    Exception in thread "main" java.lang.Error: Unable to find named traits: valid.package.path.here::ValidClassName
              at adobe.abc.Domain.resolveTypeName(Domain.java:231)
              at adobe.abc.Domain.resolveTypeName(Domain.java:148)
              at adobe.abc.GlobalOptimizer.sccp_eval(GlobalOptimizer.java:6665)
              at adobe.abc.GlobalOptimizer.sccp_analyze(GlobalOptimizer.java:5909)
              at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4628)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3514)
              at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2215)
              at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:526)
              at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:336)
              at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
              at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    !STACK 0
    java.lang.Exception
              at com.adobe.flexbuilder.project.internal.FlexProjectCore.createErrorStatus(FlexProjectCore. java:1019)
              at com.adobe.flexbuilder.util.logging.GlobalLogImpl.log(GlobalLogImpl.java:66)
              at com.adobe.flexbuilder.util.logging.GlobalLog.log(GlobalLog.java:52)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.doPackage (ExportReleaseVersionWizard.java:283)
              at com.adobe.flexbuilder.exportimport.releaseversion.ui.ExportReleaseVersionWizard.performFi nish(ExportReleaseVersionWizard.java:152)
              at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:827)
              at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:432)
              at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)
              at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
              at org.eclipse.jface.window.Window.open(Window.java:801)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction$1.run(Export ReleaseVersionAction.java:97)
              at com.adobe.flexbuilder.exportimport.releaseversion.ExportReleaseVersionAction.run(ExportRe leaseVersionAction.java:103)
              at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
              at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
              at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionI tem.java:584)
              at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
              at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java :411)
              at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
              at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
              at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
              at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
              at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
              at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
              at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
              at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
              at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
              at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
              at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
              at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
              at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
              at com.adobe.flexbuilder.standalone.FlashBuilderApplication.start(FlashBuilderApplication.ja va:108)
              at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)
              at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
              at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
              at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
              at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    The class the error message is referring to is defined with a SWC that my project links to. However, I've even tried to define a class with that same name (and location) within my project and it still fails to find it.
    Why am I able to Project->Clean and run this project within the desktop AIR player (or on the device in debug mode) but unable to export it as a release build?
    I have found a couple of threads mentioning a similar error but none of them have been marked as resolved.

    At this point I feel I am talking to myself, but I will share my work-around in case it helps another who may stumble across this post.
    In my particular case, both my main AIR application and my ANE wrapper library were referencing the same external Flex library (same revision). Both projects had the library linkage set to merge. Changing the linkage to "External" on one of the 2 libraries (it doesn't seem to matter which) and leaving the other as "Merged into code" enabled the export to complete without the bizarre "Unable to find named traits" error.

  • SQLJ error: "Exception in thread main java.lang.NoClassDefFoundError: sqlj/

    Hi,
    I am new to SQLJ. Now, in my PC (with Win98), I have JDK 1.2 and Oracle 8i (personal edition). I have used Java and Oracle in my PC without any problem. Now, I am going to learn SQLJ in order to create a java program to access Oracle database. What I have done is to set up several classpaths in DOS:
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The code of my program is:
    import java.sql.Date;
    import java.sql.SQLException;
    import oracle.sqlj.runtime.Oracle;
    import java.util.Date;
    public class Hello{
         public static void main(String[] args){
              java.sql.Date current_date;
              try{
                   // connect to the db
                   Oracle.connect(
                        "C:\ora_program\bin",
                        "system",
                        "manager");
                   // get the current date from the database
                   #sql{SELECT sysdate INTO :current_date FROM dual};
                   // display message
                   System.out.println("Hello, the current date is: "+ current_date);
              catch(SQLException e){
                   System.err.println("sqlException: "+e);
              finally{
                   try{
                        Oracle.close();
                   catch(SQLException e){
                        System.err.println("sqlException: "+e);
    And then I compile my program in DOS with the typing: sqlj Hello.sqlj
    The program cannot be compiled and the error message is:
    "Exception in thread main java.lang.NoClassDefFoundError: sqlj/tools/Sqlj"
    It indicates that the SQLJ translator class files cannot be found.
    I have set up the classpath in DOS (see above). How does the error come? Please help. Thanks.
    PC

    >
    SET classpath=C:\ora_program\sqlj\lib\translator.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime.zip;
    SET classpath=C:\ora_program\sqlj\lib\runtime12.zip;
    SET classpath=C:\ora_program\jdbc\lib\classes12.zip;
    The above only sets the classpath to the last value. You need to use the following.
    SET classpath=%classpath%;C:\ora_program\sqlj\lib\runtime.zip;

  • Java Compile Error  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14  for iOS

    When compiling one of my projects, I am getting this error suddenly:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 14
              at adobe.abc.GlobalOptimizer$InputAbc.readCode(GlobalOptimizer.java:1510)
              at adobe.abc.GlobalOptimizer$InputAbc.readBody(GlobalOptimizer.java:682)
              at adobe.abc.GlobalOptimizer$InputAbc.readBodies(GlobalOptimizer.java:403)
              at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:326)
              at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler.java:472)
              at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:82)
    Compilation failed while executing : ADT
    but only when targeting iOS. fo Android only, it works fine. Anyone have any ideas? I also logged it as a bug.

    I get the I/O exception while reading: D:\Java\HelloApplet (The system cannot find the file specified). I have previously compiled HelloApplet.java into HelloApplet.class using javac.exe
    the two include statements in the sample HelloApplet I'm using are
    import java.applet.*;
    import java.awt.*;
    I also have a ComponentEventTest.java file which I've made into a class with these two
    include statements:
    import java.awt.*;
    import java.awt.event.*;
    I can however compile .java files which have no include statements.
    I take it that my classpath is not set correctly. Like I said earlier, I'm using winxp
    and trying to set the classpath variable under system. I have tried under user too. The path names I've tried setting are C:\Program Files\Java\jdk1.5.0_02\, C:\Program Files\Java\jdk1.5.0_02\lib, C:\Program Files\Java\jdk1.5.0_02\include, and C:\Program Files\Java\jdk1.5.0_02\;C:\Program Files\Java\jdk1.5.0_02\lib;C:\Program Files\Java\jdk1.5.0_02\include.
    How can I correct this? If it's possible, I would like to set a variable in windows
    versus having to type extra commands at the command prompt everytime I try
    to run a java class with java.exe. Any help would be much appreciated

  • Error: Exception in thread "main" java.lang.NoClassDefFoundError:

    Hi
    I have seen this problem on a few forums but have not found an answer that works for me, sorry if missed it!!
    The command I am giving is:
    C:\Program Files\Rococo\ImprontoSimulator\examples\echo\bin>echo-server
    Exception in thread "main" java.lang.NoClassDefFoundError: com/rococosoft/impronto/examples/echo/EchoServer
    this runs the following batch file:
    @echo off
    set CLASSPATH=
    set CLASSPATH=%SIMULATOR_HOME%\lib\isim_j2se.jar;%CLASSPATH%
    set CLASSPATH=%SIMULATOR_HOME%\lib\log4j.jar;%CLASSPATH%
    set CLASSPATH=%SIMULATOR_HOME%\examples\echo\lib\echo.jar;%CLASSPATH%
    java -classpath "%CLASSPATH%" com.rococosoft.impronto.examples.echo.EchoServer
    this is where I assume all the CLASSPATH's are set.
    Any help would be very much appreciated.
    Thanks
    Nitin

    Once you have defined your classpath as an environment variable, it shouldn't be necessary to include it (or quote it) within the command line. In other words,
    c:\> java EchoServer
    should have worked. However, I suspect the reason the batch script doesn't work might be because %SIMULATOR_HOME% isn't defined? If Java can't find any of the libraries, then it can't find a class EchoServer that contains a main() function to call, resulting in the error message you've received.

  • Error:"exception in thread main:java.lang.noclassdeffound error.

    Hi,
    I am new to this java tech and programming. I just started learning and installed j2sdk1.4.0_03. I wrote a small hello world program and compiled it without any errors. When I execute the same using java hello command, I am getting an error like this: exception in thread "main" java.lang.noclassdeffound error. I am not able to resolve this issue. Please let me know the sol.
    thanks
    venkatraman

    send the program u have typedUmm... Why?
    Anyway @NovaKane: Welcome. Together with seifist and sunny we have at
    least three new posters who show enough intelligence to find chuck's
    solution (or one of the many hundreds of others like it) and the politeness
    to thank him for it. What's the forum coming to?
    If you need it there is a description of the classpath here:
    http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/classpath.html
    Again, welcome. And thanks for raising the intelligence level (and politeness
    quotient) of the fora.

  • Standby.wrf error Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\STAF\bin\JSTAF.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform

    Hi,
    I have created a single tile and getting below error in standby0.wrf file.
    As mentioned in doc, I made a windows 32 bit for standby VM and installed 32 bit staf followed by staf configurations.I installed all the critical updates for windows.
    Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\STAF\bin\JSTAF.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(Unknown Source)
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at com.ibm.staf.STAFHandle.<clinit>(STAFHandle.java:306)
    at IdleVMTest.main(IdleVMTest.java:30)
    I am attaching my test log.
    please let me know how to fix it.
    Thanks,
    Suresh

    Rebecca,
    I appreciate your quick response.
    I am running the test from Primeclient. I am planning to add more tiles once tile0 runs fine. Client0 runs separately.Forgot to mention this in last update.
    I assume prime client generates all wrf files. when other VM's .wrf files are generated fine, will it be still primeclient side error??
    Primeclient is windows 2008 sp2 64bit. Initially I installed 32 bit java and ended up problem while starting the  VMmark2-STAX.bat. When i installed the 64bit java, problem vanished. I assume java version is correct.
    Similary initially i installed a cygwin 64 bit but i got error like "Error VMmarkRMQmgr unable to clear  queues". So uninstalled it and installed a cygwin 32 bit and the problem vanished.
    I am seeing the standby VM is relocated fine during the test. it is just it is not capturing the data in .wrf file. Standby VM configure section does not talk about java installation. is there anything else i am missing it?
    I would like to know whether  below error talks about standby VM because standby VM is 32 bit other side primeclient is 64 bit. below error says on a IA 32-bit platform.
    Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\STAF\bin\JSTAF.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
    Below image u can see java variables are set. Is there anything wrong??
    Thanks,
    Suresh

Maybe you are looking for

  • How do I adjust the print size of a photo?

    I created a collage in PSE 10 and took the photo to Ritz to have printed out in an 18" x 24" poster.  When the file was read into their computer for printing, the sizing came up as 18'1/2" x 24".  Printing the photo as is will cut 1/2" off of the col

  • HR - ABAP LINK

    hi, Any direct link to HR-ABAP portal or forum within SDN or somewhere.

  • Problem with 7toX app

    I'm trying to import FCP7 files from an external drive to use on FCPX. I have FCPX and the 7toX app on my computer. The files on the external drive were not exported as XML files. I tried changing extension from .fcp to .xml and the app won't work. D

  • Device manager shows device but installation CD can't find a Creative prod

    Well, I suppose that the title of this thread says it all. My device manager recognizes the Creative product I have in one of the PCI slots, but when I insert the CD to install all of the programs I get an error message that reads "can't find a creat

  • Extractor on Function Module Not Passing Deltas

    Hi Experts, We have created an extractor on a function module in ERD and initialized it in BWD with no issue. However, when we change a record in ERD, the delta is not passed to BWD. We have debugged the function module and it appears the records are