Error in client java program

hi all
the following error occur on running the client program
C:\navneet\ejb_examples\hello>java HelloClient
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/logging/LogO
utputStream
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:124)
at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialCont
extFactory.java:118)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
71)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:242
at javax.naming.InitialContext.init(InitialContext.java:218)
at javax.naming.InitialContext.<init>(InitialContext.java:194)
at HelloClient.main(HelloClient.java:16)
the source code is
import java.rmi.RemoteException;
import java.util.Properties;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
import javax.naming.*;
import javax.rmi.PortableRemoteObject;
public class HelloClient {     
public static void main(String [] args) {     
try {          
          Properties props=System.getProperties();
          Context ctx=null;
          props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
          props.put(javax.naming.Context.PROVIDER_URL,"t3://localhost:7001");          
          ctx = new InitialContext(props);
     Object ref = ctx.lookup("helloBean.HelloHome");      
     HelloHome hello1 =      
(HelloHome)PortableRemoteObject.narrow(ref,HelloHome.class);
Hello1 helloHome = hello1.create();     
String message = helloHome.getMessage();
System.out.println("messsage from Bean====" +message);
// helloHome.remove();     //
     catch (NamingException ne){
     ne.printStackTrace();}
     catch (Exception exception) {     
System.err.println("Exception!");     
exception.printStackTrace();}
any one please help
thanx in advance

Hi !
make sure that your weblogic.jar in classpath
set classpath=;.;\bea\wlserver6.1\lib\weblogic.jar;
javac HelloClient .java
java HelloClient
Thanks
Ramu

Similar Messages

  • Mass processing - Error when processing Java programs / VMC out of memory

    When running a mass update background process that updates the status of a service order in CRM the job fails due to error 'Error when processing Java programs'. I checked the VMC (SM52) and noticed that there is an error about the VMC running out of memory.
    The background program can either be a PPF Action or a Z-ABAP program that performs the update. Both programs are performing a CRM_ORDER_INITIALIZE but it seems that the VMC is not releasing the memory fast enough.
    Is there anyway we can force the VMC to release the memory after processing of each individual order?
    Thanks!

    I got  similar issue and it got resolved by useing CRM_ORDER_INITILAIZE. Initalization should happen after every Order processing and see that only one header guid is passed to the the FM. May not be good option ,but just try by putting wait for 5secs after CRM_ORDER_INITILAIZE.

  • No Class found error in client java proxy

    Hi guys,
    I have configured a java proxy and I'm calling that proxy in a stand alone java program. I'm getting the below error when I execute the program.
    If any one can provide any inputs on the issue it'be great..
    Exception in thread "main" java.lang.NoClassDefFoundError: com/sap/aii/utilxi/sld/XIEntityInSld
         at com.sap.aii.proxy.xiruntime.core.XmlSystemAccess.getProperties(XmlSystemAccess.java:679)
         at com.sap.aii.proxy.xiruntime.core.XmlSystemAccess.getProperty(XmlSystemAccess.java:709)
         at com.sap.aii.proxy.xiruntime.core.XmlSystemAccess.initLogging(XmlSystemAccess.java:471)
         at com.sap.aii.proxy.xiruntime.core.XmlProxy.send(XmlProxy.java:79)
         at com.sap.aii.proxy.xiruntime.core.AbstractProxy$XmlProxyHelper.send(AbstractProxy.java:181)
         at com.sap.aii.proxy.xiruntime.core.AbstractProxy.send$(AbstractProxy.java:142)
         at com.unilever.aa.xproc.procComm.file.kalido.MIKalidoTestOutAs_PortType.mIKalidoTestOutAs(MIKalidoTestOutAs_PortType.java:18)
         at com.bcone.FTP.TestFTPClient.main(TestFTPClient.java:60)

    Try following libs:
    From XI:
    aii_adapter_xi_svc.jar, aii_af_cci.jar, aii_af_cpa.jar, aii_af_mp.jar,
    aii_af_ms_api.jar, aii_af_ms_spi.jar,
    aii_af_service_message_security.jar
    From the J2EE client JARs: (/usr/sap/<SID>/JC00/j2ee/j2eeclient/signed):
    ejb20.jar, exception.jar, guidgenerator.jar, jARM.jar, jperflib.jar,
    jta.jar, log_api.jar, logging.jar, sapj2eeclient.jar, sapni.jar,
    sapxmltoolkit.jar
    See also this guide:
    SAP on DB2 for Linux, UNIX, and Windows
    Regards
    Stefan

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

  • Error in running Java Program

    Hi,
    I have a problem in running my simple java program after the installing of the JSDK.
    I was able to compile my work but when I type java HelloWorld, the following error appears:
    Exception in thread "main" java.lang.NoClassDefFoundError:HelloWorld.
    The strange thing is I install the application in another machine and it works.
    Is there anyone that can help me with this problem.
    Thanks in advance.

    Yes I run the java program in the same folder where the class file is reside.
    I can confirm that there is no problem with the class file cause I had run it in another machine and it did work.
    Thanks.

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

  • 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 calling java program from ABAP

    Hi Experts,
    We are trying for RFC inbound scenario.
    We followed the below blog
    /people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
    We are working with SAP JCO 3.0.2
    We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
    After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
    If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
    But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
    'STFC_CONNECTION' could not be found in the server repository.
    If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
    'RFCPING' could not be found in the server repository.
    We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
    Please help us in resolving this issue.
    Thanks
    Prince

    Pabi,
    Using the RFC connection,we can establish a link between Java and SAP.
    Afterwards,hope we can call Java program from ABAP.
    Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
    DATA: REQUTEXT LIKE SY-LISEL,
          RESPTEXT LIKE SY-LISEL,
          ECHOTEXT LIKE SY-LISEL.
    DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
    DATA: RFC_MESS(128).
    REQUTEXT = 'HELLO WORLD'.
    RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
    CALL FUNCTION 'STFC_CONNECTION'
       DESTINATION RFCDEST
       EXPORTING
         REQUTEXT = REQUTEXT
       IMPORTING
         RESPTEXT = RESPTEXT
         ECHOTEXT = ECHOTEXT
       EXCEPTIONS
         SYSTEM_FAILURE        = 1 MESSAGE RFC_MESS
         COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
    IF SY-SUBRC NE 0.
        WRITE: / 'Call STFC_CONNECTION         SY-SUBRC = ', SY-SUBRC.
        WRITE: / RFC_MESS.
    ENDIF.
    Regards,
    Sree

  • Getting error when calling Java program from JSP page.

    Hi All,
    I'm getting below error msg, previously the page use to display and also java program use to run properly, but suddenly today i came across this error. May be some settings have been changed on my server, since number of developers uses this common webserver here.
    Any help would be much appreciated. Pls let me know if if anyone requires much info regarding this one.
    javax.servlet.ServletException: sun/tools/javac/Main
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at java.lang.Throwable.fillInStackTrace(Compiled Code)
         at java.lang.Throwable.(Compiled Code)
         at java.lang.Exception.(Compiled Code)
         at javax.servlet.ServletException.(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
         at javax.servlet.http.HttpServlet.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.doService(Compiled Code)
         at org.apache.tomcat.core.Handler.service(Compiled Code)
         at org.apache.tomcat.core.ServletWrapper.service(Compiled Code)
         at org.apache.tomcat.facade.RequestDispatcherImpl.doForward
    Root cause:
    java.lang.NoClassDefFoundError: sun/tools/javac/Main
         at org.apache.jasper.compiler.SunJavaCompiler.compile(Compiled Code)
         at org.apache.jasper.compiler.Compiler.compile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.doLoadJSP(Compiled Code)
         at org.apache.jasper.servlet.JasperLoader12.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.loadJSP(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.loadIfNecessary(Compiled Code)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(Compiled Code)
         at org.apache.jasper.servlet.JspServlet.service(Compiled Code)
    Message was edited by:
    shukla_arvind

    did u happen to upgrade ur jdk?????

  • Error invoking client Java Proxy

    I have a scenario with Client Java Proxy in which a JSP gives call to the EJBs generated from the Message interface. Everything is deployed correctly and when I try to invoke the JSP, following error is reported in the defaultTrace file of J2EE engine.
    com.sap.aii.proxy.xiruntime.core.XmlLandscapeAccess.getJPRConfigurationFromSLD()
    Error getting JPR configuration from SLD. Exception: entityNotFound#
    I found pointers to SAP Note # 809420 as a result of SDN search.
    Has anybody faced similar situation?
    Regards,
    Amol

    Stefan,
    Things worked after the business system was created in SLD.
    I dont see the radio buttons for rewarding points against your post. Will try later to reward points.
    Thanks for your help.
    Regards,
    Amol

  • Why do we obtain a java.rmi.MarshalException during a stateless session bean method invocation from a client java program?

    Hello,
    we're using iAS SP3.
    We deployed a stateless session bean that has a business methods with a Vector as argument (put (vector, String)).
    If we call it from a servlet, it works fine. But when we try to call it from a thread, started in a standalone java client program, we obtain a java.rmi.MarshalException.
    We tried to use Vector and HashSet objects as arguments, but we always obtain this kind of exception. It seems strange because a similar
    method that returns a Collection of objects (getAll) works fine. This is the our bean Remote Interface:
    public interface Receive extends EJBObject {
    public void putMessage(Message message, java.lang.String la) throws RemoteException; // it works fine!!!
    public void putMessages(java.util.Vector messages, java.lang.String la) throws RemoteException; // it doesn't work!!!
    Collection getAll (java.lang.String la) throws RemoteException, EJBException; // it works fine!!!!
    This is the java client stack trace:
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    org.omg.CORBA.MARSHAL: minor code: 0 completed: No
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Class.java:241)
    at com.sun.corba.ee.internal.iiop.ReplyMessage.getSystemException(ReplyMessage.java:93)
    at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:82)
    at com.sun.corba.ee.internal.corba.ClientDelegate.invoke(ClientDelegate.java:199)
    at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:248)
    at ejb._Receive_Stub.putMessages(_Receive_Stub.java:731)
    at commlayer.Receiver.run(Receiver.java:67)
    Does anyone know how to solve this problem?
    Thank you in advance,
    Maurizio

    This is big bug!
    This seems to occur when you try to return complex objects (e.g. a vector of classes or even the Date class).
    As a workaround you can add this Ejb or module to the iPlanet Classpath (NT via kregedit, Sun via iasenv skript.).
    This helps but i really don't know why.
    It should be fixed in 6.5, maybe. We'll see.
    Regards

  • CLIENT_RECEIVE_FAILED Error in Client Java Proxy

    Hi. All..
    Do you experience CLIENT_RECEIVE_FAILED Error ?
    This pattern is java proxy -> xi -> abap proxy.
    It's occurring in xi server ( QAS ) . ( I guess that is internal error. )
    I did refresh CPACache. but I don't solve.
    This interface is very good execution in DEV.
    but has occured CLIENT_RECEIVE_FAILED Error in QAS.
    What's wrong?
    Error message following....
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="INTERNAL">CLIENT_RECEIVE_FAILED</SAP:Code>
      <SAP:P1>110</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Fehler beim Empfangen per HTTP (Fehlercode: 110, Fehlertext: )</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>

    U may do the following
    1. Check in SMICM if your HTTP service is running.
    2. Upgrade the ICM kernel patch.
    3. For SP15 there is a list of corrections -have a look into this SAP note-897583
    Regards,
    Prateek

  • How to execute unix script in java program that is on unix .

    hi ,
    I want to call "sendfax" script that is for sending fax to Hylafax server.
    This sendfax script is called in client java program.

    I want to call "sendfax" script that is for sending
    fax to Hylafax server.
    This sendfax script is called in client java program.And what is your problem?

  • Error in ONS logs while implmenting FCF on oracle RAC from java program

    I have java prog on client machine that uses properties from a property file.While making the connection to the ONS port on the oracle RAC server to implement FCF the program is throwing error as below:
    java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    and when i checked the ons logs for that node the logs are as follows:
    Connection 5,199.xxx.xxxxxx,8200 header RCV failed (Connect
    ion reset by peer) coFlags=1002a
    These logs are generated only when java program tries to connect else the daemon started without any errors.
    But sometime it connets and gives the desired output.
    Please advice and do let me know in case you need more information.
    Java program on the client machine is as follows..
    * Oracle Support Services
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.util.Enumeration;
    import java.util.Properties;
    import java.util.ResourceBundle;
    import oracle.jdbc.pool.OracleConnectionCacheManager;
    import oracle.jdbc.pool.OracleDataSource;
    public class FCFConnectionCacheExample
    private OracleDataSource ods = null;
    private OracleConnectionCacheManager occm = null;
    private Properties cacheProperties = null;
    public FCFConnectionCacheExample() throws SQLException
    // create a cache manager
    occm = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    Properties props = loadProperties("fcfcache");
    cacheProperties = new java.util.Properties();
    cacheProperties.setProperty("InitialLimit", (String)props.get("InitialLimit"));
    cacheProperties.setProperty("MinLimit", (String)props.get("MinLimit"));
    cacheProperties.setProperty("MaxLimit", (String)props.get("MaxLimit"));
    ods = new OracleDataSource();
    ods.setUser((String)props.get("username"));
    ods.setPassword((String)props.get("password"));
    ods.setConnectionCachingEnabled(true);
    ods.setFastConnectionFailoverEnabled(true);
    ods.setConnectionCacheName("MyCache");
    ods.setONSConfiguration((String)props.get("onsconfig"));
    ods.setURL((String)props.get("url"));
    occm.createCache("MyCache", ods, cacheProperties);
    private Properties loadProperties (String file)
    Properties prop = new Properties();
    ResourceBundle bundle = ResourceBundle.getBundle(file);
    Enumeration enumlist = bundle.getKeys();
    String key = null;
    while (enumlist.hasMoreElements())
    key = (String) enumlist.nextElement();
    prop.put(key, bundle.getObject(key));
    return prop;
    public void run() throws Exception
    Connection conn = null;
    Statement stmt = null;
    ResultSet rset = null;
    String sQuery =
    "select sys_context('userenv', 'instance_name'), " +
    "sys_context('userenv', 'server_host'), " +
    "sys_context('userenv', 'service_name') " +
    "from dual";
    try
    conn = null;
    conn = ods.getConnection();
    stmt = conn.createStatement();
    rset = stmt.executeQuery(sQuery);
    rset.next();
    System.out.println("-----------");
    System.out.println("Instance -> " + rset.getString(1));
    System.out.println("Host -> " + rset.getString(2));
    System.out.println("Service -> " + rset.getString(3));
    System.out.println("NumberOfAvailableConnections: " +
    occm.getNumberOfAvailableConnections("MyCache"));
    System.out.println("NumberOfActiveConnections: " +
    occm.getNumberOfActiveConnections("MyCache"));
    System.out.println("-----------");
    catch (SQLException sqle)
    while (sqle != null)
    System.out.println("SQL State: " + sqle.getSQLState());
    System.out.println("Vendor Specific code: " +
    sqle.getErrorCode());
    Throwable te = sqle.getCause();
    while (te != null) {
    System.out.print("Throwable: " + te);
    te = te.getCause();
    sqle.printStackTrace();
    sqle = sqle.getNextException();
    finally
    try
    rset.close();
    stmt.close();
    conn.close();
    catch (SQLException sqle2)
    System.out.println("Error during close");
    public static void main(String[] args)
    System.out.println(">> PROGRAM using JDBC thin driver no oracle client required");
    System.out.println(">> ojdbc14.jar and ons.jar must be in the CLASSPATH");
    System.out.println(">> Press CNTRL C to exit running program\n");
    try
    FCFConnectionCacheExample test = new FCFConnectionCacheExample();
    while (true)
    test.run();
    Thread.currentThread().sleep(10000);
    catch (InterruptedException e)
    System.out.println("PROGRAM Ended by user");
    catch (Exception ex)
    System.out.println("Error Occurred in MAIN");
    ex.printStackTrace();
    Some of the info i have deleted intensionally as this is confidential
    Property file is as follows
    # properties required for test
    username=test
    password=test
    InitialLimit=10
    MinLimit=10
    MaxLimit=20
    onsconfig=nodes=RAC-node1:port,RAC-node2:port
    url=jdbc:oracle:thin:@(DESCRIPTION= \
    (LOAD_BALANCE=yes) \
    (ADDRESS=(PROTOCOL=TCP)(HOST=RAC-node1)(PORT=1521)) \
    (ADDRESS=(PROTOCOL=TCP)(HOST=RAC-node1)(PORT=1521)) \
    (CONNECT_DATA=(service_name=RAC_SERVICE)))

    Hi;
    Please check below note:
    Link Errors While Installing CRS & RAC Database software [ID 438747.1]
    Codeword File $TIMEBOMB_CWD,/opt/aCC/newconfig/aCC.cwd Missing Or Empty [ID 552893.1]
    Regard
    Helios

Maybe you are looking for