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

Similar Messages

  • 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

  • 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

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

    Hello,
    I am using the tool tzupdater over Solaris 9 to get java compliant with new DST (Daylight Saving Time) for US (2007).
    I am using the following command:
    # find /usr -fstype nfs -prune -o -fstype autofs -prune -o -name java -print -exec {} /marksman/packages/tzupdater2006p/tzupdater.jar -u \;
    Getting the following messages:
    /usr/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/dt/appconfig/netscape/java
    /usr/j2se/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/j2se/bin/sparcv9/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/j2se/jre/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/j2se/jre/bin/sparcv9/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/j2se/opt/javahelp/doc/api/com/sun/java
    /usr/java
    /usr/iplanet/console5.1/java
    /usr/iplanet/ds5/java
    /usr/iplanet/admserv5.1/java
    /usr/apache/jserv/docs/api/org/apache/java
    /usr/java1.2/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/java1.2/jre/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/java1.2/jre/bin/sparc/native_threads/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/appserver/samples/rmi-iiop/cpp/src/client/java
    /usr/appserver/samples/rmi-iiop/cpp/src/client/org/omg/boxedRMI/java
    /usr/dlc91d/jre/bin/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/dlc91d/jre/bin/sparc/native_threads/java
    Exception in thread "main" java.lang.NoClassDefFoundError: /marksman/packages/tzupdater2006p/tzupdater/jar
    /usr/dlc91d/java
    Any idea why I am getting this error, and how can I fix it?
    Thank you

    Hi,
    I was wondering if you ever saw a resolution to your problem. I am seeing the same error on Windows and can't figure out what is causing it. Any information is appreciated.
    Thanks,
    Marina Orton

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

    Am using java 1.3.1 on Red Hat Linux 7.1
    i get this error
    Exception in thread "main" java.lang.NoClassDefFoundError
    while running a simple program HelloWorld.java
    help

    When you use the "java" command, the only required argument is the name of the class that you want to execute. This argument must be a class name, not a file name, and class names are case sensitive. For example, "java HelloWorld.java" won't work because the class name isn't HelloWorld.java, it's HelloWorld. Similarly, "java helloworld" won't work because a class defined as "public class HelloWorld {" is not named helloworld due to case sensitivity. Finally, the .class file must be in a directory that is in the Classpath - that's where java.exe searches to find the file that contains the class.

  • 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.

  • Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.dr

    Hi
    I am trying to use type 4 driver to connect to my Oracle 9i Rel2 database. I downloaded the odbc14.jar from oracle and added in the C:\Oracle9i\jdbc\lib path. As on the website, I setup my environment:
    Setting Up Your Environment
    On Win95/Win98/NT:
    - Add [ORACLE_HOME]\jdbc\lib\classes111.zip and
    [ORACLE_HOME]\jdbc\lib\nls_charset11.zip to your CLASSPATH.
    (Add classes12.zip and nls_charset12.zip if JDK 1.2.x or 1.3 is
    used. Add ojdbc14.jar and nls_charset12.zip if JDK 1.4 is used.)
    - Make sure [ORACLE_HOME]\bin is in your PATH.
    Still I am getting the following error during runtime:
    Exception in thread "main" java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
    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)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at jdbc.InsertQueryEx.main(InsertQueryEx.java:11)
    Below is the source code:
    import java.sql.*;
    import java.io.*;
    public class InsertQueryEx {
    public static void main(String[] args)throws Exception{
    Class.forName("oracle.jdbc.OracleDriver");
    Connection con = DriverManager.getConnection("jdbc:oracle:thin:@Prashy:1521:orcl", "scott", "tiger");
    DataInputStream din = new DataInputStream(System.in);
    Statement stmt = con.createStatement();
    while(true){
    try{
    System.out.println("enter emp name");
    String name = din.readLine();
    System.out.println("enter emp no");
    int no = Integer.parseInt(din.readLine());
    System.out.println("enter emp salary");
    float sal = Float.parseFloat(din.readLine());
    System.out.println("enter emp address");
    String addr = din.readLine();
    int count = stmt.executeUpdate("insert into myemp values("+no+",'"+name+"',"+sal+",'"+addr+"')");
    if(count>0)
    System.out.println("Record added");
    else
    System.out.println("Failed");
    catch (Exception e){
    System.err.println("Exception: "+e.getMessage());
    Any help is appreciated
    Thanks
    Prashant

    I am sorry but I did add those in the classpath but still getting this error:
    This is what I have for user variable in classpath:
    .;C:\Oracle9i\jdbc\lib\ojdbc14.jar;C:\Oracle9i\jdbc\lib\nls_charset12.jar
    error is:
    java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
         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)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Unknown Source)
         at jdbc.InsertQueryEx.main(InsertQueryEx.java:14)
    Thanks

  • Exception in thread "main" java.lang.VerifyError: verification failed!!

    DB:11.1.0.7
    Oracle Apps:12.1.1
    OS:RHEL Linux 4 86x64
    Hi All,
    On executing the following command on node 2 of TEST instance, we received the following error but did not find any such error messages in node 1
    Notes: (1) Node 1 has java version:
    java -version
    java version "1.6.0_10"
    Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
    Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)
    (2) Node 2 has java version:
    java -version
    java version "1.4.2"
    gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9)
    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    Error message in node2:
    On executing the following command on node 2 of TEST instance, we received the following error:
    java oracle.jrad.tools.xml.importer.XMLImporter /tmp/custdocs/oracle/apps/pos/home/webui/customizations/site/0/PosHpgOrders.xml ....
    /usr/bin/java: line 36: [: `)' expected, found -
    Exception in thread "main" java.lang.VerifyError: verification failed at PC 152 in oracle.jdbc.driver.OracleDriver:registerMBeans(()V): String, int, or float constant expected
    at JvBytecodeVerifier.verify_fail(byte, int) (/usr/lib64/libgcj.so.5.0.0)
    at JvBytecodeVerifier.verify_instructions_0() (/usr/lib64/libgcj.so.5.0.0)
    at JvVerifyMethod(_Jv_InterpMethod) (/usr/lib64/libgcj.so.5.0.0)
    at JvPrepareClass(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
    at JvWaitForState(java.lang.Class, int) (/usr/lib64/libgcj.so.5.0.0)
    at java.lang.VMClassLoader.linkClass0(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
    at java.lang.VMClassLoader.resolveClass(java.lang.Class) (/usr/lib64/libgcj.so.5.0.0)
    at java.lang.Class.initializeClass() (/usr/lib64/libgcj.so.5.0.0)
    at java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib64/libgcj.so.5.0.0)
    at oracle.adf.mds.tools.util.ConnectUtils.getDBConnection(java.lang.String) (Unknown Source)
    at oracle.jrad.tools.xml.importer.XMLImporter.importDocuments(java.lang.String[], java.sql.Connection) (Unknown Source)
    at oracle.jrad.tools.xml.importer.XMLImporter.main(java.lang.String[]) (Unknown Source)
    Could anyone please share such an issue faced before and provide resolution as to what's wrong in here in node 2?
    Thanks for your time!
    Regards,

    Hi,
    (2) Node 2 has java version:
    java -version
    java version "1.4.2"Do you run this command as applmgr user? If yes, did you source the application env file?
    Could anyone please share such an issue faced before and provide resolution as to what's wrong in here in node 2?Why the java version is different on the both nodes?
    Thanks,
    Hussein

  • Exception in thread "main" java.lang.NullPointerException

    hi
    I am new to Java, and taking an introductory course in java. I wrote the code given bellow and get following error "C:\java\assingment2>java test123
    Exception in thread "main" java.lang.NullPointerException
    at PartCatalog.Add(test123.java:56)
    at test123.main(test123.java:102)"
    Can any body help me please
    import java.util.*;
    class PartRecord
    public String PartName;
    public String PartNumber;
    public float Cost;
    public int Quantity;
    public static int counter ;
    public PartRecord()
    { PartName ="";
         PartNumber="";
    Cost = 0;
         Quantity = 0;
         counter = 0;
    public void Set(String name, final String num,
    float cost, int quantity)
         PartName = name;
    PartNumber= num;
    Cost = cost;
    Quantity = quantity;
    counter++;
    public float Get()
                   return Cost*Quantity;
    public static int Counter() {return counter;}
    class PartCatalog
    public PartCatalog()
    npart=0;
    public void Add(String name, String num,
    float cost, int quantity)
    if(npart>=1000) return;
    Parts[npart++].Set(name,num,cost,quantity);
    public float ShowInventory()
    int inventory = 0;
    for(int i=0; i<npart; i++)
    inventory+= Parts.Get();
    return inventory;
    public PartRecord[] Parts = new PartRecord[1000];
    public int npart;
    class ExtPartCatalog extends PartCatalog
    public void Sort()
    Arrays.sort(Parts);
    public void Print()
    for(int i=0; i<npart; i++)
    System.out.println ( Parts[i].PartName + "\t "
    + Parts[i].PartNumber + "\t "
    + Parts[i].Cost + "\t "
    + Parts[i].Quantity + "\n");
    class test123{
    public static void main(String args[])          
         ExtPartCatalog catalog = new ExtPartCatalog();
         catalog.Add("tire ", "1", 45, 200);
         catalog.Add("microwave", "2", 95, 10);
         catalog.Add("CD Player", "3", 215, 11);
         catalog.Add("Chair ", "4", 65, 10);
         catalog.Sort();
    catalog.Print();
    System.out.println("Inventory is " + catalog.ShowInventory());
    ExtPartCatalog catalog2 = new ExtPartCatalog();
    catalog2.Add("ttt ", "1", 45, 200);
    System.out.print("\n\nTotally there are " + PartRecord.Counter() );
    System.out.println(" Parts being set" );

    Thank you for your reply. I think i used
    public PartRecord[] Parts = new PartRecord[1000];
    so i have created the reference. I tries what you told me but it still did not work. I am putting the code again, but now in the formatted form so that you can read it more easily. I will appreciate your help. Thanks
    <code>
    import java.util.*;
    class PartRecord
    {      public String PartName;
    public String PartNumber;
    public float Cost;
    public int Quantity;
    public static int counter ;
         public PartRecord()
              PartName ="";
              PartNumber="";
              Cost = 0;
              Quantity = 0;
              //counter = 0;
         public void Set(String name, final String num,
    float cost, int quantity)
         PartName = name;
         PartNumber= num;
         Cost = cost;
         Quantity = quantity;
         counter++;
         public float Get()
         return Cost*Quantity;
         public static int Counter() {return counter;}
    class PartCatalog
    {      public PartRecord[] Parts = new PartRecord[1000];
         public int npart;
    public PartCatalog()
    npart=0;
         public void Add(String name, String num,
         float cost, int quantity)
         if(npart>=1000) return;
         Parts[npart++].Set(name,num,cost,quantity);
         public float ShowInventory()
              float inventory = 0;
              for(int i=0; i<npart; i++)
              inventory= Parts[npart].Get();
              return inventory;
    /*class ExtPartCatalog extends PartCatalog
         public void Sort()
         Arrays.sort(Parts);
         public void Print()
                   for(int i=0; i<npart; i++)
                   System.out.println ( Parts.PartName + "\t "
                                  + Parts[i].PartNumber + "\t "
                                  + Parts[i].Cost + "\t "
                             + Parts[i].Quantity + "\n");
    class azimi_a{
    public static void main(String args[])
    PartCatalog c = new PartCatalog() ;//= new PartCatalog[4];
    c.Add("tire ", "1", 45, 200);
    c.Add("microwave", "2", 95, 10);
    c.Add("CD Player", "3", 215, 11);
    c.Add("Chair ", "4", 65, 10);
    <code>

  • Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

    hi to all.
    iam getting this error: could any one give me the solution.
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at DinosaursDataLoader.getData(DinosaursDataLoader.java:49)
    at DinosaursPack.load(DinosaursPack.java:22)
    at DinosaursPack.<init>(DinosaursPack.java:18)
    at myproject.main(myproject.java:17)
    import java.util.*;
    import java.io.*;
    import javax.swing.ImageIcon;
    public class Driver {
        public static void main (String[] args) {
              // create a Scanner and grab the data . . .
                 File f=new File("C:\\Users\\hariprasad koineni\\Desktop\\r.txt");// my text file containes 12 dinosuor card info
              Scanner scanner = null;
              try {
                    scanner = new Scanner(f);
              } catch (FileNotFoundException fnf) {
                    System.out.println(fnf.getMessage());
                    System.exit(0);
            // scan file line-by-line
              scanner.useDelimiter("------------------------------------------------------------------");
              int y=0;
              while (scanner.hasNext()) {
                String line = scanner.next().trim();
                System.out.println(line);
                String bits[]= new String[19];
                String[] bit = line.split("\n");       // Regex available since Java 5
                for(int j=0;j<=(bit.length-1);j++){
                        String[] bis = bit[j].split(":");
                        System.out.println(bis[0]);
                        String t=bis[1].trim();
                        bits[j]=t;
                        System.out.println(bits[j]);
                        System.out.println(j);
                String t = bits[0];                        // title
                String imgFileName = bits[1];          // image file name
                float  h = Float.parseFloat(bits[2]);    // height
                String  w = bits[3];    // weight
                String  l = bits[4];    // length
                int  kr = Integer.parseInt(bits[5]);    // killer rating
                String  i = bits[6];     // intelligence
                int  a = Integer.parseInt(bits[7]);     // age
                String df = bits[8];                      // dino file
                // create the image
               y++;
             System.out.println(line);
             System.out.println(y);
    }

    h_koineni wrote:
    sorry
    iam getting the error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
    at Driver.main(Driver.java:38)So meaning this line cause the exception:
    String t=bis[1].trim(); // hard-coded int literal 1That happens because, in line 36,
    String[] bis = bit[j].split(":");What will happen if the delimiter ':' is not found? It will return an array with a size of 1, and at this time referencing index 1 is out of bound, remember that the upper bound of an array is its size-1. One workaround is to put a selection structure after line 36.
    if (bis != null && bis.length == 2) {
        String t=bis[1].trim();
        bits[j]=t;
    }Then, recompile your code and try again.

  • Exception in thread "main" java.lang.NumberFormatException:For input String

    this is a code about arrylist. but when I debug it.it metion:Exception in thread "main" java.lang.NumberFormatException:For input String at java.lang.NumberFormatException.forInputString(numberFomatExceptionio java:48)
    at java.lang.Integer.parseInt(integer.java:468)
    at java.lang.Integer.parseInt(integer.java:497)
    at Get.getInt(manerger.java:208)
    at LinkList.insertFirst(manager.java:94)
    at manager.main(manager.java;20)
    this is my code:
    import java.io.*;
    import java.lang.*;
    public class manager
         public static void main(String args[]) throws IOException
         LinkList list=new LinkList();
         System.out.println("input S can scan the grade\ninput D can delete one entry\ninput U can update the entry\ninput A can add one entry\ninput E can end");
         int cr=System.in.read();
    switch(cr)
         case 'A':
         list.insertFirst();break;//this is 20 row
         case 'S':
         System.out.println("input the s");break;
         case 'D':
         System.out.println("input the d");break;
         case 'U':
         System.out.println("input the u");break;
    class Link
    public int number;
    public String name=new String();
    public int chs;
    public int eng;
    public int math;
    public Link next;
    public Link(int number,String name, int chs,int eng,int math)
    this.number=number;
    this.name=name;
    this.chs=chs;
    this.eng=eng;
    this.math=math;
    public Link()
         this(0,"",0,0,0);
    public void displayLink()
    System.out.println(number + " "+name+ " "+chs+ " "+eng+ " "+math+ " ");
    class LinkList
    public Link first;
    public LinkList()
    first = null;
    public boolean isEmpty()
    return first==null;
    public void displayList()
         System.out.println("");
         Link current=first;
         while(current!=null)
              current.displayLink();
              current=current.next;
         System.out.println("");
    public Link insertFirst() throws IOException
         Get getdata=new Get();
         int number=getdata.getInt();//this is 94 row
         String name=getdata.getString();
         int chs=getdata.getInt();
         int eng=getdata.getInt();
         int math=getdata.getInt();
         Link newLink = new Link(number,name,chs,eng,math);
         first=newLink;
         return first;
    public Link find(int key)
         Link current=first;
         while(current.number!=key)
              if(current.next==null)
              return null;
              else
              current=current.next;
         return current;
    public Link update(int key) throws IOException
         Link current=first;
         while(current.number!=key)
         if(current.next==null)
         return null;
         else
              System.out.println("Input the first letter of the subject:");
         int c=System.in.read();
         Get get=new Get();
              switch(c)
                   case 'c':
                   current.chs=get.getInt();break;
                   case 'e':
                   current.eng=get.getInt();break;
                   case 'm':
                   current.math=get.getInt();break;
         return current;
    public float average(char key)
         Link current=first;
         float total=0;
         float average=0;
         float counter=0;
         if(current==null)
         return 0;
         while(current!=null)
              switch(key)
                   case 'c':
                   total=current.chs+current.next.chs;break;
                   case 'e':
                   total=current.eng+current.next.eng;break;
                   case 'm':
                   total=current.math+current.next.math;break;
              current=current.next.next;
              counter++;
         average=total/counter;
         return average;
    public Link delete(int key)
         Link current=first;
         Link previous=first;
         while(current.number!=key)
              if(current.next==null)
              return null;
              else
                   previous=current;
                   current=current.next;
              if(current==first)
              first=first.next;
              else
              previous.next=current.next;
              return current;
    class Get
    public static String getString() throws IOException
    System.out.println("Input your name:");
    InputStreamReader str = new InputStreamReader(System.in);
    BufferedReader br = new BufferedReader(str);
    String s = br.readLine();
    return s;
    public static int getInt() throws IOException
    System.out.println("Input your data:");
    String st = getString();
    return Integer.parseInt(st);//this is 208 row
    }

    It may be that the code in getString() returns a
    String that ends with a newline. If that is the
    problem, you can use
    return (Integer.parseInt(st)).trim();1. getString will never return a String ending in newline. BufferedReader.readLine strips off the newline.
    2. Even if you had a newline, String.trim doesn't trim newlines.
    3. You would need to trim the String, not the int:
    return (Integer.parseInt(st.trim()));As JimDinosaur said, you are passing bad data (the value of "st").
    In getInt, add this before trying to parse "st":
    System.out.println("###"+st+"###");What does it print?

  • Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5

    I am getting error:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
    Pls tell me where I am wrong:
    import javax.swing.JOptionPane;
    import java.io.File;
    import java.io.*;
    import java.io.IOException;
    import java.util.*;
    class Test {
    String lname, fname, finalLetterGrade, LetterGrade, sub1,sub2,sub3,sub4,sub5,sub;
    int testone = 0;
         int a=0,b,c,d,e, count= 0, abs = 0,j;
    int testtwo = 0;
    int testthree = 0;
    int testfour = 0;
    int testfive = 0;
    int finalExamGrade = 0;
      int i=0;
    int participation = 0;
    int lowScore = 0;
    int abs1,abs2,abs3,abs4,abs5;
    String s="absent";
    Character ch;
    String []name;   
    int []Mark;
    double finalNumericGrade = 0;
    public Test() {
    public void inputGrades()
    int input, row, col;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of the square matrix: ");
         col = scan.nextInt(); 
    name = new String[col];
            Mark = new int[col];
            for(i = 0; i < col ; i++)
              name=JOptionPane.showInputDialog("Enter Student Name"+(i+1)+" Name: ");
    System.out.println(name[i]);
    for(j=0; j < col;j++)
    Mark[j]=Integer.parseInt(JOptionPane.showInputDialog("Marks "+(j+1)+" Mark: "));
    System.out.println(Mark[j]);
              System.out.println("Average-->"+getAverage());
              System.out.println("Student'-->"+toString());
    public double getAverage()
         if( Mark[0]==0 || Mark[1]==0 || Mark[2]==0 || Mark[3]==0 || Mark[4]==0)
    finalNumericGrade=((((float)(Mark[0])) + ((float)(Mark[1])) + ((float)(Mark[2])) + ((float)(Mark[3])) + ((float)(Mark[4])))/4);
    else
    finalNumericGrade=((((float)(Mark[0])) + ((float)(Mark[1])) + ((float)(Mark[2])) + ((float)(Mark[3])) + ((float)(Mark[4])))/5);;
    return finalNumericGrade;
    private String letterGrade(){
         //System.out.println(" +++ finalNumericGrade " + finalNumericGrade );
    if ((finalNumericGrade >= 3.50) & (finalNumericGrade <= 4))
    finalLetterGrade = "A";
    else
    if ((finalNumericGrade >= 2.50) & (finalNumericGrade < 3.50))
    finalLetterGrade = "B";
    else
    if ((finalNumericGrade >= 2) & (finalNumericGrade < 2.50))
    finalLetterGrade = "C";
    else
    if ((finalNumericGrade >= 1) & (finalNumericGrade < 2))
    finalLetterGrade = "D";
    else
    if (finalNumericGrade == 0)
    finalLetterGrade = "X";
    else finalLetterGrade ="Z";
    return finalLetterGrade;
    public int getAbsentee()
         if(testone == 0)
              abs1=1;
         if(testtwo == 0)
              abs2=1;
         if(testthree == 0)
              abs3=1;
         if(testfour == 0)
              abs4=1;
         if(testfive == 0)
              abs5=1;
         return abs=abs1+abs2+abs3+abs4+abs5;
    public String AbsentSub()
         if((testone < testtwo) & (testone < testthree) & (testone < testfour) & (testone < testfive))          
              sub=sub1;
         if((testtwo < testone) & (testtwo < testthree) & (testtwo < testfour) & (testtwo < testfive))
              sub=sub2;
         if((testthree < testone) & (testthree < testtwo) & (testthree < testfour) & (testthree < testfive))
              sub=sub3;
         if((testfour < testone) & (testfour < testthree) & (testfour < testtwo) & (testfour < testfive))
              sub=sub4;
         if((testfive < testone) & (testfive < testtwo) & (testfive < testthree) & (testfive < testfour))
              sub=sub5;
         return sub;
    public int getLowScore(){
    //Determine and return the lowest score
    lowScore = testone;
    if (testtwo < lowScore) lowScore = testtwo;
    if (testthree < lowScore) lowScore = testthree;
         if (testfour < lowScore) lowScore = testfour;
         if (testfive < lowScore) lowScore = testfive;
    return lowScore;
    public String toString() {
    String studentStringValue="\n\nStudent " sub1 " "+sub2+" "+sub3+" "+sub4+" "+sub5+ " Lowest Final Marks \n\n";
    studentStringValue+= name[i]+"\t";
    if(Mark[0]==0)
         studentStringValue+="" s "\t";
    else
         a=Mark[0];
         ch = new Character(((char) ((69-a))));
    studentStringValue+= Mark[0]+" "+ch+ "\t";
    if(Mark[1]==0)
         studentStringValue+="" s "\t";
    else
         b=Mark[1];
    ch = new Character(((char) ((69-b))));
    studentStringValue+= Mark[1]+" "+ch+ "\t";
    if(Mark[2]==0)
         studentStringValue+="" s "\t";
    else
         c=Mark[2];
    ch = new Character(((char) ((69-c))));
    studentStringValue+=Mark[2] +" "+ch+ "\t";
    if(Mark[3]==0)
         studentStringValue+="" s "\t";
    else
         d=Mark[3];
    ch = new Character(((char) ((69-d))));
    studentStringValue+= Mark[3] +" "+ch+ "\t";
    if(Mark[4]==0)
              studentStringValue+="" s "\t";
    else
         e=Mark[4];
    ch = new Character(((char) ((69-e))));
    studentStringValue+=Mark[4] +" "+ch+ "\t";
    try {
    BufferedWriter out = new BufferedWriter(new FileWriter(".//Marks3.txt", true));
    out.write(studentStringValue);
    out.close();
    } catch (IOException e) {
    //studentStringValue+=" " + abs + " ";
    //studentStringValue+=" " sub"\t";
    studentStringValue+=" " + finalNumericGrade + " \n\n";
    //studentStringValue+=" Final Letter Grade is: " + finalLetterGrade +"\n";
    return studentStringValue;
    }// toString
    public void printName(){
    System.out.print(" "+lname);
    System.out.print(" "+fname);
    public static void main(String[] args)
         Test s = new Test();
         s.inputGrades();
         System.out.println("Average-->" +s.getAverage());
         //System.out.println("Average-->" +s.setAverage());
         //System.out.println("Absent students in each Test-->" + s.getAbsentee());
         // s.getLowScore();
         //System.out.println("Final Letter Grade --> " + s.letterGrade());
         // s.AbsentSub();
         System.out.println(""+ s.toString());

    hi,
    I am getting error on line 232 n 339
    My error is :
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 2
    at Test.toString(Test.java:232)
    at Test.main(Test.java:339)
    my code is :
    import javax.swing.JOptionPane;
    import java.io.File;
    import java.io.*;
    import java.io.IOException;
    import java.util.*;
    class Test {
    String lname, fname, finalLetterGrade, LetterGrade, sub1,sub2,sub3,sub4,sub5,sub;
    int testone = 0;
         int a=0,b,c,d,e, count= 0, abs = 0,j,ab,abm=0,abj=0,abn=0,abd=0;
    int testtwo = 0;
    int testthree = 0;
    int testfour = 0;
    int testfive = 0;
    int finalExamGrade = 0;
      int i=0;
    int participation = 0;
    int lowScore = 0;
    int abs1,abs2,abs3,abs4,abs5;
    String s="absent";
    Character ch;
    String []name;
    String[] subj;
    int []Mark;
    double finalNumericGrade = 0;
    public Test() {
    public void inputGrades()
    int input, row, col;
         Scanner scan = new Scanner(System.in);
         System.out.println("Enter the length of Array: ");
         col = scan.nextInt(); 
    name = new String[col];
    subj = new String[5];
            Mark = new int[5];
            for(i = 0; i < col ; i++)
              name=JOptionPane.showInputDialog("Enter Student Name"+(i+1)+" Name: ");
    System.out.println(name[i]);
    for(j=0; j < 5;j++)
                        subj[j]=JOptionPane.showInputDialog("Enter Subject"+(j+1)+" Name: ");
    Mark[j]=Integer.parseInt(JOptionPane.showInputDialog("Marks "+(j+1)+" Mark: "));
                        System.out.println(subj[j]);
    System.out.println(Mark[j]);
                        System.out.println("Student'-->"+toString());
              System.out.println("Average Stu-->"+getAverage());
              getLowScore();
    public double getAverage()
         if( Mark[0]==0 || Mark[1]==0 || Mark[2]==0 || Mark[3]==0 || Mark[4]==0)
    finalNumericGrade=((((float)(Mark[0])) + ((float)(Mark[1])) + ((float)(Mark[2])) + ((float)(Mark[3])) + ((float)(Mark[4])))/4);
    else
    finalNumericGrade=((((float)(Mark[0])) + ((float)(Mark[1])) + ((float)(Mark[2])) + ((float)(Mark[3])) + ((float)(Mark[4])))/5);;
    return finalNumericGrade;
    private String letterGrade(){
         //System.out.println(" +++ finalNumericGrade " + finalNumericGrade );
    if ((finalNumericGrade >= 3.50) & (finalNumericGrade <= 4))
    finalLetterGrade = "A";
    else
    if ((finalNumericGrade >= 2.50) & (finalNumericGrade < 3.50))
    finalLetterGrade = "B";
    else
    if ((finalNumericGrade >= 2) & (finalNumericGrade < 2.50))
    finalLetterGrade = "C";
    else
    if ((finalNumericGrade >= 1) & (finalNumericGrade < 2))
    finalLetterGrade = "D";
    else
    if (finalNumericGrade == 0)
    finalLetterGrade = "X";
    else finalLetterGrade ="Z";
    return finalLetterGrade;
    /*****Java Absentee***/
    public int getAbsenteeJava()
         if((Mark[0]==0))     
              abj=abj+1;
         else
              abj=0;
              return abj;
    public void setAbsenteeJava()
              System.out.println("Absent in Java-->"+abj);
    /***Maths Absentee****/
         public int getAbsenteeMaths()
         if(Mark[1]==0)
              abm=abm+1;
         else
              abm=0;
              return abm;
         public void setAbsenteeMaths()
              System.out.println("Absent in Maths-->"+abm);
    /****Stats Absentee---*/
    public int getAbsenteeStat()
    sub3="Stats";
         if(Mark[2]==0)          
              abs=abs+1;
         else
              abs=0;
              return abs;
         public void setAbsenteeStat()
    System.out.println("Absent in Stats-->"+abs);
    /*****NEt Absentee****/
         public int getAbsenteeNet()
    sub4="Network";
         if(Mark[3]==0)          
              abn=abn+1;
         else
              abn=0;
              return abn;
    public void setAbsenteeNet()
    System.out.println("Absent in Network-->"+abn);
    /*****Database Absentee****/
         public int getAbsenteeData()
    sub5="Database";
         if(Mark[4]==0)          
              abd=abd+1;
         else
              abd=0;
              return abd;
         public void setAbsenteeData()
    System.out.println("Absent in Database-->"+abd);
    public String getLowScore(){
    //Determine and return the lowest score
    if(((subj[0].equals(sub1)) || (Mark[0]==0)))     
              sub="Java";
         else if(((subj[1].equals(sub2)) || (Mark[1]==0)))
              sub="Maths";
         else if(((subj[2].equals(sub3)) & (Mark[2]==0)))
              sub="Stats";
         else if(((subj[3].equals(sub4)) || (Mark[3]==0)))
              sub="Network";
         else if(((subj[4].equals(sub5)) || (Mark[4]==0)))
              sub="Database";
         return sub;
    public String toString() {
    String studentStringValue="\n\nStudent " subj[0] " "+subj[1]+" "+subj[2]+" "+subj[3]+" "+subj[4]+ " Lowest Final Marks \n\n";
         String nm = name[i];
    studentStringValue+= nm+"\t";
    if(Mark[0]==0)
         studentStringValue+="" s "\t";
    else
         {// 232: Line: getting ERROR here
         a=Mark[0];
         ch = new Character(((char) ((69-a))));
    studentStringValue+= Mark[0]+" "+ch+ "\t";
    if(Mark[1]==0)
         studentStringValue+="" s "\t";
    else
         b=Mark[1];
    ch = new Character(((char) ((69-b))));
    studentStringValue+= Mark[1]+" "+ch+ "\t";
    if(Mark[2]==0)
         studentStringValue+="" s "\t";
    else
         c=Mark[2];
    ch = new Character(((char) ((69-c))));
    studentStringValue+=Mark[2] +" "+ch+ "\t";
    if(Mark[3]==0)
         studentStringValue+="" s "\t";
    else
         d=Mark[3];
    ch = new Character(((char) ((69-d))));
    studentStringValue+= Mark[3] +" "+ch+ "\t";
    if(Mark[4]==0)
              studentStringValue+="" s "\t";
    else
         e=Mark[4];
    ch = new Character(((char) ((69-e))));
    studentStringValue+=Mark[4] +" "+ch+ "\t";
    //studentStringValue+=" " + abs + " ";
    studentStringValue+=" " sub"\t";
    studentStringValue+=" " + finalNumericGrade + " \n\n";
    //studentStringValue+=" Final Letter Grade is: " + finalLetterGrade +"\n";
    try {
    BufferedWriter out = new BufferedWriter(new FileWriter(".//Marks3.txt", true));
    out.write(studentStringValue);
    out.close();
    } catch (IOException e) {
    return studentStringValue;
    }// toString
    public void printName(){
    System.out.print(" "+lname);
    System.out.print(" "+fname);
    public static void main(String[] args)
         Test s = new Test();
         s.inputGrades();
         System.out.println("Average-->" +s.getAverage());
         //System.out.println("Average-->" +s.setAverage());
         s.getAbsenteeJava();
         s.setAbsenteeJava();
         s.getAbsenteeMaths();          
    s.setAbsenteeMaths();
         s.getAbsenteeStat();
         s.setAbsenteeStat();
         s.getAbsenteeNet();     
         s.setAbsenteeNet();
         s.getAbsenteeData();          
    s.setAbsenteeData();
         s.getLowScore();
         //System.out.println("Final Letter Grade --> " + s.letterGrade());
         System.out.println(""+ s.toString());

  • I get the message Exception in thread "main" java.lang.StackOverflowError

    I'm trying to make a program for my class and when I run the program I get the error Exception in thread "main" java.lang.StackOverflowError, I have looked up what it means and I don't see where in my program would be giving the error, can someone please help me, here is the program
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    // This visual application allows users to "shop" for items,
    // maintaining a "shopping cart" of items purchased so far.
    public class ShoppingApp extends JFrame
    implements ActionListener {
    private JButton addButton, // Add item to cart
    removeButton; // Remove item from cart
    private JTextArea itemsArea, // Where list of items for sale displayed
    cartArea; // Where shopping cart displayed
    private JTextField itemField, // Where name of item entered
    messageField; // Status messages displayed
    private ShoppingCart cart; // Reference to support object representing
    // Shopping cart (that is, the business logic)
    String itemEntered;
    public ShoppingApp() {
    // This array of items is used to set up the cart
    String[] items = new String[5];
    items[0] = "Computer";
    items[1] = "Monitor";
    items[2] = "Printer";
    items[3] = "Scanner";
    items[4] = "Camera";
    // Construct the shopping cart support object
    cart = new ShoppingCart(items);
    // Contruct visual components
    addButton = new JButton("ADD");
    removeButton = new JButton("REMOVE");
    itemsArea = new JTextArea(6, 8);
    cartArea = new JTextArea(6, 20);
    itemField = new JTextField(12);
    messageField = new JTextField(20);
    // Listen for events on buttons
    addButton.addActionListener(this);
    removeButton.addActionListener(this);
    // The list of items is not editable, and is in light grey (to
    // make it distinct from the cart area -- this would be done
    // better by using the BorderFactory class).
    itemsArea.setEditable(false);
    itemsArea.setBackground(Color.lightGray);
    cartArea.setEditable(false);
    // Write the list of items into the itemsArea
    itemsArea.setText("Items for sale:");
    for (int i = 0; i < items.length; i++)
    itemsArea.append("\n" + items);
    // Write the initial state of the cart into the cartArea
    cartArea.setText("No items in cart");
    // Construct layouts and add components
    JPanel mainPanel = new JPanel(new BorderLayout());
    getContentPane().add(mainPanel);
    JPanel controlPanel = new JPanel(new GridLayout(1, 4));
    controlPanel.add(new JLabel("Item: ", JLabel.RIGHT));
    controlPanel.add(itemField);
    controlPanel.add(addButton);
    controlPanel.add(removeButton);
    mainPanel.add(controlPanel, "North");
    mainPanel.add(itemsArea, "West");
    mainPanel.add(cartArea, "Center");
    mainPanel.add(messageField, "South");
    public void actionPerformed(ActionEvent e)
    itemEntered=itemField.getText();
    if (addButton==e.getSource())
    cart.addComputer();
         messageField.setText("Computer added to the shopping cart");
    public static void main(String[] args) {
    ShoppingApp s = new ShoppingApp();
    s.setSize(360, 180);
    s.show();
    this is a seperate file called ShoppingCart
    public class ShoppingCart extends ShoppingApp
    private String[] items;
    private int[] quantity;
    public ShoppingCart (String[] inputitems)
    super();
    items=inputitems;
    quantity=new int[items.length];
    public void addComputer()
    int x;
    for (x=0; "computer".equals(itemEntered); x++)
         items[x]="computer";
    please somebody help me, this thing is due tomorrow I need help asap!

    First, whenever you post, there is a link for Formatting Help. This link takes you to here: http://forum.java.sun.com/features.jsp#Formatting and tells you how to use the code and /code tags so any code you post will be easily readable.
    Your problem is this: ShoppingApp has a ShoppingCart and ShoppingCart is a ShoppingApp - that is ShoppingCart extends ShoppintApp. You are saying that ShoppingCart is a ShoppingApp - which probably doesn't make sense. But the problem is a child class always calls one of its parent's constructors. So when you create a ShoppingApp, the ShoppingApp constructor tries to create a ShoppingCart. The ShoppingCart calls its superclass constructor, which tries to create a ShoppingCart, which calls its superclass constructor, which tries to create a ShoppingCart, which...
    It seems like ShoppingCart should not extend ShoppingApp.

  • FB 4.7 AIR 3.6 Flex 4.9 iOS packing - Exception in thread "main" java.lang.OutOfMemoryError'

    I've got an error similar to Isaac_Sunkes' 'FB 4.7 iOS packaging - Exception in thread "main" java.lang.OutOfMemoryError',
    but the causes are not related to what he discovered, corrupt image or other files, I'd exclude bad archive contents in my project.
    I'm using Flash Builder 4.7 with Adobe AIR 3.6 set into an Apache Flex 4.9.1 SDK;
    HW system is:
    iMac,    2,7 GHz Intel Core i5,    8 GB 1600 MHz DDR3,    NVIDIA GeForce GT 640M 512 MB,    OS X 10.8.2 (12C3103)
    The Flash project consists in an application with a main SWF file which loads, via ActionScript methods, other SWF in cascade.
    I've formerly compiled and run the application on an iPad 1, IOS 5.0.1 (9A405), but got on the device the error alert:
    "Uncompiled ActionScript
    Your application is attempitng to run
    uncompiled ActionScript, probably
    due to the use of an embedded
    SWF. This is unsupported on iOS.
    See the Adobe Developer
    Connection website for more info."
    Then I changed the FB compiler switches, now are set to:
    -locale en_US
    -swf-version=19
    Please note that without the switch    -swf-version=19     the application is compiled correctly and the IPA is sent to the device
    and I can debug it, but iOS traps secondary SWF files and blocke the app usage, as previously told.
    they work on deploy of small applications,
    but, when I try to build a big IPA file either for an ad-hoc distribution, either for an debug on device, after some minutes long waiting, I get a Java stuck, with this trace:
    Error occurred while packaging the application:
    Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.util.HashMap.addEntry(HashMap.java:753)
        at java.util.HashMap.put(HashMap.java:385)
        at java.util.HashSet.add(HashSet.java:200)
        at adobe.abc.Algorithms.addUses(Algorithms.java:165)
        at adobe.abc.Algorithms.findUses(Algorithms.java:187)
        at adobe.abc.GlobalOptimizer.sccp(GlobalOptimizer.java:4731)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:3615)
        at adobe.abc.GlobalOptimizer.optimize(GlobalOptimizer.java:2309)
        at adobe.abc.LLVMEmitter.optimizeABCs(LLVMEmitter.java:532)
        at adobe.abc.LLVMEmitter.generateBitcode(LLVMEmitter.java:341)
        at com.adobe.air.ipa.AOTCompiler.convertAbcToLlvmBitcodeImpl(AOTCompiler .java:599)
        at com.adobe.air.ipa.BitcodeGenerator.main(BitcodeGenerator.java:104)
    I've tried to change the Java settings on FB's eclipse.ini in MacOS folder,
    -vmargs
    -Xms(various settings up to)1024m
    -Xmx(various settings up to)1024m
    -XX:MaxPermSize=(various settings up to)512m
    -XX:PermSize=(various settings up to)256m
    but results are the same.
    Now settings are back as recommended:
    -vmargs
    -Xms256m
    -Xmx512m
    -XX:MaxPermSize=256m
    -XX:PermSize=64m
    I've changed the Flex build.properties
    jvm.args = ${local.d32} -Xms64m -Xmx1024m -ea -Dapple.awt.UIElement=true
    with no results; now I'n get back to the standard:
    jvm.args = ${local.d32} -Xms64m -Xmx384m -ea -Dapple.awt.UIElement=true
    and now I truely have no more ideas;
    could anyone give an help?
    many thanks in advance.

    I solved this. It turns out the app icons were corrupt. After removing them and replacing them with new files this error went away.

  • On starting WebLogic getting Error : Listening for transport dt_socket at address: 8453 Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m

    Hi,
    system i am using for Oracle SOA is :
    Windows 64 Bit
    i5 Processor
    6 GB RAM
    29 GB on C Drive is already free after installation of all SOA related products.
    I have installed wlserver_10.3 for SOA 11g Development purpose and followed exact installation sequence and procedure as mention in oracle documentation
    i created domain also and every thing look correct but after installation procedure there are "Additional actions required just after every thing installed" :
    setting memory limit
    starting weblogic server (Admin Server)
    starting weblogic managed server
    and so on
    now Problem is when i execute C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin startWebLogic.cmd
    as mention in oracle documentation i am getting following error message : (i have only included last error lines instead of complete console log)
    oConsole= -Dweblogic.ext.dirs=C:\Oracle\MIDDLE~1\patch_wls1036\profiles\default\
    sysext_manifest_classpath;C:\Oracle\MIDDLE~1\patch_oepe180\profiles\default\syse
    xt_manifest_classpath;C:\Oracle\MIDDLE~1\patch_ocp371\profiles\default\sysext_ma
    nifest_classpath;C:\Oracle\MIDDLE~1\patch_adfr1111\profiles\default\sysext_manif
    est_classpath  weblogic.Server
    Listening for transport dt_socket at address: 8453
    Exception in thread "main" java.lang.NoClassDefFoundError: vXmx512m
    Caused by: java.lang.ClassNotFoundException: vXmx512m
            at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
            at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    Could not find the main class: ++Xmx512m.  Program will exit.
    Now to resolve this what i already tried are :
    I change JAVA_HOME and PATH to jdk6 which came with web logic installer
    Location is at :
    JAVA_HOME : C:\Oracle\Middleware\jdk160_29
    PATH : C:\Oracle\Middleware\jdk160_29\bin
    The above dose not include any space between path
    I ran the startWebLogic.cmd and got same error
    After that I also added
    CLASSPATH : C:\Oracle\Middleware\jdk160_29\lib\tool.jar;C:\Oracle\Middleware\wlserver_10.3\server\lib\weblogic.jar;C:\Oracle\Middleware\jdk160_29\bin
    WL_HOME:  C:\Oracle\Middleware\wlserver_10.3
    I ran the startWebLogic.cmd and got same error
    I also used earlier path which I used with eclipse when I was working on other java development.
    JAVA_HOME : C:\Program Files\Java\jdk1.7.0_21
    PATH : C:\Program Files\Java\jdk1.7.0_21\bin
    I ran the startWebLogic.cmd and got same error
    Then I also gave PATH: C:\Oracle\Middleware\wlserver_10.3\server\lib      (including the existing one using ; )
    I ran the startWebLogic.cmd and got same error
    Now may be there is a file called setSOADomainEnv.cmd in
    < C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\ setSOADomainEnv.cmd>
    That include some values for memory set :
    set JAVA_OPTIONS=%JAVA_OPTIONS%
    set DEFAULT_MEM_ARGS=-Xms512m –Xmx512m
    set PORT_MEM_ARGS=-Xms512m –Xmx768m
    if "%JAVA_VENDOR%" == "Oracle" goto OracleJVM
    set DEFAULT_MEM_ARGS=%DEFAULT_MEM_ARGS% -XX:PermSize=128m -XX:MaxPermSize=768m
    set PORT_MEM_ARGS=%PORT_MEM_ARGS% -XX:PermSize=256m -XX:MaxPermSize=768m
    now as I change the red highlighted value to 512 value because I have less memory resource and I checked in installation documentation to change the above red highlighted value to 512 original is 1024 which is too high and it was crating problem and showing memory space problem so I change it to 512 and now I am not getting that memory space problem error but may be the above error is related with change value in setSOADomainEnv.cmd file or not
    Following are my domain, weblogic and soa home directory path and all these path are exactly what it suppose to be according to Oracle Installation Documentation:
    WebLogic :
    C:\Oracle\Middleware\wlserver_10.3
    C:\Oracle\Middleware\coherence_3.7
    C:\Oracle\Middleware\oepe_11.1.1.8.0
    SOA Oracle Home Directory :
    C:\Oracle\Middleware\Oracle_SOA1
    OSB Home Location :
    C:\Oracle\Middleware\Oracle_OSB1
    Domain name : soa_div_domain
    Domain Location :       C:\Oracle\Middleware\user_projects\domains
    Application Location :  C:\Oracle\Middleware\user_projects\applications
    Domain Location:        C:\Oracle\Middleware\user_projects\domains\soa_div_domain
    form here i am trying to start weblogic : C:\Oracle\Middleware\user_projects\domains\soa_div_domain\bin\startWebLogic.cmd
    Please tell me any body want more details.
    Thanks.

    I think you are missing a character '-'
    USER_MEM_ARGS="Xms512m -Xmx512m -XX:MaxPermSize=128m"Add this character like follows
    "-Xms512m -Xmx512m -XX:MaxPermSize=128m"

Maybe you are looking for

  • Application Scaling Issue

    Hi all,           Application is getting scaled based on the width and height of div file. But components are not getting scaled. It was working in flex3. When i moved the project from Flex3 to Flex4 with same mxml code it is not working. Please anyb

  • Mac mouse wheel & trackpad--not scrolling in flash fields

    In several (probably all) Flash apps, scrollable fields do not respond to my mousewheel or trackpad scrolls. Thoughts? Running current Snow Leopard, and Flash 10.0.45.2. Thanks!

  • Unsupported Video Signal

    Have a 47TL515 3D tv.  Plugged in a VHS player and it shows the picture fine, but there is an error message on the bottom in a big grey box that reads "Unsupported Video Signal".  How do I get rid of the box?  It won't go away.

  • Help fixing design flaw

    I have coded my self into somewhat of a corner. I am creating a GUI that has multiple panels, each handling its own events. The problem is that I am not sure how to properly design it so that each panel can return events back to the main class that h

  • PS CS6 does not recognize my EOS Mark III

    It is no problem to use the lens correction in PS CS6 with my EOS 7D and the 24-105 IS L lens. Using my new EOS Mark III with the same lens, Photoshop does not recognize the lens. And in the dropdown menu, where you can normally choose the camera typ