Java server program on Linux problem

Ok, i've written a simple java server using java.nio and have tested it on my windows machine. Then people can connect and it works as it should.
However, when i run the server on my linux box it starts as it should, but no users can connect to it. Its like the connections never come through to the java program... What can cause this? Some firewall stuff etc?
I've tested running a server written in C on the same port (both the java and the c server uses TCP) and then people can connect to it without any problems.
So it seems to be some security thing in java, or in linux in connection with java programs.
Anyone can enlight me on how to get the java server to work?
Best wishes

What version of the JDK are you using, and which linux kernel?
From the Java Bug Database:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5056395
Synopsis        nio does not seem to work with Linux kernel 2.6.4 (and probably above)
Category      java:classes_nio
Reported Against      1.4.2_04
Release Fixed      1.5(tiger-rc)� {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Making a Java Server program talk with Word97

    Hi
    I realise that this is slightly off topic but I am now getting desperate, and would appreciate some help.
    I need help with how to get some info transfered from a java server
    program that is listening on a given port into my Word97.
    The idea is for the Word to send a request to the server and get a
    simple short text response back.
    I can handle the Java side of things OK, just how do I get word VBA to
    send a request to a given URL and get a response back. Word can get
    web pages so I would guess it should be able to do this. I have looked
    for other ways to do this transfer (eg CORBA) and so far no joy.
    thanks
    Efran

    HI
    Yes I did try a few of the vbs forums first since as you say they are more appropiate, but zero response!
    And now the deadline looms and still no solution, All I need to do is make Word and a Java programme communicate. Either with the Java as a Server or even a simple RTF copy and paste from Java to Word. But the problem with the one is when I paste it pastes as simple text. I have read the java tutorials on RTF and cpy/paste and the code given pastes as std text not RTF.
    Any help would be appreciated
    & thanks for the help
    cya

  • SAP EP Java vmware trial on Linux problem

    Hello,
    This is my first post in the community so kindly inform me if there are some rules that i need to follow. Now getting to my problem.
    I downloaded SAP Java trial vmware on suse linux. I extracted every this in one folder and ie all java trial rar and suse linux rars. When i start the virtual machine it starts and i press alt+f2 to see back ground processes.
    After starting central instance and SCS it just keeps on showing various processes screen with port number 4076 in the last. And after sometime a blank screen with a underscore is present without any data on the screen.
    But when i tried ABAP + Java trial version it started and worked fine. But i want only EP to practice.
    My laptop  is AMD core 2 duo with 2 gb ram.
    If i have provided less info or you want to know some other details kindly post. Any kind of guidance is very valuable to me.
    Regards,
    Elnino

    Hi Raghu,
    Actually i am not even getting the login screen of Linux where i have to login using root. So i am unable to check anything.
    Basically all instances gets started when i see the details using alt+f2 but after that it just shows several processes in list format and others and does not move forward.
    I would post screen shot if possible.
    Thanks for the suggestion and please continue your help.
    Regards,
    Elnino

  • Java Program destroys Linux Server Display or Server logs out Automatically

    hi,
    i am facing problem when my servlet program is running.
    my servlet starts a process at server which is a simple java program which publishes PDF,
    XML, RTF files and lates long to run for about 45 minutes.
    i give a call to a shell file on the server (Red Hat Linux 9.0) which in turns calls a java
    program that runs on gnome-terminal.
    i have started Tomcat from SSh for that i have exported DISPLAY (Environment variable) from
    .bash_profile. i need to do this because i need graphics environment (X11 Windows) for jfor
    which is used print jpeg images in PDF and RTF reports.
    PROBLEM
    Some time my server display gets destroyed or the server gets Logout automatically, when my
    process is running.
    following is sode to start a gnome-terminal
    strCommand="gnome-terminal -x /root/PWAppSh/StartPartialRunOff.sh PartialRunOffApp "+
    strpubType + " "  +  strGroupNumber +" "+ id + " " + Cur_Time+" "+ strPubDate +" "+
    strFromDate +" "+ strToDate ;
    p = rt.getRuntime().exec(strCommand);
    BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(strRootPath
    + "/pw/WEB-INF/classes/pid.txt")));
                             pid= "";
                             while((pid = br.readLine()) != null)
                                  getPid=pid;
                             ses.setAttribute("process",getPid);
                             ses.setAttribute("RunType",strrunType);
                             System.out.println("#Get Process ID:"+getPid);
                             FileOutputStream fos = new
    FileOutputStream(strRootPath+"/pw/System/Mgmt/Sessions/RunoffOutput.txt");
                             Stdout_Stderr errorGobbler = new
                                  Stdout_Stderr(p.getErrorStream(), "ERROR");
                             // any output?
                             Stdout_Stderr outputGobbler = new
                                  Stdout_Stderr(p.getInputStream(), "OUTPUT",
    fos);
                             // kick them off
                             errorGobbler.start();
                             outputGobbler.start();
                             // any error???
                             int exitVal = p.waitFor();
                             System.out.println("StartRunoff ExitValue: " +
    exitVal);shell script that get executed from servlet is as followes
    cd /
    cd /share/Tomcat-4/jakarta-tomcat-4.1.31/webapps/pw/WEB-INF/classes
         echo $$ > pid.txt
         echo "Path: `pwd`"
         echo "Process ID:" $$
         chmod 777 pid.txt
         echo Redirecting ProcessID
         echo "Current shell : " $SHELL   
         export
    PATH=$PATH:$HOME/bin:/usr/java/j2sdk1.4.2_08/bin:/usr/java/j2sdk1.4.2_08/lib:.:/share/amol/l
    ib/.:
         export
    CLASSPATH=.:/share/amol/lib/activation-1.0.1.jar:/share/amol/lib/ant.jar:/share/amol/lib/ava
    lon-framework-cvs-20020806.jar:/share/amol/lib/batik.jar:/share/amol/lib/fop.jar:/share/amol
    /lib/jfor-0.7.2rc1.jar:/share/amol/lib/xalan-2.4.1.jar:/share/amol/lib/mail-1.2.jar:/share/a
    mol/lib/xerces-1.2.3.jar:/share/amol/lib/jimi-1.0.jar:/share/amol/lib/logkit-1.0.1.jar:/shar
    e/amol/lib/firebirdsql-full.jar:/share/amol/lib/xercesImpl-2.2.1.jar
         exec java -server -Xmx256m -Xoss200M PW/Runoff/$1 $2 $3 $4 $5 $6 $7setting that i have done in .bash_profile file
    DISPLAY=$HOST:0
    export DISPLAY HOSTcan any one suggest or any solution to problem why my linux server Logsout ar display gets
    destroyed when my Program is runnig on Gnome terminal.
    kindly help me,
    Thanks in advance for ur most important suggestion or solution.

    Sounds a lot like a bug in some of the native libraries you use (or even in AWT). Try looking into your log files (especially for X and for your tomcat) to find out if any error messages are printed.
    Additionally there are X servers out there that don't need any concrete display hardware to run (Xvfb comes to my mind, but IIRC there are more modern alternatives available). Usign that might or might not solve your problem, but would be a good idea either way.

  • Java Server crash in Debian Linux

    Debian Linux
    Pentium 4 2.8
    1024 Ram
    java version "1.5.0_09"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_09-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_09-b03, mixed mode)
    The Java Server crash after from Begin or after 1-2 hours
    im user to java server no develope and no have gnosis
    please help me. what is problem? :(
    any solution to fix?
    try to reinstall operator system but same problem
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb777edb2, pid=26766, tid=2384333744
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b03 mixed mode)
    # Problematic frame:
    # V [libjvm.so+0xa2db2]
    # An error report file with more information is saved as hs_err_pid26766.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    hs log file
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGILL (0x4) at pc=0xb770650a, pid=27377, tid=2384006064
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b03 mixed mode)
    # Problematic frame:
    # V [libjvm.so+0x7750a]
    --------------- T H R E A D ---------------
    Current thread (0x080c7fe0): JavaThread "CompilerThread0" daemon [_thread_in_native, id=27382]
    siginfo:si_signo=4, si_errno=0, si_code=2, si_addr=0xb770650a
    Registers:
    EAX=0xb7a1bac8, EBX=0xb7a16aec, ECX=0x080ce380, EDX=0x00000028
    ESP=0x8e18fa50, EBP=0x8e18fb08, ESI=0x08137530, EDI=0x00000027
    EIP=0xb770650a, CR2=0x00000000, EFLAGS=0x00010206
    Top of Stack: (sp=0x8e18fa50)
    0x8e18fa50: 080e165c 080e152c 8e18fa98 08137250
    0x8e18fa60: 8e18fbe0 080e1530 080ce5a0 08136f90
    0x8e18fa70: 08137430 00007ff4 8e18fa98 08137210
    0x8e18fa80: 08137210 0000004b 8e18fae8 b794ab6a
    0x8e18fa90: b7a16aec 08137488 8e18fac8 b77563fd
    0x8e18faa0: 00000004 8e18fab0 00000000 b76ba7ba
    0x8e18fab0: b7a16aec 080ce6b4 8e18fae8 b7a16aec
    0x8e18fac0: 08137488 8e18fbd0 8e18fb08 b7756836
    Instructions: (pc=0xb770650a)
    0xb77064fa: 04 8b 10 42 89 10 8b 83 24 0a 00 00 10 01 08 ff
    0xb770650a: ff ff ff c7 ff ff 00 00 00 00 c7 46 00 83 00 00
    Stack: [0x8e111000,0x8e191000), sp=0x8e18fa50, free space=506k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [libjvm.so+0x7750a]
    V [libjvm.so+0x79c09]
    V [libjvm.so+0x79f4c]
    V [libjvm.so+0x83f49]
    V [libjvm.so+0x84944]
    V [libjvm.so+0x852c2]
    V [libjvm.so+0x6be52]
    V [libjvm.so+0x6c559]
    V [libjvm.so+0x6cc01]
    V [libjvm.so+0x6d0a7]
    V [libjvm.so+0x6dc0b]
    V [libjvm.so+0x109a6e]
    V [libjvm.so+0x1093f3]
    V [libjvm.so+0x2f9da6]
    V [libjvm.so+0x2f43d3]
    V [libjvm.so+0x28bbe8]
    C [libpthread.so.0+0x5ced]
    Current CompileTask:
    HotSpot Client Compiler: 72 b java.util.AbstractCollection.toArray([Ljava/lang/Object;)[Ljava/lang/Object; (75 bytes)
    ---------------  P R O C E S S  ---------------
    Java Threads: ( => current thread )
      0x080c9540 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=27383]
    =>0x080c7fe0 JavaThread "CompilerThread0" daemon [_thread_in_native, id=27382]
    0x080c7100 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=27381]
    0x080bcbc8 JavaThread "Finalizer" daemon [_thread_blocked, id=27380]
    0x080bbf48 JavaThread "Reference Handler" daemon [_thread_blocked, id=27379]
    0x0805c9c8 JavaThread "main" [_thread_in_vm, id=27377]
    Other Threads:
    0x080b9298 VMThread [id=27378]
    0x080ca9e0 WatcherThread [id=27384]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 576K, used 240K [0x8e5c0000, 0x8e660000, 0x90d20000)
    eden space 512K, 44% used [0x8e5c0000, 0x8e5f8970, 0x8e640000)
    from space 64K, 21% used [0x8e650000, 0x8e6537a0, 0x8e660000)
    to space 64K, 0% used [0x8e640000, 0x8e640000, 0x8e650000)
    tenured generation total 1408K, used 431K [0x90d20000, 0x90e80000, 0xae5c0000)
    the space 1408K, 30% used [0x90d20000, 0x90d8bd70, 0x90d8be00, 0x90e80000)
    compacting perm gen total 8192K, used 3677K [0xae5c0000, 0xaedc0000, 0xb25c0000)
    the space 8192K, 44% used [0xae5c0000, 0xae957450, 0xae957600, 0xaedc0000)
    No shared spaces configured.
    Dynamic libraries:
    08048000-08057000 r-xp 00000000 03:02 6521931 /usr/lib/j2se1.4-sun/jre/bin/java
    08057000-08059000 rwxp 0000e000 03:02 6521931 /usr/lib/j2se1.4-sun/jre/bin/java
    08059000-08253000 rwxp 08059000 00:00 0 [heap]
    8d9b7000-8d9c8000 r-xp 00000000 03:02 6537244 /usr/lib/j2se1.4-sun/jre/lib/i386/libnet.so
    8d9c8000-8d9c9000 rwxp 00011000 03:02 6537244 /usr/lib/j2se1.4-sun/jre/lib/i386/libnet.so
    8d9c9000-8dc22000 r-xs 00000000 03:02 7766468 /root/lineage2server160/gameserver/l2j-gameserver.jar
    8dc22000-8dc89000 r-xs 00000000 03:02 7766471 /root/lineage2server160/gameserver/mysql-connector-java-3.1.10-bin.jar
    8dc89000-8dd01000 r-xs 00000000 03:02 7766462 /root/lineage2server160/gameserver/c3p0-0.9.0.4.jar
    8dd01000-8de28000 r-xs 00000000 03:02 7766467 /root/lineage2server160/gameserver/jython.jar
    8de28000-8de6d000 r-xs 00000000 03:02 7766461 /root/lineage2server160/gameserver/bsh-2.0.jar
    8de6d000-8deb4000 r-xs 00000000 03:02 7766466 /root/lineage2server160/gameserver/javolution.jar
    8deb4000-8dedf000 r-xs 00000000 03:02 7766460 /root/lineage2server160/gameserver/bsf.jar
    8dedf000-8deee000 r-xs 00000000 03:02 7766465 /root/lineage2server160/gameserver/ibmaio.jar
    8deee000-8df19000 r-xs 00000000 03:02 6522080 /usr/lib/j2se1.4-sun/jre/lib/ext/sunpkcs11.jar
    8df19000-8df40000 r-xs 00000000 03:02 6521992 /usr/lib/j2se1.4-sun/jre/lib/ext/sunjce_provider.jar
    8df40000-8e004000 r-xs 00000000 03:02 6521991 /usr/lib/j2se1.4-sun/jre/lib/ext/localedata.jar
    8e004000-8e011000 r-xs 00000000 03:02 6521990 /usr/lib/j2se1.4-sun/jre/lib/ext/ldapsec.jar
    8e011000-8e012000 ---p 8e011000 00:00 0
    8e012000-8e091000 rwxp 8e012000 00:00 0
    8e091000-8e094000 ---p 8e091000 00:00 0
    8e094000-8e111000 rwxp 8e094000 00:00 0
    8e111000-8e114000 ---p 8e111000 00:00 0
    8e114000-8e191000 rwxp 8e114000 00:00 0
    8e191000-8e194000 ---p 8e191000 00:00 0
    8e194000-8e211000 rwxp 8e194000 00:00 0
    8e211000-8e214000 ---p 8e211000 00:00 0
    8e214000-8e291000 rwxp 8e214000 00:00 0
    8e291000-8e294000 ---p 8e291000 00:00 0
    8e294000-8e311000 rwxp 8e294000 00:00 0
    8e311000-8e312000 ---p 8e311000 00:00 0
    8e312000-8e396000 rwxp 8e312000 00:00 0
    8e396000-8e3b2000 rwxp 8e396000 00:00 0
    8e3b2000-8e3b3000 rwxp 8e3b2000 00:00 0
    8e3b3000-8e49f000 rwxp 8e3b3000 00:00 0
    8e49f000-8e4a0000 rwxp 8e49f000 00:00 0
    8e4a0000-8e4b2000 rwxp 8e4a0000 00:00 0
    8e4b2000-8e4b4000 rwxp 8e4b2000 00:00 0
    8e4b4000-8e59f000 rwxp 8e4b4000 00:00 0
    8e59f000-8e5a3000 rwxp 8e59f000 00:00 0
    8e5a3000-8e5bf000 rwxp 8e5a3000 00:00 0
    8e5bf000-8e660000 rwxp 8e5bf000 00:00 0
    8e660000-90d20000 rwxp 8e660000 00:00 0
    90d20000-90e80000 rwxp 90d20000 00:00 0
    90e80000-ae5c0000 rwxp 90e80000 00:00 0
    ae5c0000-aedc0000 rwxp ae5c0000 00:00 0
    aedc0000-b25c0000 rwxp aedc0000 00:00 0
    b25c0000-b25c6000 r-xp 00000000 03:02 6537245 /usr/lib/j2se1.4-sun/jre/lib/i386/libnio.so
    b25c6000-b25c7000 rwxp 00005000 03:02 6537245 /usr/lib/j2se1.4-sun/jre/lib/i386/libnio.so
    b25c7000-b25ca000 rwxp b25c7000 00:00 0
    b25ca000-b2647000 rwxp b25ca000 00:00 0
    b2647000-b26ef000 rwxp b2647000 00:00 0
    b26ef000-b4647000 rwxp b26ef000 00:00 0
    b4647000-b4eb7000 r-xs 00000000 03:02 6521980 /usr/lib/j2se1.4-sun/jre/lib/charsets.jar
    b4eb7000-b4ecc000 r-xs 00000000 03:02 6522045 /usr/lib/j2se1.4-sun/jre/lib/jce.jar
    b4ecc000-b4f51000 r-xs 00000000 03:02 6522046 /usr/lib/j2se1.4-sun/jre/lib/jsse.jar
    b4f51000-b4f67000 r-xs 00000000 03:02 6522054 /usr/lib/j2se1.4-sun/jre/lib/sunrsasign.jar
    b4f67000-b4fd0000 rwxp b4f67000 00:00 0
    b4fd0000-b75e6000 r-xs 00000000 03:02 6522053 /usr/lib/j2se1.4-sun/jre/lib/rt.jar
    b75e6000-b75f5000 r-xp 00000000 03:02 6537248 /usr/lib/j2se1.4-sun/jre/lib/i386/libzip.so
    b75f5000-b75f7000 rwxp 0000e000 03:02 6537248 /usr/lib/j2se1.4-sun/jre/lib/i386/libzip.so
    b75f7000-b7618000 r-xp 00000000 03:02 6537233 /usr/lib/j2se1.4-sun/jre/lib/i386/libjava.so
    b7618000-b761a000 rwxp 00020000 03:02 6537233 /usr/lib/j2se1.4-sun/jre/lib/i386/libjava.so
    b761a000-b7625000 r-xp 00000000 03:02 6537247 /usr/lib/j2se1.4-sun/jre/lib/i386/libverify.so
    b7625000-b7626000 rwxp 0000b000 03:02 6537247 /usr/lib/j2se1.4-sun/jre/lib/i386/libverify.so
    b7626000-b7630000 r-xp 00000000 03:02 6980699 /lib/tls/libnss_files-2.3.6.so
    b7630000-b7632000 rwxp 00009000 03:02 6980699 /lib/tls/libnss_files-2.3.6.so
    b7632000-b763a000 r-xp 00000000 03:02 6980703 /lib/tls/libnss_nis-2.3.6.so
    b763a000-b763c000 rwxp 00008000 03:02 6980703 /lib/tls/libnss_nis-2.3.6.so
    b763c000-b7643000 r-xp 00000000 03:02 6980695 /lib/tls/libnss_compat-2.3.6.so
    b7643000-b7645000 rwxp 00006000 03:02 6980695 /lib/tls/libnss_compat-2.3.6.so
    b7645000-b7657000 r-xp 00000000 03:02 6980693 /lib/tls/libnsl-2.3.6.so
    b7657000-b7659000 rwxp 00012000 03:02 6980693 /lib/tls/libnsl-2.3.6.so
    b7659000-b765b000 rwxp b7659000 00:00 0
    b7661000-b7669000 rwxs 00000000 03:02 8552508 /tmp/hsperfdata_root/27377
    b7669000-b768d000 r-xp 00000000 03:02 6980690 /lib/tls/libm-2.3.6.so
    b768d000-b768f000 rwxp 00023000 03:02 6980690 /lib/tls/libm-2.3.6.so
    b768f000-b79fb000 r-xp 00000000 03:02 6537222 /usr/lib/j2se1.4-sun/jre/lib/i386/client/libjvm.so
    b79fb000-b7a1a000 rwxp 0036b000 03:02 6537222 /usr/lib/j2se1.4-sun/jre/lib/i386/client/libjvm.so
    b7a1a000-b7e31000 rwxp b7a1a000 00:00 0
    b7e31000-b7f5f000 r-xp 00000000 03:02 6980682 /lib/tls/libc-2.3.6.so
    b7f5f000-b7f64000 r-xp 0012e000 03:02 6980682 /lib/tls/libc-2.3.6.so
    b7f64000-b7f67000 rwxp 00133000 03:02 6980682 /lib/tls/libc-2.3.6.so
    b7f67000-b7f69000 rwxp b7f67000 00:00 0
    b7f69000-b7f6b000 r-xp 00000000 03:02 6980688 /lib/tls/libdl-2.3.6.so
    b7f6b000-b7f6d000 rwxp 00001000 03:02 6980688 /lib/tls/libdl-2.3.6.so
    b7f6d000-b7f6e000 rwxp b7f6d000 00:00 0
    b7f6e000-b7f7c000 r-xp 00000000 03:02 6980708 /lib/tls/libpthread-2.3.6.so
    b7f7c000-b7f7e000 rwxp 0000d000 03:02 6980708 /lib/tls/libpthread-2.3.6.so
    b7f7e000-b7f80000 rwxp b7f7e000 00:00 0
    b7f83000-b7f85000 r-xs 00000000 03:02 6521989 /usr/lib/j2se1.4-sun/jre/lib/ext/dnsns.jar
    b7f85000-b7f8b000 r-xp 00000000 03:02 6537250 /usr/lib/j2se1.4-sun/jre/lib/i386/native_threads/libhpi.so
    b7f8b000-b7f8c000 rwxp 00006000 03:02 6537250 /usr/lib/j2se1.4-sun/jre/lib/i386/native_threads/libhpi.so
    b7f8c000-b7f8d000 rwxp b7f8c000 00:00 0
    b7f8d000-b7f8e000 r-xp b7f8d000 00:00 0
    b7f8e000-b7f90000 rwxp b7f8e000 00:00 0
    b7f90000-b7fa5000 r-xp 00000000 03:02 6964464 /lib/ld-2.3.6.so
    b7fa5000-b7fa7000 rwxp 00015000 03:02 6964464 /lib/ld-2.3.6.so
    bf6c3000-bf6c6000 ---p bf6c3000 00:00 0
    bf6c6000-bf8c3000 rwxp bf6c6000 00:00 0 [stack]
    ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
    VM Arguments:
    jvm_args: -Xmx512m
    java_command: net.sf.l2j.gameserver.GameServer
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games
    LD_LIBRARY_PATH=/usr/lib/j2se1.4-sun/jre/lib/i386/client:/usr/lib/j2se1.4-sun/jre/lib/i386:/usr/lib/j2se1.4-sun/jre/../lib/i386
    SHELL=/bin/bash
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x325bd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGBUS: [libjvm.so+0x325bd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGFPE: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGPIPE: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x28c460], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGINT: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGQUIT: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGTERM: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    --------------- S Y S T E M ---------------
    OS:testing/unstable
    uname:Linux 2.6.17 #4 SMP PREEMPT Wed May 10 13:53:45 CEST 2006 i686
    libc:glibc 2.3.6 NPTL 2.3.6
    rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
    load average:0.00 0.11 0.08
    CPU:total 1 (cores per cpu 1, threads per core 1) family 15 model 2 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 1003220k(219224k free), swap 2096440k(2096360k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_09-b03) for linux-x86, built on Oct 12 2006 10:54:08 by java_re with gcc 3.2.1-7a (J2SE release)
    Message was edited by:
    PantelisKap

    # An unexpected error has been detected by HotSpot Virtual Machine:
    # SIGSEGV (0xb) at pc=0xb279fb2c, pid=16446, tid=3084670656
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b03 mixed mode, sharing)
    # Problematic frame:
    # J net.sf.l2j.gameserver.skills.DocumentSkill.parseSkill(Lorg/w3c/dom/Node;)V
    --------------- T H R E A D ---------------
    Current thread (0x0805c9c8): JavaThread "main" [_thread_in_Java, id=16446]
    siginfo:si_signo=11, si_errno=0, si_code=1, si_addr=0x004f964e
    Registers:
    EAX=0x6cae9ef8, EBX=0x00000000, ECX=0xfffffffc, EDX=0x8cdbc580
    ESP=0xbf871400, EBP=0xbf871498, ESI=0x0036574e, EDI=0x00000000
    EIP=0xb279fb2c, CR2=0x004f964e, EFLAGS=0x00010207
    Top of Stack: (sp=0xbf871400)
    0xbf871400: 00000000 8cdbc568 6cae9cf8 ffffffff
    0xbf871410: 708cb1d8 b76df649 8ca83a58 00000002
    0xbf871420: 00000000 00000023 bf871478 b26b3084
    0xbf871430: 00000023 b278513f 6cae61b0 708cfb00
    0xbf871440: 708ca048 bf871458 6cae9da8 b27936fa
    0xbf871450: 00000073 00000023 00000023 00000d41
    0xbf871460: ffffffff 8cdbc568 6cae9cf8 ffffffff
    0xbf871470: 00000000 708cb1d8 bf871498 00000001
    Instructions: (pc=0xb279fb2c)
    0xb279fb1c: 4f 0f 85 f1 ff ff ff 8b 75 b0 89 46 10 c1 ee 09
    0xb279fb2c: c6 86 00 3f 0e b2 00 8b 75 0c 8b 76 10 89 75 b0
    Stack: [0xbf675000,0xbf875000), sp=0xbf871400, free space=2033k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    J net.sf.l2j.gameserver.skills.DocumentSkill.parseSkill(Lorg/w3c/dom/Node;)V
    J net.sf.l2j.gameserver.skills.DocumentSkill.parseDocument(Lorg/w3c/dom/Document;)V
    j net.sf.l2j.gameserver.skills.DocumentBase.parse()Lorg/w3c/dom/Document;+66
    j net.sf.l2j.gameserver.skills.SkillsEngine.loadSkills(Ljava/io/File;)Ljava/util/List;+44
    j net.sf.l2j.gameserver.skills.SkillsEngine.loadAllSkills(Ljava/util/Map;)V+35
    j net.sf.l2j.gameserver.SkillTable.<init>()V+27
    j net.sf.l2j.gameserver.SkillTable.getInstance()Lnet/sf/l2j/gameserver/SkillTable;+10
    j net.sf.l2j.gameserver.skills.DocumentBase.attachSkill(Lorg/w3c/dom/Node;Ljava/lang/Object;Lnet/sf/l2j/gameserver/skills/Condition;)V+86
    J net.sf.l2j.gameserver.skills.DocumentBase.parseTemplate(Lorg/w3c/dom/Node;Ljava/lang/Object;)V
    J net.sf.l2j.gameserver.skills.DocumentItem.parseItem(Lorg/w3c/dom/Node;)V
    J net.sf.l2j.gameserver.skills.DocumentItem.parseDocument(Lorg/w3c/dom/Document;)V
    j net.sf.l2j.gameserver.skills.DocumentBase.parse()Lorg/w3c/dom/Document;+66
    j net.sf.l2j.gameserver.skills.SkillsEngine.loadData(Ljava/util/Map;Ljava/util/List;)Ljava/util/List;+52
    j net.sf.l2j.gameserver.skills.SkillsEngine.loadWeapons(Ljava/util/Map;)Ljava/util/List;+14
    J net.sf.l2j.gameserver.ItemTable.<init>()V
    v ~OSRAdapter
    j net.sf.l2j.gameserver.ItemTable.getInstance()Lnet/sf/l2j/gameserver/ItemTable;+10
    j net.sf.l2j.gameserver.GameServer.<init>()V+213
    j net.sf.l2j.gameserver.GameServer.main([Ljava/lang/String;)V+70
    v ~StubRoutines::call_stub
    V [libjvm.so+0x17a75c]
    V [libjvm.so+0x28afd8]
    V [libjvm.so+0x17a58f]
    V [libjvm.so+0x1a4e32]
    V [libjvm.so+0x196042]
    C [java+0x1873]
    C [libc.so.6+0x14ea8] __libc_start_main+0xc8
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    0x083d9568 JavaThread "GerenalSTPool-3" [_thread_blocked, id=16463]
    0x083d99b0 JavaThread "GerenalSTPool-2" [_thread_blocked, id=16462]
    0x083a6738 JavaThread "GameTimeController" daemon [_thread_blocked, id=16461]
    0x082574d0 JavaThread "GerenalSTPool-1" [_thread_blocked, id=16460]
    0x08235a18 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#2" daemon [_thread_blocked, id=16458]
    0x0822c690 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1" daemon [_thread_blocked, id=16457]
    0x0822bd18 JavaThread "com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0" daemon [_thread_blocked, id=16456]
    0x0822b570 JavaThread "Timer-0" daemon [_thread_blocked, id=16454]
    0x080a53f0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=16452]
    0x080a3e90 JavaThread "CompilerThread0" daemon [_thread_blocked, id=16451]
    0x080a2db0 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=16450]
    0x0809cb30 JavaThread "Finalizer" daemon [_thread_blocked, id=16449]
    0x0809be40 JavaThread "Reference Handler" daemon [_thread_blocked, id=16448]
    =>0x0805c9c8 JavaThread "main" [_thread_in_Java, id=16446]
    Other Threads:
    0x080992e0 VMThread [id=16447]
    0x080a6890 WatcherThread [id=16453]
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 3072K, used 840K [0x6ca20000, 0x6cd70000, 0x6f180000)
    eden space 2752K, 30% used [0x6ca20000, 0x6caf23b0, 0x6ccd0000)
    from space 320K, 0% used [0x6cd20000, 0x6cd20000, 0x6cd70000)
    to space 320K, 0% used [0x6ccd0000, 0x6ccd0000, 0x6cd20000)
    tenured generation total 40172K, used 31252K [0x6f180000, 0x718bb000, 0x8ca20000)
    the space 40172K, 77% used [0x6f180000, 0x710051d8, 0x71005200, 0x718bb000)
    compacting perm gen total 8192K, used 4319K [0x8ca20000, 0x8d220000, 0x90a20000)
    the space 8192K, 52% used [0x8ca20000, 0x8ce57d68, 0x8ce57e00, 0x8d220000)
    ro space 8192K, 68% used [0x90a20000, 0x90f9ed48, 0x90f9ee00, 0x91220000)
    rw space 12288K, 48% used [0x91220000, 0x917e9e68, 0x917ea000, 0x91e20000)
    Dynamic libraries:
    08048000-08057000 r-xp 00000000 03:02 6996556 /usr/lib/j2sdk1.5-sun/bin/java
    08057000-08059000 rwxp 0000e000 03:02 6996556 /usr/lib/j2sdk1.5-sun/bin/java
    08059000-084e8000 rwxp 08059000 00:00 0 [heap]
    6ca20000-6cd70000 rwxp 6ca20000 00:00 0
    6cd70000-6f180000 rwxp 6cd70000 00:00 0
    6f180000-718bb000 rwxp 6f180000 00:00 0
    718bb000-8ca20000 rwxp 718bb000 00:00 0
    8ca20000-8d220000 rwxp 8ca20000 00:00 0
    8d220000-90a20000 rwxp 8d220000 00:00 0
    90a20000-90f9f000 r-xs 00001000 03:02 6980776 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/classes.jsa
    90f9f000-91220000 rwxp 90f9f000 00:00 0
    91220000-917ea000 rwxp 00580000 03:02 6980776 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/classes.jsa
    917ea000-91e20000 rwxp 917ea000 00:00 0
    91e20000-91ef0000 rwxp 00b4a000 03:02 6980776 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/classes.jsa
    91ef0000-92220000 rwxp 91ef0000 00:00 0
    92220000-92224000 r-xs 00c1a000 03:02 6980776 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/classes.jsa
    92224000-92620000 rwxp 92224000 00:00 0
    b1560000-b1563000 ---p b1560000 00:00 0
    b1563000-b15e0000 rwxp b1563000 00:00 0
    b15e0000-b15e3000 ---p b15e0000 00:00 0
    b15e3000-b1660000 rwxp b15e3000 00:00 0
    b1660000-b1663000 ---p b1660000 00:00 0
    b1663000-b16e0000 rwxp b1663000 00:00 0
    b16e0000-b16e3000 ---p b16e0000 00:00 0
    b16e3000-b1760000 rwxp b16e3000 00:00 0
    b1760000-b1763000 ---p b1760000 00:00 0
    b1763000-b17e0000 rwxp b1763000 00:00 0
    b17e0000-b17e3000 ---p b17e0000 00:00 0
    b17e3000-b1860000 rwxp b17e3000 00:00 0
    b1860000-b1863000 ---p b1860000 00:00 0
    b1863000-b18e0000 rwxp b1863000 00:00 0
    b18e0000-b18e3000 ---p b18e0000 00:00 0
    b18e3000-b1960000 rwxp b18e3000 00:00 0
    b1960000-b1966000 r-xp 00000000 03:02 6980787 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libnio.so
    b1966000-b1967000 rwxp 00005000 03:02 6980787 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libnio.so
    b1967000-b1978000 r-xp 00000000 03:02 6980786 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libnet.so
    b1978000-b1979000 rwxp 00011000 03:02 6980786 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libnet.so
    b1979000-b1bd2000 r-xs 00000000 03:02 7766468 /root/lineage2server160/gameserver/l2j-gameserver.jar
    b1bd2000-b1c39000 r-xs 00000000 03:02 7766471 /root/lineage2server160/gameserver/mysql-connector-java-3.1.10-bin.jar
    b1c39000-b1cb1000 r-xs 00000000 03:02 7766462 /root/lineage2server160/gameserver/c3p0-0.9.0.4.jar
    b1cb1000-b1dd8000 r-xs 00000000 03:02 7766467 /root/lineage2server160/gameserver/jython.jar
    b1dd8000-b1e1d000 r-xs 00000000 03:02 7766461 /root/lineage2server160/gameserver/bsh-2.0.jar
    b1e1d000-b1e64000 r-xs 00000000 03:02 7766466 /root/lineage2server160/gameserver/javolution.jar
    b1e64000-b1e8f000 r-xs 00000000 03:02 7766460 /root/lineage2server160/gameserver/bsf.jar
    b1e8f000-b1e9e000 r-xs 00000000 03:02 7766465 /root/lineage2server160/gameserver/ibmaio.jar
    b1e9e000-b1f62000 r-xs 00000000 03:02 6995979 /usr/lib/j2sdk1.5-sun/jre/lib/ext/localedata.jar
    b1f62000-b1f8d000 r-xs 00000000 03:02 6995977 /usr/lib/j2sdk1.5-sun/jre/lib/ext/sunpkcs11.jar
    b1f8d000-b1fb4000 r-xs 00000000 03:02 6995976 /usr/lib/j2sdk1.5-sun/jre/lib/ext/sunjce_provider.jar
    b1fb4000-b1fb5000 ---p b1fb4000 00:00 0
    b1fb5000-b2034000 rwxp b1fb5000 00:00 0
    b2034000-b2037000 ---p b2034000 00:00 0
    b2037000-b20b4000 rwxp b2037000 00:00 0
    b20b4000-b20b7000 ---p b20b4000 00:00 0
    b20b7000-b2134000 rwxp b20b7000 00:00 0
    b2134000-b2137000 ---p b2134000 00:00 0
    b2137000-b21b4000 rwxp b2137000 00:00 0
    b21b4000-b21b7000 ---p b21b4000 00:00 0
    b21b7000-b2234000 rwxp b21b7000 00:00 0
    b2234000-b2237000 ---p b2234000 00:00 0
    b2237000-b22b4000 rwxp b2237000 00:00 0
    b22b4000-b22b5000 ---p b22b4000 00:00 0
    b22b5000-b2340000 rwxp b22b5000 00:00 0
    b2340000-b235c000 rwxp b2340000 00:00 0
    b235c000-b2370000 rwxp b235c000 00:00 0
    b2370000-b2449000 rwxp b2370000 00:00 0
    b2449000-b244b000 rwxp b2449000 00:00 0
    b244b000-b245c000 rwxp b244b000 00:00 0
    b245c000-b2471000 rwxp b245c000 00:00 0
    b2471000-b2549000 rwxp b2471000 00:00 0
    b2549000-b254d000 rwxp b2549000 00:00 0
    b254d000-b2569000 rwxp b254d000 00:00 0
    b2569000-b257c000 rwxp b2569000 00:00 0
    b257c000-b25f4000 rwxp b257c000 00:00 0
    b25f4000-b27ec000 rwxp b25f4000 00:00 0
    b27ec000-b45f4000 rwxp b27ec000 00:00 0
    b45f4000-b4e64000 r-xs 00000000 03:02 6980848 /usr/lib/j2sdk1.5-sun/jre/lib/charsets.jar
    b4e64000-b4e79000 r-xs 00000000 03:02 6980813 /usr/lib/j2sdk1.5-sun/jre/lib/jce.jar
    b4e79000-b4efe000 r-xs 00000000 03:02 6980846 /usr/lib/j2sdk1.5-sun/jre/lib/jsse.jar
    b4efe000-b4f67000 rwxp b4efe000 00:00 0
    b4f67000-b757d000 r-xs 00000000 03:02 6980850 /usr/lib/j2sdk1.5-sun/jre/lib/rt.jar
    b757d000-b758c000 r-xp 00000000 03:02 6980783 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libzip.so
    b758c000-b758e000 rwxp 0000e000 03:02 6980783 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libzip.so
    b758e000-b75af000 r-xp 00000000 03:02 6980781 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libjava.so
    b75af000-b75b1000 rwxp 00020000 03:02 6980781 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libjava.so
    b75b1000-b75bc000 r-xp 00000000 03:02 6980780 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libverify.so
    b75bc000-b75bd000 rwxp 0000b000 03:02 6980780 /usr/lib/j2sdk1.5-sun/jre/lib/i386/libverify.so
    b75bd000-b75c6000 r-xp 00000000 03:02 6980876 /lib/tls/libnss_files-2.3.6.so
    b75c6000-b75c8000 rwxp 00008000 03:02 6980876 /lib/tls/libnss_files-2.3.6.so
    b75c8000-b75d0000 r-xp 00000000 03:02 6980878 /lib/tls/libnss_nis-2.3.6.so
    b75d0000-b75d2000 rwxp 00007000 03:02 6980878 /lib/tls/libnss_nis-2.3.6.so
    b75d2000-b75d9000 r-xp 00000000 03:02 6980874 /lib/tls/libnss_compat-2.3.6.so
    b75d9000-b75db000 rwxp 00006000 03:02 6980874 /lib/tls/libnss_compat-2.3.6.so
    b75db000-b75ed000 r-xp 00000000 03:02 6980873 /lib/tls/libnsl-2.3.6.so
    b75ed000-b75ef000 rwxp 00011000 03:02 6980873 /lib/tls/libnsl-2.3.6.so
    b75ef000-b75f1000 rwxp b75ef000 00:00 0
    b75f5000-b75f7000 r-xs 00000000 03:02 6995978 /usr/lib/j2sdk1.5-sun/jre/lib/ext/dnsns.jar
    b75f7000-b75ff000 rwxs 00000000 03:02 8552461 /tmp/hsperfdata_root/16446
    b75ff000-b7622000 r-xp 00000000 03:02 6980871 /lib/tls/libm-2.3.6.so
    b7622000-b7624000 rwxp 00022000 03:02 6980871 /lib/tls/libm-2.3.6.so
    b7624000-b7990000 r-xp 00000000 03:02 6980774 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/libjvm.so
    b7990000-b79af000 rwxp 0036b000 03:02 6980774 /usr/lib/j2sdk1.5-sun/jre/lib/i386/client/libjvm.so
    b79af000-b7dc6000 rwxp b79af000 00:00 0
    b7dc6000-b7eee000 r-xp 00000000 03:02 6980867 /lib/tls/libc-2.3.6.so
    b7eee000-b7ef3000 r-xp 00127000 03:02 6980867 /lib/tls/libc-2.3.6.so
    b7ef3000-b7ef5000 rwxp 0012c000 03:02 6980867 /lib/tls/libc-2.3.6.so
    b7ef5000-b7ef8000 rwxp b7ef5000 00:00 0
    b7ef8000-b7efa000 r-xp 00000000 03:02 6980870 /lib/tls/libdl-2.3.6.so
    b7efa000-b7efc000 rwxp 00001000 03:02 6980870 /lib/tls/libdl-2.3.6.so
    b7efc000-b7efd000 rwxp b7efc000 00:00 0
    b7efd000-b7f0b000 r-xp 00000000 03:02 6980864 /lib/tls/libpthread-2.3.6.so
    b7f0b000-b7f0d000 rwxp 0000d000 03:02 6980864 /lib/tls/libpthread-2.3.6.so
    b7f0d000-b7f14000 rwxp b7f0d000 00:00 0
    b7f14000-b7f1a000 r-xp 00000000 03:02 6980769 /usr/lib/j2sdk1.5-sun/jre/lib/i386/native_threads/libhpi.so
    b7f1a000-b7f1b000 rwxp 00006000 03:02 6980769 /usr/lib/j2sdk1.5-sun/jre/lib/i386/native_threads/libhpi.so
    b7f1b000-b7f1c000 rwxp b7f1b000 00:00 0
    b7f1c000-b7f1d000 r-xp b7f1c000 00:00 0
    b7f1d000-b7f1f000 rwxp b7f1d000 00:00 0
    b7f1f000-b7f34000 r-xp 00000000 03:02 6964594 /lib/ld-2.3.6.so
    b7f34000-b7f36000 rwxp 00014000 03:02 6964594 /lib/ld-2.3.6.so
    bf675000-bf678000 ---p bf675000 00:00 0
    bf678000-bf875000 rwxp bf678000 00:00 0 [stack]
    ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]
    VM Arguments:
    jvm_args: -Xmx512m
    java_command: net.sf.l2j.gameserver.GameServer
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games
    LD_LIBRARY_PATH=/usr/lib/j2sdk1.5-sun/jre/lib/i386/client:/usr/lib/j2sdk1.5-sun/jre/lib/i386:/usr/lib/j2sdk1.5-sun/jre/../lib/i386
    SHELL=/bin/bash
    Signal Handlers:
    SIGSEGV: [libjvm.so+0x325bd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGBUS: [libjvm.so+0x325bd0], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGFPE: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGPIPE: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGILL: [libjvm.so+0x28a010], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGUSR1: SIG_DFL, sa_mask[0]=0x00000000, sa_flags=0x00000000
    SIGUSR2: [libjvm.so+0x28c460], sa_mask[0]=0x00000000, sa_flags=0x10000004
    SIGHUP: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGINT: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGQUIT: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    SIGTERM: [libjvm.so+0x28be90], sa_mask[0]=0x7ffbfeff, sa_flags=0x10000004
    --------------- S Y S T E M ---------------
    OS:4.0
    uname:Linux 2.6.17 #4 SMP PREEMPT Wed May 10 13:53:45 CEST 2006 i686
    libc:glibc 2.3.6 NPTL 2.3.6
    rlimit: STACK 8192k, CORE 0k, NPROC infinity, NOFILE 1024, AS infinity
    load average:1.31 0.62 0.38
    CPU:total 1 (cores per cpu 1, threads per core 1) family 15 model 2 stepping 9, cmov, cx8, fxsr, mmx, sse, sse2
    Memory: 4k page, physical 1003220k(251136k free), swap 2096440k(2096396k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_09-b03) for linux-x86, built on Oct 12 2006 10:54:08 by java_re with gcc 3.2.1-7a (J2SE release)

  • Java Server Pages Programming Database Access Error Through Tomcat

    Question# 1
    I am trying to access MYSQL Database through JAVA Server Pages programming using Tomcat Server as web server on win xp.
    Whenever I give following url http://localhost:8080/jspBook/ch1/customers.jsp in web browser , I get followin errors.
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
    org.apache.jsp.ch1.customers_jsp._jspService(org.apache.jsp.ch1.customers_jsp:96)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.15 logs.
    Apache Tomcat/5.5.15
    I am facing this problem since one month. I tried searching on google, but could not get concrete answer. I have configured mysqlconnector to connect to mysql and also configured other things in Tomcat's webapps folder. But I could not overcome this error.
    Please reply urgently. Thankz for the help and time. ?
    <!-- JSP Directives -->
    <%@ page import="java.sql.*" %>
    <%@ page contentType="text/html" %>
    <html>
    <head>
         <title>Insurance Quoting System</title>
    </head>
    <body>
    <basefont face="Arial">
    <!-- JSP Declarations -->
    <%! ResultSet rs = null;%>
    <!-- JSP Scriptlet -->     
    <%
         try {
              Class.forName("org.gjt.mm.mysql.Driver");
              Connection db = DriverManager.getConnection(
    "jdbc:mysql://localhost:3306/quoting");
              Statement s = db.createStatement();
              rs = s.executeQuery("select * from customer");
         catch (Exception e) {
    // For now, just report the error to the system log
         System.out.println(e.toString());
    %>
    <!-- Template text -->
    <table width="550" border="0" align="center">
    <tr>
    <td bgcolor="#006633">
    <div align="center">
              <font size="6" color="#FFFFFF"><b>Insurance Quoting System</b></font>
         </div>
    </td>
    </tr>
    <tr>
    <td>
    <p> </p>
    <p> </p>
    <p align="center"><b>Customers</b></p>
    <table width="290" border="0" align="center">
    <%
         try {
              while (rs.next()) {
    %>
    <!-- JSP Expressions used within template text -->
         <tr>
              <td width="20"><%= rs.getInt(1) %></td>
              <td width="70"><%= rs.getString(2) %></td>
              <td width="70"><%= rs.getString(3) %></td>
              <td width="40">
                   <a href="custMaint.jsp?id=<%= rs.getString(1) %>&action=edit">edit
    </a>
              </td>
              <td width="40">
                   <a href="custMaint.jsp?id=<%= rs.getString(1) %>&action=delete">delete
    </a>
              </td>
              <td width="40">
                   <a href="custMaint.jsp?id=<%= rs.getString(1) %>&action=newQuote">new quote
    </a>
              </td>
         </tr>
    <%
         catch (SQLException e) {
         // For now, just report the error to the system log
         System.out.println(e.toString());
    %>
    </table>
    </td>
    </tr>
    <tr>
         <td>
              <p> </p>
         <p align="center">New Customer</p>
         </td>
    </tr>
    </table>
    </body>
    </html>
    I have tried all possible configurations of classpath with mysqlconnectorj and Tomcat, but i could not find any solution. Plz help urgently. Thankz a lot.

    Your DB connection is probably failing
    As a result your result set "rs" is null when you get to it later on, causing a null pointer exception.
    Do you need to provide a username/password for your database?
    Have you configured your database to allow connections from localhost?
    If you haven't already figured it out, doing SQL programming in a JSP is bad practice. Put your SQL code into a java bean / class where it belongs.

  • HTTP Client/Server program problems

    Hi all,
    I am doing an exercise in which I create a Client and Server program. I send a GET request but nothing seems to happen. There is obviously something I'm missing. Could it be a badly formed request? The code is below. Any help is appreciated.
    Client program.....
    import java.io.*;
    import java.net.*;
    import java.util.StringTokenizer;
    public class HTTPClient{
        String host, path;
        int port;
        public static void main (String argv[]){
         new HTTPClient(argv[0]);
        public HTTPClient(String url){
         try{
             URL myURL = new URL(url);
             host = myURL.getHost();
             port = myURL.getPort();
             System.out.println("Port = " + port);
             if (port == -1) port = 30280;;
             path = myURL.getPath();
             if (path.equals("")) path =  "/";
             Socket s = new Socket(InetAddress.getByName(host), port);
             sendRequest(s.getOutputStream());
             printResponse(s.getInputStream());
             s.close();
         catch(MalformedURLException murl){
             System.out.println("Badly formatted URL " + murl.getMessage());
         catch(IOException e){
             System.out.println("Problem initialising socket " + e.getMessage());
        public void sendRequest(OutputStream out){
              StringBuffer buf = new StringBuffer();
              buf.append("GET /AC095.html HTTP/1.1\r\n");
              buf.append("Host: http://students.odl.qmul.ac.uk\r\n\r\n");
              try{
                   out.write(buf.toString().getBytes("US-ASCII"));
              catch (IOException e) {System.out.println(e.getMessage());
        public void printResponse(InputStream in){
             try{
                  while (in.available() <= 0)
                  Thread.sleep(500);
                  while (in.available() > 0)
                  System.out.print((char) in.read());
                  System.out.println ("");
             catch (IOException e) {
                  System.out.println(e.getMessage());
             catch (InterruptedException ie) {
                  System.out.println("Error waiting for response " + ie.getMessage());
         /* Read in the response from the HTTP server and print it out */
    }Server code......
    import java.io.*;
    import java.net.*;
    import java.util.*;
    public class HTTPServer{
        String version = null;
         public String httpVer;
        public static void main(String argv[]){
         new HTTPServer(Integer.parseInt(argv[0]));
        public HTTPServer(int port){
         boolean listening = true;
         try{
              ServerSocket ss = new ServerSocket(port);
              System.out.println("HTTP Server running and listening for requests...");
              while (listening){
               Socket mySocket = ss.accept();
               InputStream in   = mySocket.getInputStream();
               readHeaders(in);
               String response = getResponse();
               OutputStream out = mySocket.getOutputStream();     
               out.write(response.getBytes("US-ASCII"));
               out.flush();
               mySocket.close();
          catch(Exception e){System.out.println(e.getMessage());}
        private String getResponse(){
             StringBuffer responseBuf = new StringBuffer();
             responseBuf.append (httpVer + " 200 OK\r\n");
             responseBuf.append ("Content-type: text/html\r\n");
             responseBuf.append ("Content-length: 119\r\n");
             responseBuf.append ("<HTML>\r\n");
             responseBuf.append ("<TITLE> My served web document </TITLE>\r\n");
             responseBuf.append ("</HEAD>\r\n");
             responseBuf.append ("<BODY>\r\n");
             responseBuf.append ("<H1> Hello from the server! </H1>\r\n");
             responseBuf.append ("</BODY>\r\n");
             responseBuf.append ("</HTML>\r\n\r\n");
             String responseStr = responseBuf.toString();
             responseStr = responseStr.trim();
         return "";
        private void readHeaders(InputStream in) throws IOException {
         StringBuffer sbuf = new StringBuffer();
         int ch;
         String clientStr;
         //This loop reads in all of the input until there is nothing left to read.
         //All of the characters are appended to the string buffer.
         while ((ch = in.read()) != -1) {
              sbuf.append((char) ch);
         //clientStr will hold string in string buffer without any leading or
         //trailing white space.
         clientStr = sbuf.toString();
         clientStr = clientStr.trim();
         //Split clientStr into substrings and store them in an array.
         String [] tokens = clientStr.split(" ");
         //Obtains HTTP version
         httpVer = tokens [2];
    }Cheers,
    Chris

    I've written out.flush() in the server program. When I attempt to connect to the server it just hangs. I've modified the code locally to request a webpage from elsewhere and it works so it can't be the format of my GET request. I assume that the problem has to be in the Server program. Is it not reading in and understanding the /r/n properly?

  • Problem in server program: HELP!!!!

    I just tried to introduce methods in my server program (TCPServer.java). the methods are
    run_server() : for creating server socket object
    [b[accept() [/b]: for Listening to a connection, made to the socket and accepting it.
    getstreams() : initializing the streams
    b]recieve_n_process() : receiving client input and processing it
    send_response(): sending response back to client.
    But now I am getting runtime exception
    C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>javac TCPServer.java
    C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>java TCPServer
    Exception in thread "main" java.lang.NullPointerException
    at TCPServer.accept(TCPServer.java:19)
    at TCPServer.main(TCPServer.java:58)
    C:\Program Files\j2sdk_nb\j2sdk1.4.2\bin\abc>
    I know I might have made some silly mistake somewhere, please help me to detect it.
    here is my code TCPServer.java
    import java.io.*;
    import java.net.*;
    class TCPServer {
         private ServerSocket welcomeSocket;
         private Socket connectionSocket;
         private ObjectInputStream Client_input;
         private ObjectOutputStream  Client_output;
         private     String clientSentence;
         private String capitalizedSentence;
         private void run_server() throws Exception
          ServerSocket welcomeSocket = new ServerSocket(80);
         private void accept() throws Exception
         {connectionSocket = welcomeSocket.accept(); }
         private void getstreams() throws IOException
         Client_output = new ObjectOutputStream(connectionSocket.getOutputStream());
         Client_output.flush();
             Client_input =  new ObjectInputStream(connectionSocket.getInputStream());
         private void recieve_n_process() throws Exception
         clientSentence = (String ) Client_input.readObject();
         capitalizedSentence = clientSentence.toUpperCase() + '\n';
         private void send_response() throws IOException
         Client_output.writeObject(capitalizedSentence);
      public static void main(String argv[]) throws Exception
         TCPServer server = new TCPServer();
         try{
         server.run_server();
          while(true) {
              server.accept();
                server.getstreams() ;
              server.recieve_n_process();
              server.send_response();
         } catch(EOFException eofException) {}
           catch (IOException ioException) {}     
        }It was working fine before I introduced these methods. Earlier it was like this
    import java.io.*;
    import java.net.*;
    class TCPServer {
      public static void main(String argv[]) throws Exception
          String clientSentence;
          String capitalizedSentence;
          ServerSocket welcomeSocket = new ServerSocket(80);
          while(true) {
                       Socket connectionSocket = welcomeSocket.accept();
               ObjectInputStream inFromClient =  new ObjectInputStream(connectionSocket.getInputStream());
               ObjectOutputStream  outToClient =
                 new ObjectOutputStream(connectionSocket.getOutputStream());
               clientSentence = (String ) inFromClient.readObject();
               capitalizedSentence = clientSentence.toUpperCase() + '\n';
               outToClient.writeObject(capitalizedSentence);

    hello every one,
    i got it where is the problem. I had declared the object of ServerSocket class locally in run_server(). It had to be declared globally though.
    private void run_server() throws Exception
         ServerSocket welcomeSocket = new ServerSocket(80);
    this one works out
    private void run_server() throws Exception
         welcomeSocket = new ServerSocket(80);
         }

  • File transfer, read write through sockets in client server programming java

    Hello All, need help again.
    I am trying to create a Client server program, where, the Client first sends a file to Server, on accepting the file, the server generates another file(probably xml), send it to the client as a response, the client read the response xml, parse it and display some data. now I am successful sending the file to the server, but could not figure out how the server can create and send a xml file and send it to the client as response, please help. below are my codes for client and server
    Client side
    import java.io.BufferedInputStream;
    import java.io.BufferedOutputStream;
    import java.io.BufferedReader;
    import java.io.DataInputStream;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.InetAddress;
    import java.net.Socket;
    import java.net.UnknownHostException;
    public class XMLSocketC
         public static void main(String[] args) throws IOException
              //Establish a connection to socket
              Socket toServer = null;
              String host = "127.0.0.1";     
              int port = 4444;
              try
                   toServer = new Socket(host, port);
                   } catch (UnknownHostException e) {
                System.err.println("Don't know about host: localhost.");
                System.exit(1);
            } catch (IOException e) {
                System.err.println("Couldn't get I/O for the connection to host.");
                System.exit(1);
              //Send file over Socket
            //===========================================================
            BufferedInputStream fileIn = null;
              BufferedOutputStream out = null;
              // File to be send over the socket.
              File file = new File("c:/xampp/htdocs/thesis/sensorList.php");
              // Checking for the file to be sent.
              if (!file.exists())
                   System.out.println("File doesn't exist");
                   System.exit(0);
              try
                   // InputStream to read the file
                   fileIn = new BufferedInputStream(new FileInputStream(file));
              }catch(IOException eee)
                   System.out.println("Problem, kunne ikke lage fil");
              try
                   InetAddress adressen = InetAddress.getByName(host);
                   try
                        System.out.println("Establishing Socket Connection");
                        // Opening Socket
                        Socket s = new Socket(adressen, port);
                        System.out.println("Socket is clear and available.....");
                        // OutputStream to socket
                        out = new BufferedOutputStream(s.getOutputStream());
                        byte[] buffer = new byte[1024];
                        int numRead;
                        //Checking if bytes available to read to the buffer.
                        while( (numRead = fileIn.read(buffer)) >= 0)
                             // Writes bytes to Output Stream from 0 to total number of bytes
                             out.write(buffer, 0, numRead);
                        // Flush - send file
                        out.flush();
                        // close OutputStream
                        out.close();
                        // close InputStrean
                        fileIn.close();
                   }catch (IOException e)
              }catch(UnknownHostException e)
                   System.err.println(e);
            //===========================================================
            //Retrieve data from Socket.
              //BufferedReader in = new BufferedReader(new InputStreamReader(toServer.getInputStream()));
              DataInputStream in = new DataInputStream(new BufferedInputStream(toServer.getInputStream()));
              //String fromServer;
            //Read from the server and prints.
              //Receive text from server
              FileWriter fr = null;
              String frn = "xxx_response.xml";
              try {
                   fr = new FileWriter(frn);
              } catch (IOException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              try{
                   String line = in.readUTF();                    //.readLine();
                   System.out.println("Text received :" + line);
                   fr.write(line);
              } catch (IOException e){
                   System.out.println("Read failed");
                   System.exit(1);
            in.close();
            toServer.close();
    public class XMLSocketS
          public static void main(String[] args) throws IOException
              //Establish a connection to socket
               ServerSocket serverSocket = null;
                 try {
                     serverSocket = new ServerSocket(4444);
                 } catch (IOException e) {
                     System.err.println("Could not listen on port: 4444.");
                     System.exit(1);
              Socket clientLink = null;
              while (true)
                        try
                             clientLink = serverSocket.accept();
                           System.out.println("Server accepts");
                             BufferedInputStream inn = new BufferedInputStream(clientLink.getInputStream());
                             BufferedOutputStream ut = new BufferedOutputStream(new FileOutputStream(new File("c:/xampp/htdocs/received_from_client.txt")));
                             byte[] buff = new byte[1024];
                             int readMe;
                             while( (readMe = inn.read(buff)) >= 0)
                             {     //reads from input stream, writes the file to disk
                                  ut.write(buff, 0, readMe);
                             // close the link to client
                             clientLink.close();                         
                             // close InputStream
                             inn.close();                         
                             // flush
                             ut.flush();                         
                             // close OutputStream
                             ut.close();     
                             //Sending response to client     
                             //============================================================
                             //============================================================
                             System.out.println("File received");
              }catch(IOException ex)
              {System.out.println("Exception.");}
                        finally
                             try
                                  if (clientLink != null) clientLink.close();
                             }catch(IOException e) {}
                 clientLink.close();
                 //serverSocket.close();
    }

    SERVER
    import java.net.*;
    import java.io.*;
    public class XMLSocketS
          public static void main(String[] args) throws IOException
                   //Establish a connection to socket
               ServerSocket serverSocket = null;
                 try {
                     serverSocket = new ServerSocket(4545);
                 } catch (IOException e) {
                     System.err.println("Could not listen on port: 4444.");
                     System.exit(1);
              Socket clientLink = null;
                  try
                             clientLink = serverSocket.accept();
                         System.out.println("Server accepts the client request.....");
                         BufferedInputStream inn = new BufferedInputStream(clientLink.getInputStream());
                             BufferedOutputStream ut = new BufferedOutputStream(new FileOutputStream(new File("c:/xampp/htdocs/received_from_client.txt")));
                             byte[] buff = new byte[1024];
                             int readMe;
                             while( (readMe = inn.read(buff)) >= 0)
                             {     //reads from input stream, writes the file to disk
                                  ut.write(buff, 0, readMe);
                             ut.flush();                         
                             //Sending response to client     
                             //============================================================
                             BufferedInputStream ftoC = null;
                             BufferedOutputStream outtoC = null;
                             // File to be send over the socket.
                             File file = new File("c:/xampp/htdocs/thesis/user_registration_response.xml");
                             try
                                  // InputStream to read the file
                                   ftoC = new BufferedInputStream(new FileInputStream(file));
                             }catch(IOException eee)
                             {System.out.println("Problem reading file");}
                             // OutputStream to socket
                             outtoC = new BufferedOutputStream(clientLink.getOutputStream());
                             byte[] buffer = new byte[1024];
                             int noRead;
                             //Checking if bytes available to read to the buffer.
                             while( (noRead = ftoC.read(buffer)) >= 0)
                                  // Writes bytes to Output Stream from 0 to total number of bytes
                                  outtoC.write(buffer, 0, noRead);
                             outtoC.flush();
                             //============================================================
                             System.out.println("File received");
              }catch(IOException ex)
              {System.out.println("Exception.");}
                        finally
                             try
                                  if (clientLink != null) clientLink.close();
                             }catch(IOException e) {}
                 clientLink.close();
                 //serverSocket.close();
          }CLIENT SIDE
    import java.io.*;
    import java.net.*;
    public class XMLSocketC
              @SuppressWarnings("deprecation")
              public static void main(String[] args)
                   // Server: "localhost" here. And port to connect is 4545.
                   String host = "127.0.0.1";          
                   int port = 4545;
                   BufferedInputStream fileIn = null;
                   BufferedOutputStream out = null;
                   // File to be send over the socket.
                   File file = new File("c:/xampp/htdocs/thesis/sensorList.xml");
                   try
                        // InputStream to read the file
                        fileIn = new BufferedInputStream(new FileInputStream(file));
                   }catch(IOException eee)
                   {System.out.println("Problem");}
                   try
                             System.out.println("Establishing Socket Connection");
                             // Opening Socket
                             Socket clientSocket = new Socket(host, port);
                             System.out.println("Socket is clear and available.....");
                             // OutputStream to socket
                             out = new BufferedOutputStream(clientSocket.getOutputStream());
                             byte[] buffer = new byte[1024];
                             int numRead;
                             //Checking if bytes available to read to the buffer.
                             while( (numRead = fileIn.read(buffer)) >= 0)
                                  // Writes bytes to Output Stream from 0 to total number of bytes
                                  out.write(buffer, 0, numRead);
                             // Flush - send file
                             out.flush();
                             //=======================================
                             DataInputStream in = new DataInputStream(new BufferedInputStream(clientSocket.getInputStream()));
                             BufferedWriter outf = new BufferedWriter(new FileWriter("c:/xampp/htdocs/received_from_server.txt",true));
                             String str;
                             while(!(str = in.readLine()).equals("EOF")) {     
                                  System.out.println("client : Read line -> <" + str + ">");
                                  outf.write(str);//Write out a string to the file
                                  outf.newLine();//write a new line to the file (for better format)
                                  outf.flush();
                             //=======================================
                             // close OutputStream
                             out.close();
                             // close InputStrean
                             fileIn.close();
                             // close Socket
                             clientSocket.close();
                        }catch (IOException e)
                        {System.out.println("Exception.");}
         Could you please point where am I doing the stupid mistake, client to server is working properly, but the opposite direction is not.
    Thanks

  • Application Server 4.0 caching the Java Servlet Program

    Hi all,
    I am working with Oracle8i databse and Oracle Application Server 4.0. Now I need to develop some Java Servlet's Program. I successful configure the server and my Servlet program can connect to the Oracle database.
    However, when I make some modification to the program and recompile it. The browser cannot refresh to the modified program. This mean that the content is't update. I think the reason may be the previous program is cached in server.
    Later, I discover using the 'owsctl' utility to reload the application server can solve this problem. However, it is quite inconvenience and not favour to reloasd the server very frequently. And I guess there may have some configuration parameters in the 'OAS Manager' can help me to solve my problem.
    So, anyone can tell me how to solve this problem? Thank you very much.
    Regards

    OAS 4.0.8.1 supports servlets. You need a patch if you implement extra path info feature of servlets. In addition, you have to bounce OAS everytime you upload new servlets. This behavior does not follow the Servlet spec and I don't know when Oracle will fix it. It is a big problem for sites trying to run 24x7.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by dlnoida:
    Dear All,
    I have an application built in applets, i wants to host them on OAS 4.0.7.
    How can i do it if possible? Do i reqire any third party tool for it ?
    Is OAS 4.0.8 supports servlets?<HR></BLOCKQUOTE>
    null

  • Run java program on linux

    Hi All
    I'm beginner with linux
    I have java program and I can run it in windows7 with bat file
    jre1.6.0_04\bin\java -classpath "..\classes"  database_com.Main_Class 7778
    pauseI want to run this program in linux but I can't
    I try run this program with bat file :
    /java-1.5.0-gcj-4.3-1.5.0.0/bin/java -classpath "../classes"  database_com.Main_Class 7778
    pauseplease help me

    Ora-dbaabode wrote:
    I want to run this program in linux but I can'tImagine you have a splitting headache and decide to go to the doctor. You come into his (or her) office and say, Doc, I'm not feeling to well. The doctor replies and asks, well, what seems to be the problem? You reply: "well, I just don't feel too good". See where I'm getting at (hint: missing details!).
    As for your JDK, I highly, no, I very highly recommend you get rid of GCJ and install Sun's JDK. This may very well be the source of your problems. GCJ is a pain in the @ss!

  • Running a perl shell command through a java program on linux platform

    i'm trying to execute the following command in a java program "perl xxx.pl" using the runtime.getruntime method
    here is the piece of code
    String[] cmd={"perl","-c","AraMorph.pl",""};
    Process p = Runtime.getRuntime().exec(cmd,null,new File("/home/ahmed/buckwalter_morphan_1/data"));
    p.waitFor();
    BufferedReader in=new BufferedReader(new InputStreamReader(p.getInputStream()));
    String line;
    while ((line=in.readLine())!=null)
    System.out.println(line);
    but it doesn't output anything even if i tried to print the output to a file
    i'm trying to execute this program on linux platform but its working properly on a windows platform
    thx
    raar

    String[] cmd={"perl","AraMorph.pl"," </home/ahmed/in.txt"," >/home/ahmed/ast.txt"};
    Process p = Runtime.getRuntime().exec(cmd,null,new File("/home/ahmed/buckwalter_morphan_1/data"));
    BufferedReader in=new BufferedReader(new InputStreamReader(p.getErrorStream()));
    String line;
    while ((line=in.readLine())!=null)
    System.out.println(line);
    p.waitFor();
    String str2=p.getInputStream().toString();
    System.out.println("==================================="+str2);
    and it still outputs nothing but goes in something like infinite loop or as assumed in the article u suggested a deadlock but even all solutions to all pitfalls didn't succeed

  • Java Concurrent Program - connecting to MS SQL Server

    Hi,
    I hope this is correct forum to post this question.
    I am writing a JCP which will connect to a MS SQL Server DB, pull data from a table and populate this data into a custome table in EBS (R12.1.1) database. But I am facing some issues.
    When I run run this concurrent program from EBS, I get following exception message:
    Wed Aug 08 01:18:04 GMT 2012: In openConection()
    Wed Aug 08 01:18:04 GMT 2012: Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: openConection() ClassNotFoundException: java.lang.ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver
    Wed Aug 08 01:18:04 GMT 2012: Before Calling processPrintMachineRecords()
    Wed Aug 08 01:18:04 GMT 2012: Exception:: java.lang.NullPointerException
    Wed Aug 08 01:18:04 GMT 2012: In closeSQLServerConnection().......closing JDBC Connection
    Wed Aug 08 01:18:04 GMT 2012: Connection object was null, hence skipping close
    Wed Aug 08 01:18:04 GMT 2012: After Calling processPrintMachineRecords()
    The I read somewhere on internet that I should set CLASSPATH in options field of concurrent program definition. So I provided classpath as follows:
    -cp /rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/apps.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes/sqljdbc_4.0/enu/sqljdbc.jar
    In this classpath sqljdbc.jar contains the classes for connecting to MS SQL Server DB. However after giving classpath like this I started getting different error:
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/apps/fnd/cp/request/Run
    Caused by: java.lang.ClassNotFoundException: oracle.apps.fnd.cp.request.Run
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    It appears from the error message that after giving this CLASSPATH, program was not able to find the "Run" method itself. In otherwords, CLASSPATH screwed it further.
    Can anybody please point out what am I doing wrong here?
    Regards
    Java Code:
    package oracle.apps.custom.printmachine;
    import java.sql.*;
    import oracle.apps.fnd.cp.request.* ;
    import java.io.*;
    import oracle.apps.fnd.util.*;
    public class PrintMachineInterface implements JavaConcurrentProgram {
    public static final String M_SUCCESS = "SUCCESS";
    public static final String M_ERROR = "ERROR";
    public static final String M_WARNING = "WARNING";
    int mRequestStatus = -1;
    int max_number_of_records = 99999999;
    private String mSqlServerHost = "mysqlserver.domain.com";
    // Application Short Name
    private String applName;
    CpContext mCtx;
    LogFile logFile;
    OutFile outFile;
    Connection mConn = null;
    ReqCompletion lRC;
    public PrintMachineInterface(){
    // if no parameter value is specified for APPLNAME then use FND
    //as default value
    applName = "FND";
    private void logMessage(String str) {
    java.util.Date now = new java.util.Date();
    logFile.writeln(now.toString() + ": " + str, LogFile.STATEMENT);
    static String mInsertRecord = " Declare " + " BEGIN "
    + " INSERT INTO XXGFN_GBL_CE_PM_STAGE(ID, KEY, FILENAME, PRINTED_AT, CREATED_AT, DOCTYPE, LANGUAGE, OU, TRX_ID, DOC_ID, REQ_ID, TEMPLATE, PAGES, DOC_TEXT, TIMES_RECEIVED)"
    + " VALUES (:1, :2, :3, :4, :5, :6, :7, :8, :9, :10, :11, :12, :13, substr(:14,2000), :15);"
    + " COMMIT;"
    + " END;";
    static Connection con = null;
    public void openConection() {
    logMessage( "In openConection()");
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    public void closeSQLServerConnection() {
    try {
    logMessage( "In closeSQLServerConnection().......closing JDBC Connection");
    if (con != null)
    logMessage( "Con is not null");
    con.close();
    logMessage( "Con Closed Successfully");
    else
    logMessage( "Connection object was null, hence skipping close");
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    } catch (Exception ex) {
    logMessage("Exception in closeSQLServerConnection() : " + ex);
    private void populate_staging_table(
    String p_id,
    String p_key,
    String p_filename,
    String p_printed_at,
    String p_created_at,
    String p_doctype,
    String p_language,
    String p_ou,
    String p_trx_id,
    String p_doc_id,
    String p_req_id,
    String p_template,
    String p_pages,
    String p_doc_text,
    String p_times_received
    PreparedStatement lStmt = null;
    logMessage("Populating data from PrintMachine history table");
    try {
    lStmt = mConn.prepareCall(mInsertRecord);
    lStmt.setString(1, p_id);
    lStmt.setString(2, p_key);
    lStmt.setString(3, p_filename);
    lStmt.setString(4, p_printed_at);
    lStmt.setString(5, p_created_at);
    lStmt.setString(6, p_doctype);
    lStmt.setString(7, p_language);
    lStmt.setString(8, p_ou);
    lStmt.setString(9, p_trx_id);
    lStmt.setString(10, p_doc_id);
    lStmt.setString(11, p_req_id);
    lStmt.setString(12, p_template);
    lStmt.setString(13, p_pages);
    lStmt.setString(14, p_doc_text);
    lStmt.setString(15, p_times_received);
    lStmt.execute();
    lStmt.close();
    } catch (SQLException s) {
    logMessage("Exception thrown w/ error message: "
    + s.getMessage());
    s.printStackTrace();
    finally {
    try {
    if (lStmt != null)
    lStmt.close();
    } catch (SQLException e) {
    logMessage("SQLException: " + e);
    private void processPrintMachineRecords() {
    int number_of_recs = 0;
    try {
    PreparedStatement stmt = con.prepareStatement("SELECT TOP 1000 ID, Key, Filename, PrintedAt, CreatedAt, Doctype, Language,OU, TransactionID, DocumentID, RequestID, Template, Pages, Documenttext, TimesReceived FROM PM_DATA.dbo.History" );
    ResultSet rst = stmt.executeQuery();
    while (rst.next()) {
    number_of_recs++;
    if (number_of_recs == max_number_of_records) break;
    populate_staging_table(
    rst.getString(1), rst.getString(2)
    ,rst.getString(3), rst.getString(4)
    ,rst.getString(5), rst.getString(6)
    ,rst.getString(7), rst.getString(8)
    ,rst.getString(9), rst.getString(10)
    ,rst.getString(11), rst.getString(12)
    ,rst.getString(13), rst.getString(14)
    ,rst.getString(15)
    stmt.close();
    rst.close();
    mConn.commit();
    } catch (SQLException ex) {
    logMessage("SQLException: " + ex);
    catch (Exception ex) {
    logMessage("Exception:: " + ex);
    closeSQLServerConnection();
    public void runProgram(CpContext pCpContext) {
    applName = "XXGFN";
    String l_file_path = null;
    mCtx = pCpContext;
    //get handle on request completion object for reporting status
    lRC = pCpContext.getReqCompletion();
    // assign logfile
    logFile = pCpContext.getLogFile();
    // assign outfile
    outFile = pCpContext.getOutFile();
    // get the JDBC connection object
    mConn = pCpContext.getJDBCConnection();
    l_file_path = ((new File(outFile.getFileName())).getParent() == null ? ""
    : (new File(outFile.getFileName())).getParent());
    // get parameter list object from CpContext
    ParameterList lPara = pCpContext.getParameterList();
    while (lPara.hasMoreElements())
    NameValueType aNVT = lPara.nextParameter();
    if ( aNVT.getName().equals("APPLNAME") )
    applName = aNVT.getValue();
    /** openConection() Opens the connection to SQL Server Database*/
    openConection() ;
    logMessage("Before Calling processPrintMachineRecords()");
    processPrintMachineRecords();
    logMessage("After Calling processPrintMachineRecords()");
    try{
    setCompletion(ReqCompletion.NORMAL, "Request Completed Normal");
    } catch (Exception e) {
    setCompletion(ReqCompletion.ERROR, e.toString());
    } finally {
    pCpContext.releaseJDBCConnection();
    * Sets the request completion status based on proper precedence. ERROR >
    * WARNING > NORMAL
    * @param pStatus
    * Status of the request.
    * @param pCompletionText
    * Request's completion text.
    public void setCompletion(int pStatus, String pCompletionText) {
    if ((pStatus == ReqCompletion.ERROR)
    || ((pStatus == ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))
    || ((pStatus == ReqCompletion.NORMAL)
    && (mRequestStatus != ReqCompletion.WARNING) && (mRequestStatus != ReqCompletion.ERROR))) {
    mRequestStatus = pStatus;
    lRC.setCompletion(pStatus, pCompletionText);
    }

    ok
    i used Template.java as input
    useful MOS:
    How To Create a Java Concurrent Program? [ID 827563.1]
    Java Concurrent Program FAQ [ID 827575.1]
    i used
    //goto ms sql server 2008r2       
            try{
             Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");        
             con = java.sql.DriverManager.getConnection( 
                                          "jdbc:sqlserver://1.2.3.4:1433;databaseName=test;selectMethod=cursor", 
                                          "test", "test");          
              if(con!=null) System.out.println("Connection Successful!");
            }catch(Exception e){
              e.printStackTrace();
              System.out.println("Error Trace in getConnection() : " + e.getMessage());
            }1.2.3.4 - ip of instance with sqlserver2008r2 :)
    in your code
    >
    try {
    logMessage( "Before Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "After Loading Driver com.microsoft.jdbc.sqlserver.SQLServerDriver");
    logMessage( "Attempting to connect to " + mSqlServerHost);
    con = DriverManager.getConnection("jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=sql_user;Password=sql_pwd");
    logMessage( "After con assigned from getConnection(jdbc:microsoft:sqlserver://" + mSqlServerHost + ":1433;User=pm_dba_access;Password=*****");
    } catch (java.lang.ClassNotFoundException e) {
    logMessage("openConection() ClassNotFoundException: " + e);
    } catch (SQLException ex) {
    logMessage("openConection() SQLException: " + ex);
    >
    try my case for Driver and Connection
    put result .class file to needed directory
    put sqljdbc4.jar to /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib
    and for concurrent program option
    -classpath /rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/classes:/rs01/u02/applmgr/utyeb02/apps/apps_st/appl/au/12.0.0/appsborg.zip:/rs01/u02/applmgr/utyeb02/apps/apps_st/comn/java/lib/sqljdbc4.jaralso useful mos:
    Classpath Setting of Third Party Jar Files in R12 Java Concurrent Program (JCP) [ID 1292694.1]

  • Problem with JDBC cc with new java server node

    Hi experts,
    I have the next situation I hope you can help me.
    I created an additional java server node in a PI 7.1 system, this because helpful performance.
    Bought nodes started ok.
    The problem was when I saw in the RW that all the jdbc channels was in status ??? and in the Short Log "not adapter engine assigned".
    I did the complete refresh cache en the SXI_CACHE.
    I read that I can restart the Adapter Engine, unfortunately I don't have a System Administrator. Would you tell me how to restart the adapter engine?
    If anybody have other option, please tell me.
    Thanks in advance.

    Thanks Spantaleoni.
    I'm doing a restart of the instance right now.
    I complement the error. When I start or stop the cc has the next error.
    com.sap.aii.af.service.administration.api.AdminException: No adapter registered for channel 18996fb1cfda31ff9dca269f4c71e43c
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.notifyChannelActivationStateChanged(AdminManagerImpl.java:851)
    at com.sap.aii.af.service.administration.impl.cluster.ClusterManager.eventReceivedSync(ClusterManager.java:426)
    at com.sap.aii.af.service.event.impl.worker.sync.SyncLocalWorker.work(SyncLocalWorker.java:52)
    at com.sap.aii.af.service.event.impl.worker.sync.AbstractSyncWorker.startWork(AbstractSyncWorker.java:40)
    at com.sap.aii.af.service.event.impl.EventManagerImpl.sendEventAndWaitForAnswer(EventManagerImpl.java:484)
    at com.sap.aii.af.service.event.impl.EventManagerImpl.sendEventAndWaitForAnswer(EventManagerImpl.java:348)
    at com.sap.aii.af.service.administration.impl.cluster.ClusterManager.notifyChannelActivationStateChanged(ClusterManager.java:280)
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.setChannelActivationState(AdminManagerImpl.java:699)
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.setChannelActivationState(AdminManagerImpl.java:625)
    at com.sap.aii.af.service.administration.impl.AdminManagerImpl.setChannelActivationState(AdminManagerImpl.java:618)
    at com.sap.aii.mdt.amt.channelmonitoring.SummaryChannelList.setChannelsActivationState(SummaryChannelList.java:1041)
    at com.sap.aii.mdt.amt.channelmonitoring.ChannelMonitoringDynPage.process_deactivate(ChannelMonitoringDynPage.java:1990)
    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:585)
    at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:172)
    at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:102)
    at com.sapportals.htmlb.page.PageProcessorServlet.handleRequest(PageProcessorServlet.java:62)
    at com.sapportals.htmlb.page.PageProcessorServlet.doPost(PageProcessorServlet.java:22)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:66)
    at com.sap.engine.services.servlets_jsp.server.Invokable.invoke(Invokable.java:32)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:431)
    at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:289)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:376)
    at com.sap.engine.services.servlets_jsp.filters.ServletSelector.process(ServletSelector.java:85)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:160)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
    at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
    at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
    at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
    at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:309)
    at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    Thanks

  • Problem in server program

    Hi
    My client prog runs in an infinite loop where it captures the screen and creates an image object.
    After that it sends the image object to the server prog.
    Server program receives it and displays it using Jframe , that is it uses a panel and a button named paste.
    So I have used an infinite loop in the server side as well.
    Problem is as long as client is running the interface that i used for pasting , pops up but I cant see the paste button
    Its only when I close the client side the paste button becomes visible and its also working.
    but I need to paste it even when the client side is running.
    Any idea where am I going wrong?
    The relevant codes are as follows----
    SERVER:
    public class Test
         public Test() {
         try {
         ServerSocket ser=new ServerSocket(4444);     
         ImageIcon img=new ImageIcon();
         String s1="1";
         for(;;){
            Socket clisoc=ser.accept();     
            DataOutputStream os1 = new DataOutputStream(clisoc.getOutputStream());
            os1.writeUTF(s1);
           ObjectInputStream oin = new ObjectInputStream(clisoc.getInputStream());
            img=(ImageIcon)oin.readObject();
            Image i =img.getImage();
           Test1 e = new Test1(i);
            System.out.println(i);
         os1.close();
         oin.close();
         clisoc.close();
         }catch(Exception e){}
    }Test1 class is used for creating the image from the image object.
    CLIENT---
    public final class Test2 implements ClipboardOwner{
        public static void main (String[]  aArguments ){
         try{
              String s1;
              for(;;){
        Socket clisoc= new Socket("localhost",4444);
        TextTransfer textTransfer = new TextTransfer();
        DataInputStream dis=new DataInputStream(clisoc.getInputStream());
        s1=dis.readUTF();
        if(s1.equals("1")){
        Robot robot=new Robot();
        robot.keyPress(KeyEvent.VK_PRINTSCREEN);
        robot.keyRelease(KeyEvent.VK_PRINTSCREEN);
        BufferedImage g=(textTransfer.getClipboard());
        ImageIcon ic = new ImageIcon(g);
        System.out.println(ic);   
        ObjectOutputStream oos = new ObjectOutputStream(clisoc.getOutputStream());
        Thread.sleep(9000);
        oos.writeObject(ic);
        dis.close();
        oos.close();
        clisoc.close();     
       else
         continue;
        }catch(Exception e){System.out.println(e);}
       }    getClipboard() is the function to catch the clipboard content.
    Thanks in advance.

    Thanks for replying.
    I got rid of the problem by introducing a similar if-else block in the server side as well.
    Now I also dont have any Thread.sleep() in either client or server program.
    The interface that I used to paste the image pops up alright but the paste button takes almost 3 minutes to appear.
    Is it normal in windows 98 (P4)?Mind you , the button is working fine.
    would you specify why should I "get rid of other close statements" except oos.close()?
    I solved my previous problem by keeping them as it is.

Maybe you are looking for

  • 3D Render is different in Photoshop CS6 vs CS4 when edited

    Hope you guys can help me, because I'm really clueless on what changed in CS6 that is causing this. We have a 3D file that has a layer where we can change out the labels. The things is this, when I open the file in CS6, and try to edit it, the appear

  • Can't get ADE to recognise my kobo - help!!

    I bought a kobo aura today. Bought a book from the kobo stall which is reading fine. The main reason I got an ereader was for ebooks from the public library. So I then I tried to get a public library book on to the kobo. Successfully transferred a co

  • Numbers syntax problem

    I use this equation in Ms Excel. Numbers does not seem to like it. I'm trying to identify a column and a random row between two mumbers. Here is the EXCEL equation: INDIRECT("q"&INT(RANDBETWEEN(50,52))). In EXCEL, it will go to column "q" and select

  • How to fix parts in a track

    So I'm recording guitar in garageband. Is there a way to fix certain sections within the track? I have an otherwise good track but I noticed a few hiccups here and there. Thanks!

  • OBIEE repository variable CURRENT_ENTERPRISE_QUARTER not set

    Hi, We have a trial on-premise instance of Fusion Sales. The embedded OBIEE reports are not retrieving results because of the filters CURRENT_ENTERPRISE_QUARTER and CURRENT_ENTERPRISE_YEAR pointing to 2011. Could someone please advice in detail how t