Error while running Java program which call a file upload servlet

Hi all,
I have a java program which calls a servlet and sends the file to be uploaded by the servlet. I used Jbuilder to create java program and servlet program. I compiled both the programs and compilation suceeded and my class files are avaialbe in
WEB-INF/classes/content directory. But now I am trying to run the Java program(this contains main method) from the command prompt, which should inturn call my servlet.(I have web.xml file inside WEB-INF dir). But I receive the following error
C:\tomcat5.5.15\apache-tomcat-5.5.16\webapps\content\WEB-INF\classes\content>java MultiContentSender
Exception in thread "main" java.lang.NoClassDefFoundError: MultiContentSender (w
rong name: content/MultiContentSender)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
My dir strcture is as below
TOMCAT_HOME/webapps/content/WEB-INF/classes/content/*.class
I am not able to figure out the error, can anyone throw some light on this issue.

You are trying to invoke the class from the command prompt. My guess is that MultiContentSender contains a package, which means that you'll need to add your WEB-INF\classes directory to the classpath before it will work. Classes stored in this directory are expected to be invoked through tomcat, which builds it's own classpath.

Similar Messages

  • Strange error while running java program in oracle

    Hi all,
    I have written a java program and saved it as .sqlj file. i have to run the program on sql prompt.
    while running the program i am getting the following error.Please help me.I am in urgent situation
    ORA-29536: badly formed source: User has attempted to load a class
    (tactossSecurity) into a restricted package. Permission can be granted using
    dbms_java.grant_permission(<user>, LoadClassInPackage...
    Thanks & Regards
    Raghavender Rao Kodumuri

    Raghavender,
    I also answered you in the SQL forum, where you posted the exact same question.
    Re: Trying to execute java programm in oracle getting the following error
    Good Luck,
    Avi.

  • Error while running the program of deferred Tax ( New)Program Name RFUMSV50

    Hi
    I am getting the error while running the program of deferred Tax ( New)
    Following is the detailed error :
    Enter rate / INR rate type M for 00.00.0000 in the system settings
    Message no. SG105
    Diagnosis
    For the conversion of an amount into another currency, an entry is missing in the currency conversion table.
    Procedure
    Add the missing entry in the currency conversion table.
    Execute function
    You can then continue to process the commercial transaction.
    Thanks & Regards,
    PM

    Check the following notes:-
    1)  Note 46582 - 2.2->3.0: error SG105 for exchange rate M w. inv.
    2)  Note 165645 - SG105:Enter rate & / & rate type & for 00.00.0000..
    3)  Note 483542 - F110: SG105 in maintenance of proposal run with wthhldng tax
    4)  Note 975657 - SG 105: FI-Enjoy with foreign currency and calculate tax
    thanks
    G. Lakshmipathi

  • Error while running jms program in eclipse

    Hi,
    Friends.I am new to forum.This is the first question I am posting.I am new to Java Messaging service.While running the program in eclipse I am getting the following error...
    javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'scsstasdap03:QSEIBEL'
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:569)
         at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:2328)
         at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1749)
         at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:144)
         at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:54)
         at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:106)
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.<init>(JMSManager.java:87)
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.<clinit>(JMSManager.java:40)
         at com.bofa.pbes.cedapi.cmwmq.JMSCEDAgent.<init>(JMSCEDAgent.java:24)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<init>(MessageProcessingController.java:34)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<clinit>(MessageProcessingController.java:38)
    java.lang.ExceptionInInitializerError
    Caused by: java.lang.NullPointerException
         at com.bofa.pbes.cedapi.cmwmq.JMSManager.addMessageListener(JMSManager.java:173)
         at com.bofa.pbes.cedapi.cmwmq.JMSCEDAgent.<init>(JMSCEDAgent.java:25)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<init>(MessageProcessingController.java:34)
         at com.bofa.pbes.cedapi.cmwmq.MessageProcessingController.<clinit>(MessageProcessingController.java:38)
    Exception in thread "main"
    Please help me.....

    Have a look in eclipse in the menu under window -> preferences -> java -> installed jre's which one is selected there.
    Than you have to check you project settings: right click on the project and select properterties. Check "Java Build Path" and "Java Compiler" settings.
    If you run your program, the console also shows the version you are running. If it is an 1.6 version everything should work.

  • JVM Error while running java application through Java Webstart

    Hi All,
    While running java application through Webstart, we got the following error log and application is not running. I am not sure why this is happened? Can anyone help me out to resolve this problem?
    Help Regarding this will be highly appreciated.
    Thanks In advance.
    Bala
    Error in Log File:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # Internal Error (53545542324F5554494E45530E435050008C), pid=684, tid=9424
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode)
    --------------- T H R E A D ---------------
    Current thread (0x00345a60): JavaThread [_thread_in_vm, id=9424]
    Stack: [0x00030000,0x00070000), sp=0x0006f9a4, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x12430d]
    V [jvm.dll+0x6366e]
    V [jvm.dll+0x636a3]
    V [jvm.dll+0x10073c]
    V [jvm.dll+0x7859b]
    V [jvm.dll+0x919fc]
    C [javaw.exe+0x2120]
    C [javaw.exe+0x11bb]
    C [javaw.exe+0x3151]
    C [kernel32.dll+0x123e5]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    Other Threads:
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 2304K, used 42K [0x02a60000, 0x02cd0000, 0x051c0000)
    eden space 2112K, 2% used [0x02a60000, 0x02a6a908, 0x02c70000)
    from space 192K, 0% used [0x02c70000, 0x02c70000, 0x02ca0000)
    to space 192K, 0% used [0x02ca0000, 0x02ca0000, 0x02cd0000)
    tenured generation total 30272K, used 0K [0x051c0000, 0x06f50000, 0x22a60000)
    the space 30272K, 0% used [0x051c0000, 0x051c0000, 0x051c0200, 0x06f50000)
    compacting perm gen total 8192K, used 409K [0x22a60000, 0x23260000, 0x26a60000)
    the space 8192K, 4% used [0x22a60000, 0x22ac64d0, 0x22ac6600, 0x23260000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040d000 C:\Program Files\Java\jre1.5.0_11\bin\javaw.exe
    0x7c800000 - 0x7c8c0000 C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000 C:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77fec000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000 C:\WINDOWS\system32\RPCRT4.dll
    0x77380000 - 0x77412000 C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000 C:\WINDOWS\system32\GDI32.dll
    0x77ba0000 - 0x77bfa000 C:\WINDOWS\system32\MSVCRT.dll
    0x71c20000 - 0x71c32000 C:\WINDOWS\system32\tsappcmp.dll
    0x76290000 - 0x762ad000 C:\WINDOWS\system32\IMM32.DLL
    0x6d640000 - 0x6d7dd000 C:\Program Files\Java\jre1.5.0_11\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000 C:\WINDOWS\system32\WINMM.dll
    0x71bc0000 - 0x71bc8000 C:\WINDOWS\system32\rdpsnd.dll
    0x771f0000 - 0x77201000 C:\WINDOWS\system32\WINSTA.dll
    0x71c40000 - 0x71c98000 C:\WINDOWS\system32\NETAPI32.dll
    0x76b70000 - 0x76b7b000 C:\WINDOWS\system32\PSAPI.DLL
    0x6d290000 - 0x6d298000 C:\Program Files\Java\jre1.5.0_11\bin\hpi.dll
    0x6d610000 - 0x6d61c000 C:\Program Files\Java\jre1.5.0_11\bin\verify.dll
    0x6d310000 - 0x6d32d000 C:\Program Files\Java\jre1.5.0_11\bin\java.dll
    0x6d630000 - 0x6d63f000 C:\Program Files\Java\jre1.5.0_11\bin\zip.dll
    VM Arguments:
    jvm_args: -Xms32m -Xmx512m -Xbootclasspath/a:C:\Program Files\Java\jre1.5.0_11\lib\javaws.jar;C:\Program Files\Java\jre1.5.0_11\lib\deploy.jar -Djnlpx.home=C:\Program Files\Java\jre1.5.0_11\bin -Djnlpx.splashport=1970 -Djnlpx.jvm="C:\Program Files\Java\jre1.5.0_11\bin\javaw.exe" -Djnlpx.remove=true -Djava.security.policy=file:C:\Program Files\Java\jre1.5.0_11\lib\security\javaws.policy -DtrustProxy=true -Xverify:remote -Djnlpx.heapsize=32m,512m
    java_command: com.sun.javaws.Main C:\DOCUME~1\ssiwach\LOCALS~1\Temp\1\javaws3
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=C:\Program Files\Java\jre1.5.0_11\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\mysql\bin;"C:\Program Files\Java\jre1.5.0_11\bin"
    USERNAME=ssiwach
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 1
    CPU:total 2 (cores per cpu 1, threads per core 2) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht
    Memory: 4k page, physical 2097151k(438060k free), swap 4194303k(5136k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_11-b03) for windows-x86, built on Dec 15 2006 01:16:12 by "java_re" with MS VC++ 6.0
    ------------------------------------------------------------------------------------------------------------------

    Hi All,
    While running java application through Webstart, we got the following error log and application is not running. I am not sure why this is happened? Can anyone help me out to resolve this problem?
    Help Regarding this will be highly appreciated.
    Thanks In advance.
    Bala
    Error in Log File:
    # An unexpected error has been detected by HotSpot Virtual Machine:
    # Internal Error (53545542324F5554494E45530E435050008C), pid=684, tid=9424
    # Java VM: Java HotSpot(TM) Client VM (1.5.0_11-b03 mixed mode)
    --------------- T H R E A D ---------------
    Current thread (0x00345a60): JavaThread [_thread_in_vm, id=9424]
    Stack: [0x00030000,0x00070000), sp=0x0006f9a4, free space=254k
    Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
    V [jvm.dll+0x12430d]
    V [jvm.dll+0x6366e]
    V [jvm.dll+0x636a3]
    V [jvm.dll+0x10073c]
    V [jvm.dll+0x7859b]
    V [jvm.dll+0x919fc]
    C [javaw.exe+0x2120]
    C [javaw.exe+0x11bb]
    C [javaw.exe+0x3151]
    C [kernel32.dll+0x123e5]
    --------------- P R O C E S S ---------------
    Java Threads: ( => current thread )
    Other Threads:
    VM state:not at safepoint (normal execution)
    VM Mutex/Monitor currently owned by a thread: None
    Heap
    def new generation total 2304K, used 42K [0x02a60000, 0x02cd0000, 0x051c0000)
    eden space 2112K, 2% used [0x02a60000, 0x02a6a908, 0x02c70000)
    from space 192K, 0% used [0x02c70000, 0x02c70000, 0x02ca0000)
    to space 192K, 0% used [0x02ca0000, 0x02ca0000, 0x02cd0000)
    tenured generation total 30272K, used 0K [0x051c0000, 0x06f50000, 0x22a60000)
    the space 30272K, 0% used [0x051c0000, 0x051c0000, 0x051c0200, 0x06f50000)
    compacting perm gen total 8192K, used 409K [0x22a60000, 0x23260000, 0x26a60000)
    the space 8192K, 4% used [0x22a60000, 0x22ac64d0, 0x22ac6600, 0x23260000)
    No shared spaces configured.
    Dynamic libraries:
    0x00400000 - 0x0040d000 C:\Program Files\Java\jre1.5.0_11\bin\javaw.exe
    0x7c800000 - 0x7c8c0000 C:\WINDOWS\system32\ntdll.dll
    0x77e40000 - 0x77f42000 C:\WINDOWS\system32\kernel32.dll
    0x77f50000 - 0x77fec000 C:\WINDOWS\system32\ADVAPI32.dll
    0x77c50000 - 0x77cef000 C:\WINDOWS\system32\RPCRT4.dll
    0x77380000 - 0x77412000 C:\WINDOWS\system32\USER32.dll
    0x77c00000 - 0x77c48000 C:\WINDOWS\system32\GDI32.dll
    0x77ba0000 - 0x77bfa000 C:\WINDOWS\system32\MSVCRT.dll
    0x71c20000 - 0x71c32000 C:\WINDOWS\system32\tsappcmp.dll
    0x76290000 - 0x762ad000 C:\WINDOWS\system32\IMM32.DLL
    0x6d640000 - 0x6d7dd000 C:\Program Files\Java\jre1.5.0_11\bin\client\jvm.dll
    0x76aa0000 - 0x76acd000 C:\WINDOWS\system32\WINMM.dll
    0x71bc0000 - 0x71bc8000 C:\WINDOWS\system32\rdpsnd.dll
    0x771f0000 - 0x77201000 C:\WINDOWS\system32\WINSTA.dll
    0x71c40000 - 0x71c98000 C:\WINDOWS\system32\NETAPI32.dll
    0x76b70000 - 0x76b7b000 C:\WINDOWS\system32\PSAPI.DLL
    0x6d290000 - 0x6d298000 C:\Program Files\Java\jre1.5.0_11\bin\hpi.dll
    0x6d610000 - 0x6d61c000 C:\Program Files\Java\jre1.5.0_11\bin\verify.dll
    0x6d310000 - 0x6d32d000 C:\Program Files\Java\jre1.5.0_11\bin\java.dll
    0x6d630000 - 0x6d63f000 C:\Program Files\Java\jre1.5.0_11\bin\zip.dll
    VM Arguments:
    jvm_args: -Xms32m -Xmx512m -Xbootclasspath/a:C:\Program Files\Java\jre1.5.0_11\lib\javaws.jar;C:\Program Files\Java\jre1.5.0_11\lib\deploy.jar -Djnlpx.home=C:\Program Files\Java\jre1.5.0_11\bin -Djnlpx.splashport=1970 -Djnlpx.jvm="C:\Program Files\Java\jre1.5.0_11\bin\javaw.exe" -Djnlpx.remove=true -Djava.security.policy=file:C:\Program Files\Java\jre1.5.0_11\lib\security\javaws.policy -DtrustProxy=true -Xverify:remote -Djnlpx.heapsize=32m,512m
    java_command: com.sun.javaws.Main C:\DOCUME~1\ssiwach\LOCALS~1\Temp\1\javaws3
    Launcher Type: SUN_STANDARD
    Environment Variables:
    PATH=C:\Program Files\Java\jre1.5.0_11\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;D:\mysql\bin;"C:\Program Files\Java\jre1.5.0_11\bin"
    USERNAME=ssiwach
    OS=Windows_NT
    PROCESSOR_IDENTIFIER=x86 Family 15 Model 4 Stepping 1, GenuineIntel
    --------------- S Y S T E M ---------------
    OS: Windows Server 2003 family Build 3790 Service Pack 1
    CPU:total 2 (cores per cpu 1, threads per core 2) family 15 model 4 stepping 1, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ht
    Memory: 4k page, physical 2097151k(438060k free), swap 4194303k(5136k free)
    vm_info: Java HotSpot(TM) Client VM (1.5.0_11-b03) for windows-x86, built on Dec 15 2006 01:16:12 by "java_re" with MS VC++ 6.0
    ------------------------------------------------------------------------------------------------------------------

  • Error while invoking Java Program in BPEL

    When I'm invoking a simple "Hello World" Java Program from BPEL it is working fine but while invoking a Java Program which is downloading some data from a website I'm getting the following error:
    Faulted while invoking operation "Helper" on provider "CMP_GBL_IN_URL_Download"
    <messages><input><Invoke_Helper_InputVariable><part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="payload"><payload xmlns:ns1="http://www.arrow.com/CMP_GBL_IN_Exchange_Rate_Interface_Controller">
    <ns1:input/>
    </payload>
    </part></Invoke_Helper_InputVariable></input><fault><bindingFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>[email protected]0 : Could not invoke 'Helper'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: No method named 'Helper' found that match the parts specified</summary>
    </part><part name="detail"><detail>org.collaxa.thirdparty.apache.wsif.WSIFException: No method named 'Helper' found that match the parts specified</detail>
    </part></bindingFault></fault></messages>
    Can anybuddy please help me on this.

    In what way do you invoke the Java program?
    Riko

  • Error while running java code

    Hi
    I have requirement of converting word document to PDF/A. Iam using the APIs provided by Livecycle ES. I tried to implement the requirement by creating a java program with the jar files provided. But iam getting the following error. Can anyone plz help me?
    ALC-PDG-1000-000: com.adobe.livecycle.generatepdf.client.ConversionException: ALC-PDG-001-000-Conversion failed because of an exception.
    Causing exception message : Remote EJBObject lookup failed for 'ejb/Invocation'; nested exception is:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    Caused by: java.rmi.RemoteException: Remote EJBObject lookup failed for 'ejb/Invocation'; nested exception is:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher. java:90)
    at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.doSend(EjbMessageDispatcher.java :119)
    at com.adobe.idp.dsc.provider.impl.base.AbstractMessageDispatcher.send(AbstractMessageDispat cher.java:57)
    at com.adobe.idp.dsc.clientsdk.ServiceClient.invoke(ServiceClient.java:208)
    at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:172)
    at Converttopdfa.main(Converttopdfa.java:44)
    Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.adobe.idp.dsc.provider.impl.ejb.EjbMessageDispatcher.initialise(EjbMessageDispatcher. java:84)
    ... 5 more
    Error OCCURRED: ALC-PDG-001-000-Conversion failed because of an exception.
    Causing exception message : Remote EJBObject lookup failed for 'ejb/Invocation'; nested exception is:
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    at com.adobe.livecycle.generatepdf.client.GeneratePdfServiceClient.createPDF(GeneratePdfServ iceClient.java:194)
    at Converttopdfa.main(Converttopdfa.java:44)

    XML reading program<br /><br />package com.parser;<br />import static org.w3c.dom.Node.ATTRIBUTE_NODE;<br />import static org.w3c.dom.Node.CDATA_SECTION_NODE;<br />import static org.w3c.dom.Node.COMMENT_NODE;<br />import static org.w3c.dom.Node.DOCUMENT_TYPE_NODE;<br />import static org.w3c.dom.Node.ELEMENT_NODE;<br />import static org.w3c.dom.Node.ENTITY_NODE;<br />import static org.w3c.dom.Node.ENTITY_REFERENCE_NODE;<br />import static org.w3c.dom.Node.NOTATION_NODE;<br />import static org.w3c.dom.Node.PROCESSING_INSTRUCTION_NODE;<br />import static org.w3c.dom.Node.TEXT_NODE;<br /><br />import java.io.IOException;<br />import java.io.StringReader;<br />import java.util.ArrayList;<br />import java.util.HashMap;<br /><br />import javax.xml.parsers.DocumentBuilder;<br />import javax.xml.parsers.DocumentBuilderFactory;<br />import javax.xml.parsers.ParserConfigurationException;<br /><br />import org.w3c.dom.Document;<br />import org.w3c.dom.DocumentType;<br />import org.w3c.dom.Node;<br />import org.w3c.dom.NodeList;<br />import org.w3c.dom.Text;<br />import org.xml.sax.InputSource;<br />import org.xml.sax.SAXException;<br /><br />public class MainClass {<br />     <br />     HashMap map = new HashMap();<br />     ArrayList a = new ArrayList(10);<br />  public static void main(String args[]) {<br />    DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();<br />    builderFactory.setNamespaceAware(true);       // Set namespace aware<br />    builderFactory.setValidating(true);           // and validating parser feaures<br />    builderFactory.setIgnoringElementContentWhitespace(true); <br />    <br />    DocumentBuilder builder = null;<br />    try {<br />      builder = builderFactory.newDocumentBuilder();  // Create the parser<br />    } catch(ParserConfigurationException e) {<br />      e.printStackTrace();<br />    }<br />    Document xmlDoc = null;<br /><br />    try {<br />      xmlDoc = builder.parse(new InputSource(new StringReader(xmlString1)));<br /><br />    } catch(SAXException e) {<br />      e.printStackTrace();<br /><br />    } catch(IOException e) {<br />      e.printStackTrace();<br />    }<br />    DocumentType doctype = xmlDoc.getDoctype();       <br />    if(doctype == null) {                             <br />      System.out.println("DOCTYPE is null");<br />    } else {                                          <br />      System.out.println("DOCTYPE node:\n" + doctype.getInternalSubset());<br />    }<br /><br />    System.out.println("\nDocument body contents are:");MainClass m = new MainClass();<br />    m.listNodes(xmlDoc.getDocumentElement(),"");         // Root element & children<br />    <br />    m.abc();<br />  }<br />   public  void abc(){<br />        System.out.println("++++"+a.size());<br />        <br />        for(int i=0; i<a.size();i+=2){<br />                 map.put(a.get(i), a.get(i+1));<br />                 <br />                 <br />                 //map.put(i, i+1);<br />                 <br />                 //map.put(a.get(i), a.get(i+1));<br />            }  <br />        <br />        System.out.println("Map"+map.toString());<br />           <br />        <br />        }<br />  <br />  private void listNodes(Node node, String indent) {<br />     try{<br />          <br />       String nodeName = node.getNodeName();<br />   //System.out.println(indent+" Node: " + nodeName);<br />   // if(nodeName == "id")<br />    short type = node.getNodeType();<br />    <br />   //System.out.println(indent+" Node Type: " + nodeType(type));<br />    if(type == TEXT_NODE){<br />         <br />         <br />//         System.out.println(indent+" Node is: "+(node).getParentNode().getNodeName());<br />         if((node).getParentNode().getNodeName()== "id"){<br />              //System.out.println(indent+" Node is: "+(node).getParentNode().getNodeName());<br />              System.out.println(indent+" key is: "+((Text)node).getWholeText());<br />              a.add(((Text)node).getWholeText());<br />         }<br />         if((node).getParentNode().getNodeName()== "val"){<br />              //System.out.println(indent+" Node is: "+(node).getParentNode().getNodeName());<br />              System.out.println(indent+" value is: "+((Text)node).getWholeText());<br />              a.add(((Text)node).getWholeText());<br />         }<br />         <br />         <br />    }<br />    <br />    NodeList list = node.getChildNodes();       <br />    if(list.getLength() > 0) {                  <br />     // System.out.println(indent+" Child Nodes of "+nodeName+" are:");<br />      for(int i = 0 ; i<list.getLength() ; i++) {<br />        listNodes(list.item(i),indent+"  ");     <br />      }<br />     <br />       <br />    }      <br />     } catch(Exception e){<br />          e.printStackTrace();<br />     }<br />  }<br /><br />  static String nodeType(short type) {<br />    switch(type) {<br />      case ELEMENT_NODE:                return "Element";<br />      case DOCUMENT_TYPE_NODE:          return "Document type";<br />      case ENTITY_NODE:                 return "Entity";<br />      case ENTITY_REFERENCE_NODE:       return "Entity reference";<br />      case NOTATION_NODE:               return "Notation";<br />      case TEXT_NODE:                   return "Text";<br />      case COMMENT_NODE:                return "Comment";<br />      case CDATA_SECTION_NODE:          return "CDATA Section";<br />      case ATTRIBUTE_NODE:              return "Attribute";<br />      case PROCESSING_INSTRUCTION_NODE: return "Attribute";<br />    }<br />    return "Unidentified";<br />  }<br /><br />  static String xmlString ="<?xml version=\"1.0\"?>" +<br />      "  <!DOCTYPE address" +<br />      "  [" +<br />      "     <!ELEMENT address (buildingnumber, street, city, state, zip)>" +<br />      <br />      "     <!ELEMENT buildingnumber (#PCDATA)>" +<br />      "     <!ELEMENT street (#PCDATA)>" +<br />      "     <!ELEMENT city (#PCDATA)>" +<br />      "     <!ELEMENT state (#PCDATA)>" +<br />      "     <!ELEMENT zip (#PCDATA)>" +<br />      "  ]>" +<br />      "" +<br />      "  <address>" +<br />      "    <buildingnumber> 29 </buildingnumber>" +<br />      "    <street> South Street</street>" +<br />      "    <city>Vancouver</city>" +<br />      "" +<br />      "    <state>BC</state>" +<br />      "    <zip>V6V 4U7</zip>" +<br />      "  </address>";<br />  <br />  static String xmlString1 ="<?xml version=\"1.0\"?>" +<br />  "  <!DOCTYPE retrCtx" +<br />  "  [" +<br />  <br />    <br />  "     <!ELEMENT retrCtx (id, val)>" +<br />  <br />  "     <!ELEMENT id (#PCDATA)>" +<br />  "     <!ELEMENT val (#PCDATA)>" +<br />  "       ]>" +<br />  "" +<br />  "<retrCtx ver = '1'>" +<br />  "  <item_map type='std'>" +<br />  "    <item>" +<br />  "    <id>rtrId</id>" +<br />  "    <val>00993236327</val>" +<br />  "    </item>" +<br />  "    <item>" +<br />  "    <id>rtrId2</id>" +<br />  "    <val>009932363278</val>" +<br />  "    </item>" +<br />  "  </item_map> " +<br />  "  <item_map type='std'>" +<br />  "    <item>" +<br />  "    <id>rtrId3</id>" +<br />  "    <val>00993236329</val>" +<br />  "    </item>" +<br />  "    <item>" +<br />  "    <id>rtrId4</id>" +<br />  "    <val>009932363210</val>" +<br />  "    </item>" +<br />  "  </item_map> " +<br />  "  </retrCtx>";<br />}

  • Sourcing : Error while Running Java Concurrent Program

    Hi All,
    Navigations:
    Application: Sourcing
    Responsibility : Sourcing Buyer
    Concurrent Program : Generate and Store Sourcing response spreadsheet
    I am trying to run
    Java Concurrent Program : Generate and Store Sourcing response spreadsheet in SRS Window,
    it completed with Error status.
    Please let me know How can I run this Concurrent Program with Normal status and able to view/save the Output.
    Please provide resolution on this.

    Thanks for your reply..
    Program: Generate and Store Sourcing response spreadsheet
    ShortName: PON_EXPORT_RESPONSE
    Application: Sourcing
    Executable: ExportResponseCp
    Method: Java Concurrent Program
    Responsibility : Sourcing Buyer.
    Has this ever worked? If yes, any changes been done recently?
    => No
    Is this the seeded concurrent program or a custom one?
    => Its seeded program.
    EBS: R12.1.3
    Login as Sourcing Buyer Responsibility :
    When you create RFQ and then Close RFQ and then create Surrogate quote and after you Export the Spreadsheet in SelfService Pages it generates the output.
    But if You run the concurrent program (Generate and Store Sourcing response spreadsheet) it errors out.
    Error : Exception in thread main java .lang.stringIndexOutOfBoundException:
    Thanks..

  • Error while running J2ME  program in KtoolKit

    hi,
    i am doing my project in j2me as i m developing a Jabber client .where my Client application has to connect jabber server through GPRS...
    so while running the project in KToolKt it ask that client application wants to send the information this requires airtime which may cost you money.is this ok?(TCP)
    after clicking on yes option program goes in deadlock...thorws following error message
    Error
    =====
    Warning: To avoid potential deadlock, operations that may block, such as
    networking, should be performed in a different thread than the
    commandAction() handler.
    ===================
    plz send me solution if you know....
    regards...

    jhd
    hi.
    this is a common error whenever we are accesing some other basedir other than current base we have to access that via new thread
    i.e suppose i have written the code to make HttpConnection in command Action we can not access it via same thread so we ahave to create another thread and from that thread we have to call our function in which we are making HttpConnection or any RMS operation......
    if(c == connectionCommand)
    new Thread(new Runnable() {
              public void run() {
                makeConnection();               
    }).start();          
    }in this code when you are pessing connectionCommand it will create new thread and from that thread it will call makeConnaction in which we have to write code to establish connection.
    i hope this will solve your problem.
    Regards,
    Jasmit vala.
    rajputjasmit@ yahoo.co.in

  • Error while running PING program using applet. Pls correct the code.-urgent

    Can anyone pls correct the error in the below code.
    Program : TestExec1
    Using : Applet
    Logic : Trying to display the ping status in the text area but it returns error...!
    CODING
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.awt.event.*;
    import java.applet.*;
    import java.*;
    /*<applet code="TestExec1" width=380 height=150>
    </applet>
    public class TestExec1 extends Applet
    String line = null;
    TextArea outputArea;
    Process p;     
         public void init()
              outputArea = new TextArea(20,20);
         public void start()
              try
                        Process p= Runtime.getRuntime().exec("ping 192.168.100.192 -t");
                        BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
                        while ((line = in.readLine()) != null)
                             outputArea.append("\n" + line);
                             System.out.println(line);
              catch (IOException e)
                        e.printStackTrace();
    Error : C:\Program Files\Java\jdk1.6.0_02\bin>appletviewer TestExec1.java
    java.security.AccessControlException: access denied (java.io.FilePermission <<AL
    L FILES>> execute)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at java.lang.SecurityManager.checkExec(SecurityManager.java:782)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:447)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)
    at TestExec1.start(TestExec1.java:31)
    at sun.applet.AppletPanel.run(AppletPanel.java:458)
    at java.lang.Thread.run(Thread.java:619)
    Regards
    ESM

    java.security.AccessControlException: access denied (java.io.FilePermission
    <<ALL FILES>> execute)This message tells you that the applet does not have permission to access/execute files. Access may be granted by either signing the applet, which allows the user to grant (or not grant) the access when running the applet, or by adding the necessary permission file to the user's computer.
    See http://java.sun.com/javase/6/docs/technotes/guides/security/index.html

  • Error while running Java application using Crystal Reports 2011

    Hello,
    I would like to ask for your help.
    Environment details:
    Java based standalone application in Development environment.
    Crystal Reports 2011 (no SP applied)
    Oracle 11g ( 32 bit client installed)
    Win7 64 bit OS.
    Workflow:
    While running the java application, which will display the reports I am getting the below mentioned error. I guess that is because I am missing the Crystal runtimes (Correct me if I am wrong).
    I know that CR2011 do not have any sdks/ jar available for deployment. In this case, which runtimes should I be using? Does installing CR2011 be enough in the development box?
    Please provide me the link from which I can download the same.
    Let me know if I need to provide more details on this. Any suggestions are most welcome.
    Thank You.
    Code used:
    reportClientDoc = new ReportClientDocument();
    System.err.println("Opening the Report ");
    reportClientDoc.open(REPORT_PATH, 0);
    // this is where the error or exception is thrown
    _Error: _
    log4j:WARN No appenders could be found for logger (com.crystaldecisions.reports.reportdefinition.ReportDocument).
    log4j:WARN Please initialize the log4j system properly.
    com.crystaldecisions.sdkreport.lib.ReportSDKException: com/businessobjects/reports/jdbinterface/common/DBException---- Error code:-2147467259 Error code name:failed
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:286)
                    at com.businessobjects.sdk.erom.jrc.a.<init>(SourceFile:43)
                    at com.businessobjects.sdk.erom.jrc.ReportAgentFactory.createAgent(SourceFile:46)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.<init>(SourceFile:703)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:662)
                    at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:632)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.if(SourceFile:504)
                    at com.crystaldecisions.sdk.report.application.ClientDocument.open(SourceFile:669)
                    at com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
                    at rp.batch.bo.RpJRCExportReport.runReportExport(RpJRCExportReport.java:517)
                    at rp.batch.bo.RpSchedReportRun.process(RpSchedReportRun.java:163)
                    at rp.batch.bo.RpSchedReportRun.drive(RpSchedReportRun.java:240)
                    at rp.batch.bo.RpSchedReportRun.main(RpSchedReportRun.java:265)
    Caused by: java.lang.NoClassDefFoundError: com/businessobjects/reports/jdbinterface/common/DBException
                    at com.crystaldecisions.reports.queryengine.Session.a2(SourceFile:244)
                    at com.crystaldecisions.reports.datafoundation.DataFoundation.do(SourceFile:376)
                    at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.do(SourceFile:111)
                    at com.crystaldecisions.reports.dataengine.datafoundation.CreateDataConnectionCommand.new(SourceFile:81)
                    at com.crystaldecisions.reports.common.CommandManager.a(SourceFile:71)
                    at com.crystaldecisions.reports.common.Document.a(SourceFile:203)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:442)
                    at com.businessobjects.reports.reportconverter.v12.e.a(SourceFile:231)
                    at com.businessobjects.reports.reportconverter.v12.d.m(SourceFile:192)
                    at com.businessobjects.reports.reportconverter.v12.f.if(SourceFile:210)
                    at com.businessobjects.reports.reportconverter.v12.V12SaveLoader.a(SourceFile:242)
                    at com.businessobjects.reports.loader.ReportLoader.a(SourceFile:205)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:137)
                    at com.businessobjects.reports.sdk.JRCReportLoader.a(SourceFile:76)
                    at com.businessobjects.reports.sdk.requesthandler.ReportDocumentRequestHandler.a(SourceFile:136)
                    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.<init>(SourceFile:229)
                    ... 12 more
    Caused by: java.lang.ClassNotFoundException: com.businessobjects.reports.jdbinterface.common.DBException
                    at java.net.URLClassLoader1.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:307)
                    at sun.misc.LauncherAppClassLoader.loadClass(Launcher.java:301)
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
                    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
                    ... 28 more

    Help me ...
    Ambient:
    Crystal Reports Viewer 14.0.0.0
    java.vendor = Sun Microsystems Inc.
    java.version = 1.6.0_37
    os.name = Windows NT (unknown)
    os.version = 6.2
    os.arch = amd64
    Exception:
    com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects.sdk.erom.jrc.ReportAgentFactory---- Error code:-2147215357 [CRSDK00000026] Error code name:internal
              at com.crystaldecisions.sdk.occa.report.lib.ReportSDKException.throwReportSDKException(ReportSDKException.java:112)
              at com.crystaldecisions.proxy.remoteagent.RemoteAgent.createDefaultAgent(RemoteAgent.java:1000)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.initRemoteAgent(ClientDocument.java:770)
              at com.crystaldecisions.sdk.occa.report.application.ClientDocument.open(ClientDocument.java:961)
              at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.open(ReportClientDocument.java:226)
              at src.HelloWorldSwing.createAndShowGUI(HelloWorldSwing.java:54)
              at src.HelloWorldSwing.main(HelloWorldSwing.java:24)
    Source:
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import com.crystaldecisions.ReportViewer.ReportViewerBean;
    import com.crystaldecisions.sdk.occa.report.application.DatabaseController;
    import com.crystaldecisions.sdk.occa.report.application.OpenReportOptions;
    import com.crystaldecisions.sdk.occa.report.application.ReportClientDocument;
    import com.crystaldecisions.sdk.occa.report.data.IConnectionInfo;
    import com.crystaldecisions.sdk.occa.report.reportsource.IReportSource;
    public class HelloWorldSwing {
               * @param args
              public static void main(String[] args) {
                        HelloWorldSwing pgm = new HelloWorldSwing();
                        try {
                                  pgm.createAndShowGUI();
                        } catch (Exception e) {
                                  e.printStackTrace();
                                  //JOptionPane.showMessageDialog(null, e.toString());
               * @throws Exception
              public void createAndShowGUI() throws Exception {
                        // Make sure we have nice window decorations.
                        JFrame.setDefaultLookAndFeelDecorated(false);
                        // Create and set up the window.
                        JFrame frame = new JFrame("HelloWorldSwing");
                        frame.setTitle("Titolo del Report");
                        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                        ReportViewerBean viewer = new ReportViewerBean();
                        viewer.init(new String[0], null, null, null);
                        ReportClientDocument rpt = new ReportClientDocument();
                        rpt.setReportAppServer(ReportClientDocument.inprocConnectionString); // inproc:jrc
                        rpt.open("Report.rpt", OpenReportOptions._openAsReadOnly);
                        IReportSource rptSource = rpt.getReportSource();
                        viewer.setReportSource(rptSource);
                        frame.getContentPane().add(viewer, BorderLayout.CENTER);
                        frame.setSize(1930, 1030);
                        frame.setVisible(true);
                        viewer.start();

  • Error while running Java Application as NT Service using INSTSRV

    Hi,
    I am trying to run Java Application as an NT Service using Instsrv.But when i start the service It works fine.when i stop the service it does not stop and it continues to run the application.When i uninstall the service It still executes.When i reboot my machine it stops .Is there any solutions for this.Any help is greatly appreciated.
    Thanks.

    I actually had similar situation. I used autoexnt.ext tool (it creats a service that can be called when rebooting) to start a batch file which in turn run a java program. After the program starts, it can only be stopped through Task Manager or Ctrl-C at the dos window (it creats a dos window) or close the window directly. Stopping the service has nothing to do with the program. I feel this is reasonable because the only function of the service here is to start the application. After that the service does not (very likely) have any connection with the program so whatever you do with the service will not affect the program itself. I wonnder if you are in the same situation.
    PC

  • Error while running the program

    Hello everybody
    I have installed jdk in my computer, but when I try to run the program it shows the following error
    "Unable to load the main class"
    The program is compiling properly the only problem is in running the program.
    What is the reason for this error and how can I fix this error?
    Regards

    Are you familiar with the classpath?
    It tells the JRE which directory has your *.class files.
    At the command line, you would java -cp  dir_name  class_file_nameIf you're using an IDE, check the menus at the top of the editor screen.

  • Error while loading java program using loadjava

    Hi
    I have oracle 8.1.7 in NT server. When I try to load a java program with load java it gives me the error like this
    Error while resolving class EchoInput
    ORA-00904: invalid column name
    loadjava: 1 errors
    Why this is happening. How can I resolve this. Any help is appreciated
    Thanks
    Santhosh

    You need to install teh jserver component.
    have your dba review this and run all java enabling scripts.
    look for it in the doc as initjvm.sql.

  • Error while running java proxy in PI 7.1

    Hi All,
    I had created a java proxy using nwds 7.1. This java proxy is called by XI channel and its synchronous.
    WHen i run my scenario in PI i am getting a error "Error while sending message: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Error processing inbound message. Exception: No remote bean found for reference of class $Proxy2919
    Kindly help me finding what can be the issue.
    Regards,
    Rajesh

    Go to the JNDI Browser (Nwa -> Problem Management), and check if the proxy was deployed correctly with the exact name "Proxy2919".
    Also, check the OSS note below.
    #1292633 - JPR: Throwing "No remote bean found for reference of class"

Maybe you are looking for

  • CIN-Pricing Procedure for Trading Goods

    Hi Gurus Need yr expertise... Currently we have trading goods process which do not require any excise duties but VAT or CST is required.. Could you pls advise what will be the best pricing procedure to be used as the proposed pricing procedure by SAP

  • Mail Application Crashes Everytime Open A Message

    I looked at the previously posted questions but did not find anything specific my problem. My mail application crashes every time I try to open an email. It only happens when I attempt to open the email. If the preview pane is open, the application c

  • How do I back up my iTunes folder to my time capsule?

    How do I back up my iTunes folder to my Time Capsule?

  • Apple Mail, IMAP messages are mangled

    I have just connected to my IMAP account with Apple Mail. It appears that there is an encoding problem. (It was using Outlook for Mac before because of work obligations, but I'd really prefer to use Apple Mail.) These messages still look okay in the

  • Display doesn't work anymore on my Encore WT8-A

    Hey everyone, I have an Encore WT8-A-102 with Windows 8.1 One morning, when I tried to start it (not from standby/hibernation but normal start) nothing happend anymore. the display stayed black. only when I touched the windows button sometimes it vib