Need help to run  The First EJB program

hello i m new to the ejb
i tried to run the very simple exaple i was able to compile the following code and deploy them to the j2ee server but i wavs un able to run the cilent program in the same machine
here are the codes
// this is remote intterface class
public interface remote extends javax.ejb.EJBObject{
public String show() throws java.rmi.RemoteException;
//home interface
import javax.ejb.*;
import java.rmi.*;
public interface homeinter extends EJBHome{
remote create()throws CreateException,RemoteException;
//bean
import javax.ejb.SessionBean;
import javax.ejb.EJBException;
import java.rmi.RemoteException;
import javax.ejb.SessionContext;
public class bean implements SessionBean {
SessionContext sct;
public String show() throws RemoteException {
return " this is from bean";
public void ejbActivate(){}
public void ejbPassivate(){}
public void ejbCreate(){}
public void ejbRemove(){}
public void setSessionContext(SessionContext set){
this.sct=set;
// client
import javax.ejb.*;
import javax.rmi.*;
import javax.naming.*;
import java.rmi.*;
public class client {
public static void main(String[] args) {
try{
InitialContext ic= new InitialContext();
Object obj= ic.lookup("MySecond");
homeinter h=(homeinter)PortableRemoteObject.narrow(obj,homeinter.class);
remote r=h.create();
System.out.println("the return value is" + r.show());
}catch(Exception e){
e.printStackTrace();
in the DOS prompt i tried to run the programme like
set CPATH=.;c:\j2ee\lib\j2ee.jar;secondClient.jar
java -Dorg.omg.CORBA.ORBInitialHost=lacalhost -classpath %CPATH% client
then i had the following error mesage
C:\ejb>set CPATH=.;c:\j2ee\lib\j2ee.jar;secondClient.jar
C:\ejb>java -Dorg.omg.CORBA.ORBInitialHost=Localhost -classpath .;c:\j2ee\lib\
j2ee.jar;secondClient.jar client
Exception in thread "main" java.lang.NoSuchMethodError: loadClass0
at com.sun.corba.ee.internal.util.JDKClassLoader.specialLoadClass(Native
Method)
at com.sun.corba.ee.internal.util.JDKClassLoader.loadClass(JDKClassLoade
r.java:58)
at com.sun.corba.ee.internal.util.JDKBridge.loadClassM(JDKBridge.java:18
0)
at com.sun.corba.ee.internal.util.JDKBridge.loadClass(JDKBridge.java:83)
at com.sun.corba.ee.internal.javax.rmi.CORBA.Util.loadClass(Util.java:37
8)
at javax.rmi.CORBA.Util.loadClass(Unknown Source)
at javax.rmi.PortableRemoteObject.createDelegateIfSpecified(Unknown Sour
ce)
at javax.rmi.PortableRemoteObject.<clinit>(Unknown Source)
at com.sun.enterprise.naming.SerialContext.getProvider(SerialContext.jav
a:57)
at com.sun.enterprise.naming.SerialContext.<init>(SerialContext.java:79)
at com.sun.enterprise.naming.SerialInitContextFactory.getInitialContext(
SerialInitContextFactory.java:54)
at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
at javax.naming.InitialContext.init(Unknown Source)
at javax.naming.InitialContext.<init>(Unknown Source)
at client.main(client.java:10)
pls give me a solution
thank you

1. which app server u r using ? R u using RI ?
2. what is this secondclient.jar ?
3. Have u added server specific jar containing implementation of IntialConrtextFactory in the classpath of client?
4. If using RI, then I suppose u will have to set "Support Client Choice" (Possibly) to true, then generate client.jar.
5. Which IDE u r using (If any) ?
6. Are u sure that ur jar file (containng EJBs) deployed successfully ?
7. Almost every server provides GUI console sort of , u can check whether it was deployed successfuly ?
Pls update
GiveMeJ
Sanjeev

Similar Messages

  • I need help in making the programe which updates our code into client machi

    I need help in making the programme which updates our code into client machine from the server.
    As yahoo messanger does if there is any updated version of yahoo messanger.
    It asks when we login into it do you want to update new version of yahoo messanger
    It automatically updates it
    Need Help??

    Sounds to me like you need Java Web Start.

  • I am trying to reinstall Windows on my macbook pro.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."

    I am trying to reinstall Windows (would not launch).  I removed the partition and started over.  I downloaded the support files and Windows 7 iso file to a USB drive.  However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode."  I was successful before, what am I doing wrong this time?

    Try a restart.
    If that doesn't fix the problem, shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application unistaller. For each disable/delete, you will need to restart if you don't do them all at once.
    Safe Mode
    Safe Mode - About
    General information.
    Isolating issues in Mac OS X
    Troubleshooting Permission Issues
    Step by Step to Fix Your Mac

  • I need help in booting the microsoft operating system

              i need help in booting the microsoft operating system from startup.

    Which version of OS X are you running? All you need to do is to purchase a retail copy of whichever flavor of Windows you like (I prefer Windows 7 Professional to Win 8.1) and use Boot Camp to install same. Then you'll be able to boot into either Mac OS or Windows by holding down the option key.
    Boot Camp -> http://support.apple.com/kb/ht1461.
    Good luck,
    Clinton

  • Always pop-up  error mesage when i run the cd-rom program

    Always pop-up  error mesage when i run the cd-rom program - Macromedia Projector發生問題,必須關閉,謹此致歉

    You need to disable "Autoplay" for your CD drive. In the Control Panel under Hardware.

  • I just bought my MacBook Pro 13" and I tried to install an anti virus but then it went into a grey folder with a question mark I need help with restoring the iOS please

    I need help taking out the grey folder with the question mark and I've try everything except the CD thing because my MacBook didn't come with one so I really need help please

    What anti-virus software did you install? Although there's a lot of bad anti-virus software out there, no anti-virus software should cause such a problem. A gray screen with a flashing question mark on a folder means that no bootable system could be found, which means that the system was badly damaged or corrupt. Even installing bad software would not normally cause that, so either there was something badly wrong with the system already or the anti-virus software you tried to install was really, really bad!
    As mende1 says, you need to reinstall the system at this point. After your system is back up and running, read my Mac Malware Guide. If, after reading that, you want anti-virus software, use one of the programms recommended in that guide.

  • The query just run the first time, the second doesnt run

    The query just run the first time, the second doesnt run, i checked it in the SM50 and appear this msg:
    CL_RSR_CACHE_BO_FF============CP
    its not a problem of indexes, i repaired it but its really weird cause the first time the query run ok, the second doesnt, it seems that the cache is confused or i dont know, help guys, i'll really appreciate it

    I was watching the notes, its really weird when i load the cube and execute the query for the first time, its ok, to the second stay in cache, but i was watching that the cube doesnt allow me activat the BD statistics, i dont know if this is necesary to improve the performance of the query, what i know is this:
    1- before i create a Hierarchy for an infoobject thta is in the cube ,  the query used to run ok. Now when i load the first time and execute its ok, but the second stay in cache.
    2- now i can activate the statistics for the cube, the indexes are ok, i checked for the RSRV and all is ok less the statistics.
    what can i do help friends...

  • New to Forms, need help in Installing the Summit Application

    Can someone guide me in installing Summit appl. and a runtime env. configuration. I am using 10g Dev. and 10g DB.
    I have put the complete summit folder (got it from OTN) in C:/ and was successful in importing the summit data from the command line.
    the problems i am facing are:
    *Should i directly point to the summit folder in the c:/ while entering values for forms_path in the registry?
    *next point in the readme file says
    compile the application. The file gen.bat will generate files under microsoft windows. What application should I compile and how?
    Runtime environment configuration
    # Summit Application
    Alias /summit/ "C:\summit/"
    *this has to be added to the HTTPD.CONF file in Apache.
    But i have found this file in my pc at this loc: (C:\DevSuiteHome_1\perl\site\5.6.1\lib\Apache) Is this the same file?
    [summit]
    IE=JInitiator
    archive_jini=f60all_jinit.jar,/summit/RoundedButton.class
    userid=summit/summit@<connect_string>
    form=customers
    pageTitle=Summit
    splashScreen=no
    lookAndFeel=oracle
    separateFrame=false
    width=994
    height=582
    serverapp=/summit/summit_reg
    envFile=summit.env
    the above is to be added to the FORMSWEB.CFG file, which i found. can i just change the connect_string and add it at the bottom of the file that i view in notepad. or do i have to fit it in somewhere in between the existing code in the file.
    PLEASE HELP!!

    The first thing you must realize is that this Demo is very old and was created for a very old Forms version (6.0.x). At least three new releases have come out since this demo was created.
    The documentation for the demo is specific to that old version. Every reference to "60" should be removed. For example a reference to FORMS60_PATH has now been changed to FORMS_PATH. This applies to ALL variables.
    The same applies to file names. For example f60all.jar is now frmall.jar. Same is true for f60all_jinit.jar, which is now frmall_jinit.jar.
    So, as you can see copying the README word for word is going to cause you problems.
    Here is an overview of what you likely need to do based on your last update:
    1. Verify that you successfully imported the database objects related to the demo. Login as summit and see if the tables and data actually exist. If not, this should be corrected first.
    2. Whether you use default.env or summit.env is entirely up to you. If you choose to use default.env, the only thing I can think of that would need to be changed is the FORMS_PATH. Add the path to where your FMX, MMX, and PLX files will be located.
    If you choose to use summit.env, copy the file to ..\forms\server (this is the same directory where you will find default.env). Open this file in a text editor. You will need to change all of the "60" references like I previously mentioned. You will likely also need to change the value of ORACLE_HOME as well as many others. This is why using the existing default.env would probably be easier.
    If you carefully read the contents of summit.env, you should be able to understand what needs to be changed. I'm sure many of the directories noted in the file won't even exist. You need to set them to the equivalent on your system.
    3. If you plan to use a "gen.bat" file to compile the application, you will likely need to open it in a text editor first. Verify that FORMS_PATH, ORACLE_HOME, PATH and all other variables are correctly set.
    4. If you are using Developer Suite there is no Apache, so setting the Alias is a little different. However, as previously mentioned, this is unnecessary anyway IF you copy the demos CLASS and JAR files to the ..\forms\java directory. You will then not use the Alias reference in your ARCHIVE and ARCHIVE_JINI entries. For example simply do this:
    archive_jini=frmall_jinit.jar,RoundedButton.class
    archive=frmall_jinit.jar,RoundedButton.class
    5. As mentioned, your formsweb.cfg entries will look like this and should be at the bottom of the file below the existing entries:
    [summit]
    archive_jini=frmall_jinit.jar,/summit/RoundedButton.class
    userid=summit/summit@ORCL
    form=customers
    pageTitle=Summit
    splashScreen=no
    lookAndFeel=oracle
    separateFrame=false
    width=994
    height=582
    serverApp=summit_reg
    envFile=summit.env
    The reference to serverApp is for access to the .dat file, which I will assume you have in your C:\summit directory. Again, remove the Alias reference and copy the file within the Oracle Home where the original is found. If the demo .dat file is named "Registry.dat", rename the original so you can revert back to it later.
    This file should be stored in:...\forms\java\oracle\forms\registry
    If you really want to create the Alias and follow the instructions as closely as possible, you will find that the Alias should be configured in the following:
    ...\j2ee\DevSuite\application-deployments\forms\formsweb\orion-web.xml
    Use the existing entries as an example. Your entry will look something like this:
    <virtual-directory virtual-path="/summit" real-path="C:\summit" />
    If you are new to all of this, I would recommend that you flip through some of the documentation. Starting with a demo before understanding how the product works is probably not the best approach. Here are some references to useful documentation. References to additional documentation can be found in link on these pages. Be aware that most documentation which was created for Forms 9.0.4 will still apply to 10.1.2.
    Forms 10.1.2 Tech Listing
    http://www.oracle.com/technology/products/forms/techlisting10gR2.html
    Forms 9.0.4 Tech Listing
    http://www.oracle.com/technology/products/forms/techlisting10g.html
    Forms 10.1.2 Online Help (same as Help found in Builder)
    http://www.oracle.com/webapps/online-help/forms/10g/
    Forms 10.1.2 Deployment Guide
    http://download.oracle.com/docs/cd/B19375_07/doc/frs/forms/B14032_03/toc.htm

  • Need script to run on first boot then remove itself

    I am working on panther and tiger images to deploy in labs at middle schools. There is a piece of software that the district owns that is network aware and each computer on a network running this software needs its own individual station number set in a config file. I have written a script that will set this number to be the last 3 digits of the static ip address of the computer and i can run this from ard on multiple computers but i would like to somehow include this script in the image so it is run the first time the computer boots up after being cloned and then does not run again. We also use virex on these computers and when we clone with virex installed we are having problems updating the defs. I would like to also be able to have a folder with the virex package file in it and on first bootup after the clone have a script run and install virex on the first boot.
    I am sure this is not too difficult but I have not done anything like this before, maybe a couple oneliners to get me started, Thanks.
    Do not want to use post action items in netrestore.
    Mark

    You may want to post your question in the Unix discussions:
    http://discussions.apple.com/forum.jspa?forumID=735

  • I need help understanding how the Apple components integrate to create a system across all my devices?

    I need help understanding how the Apple components connect to create a whole system across all my devices?
    Is there a resource that describes current system and associated functionality?
    For example:
    Buy A, B, C to achieve "X" 
    You will need:
    an internet provider which supports <specs>
    add D to achieve "Y"
    You will need:
    an internet provider which supports <specs>
    add "E" to achieve "Z"
    You will need:
    an internet provider which supports <specs>
    For example, I am looking at the Gen 6 Airport extreme.  For intended performance do I need broadband? if so what are the specs, or will basic internet service suffice?  Do I need the internet provider's modem or does the Airport extreme replace that?  And then I think, if I am doing this, I should also look at Apple TV....What do I need and Why?  Then I look at the New Desk top coming out in the fall, and I think well, if I wait and get this, what does this component do for the system, and what becomes redundant? What does this awesome desktop do for my ability to sit and use a new macbook air when I travel  or sit on the couch in my PJs?
    If there was a place that plainly stated "if you buy the new dektop you can configure a system including only these components and achieve <this result> and by adding <additional components> you will achieve this result.
    I have been to the genius store a few times, but I come out of there more confused unless I have SPECIFIC questions or already know what to buy. 
    A "System Configuration App" would be a really great sales tool--Just saying.

    I have no idea what "fully optimized" means.
    No Apple device will let you watch broadcast TV. The Apple TV is a good option for watching streaming TV from iTunes, NetFlix and Hulu. If you want to watch from other sources, you may need to look at other devices.
    Any Mac computer or iPad will allow you to surf the web.
    What business software?
    Time Capsule is a good option for back ups.
    Update what across all devices?
    For accessing documents from all devices, a service like Dropbox is your best bet.
    I have no idea what "step as far away from an internet provider as possible" means. If you want Internet access, you need an Internet provider.
    Lighting fast speed for what? Processor? The specs are listed for all devices in the Online Store. Internet? We're back to the service provider.
    Technology changes. The only way to keep pace with it beyond a couple of years is to buy new stuff.
    The bottom line is you need to look at the specs for devices availble and at your budget and decide what best meets your needs. If you are unable to do that on your own, there are lot of technology consultants out there who will, for a fee, look at your exact situation, make recommendations and even handle the purchase and set up. Perhaps that would be the best route for you.
    Best of luck.

  • When I click on the 'help' key in the elements 12 program it wants to open it in Firefox2. Firefox doesn't work on my Macbook Pro Air. I use Safari. How do I get it to open?

    When I click on the 'help' key in the elements 12 program it wants to open it in Firefox2. Firefox doesn't work on my Macbook Pro Air. I use Safari. How do I get it to open?

    Hmm, that is very strange. I agree with MichelB that it's probably best just to get the PDF, but you can try going to your username>library>preferences and deleting:
    com.adobe.PhotoshopElements.plist
    Adobe Photoshop Elements 12 settings
    Adobe Photoshop Elements 12 paths
    To see the library, click the Go menu in the Finder and hold down the option key and it will appear below the little house for your user account. While you're in there it wouldn't be a bad idea to go to the Saved Application States folder and delete anything pertaining to PSE.
    Repair permissions and see if that does it.

  • I need help to remove the wrong email on my Iphone.  I can't down load app because my apple ID doese not match with the wrong email please help

    I need help to remove the wrong email on my Iphone.  the represnter who set up my phone put in the wrong email, and now I can't down loand apps on my phone because the apple ID does not match

    So sign out of the Apple ID under Settings > iTunes & App Store, then sign in with your own.

  • Need help to trace the place where error occuring in Web UI of type System

    Hi All,
    Need help to trace the place where error occurring in Web UI of type System error,
    this error coming while saving the corporate account creation,
    error message description : - System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_SEGMENT
    System error: Interruption in Routine READ TABLE GT_CHAR_VAL, CHAR_NAME = PVTLTD_CLEAN_CLASS-CP
    thanking you.
    Best Regards,
    VijHyd

    Hi Nagaraj,
    See that the mandatory SICF setting are enabled or Active in the SICF Services.  Follow the steps as below:-
    Enter the TCode SICF
    Execute the same for Hierarchy Type SICF.
    Check the following SAP Note 1295006.
    If every thing is Active then, the IC Agent role will open.
    Still if it is not opening Let me know.
    regards,
    Sarangamath

  • Need help in formatting the Date - Date does not

    Need help in formatting the Date - Date does not formats and give Not a valid month error in the below scenario.
    select oc.ST_PGM_MGR, r.ag_dnum, get_major_work_type(r.perf_eval_rtng_id) "v_work_code", r.ag_dnum_supp "supp", r.intfinal, to_char(r.formdate,'MM/DD/YYYY') "formdate", to_char(r.servfrom,'MM/DD/YYYY') "srv_from", to_char(r.servto,'MM/DD/YYYY') "srv_to", descript, add_months(to_char
    --- Bellow line of Code on trying to format it to mm/dd/yyyy gives the error
    (r.formdate, 'DD-MON-YYYY'),12) "formdate2"
    from  table REdited by: Lucy Discover on Jul 7, 2011 11:34 AM
    Edited by: Lucy Discover on Jul 7, 2011 1:05 PM

    Your syntax is wrong - look at the post above where this syntax is given:
    to_char (add_months(r.formdate,12), 'MM/DD/YYYY') "formdate2"Look at the formula from a logical perspective - "inside out" to read what is happening -
    take formdate, add 12 months
    add_months(r.formdate, 12)then apply the to_char format mask - basic syntax
    to_char(date, 'MM/DD/YYYY')Compare to your syntax:
    to_char(add_months(r.formdate, 'MM/DD/YYYY'),12) "formdate2"You will see your format string inside the call to add_months, and your 12 inside the call to to_char.
    Good luck!

  • Need help in understanding the error ORA-01843: not a valid month - ECX_ACT

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

    Hello All,
    We need help in understanding the Transaction Monitor -> Processing Message (error "ORA-01843: not a valid month - ECX_ACTIONS.GET_CONVERTED_DATE").
    And how to enable the log for Transaction Monitor -> Processing Logfile.
    Actually we are trying to import the Purchase Order XML (OAG) into eBusiness Suite via BPEL Process Manager using the Oracle Applications Adapter. The process is working fine with expected payload until it reaches the XML Gateway Transaction Monitor, where we are getting this error.
    thanks
    muthu.

Maybe you are looking for

  • Connect to multiple drives in the same directory?

    Please pardon me for not using correct terminology. I cannot mount (map) two drives in the same directory. I use "Go >Connect to Server >smb://fs.domain.edu/~directory/folder1" and the folder1 icon pops up on my desktop. Then if I use the same struct

  • Transfering data from sand box to development server

    Hi, we created some production orders using co01 t-code in sand box. we would like to copy / move those orders in development server. is it possible? if yes pls guide me. thanking you in advance.

  • FOX tips n tricks in IP

    Hi Marc,              1. As discussed in the webinar, I would like to know how to find the generated ABAP program for the FOX , so that I can debug it. Kindly let us know all possible ways of debugging a FOX in IP.              2. What is the ABAP Pr

  • Keyboard selection of layers

    I'm more of a keyboard user than a mouse user and would like to select layer with the keyboard (ie. move up or down selecting layers in the timeline with keystrokes like ctrl-down/ctrl-up in AfterEffects) but can't seem to find a way to assign that a

  • Can i return an iPod to apple from a third party seller

    I got an ipod from amazon. Found out it was from a third party seller and not amazon itself. I got it out and set it up. I recieved a case for it in the mail 2 days later and went to put it on. At that point I realized that it does not have a rear fa