NoInitialContextException error with simple EJB

I am trying some of the basic EJB excercises in Mark Wutka's Using Java 2 Enterprixe Edition. The EJB is deployed using the server that comes with the Sun ej2ee SDK.
When starting the client, I get
Exception: 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
I am confused about this, as I understood that when using the j2ee server, this parameter is already defined via the j2ee.jar library. The only reference to this error I could find stated that it would occur if the j2ee.jar file is not in the classpath. Unfortunately, it is in mine, so it doesn't help.
I've included the code for the ejb, but it's just generic code I've seen in lots of tutorials.
package usingj2ee.hello;
import java.util.*;
import javax.naming.*;
import javax.rmi.*;
public class TestHello
public static void main(String[] args)
try
/** Creates a JNDI naming context for location objects */
Context context = new InitialContext();
/** Asks the context to locate an object named "HelloWorld" and expects the
object to implement the HelloWorldSessionHome interface */
HelloWorldSessionHome home = (HelloWorldSessionHome)
PortableRemoteObject.narrow(
context.lookup("HelloWorld"),
HelloWorldSessionHome.class);
/** Asks the Home interface to create a new session bean */
HelloWorldSession session = (HelloWorldSession) home.create();
System.out.println("The default greeting is: "+
session.getGreeting());
session.setGreeting("Howdy!");
System.out.println("The greeting is now: "+session.getGreeting());
/** Destroy this session */
session.remove();
/** Now create a session with a different greeting */
session = (HelloWorldSession) home.create("Guten Tag!");
System.out.println("Created a new session with a greeting of: "+
session.getGreeting());
/** Destroy this session */
session.remove();
catch (Exception exc)
exc.printStackTrace();

Just now, I accidentally ran the client without stating the j2ee server, and got exactly the same error message.
I'm wondring if there's any server configuration I need to do that hasn't been done.

Similar Messages

  • MTS dies on 8.1.5 with simple EJB!

    Invoking a simple, hello-world like EJB against 8.1.5 occasionally (well, sort of frequently) causes a core dump, as traced in the alert file (excerpt follows). Apparently MTS on 8.1.5 is not very robust... or what?
    Has anybody experienced the same problem?
    Mauro
    Errors in file /u01/app/oracle/admin/DB8I/bdump/s000_18045.trc:
    ORA-07445: exception encountered: core dump [11] [0] [] [] [] []
    Thu May 4 18:27:40 2000
    Load Indicator not supported by OS !
    found dead multi-threaded server 'S000', pid = (8, 2)
    null

    The server has to be 8.1.6 or above to
    use the XA features.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Bill Burcham ([email protected]):
    I'm using Oracle's 8.1.6 XADataSource. I'm enlisting the XAResource associated with an XAConnection with my JTA transaction manager. I'm hitting an 8.1.5 RDBMS server.
    Apparently, I'm missing the PL/SQL package JAVA_XA. Can I get a .sql for it and load it into the 8.1.5 server and succeed, or do I have to get an 8.1.6 server?
    Here's the error message I get at commit-time (the transaction manager (mine) is issuing an "end" to the XAResource which in turn appears to be trying to invoke JAVA_XA.XA_END via a prepared statement):
    java.sql.SQLException: ORA-06550: line 1, column 14:
    PLS-00201: identifier 'JAVA_XA.XA_END' must be declared
    ORA-06550: line 1, column 8:
    PL/SQL: Statement ignored
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
    I searched my catalog (all_source table) for this package and can't find it.<HR></BLOCKQUOTE>
    null

  • Error with stateless EJB

    Hi,
    I am new to WebLogic and I trying to learn it. I was doing an exercise with a stateless EJB I got from a book and get this error:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory. Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory
         at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    That class is already in my class path and still does not work. I am using WLS 8.1 on a Linux Suse 9.0 OS, and my IDE is Eclipse. The code seems to be fine seems it is deployed flawlessly by the server. No errors, no warnings. I can post if some one needs to see it. Any ideas?
    Thanks!

    If anyone is interested, and since it seems to be a common anoying problem, the solution is to put the weblogic.jar files in the classpath, and all of the client ones as well.

  • Error with javax.ejb.*

    Hi,
    I am new to J2EE. I downloaded j2sdk1.4.1_01, j2sdkee1.3.1, and Ant 1.3 on a Windows XP Home Edition platform. Downloaded as well the Tutorial; which what I was testing it with. In the very first example (converter) as I did "ant converter" to compile, it fired a couple of errors:
    1. 16 Bit MS-DOS subsystem
    C:\WINDOWS\system32\ntvdm.exe
    Error while setting up environment for the application
    It continues running and then says
    2. package javax.ejb does not exist
    I already checked my PATH several times and included <J2EE_HOME>\bin and also <J2EE_HOME>\bin\j2ee.jar
    It did not work. What's going on? Any help would be appreciated.
    Thanks!!

    why is u r classpath J2EE_HOME\bin\j2ee.jar i guess it should under lib
    J2EE_HOME\lib\j2ee.jar
    hope this helps
    pranav

  • Compiler Error with simple vi using MatLab script nodes

    While attempting to build a simple vi to test the capabilities of LabView's interface with MatLab, I received a compiler error message that said I should report the problem to National Instruments Tech Support. The error said, "reference to undefined label from: refPC=0x41C." I've attached the vi that created the error. I am using LabView 7.0 on a PC running Windows 98.
    Attachments:
    Compliererror.vi ‏11 KB

    I don't know if this will help your problem, but there is a fix for some problems with LabVIEW 7.0 and Matlab:
    http://digital.ni.com/public.nsf/websearch/4475BC3CEB062C9586256D750058F14B?OpenDocument
    Good luck,
    -Jim

  • 'Menu too Complex' Error with Simple Subtitles

    Hi,
    I am buildling a DVD with the option to turn subtitles on and off.  I have built what I thought was a pretty simple configuration to achieve. See diagram and error message below.  I have successful bult a similar disc, a blu-ray, with significantly more complexity and content with no problem. I am trying to build a similar, simple subtitle centric structure for 3 individual video products, but each project I create fails to build the disc in the end with the same error message. Any suggestions?
    I am using CS6 on a Windows7 PC platform. Encore v. 6.0.2.004. Can provide more specs as necessary.
    Thanks!
    Lindsay

    Based on other threads, it is not the navigation, but the subtitle formatting (margins or fonts or such). Margins must be adjusted upon import.
    I have not tested any of these solutions.
    This is the one that seemed the most likely to work:
    http://forums.creativecow.net/thread/145/865932#870828
    Dave Knop said:
    "You make the adjustments upon importing the file.
    If you created your subtitles within Encore, the only way I know to see the full list of settings is this:
    Select a subtitle track on your timeline and from the top menu, click Timeline > Export Subtitles. Save the file. Now with that same track selected on your timeline, Re-import the file.
    (Timeline > Import Subtitles )
    Upon import of this file you should see the FULL range of Subtitle setting options in the menu. The margins will be the numbers defaulted at (72 648)/(48 432) The 72/648 numbers are the left and right margins that seem to cause the error.
    Setting them to 92 (left) and 628 (right) has worked for me."
    Please let us know.

  • Error deploying simple EJB

    I'm new to EJB and I was trying to deploy a sample out of Oreilly's EJB 4th Ed. I created the necessary files with NetBeans, build went fine, but deployment results in the error "If the table CABIN for the bean corresponding to the generated class com.titan.cabin.CabinBean1365762729_JDOState is mapped as the primary table, it must have a primary key. Choose a different primary table or verify that the contents of the schema file are correct. "
    I tried to see if creating an empty NetBeans project would be any better. My bean is mapped to the following MySQL table:
    ------------------------------------------------------+
    | Field | Type | Null | Key | Default | Extra |
    ------------------------------------------------------+
    | ID | decimal(19,0) | | PRI | 0 | |
    | SHIP_ID | int(11) | YES | | NULL | |
    | BED_COUNT | int(11) | YES | | NULL | |
    | NAME | char(30) | YES | | NULL | |
    | DECK_LEVEL | int(11) | YES | | NULL | |
    ------------------------------------------------------+
    The primary key IS set in the descriptor. Should it also be mapped as the other fields? I tried mapped and non-mapped. Calling it a night for now.
    Thanks,
    Alec

    Presumably you're using the EJB3 tech preview, and not a vanilla WebLogic 9.2 install, right?
    Can you post the full stack trace?
    -Patrick

  • Compilation errors with CMP EJBs in OC4J

    I have created several new EJB's in JDeveloper using the
    EJB creation wizard. For most of them I chose the CMP Entity Beans from Tables wizard. Now I have already created some EJB's this way and have used them successfully. But for some reason when I try to start my OC4J, I get the following error messages for all my new EJB's:
    Error creating table: java.sql.SQLException: ORA-00955: name is already used by an existing object
    Why is this?

    The out-of-the-box behaviour of OC4J is to try to create tables for CMP beans when they are deployed. It sounds like a redeployment may be occuring bwhen you restart OC4J which is causing it to try and create the tables.
    I think that even though you see these error messages, the container will start and your beans will function.
    You can do one of two things to alter this situation if you want
    a) manually drop the tables from the db before you do the next deployment
    b) set the default behaviour of OC4J to drop tables when an application is undeployed (which happens before a redeployment is done) -- this can be done by setting an additional attribute on the j2ee/home/config/application.xml file -- "autodelete-tables=true"
    -steve-

  • Compilation error with simple if-else statement

    package chapterFive;
    * Author: Sarab
    * Filename: MainClass.java
    * Purpose: Try and get my mind around the concept of the selection
    * control structures and repetition statements
    class MainClass {
         public static void main(String [] args)
              // some variables and prompt for input
              java.util.Scanner scan = new java.util.Scanner(System.in);
              System.out.print("Please enter your name: ");
              String input = scan.nextLine();
              // some repetition statement, for loop
              if (input.equals("Sarab"));
                   System.out.println("Welcome Sarab!");
              else
                   System.out.println("You are in the else statement");
                   for(int sentinelValue; sentinelValue<5; sentinelValue++)
                        System.out.println("The following is the numbers 0-4"
                                  + " printed on separate lines: " + sentinelValue);
              System.out.println("This line will print regardless of whether you"
                        + " entered the if or the else portion of the selection"
                        + " statement.");
    }I am getting the following error:
    Exception in thread "main" java.lang.Error: Unresolved compilation problem:
         Syntax error on token "else", delete this token
         at chapterFive.MainClass.main(MainClass.java:26)What's the matter? This looked straight forward enough to me.

    if (input.equals("Sarab"));
    // is the same as
    if (input.equals("Sarab")) {}
    // so what you have amounts to this:
    if (input.equals("Sarab")) {}
      System.out.println("Welcome Sarab!");
    else { ... }You've got an if block that does nothing, then a block that always executes, calling println, and then your else. Since you have that block between if and else, the if has ended and it's not legal to use else.
    Get rid of the semicolon after if.

  • Compilation error with simple ELSIF

    Below is a magic program that determines self worth in monetary exchange based on the first letter that comes to you your mind. Whether it realy does that or not is besides the point, what I don't get is what is wrong with my ELSIF statement?
    -- Majic program that will guess how much you are worth
    ACCEPT s_first PROMPT 'Enter your random letter'
    DECLARE
    random_letter  VARCHAR(20);
    personal_worth   VARCHAR(20);
    BEGIN
    IF random_letter >= 'A' AND <= 'D' THEN
    personal_worth = '$100,000';
    ELSIF random_letter >= 'E' AND <= 'K' THEN
    personal_worth = '$10,000';
    ELSIF random_letter >= 'L' AND <= 'N' THEN
    personal_worth = '$1,000';
    ELSIF random_letter >= 'O' AND <= 'P' THEN
    personal_worth = '$100';
    ELSIF random_letter >= 'Q' AND <= 'T' THEN
    personal_worth = '$10';
    ELSE random_letter >= 'U' AND <= 'Z' THEN
    personal_worth = '$1';
    dbms_output.put_line('The letter you entered was ' || random_letter || ' and your personal worth is ' || personal_worth);
    END;

    Hi,
    The code in Husain's last message works for me.
    When I enter F, it prints $10,000:
    'Enter your random letter'
    F
    The letter you entered was F and your personal worth is $10,000
    PL/SQL procedure successfully completed.When I enter T, it prints $10:
    'Enter your random letter'
    T
    The letter you entered was T and your personal worth is $10
    PL/SQL procedure successfully completed.What are you doing differently?
    Post your exact code and output.
    The code I'm running is:
    set define '&';
    PROMPT 'Enter your random letter'
    ACCEPT random_letter
    declare
         --random_letter VARCHAR(20);
         personal_worth VARCHAR(20);
    BEGIN
          IF    '&random_letter' >= 'A' AND '&random_letter' <= 'D' THEN
                   personal_worth := '$100,000';
          ELSIF '&random_letter' >= 'E' AND '&random_letter' <= 'K' THEN
                   personal_worth := '$10,000';
          ELSIF '&random_letter' >= 'L' AND '&random_letter' <= 'N' THEN
                   personal_worth := '$1,000';
          ELSIF '&random_letter' >= 'O' AND '&random_letter' <= 'P' THEN
                   personal_worth := '$100';
          ELSIF '&random_letter' >= 'Q' AND '&random_letter' <= 'T' THEN
                   personal_worth := '$10';
          ELSE --if random_letter >= 'Q'
                  personal_worth := '$1';
          end if;
    --    dbms_output.put_line('The letter you entered was ' || '&random_letter' || ' and your personal worth is ' || personal_worth);
          dbms_output.put_line('The letter you entered was &random_letter and your personal worth is ' || personal_worth);
    END;
    /Note that I changed the put_line statement at the end, but the two produce the exact same results.
    The commented out version is concatenating 3 string literals, analagous to this:
    'x' || 'y' || 'z'The second version is printing the exact same text as one sting literal:
    'xyz'If you you have a reason for using the longer way, then use it.

  • How this error is possible with the most simple EJB model example?

    javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://127.0.0.1:7101: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection refused; No available router to destination]
         at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:40)
         at weblogic.jndi.WLInitialContextFactoryDelegate.toNamingException(WLInitialContextFactoryDelegate.java:783)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:367)
         at weblogic.jndi.Environment.getContext(Environment.java:315)
         at weblogic.jndi.Environment.getContext(Environment.java:285)
         at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:117)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
         at javax.naming.InitialContext.init(InitialContext.java:223)
         at javax.naming.InitialContext.<init>(InitialContext.java:197)
         at test.client.SessionEJBRemoteClient.getInitialContext(SessionEJBRemoteClient.java:259)
         at test.client.SessionEJBRemoteClient.main(SessionEJBRemoteClient.java:34)
    Caused by: java.net.ConnectException: t3://127.0.0.1:7101: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection refused; No available router to destination
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:216)
         at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:170)
         at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:153)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:352)
         ... 9 more
    Caused by: java.rmi.ConnectException: Destination unreachable; nested exception is:
         java.net.ConnectException: Connection refused; No available router to destination
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:464)
         at weblogic.rjvm.ConnectionManager.bootstrap(ConnectionManager.java:315)
         at weblogic.rjvm.RJVMManager.findOrCreateRemoteInternal(RJVMManager.java:251)
         at weblogic.rjvm.RJVMManager.findOrCreate(RJVMManager.java:194)
         at weblogic.rjvm.RJVMFinder.findOrCreateRemoteServer(RJVMFinder.java:238)
         at weblogic.rjvm.RJVMFinder.findOrCreateInternal(RJVMFinder.java:200)
         ... 12 more
    Process exited with exit code 0.
    can someone orient me on solving this error? i am making this example from oracle:
    http://www.oracle.com/technology/obe/obe11jdev/ps1/ejb/ejb.html
    thank you
    Vael

    yes it is!!! sorry i need to sleep.
    do you know why now i am trying to exec the client and get this error?
    javax.ejb.EJBException: EJB Exception: ; nested exception is:
         java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
         java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection
    java.rmi.RemoteException: EJB Exception: ; nested exception is:
         java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection
         at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
         at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
         at test.model.SessionEJB_qxt9um_SessionEJBRemoteImpl_1032_WLStub.getDescripcionextraFindAll(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
         at $Proxy0.getDescripcionextraFindAll(Unknown Source)
         at test.client.SessionEJBRemoteClient.main(SessionEJBRemoteClient.java:36)
    Caused by: java.lang.NoClassDefFoundError: com/mysql/jdbc/Connection
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    the Model Project has got the MySQL jar library
    Thank you!

  • Error in deploying a simple EJB 3.0

    Hi ,
    I am getting the following error while deploying my simple ejb of version 3.0 in Weblogic 9.2.
    Exception preparing module: EJBModule(build) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Error processing annotations: java.lang.NullPointerException.
    During my evaluation of Weblogic 9.2 for EJB 3.0 , I have got the following questions.
    EJB Specification states that EJB's in EJB 3.0 can be developed and deployed without the need of deployment descriptors. I have created a simple EJB with two file Env.java and EnvBean.java and the source code is given below.
    a) I just complied these class files and when I was trying to deploy without ejb-jar.xml and weblogic-ejb-jar.xml, the console was not at all allowing me to deploy.Why is this so?
    b) After I created a META-INF file under root of classes directory by placing ejb-jar.xml with empty <enterprise-beans> element, console was allowing me to deploy with errors in parsing ejb-jar.xml. The error was either session/entity/mdb is a required under <enterprise-beans> element. Why is this required when there are several examples stating <enterprise-beans> element can be empty.
    c) Later I updated ejb-jar.xml with <session> element under <enterprise-beans> with the following values. I got the above error when deployed with this change.
    I had been struggling to deploy this simple bean for almost a day.Pleas point me if there is any documentation that solves my stated problem or if there is a solution.Thanks in advance.
    regards
    Karim
    ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
    <enterprise-beans>
    <session>
    <description>This is the stateless ejb</description>
    <display-name>Env Bean</display-name>
    <ejb-name>EnvBean</ejb-name>
    </session>
    </enterprise-beans>
    </ejb-jar>
    Env.java
    package examples ;
    public interface Env {
    public void display();
    EnvBean.java
    package examples;
    import javax.ejb.Remote;
    import javax.ejb.Stateless;
    @Stateless
    @Remote(Env.class)
    public class EnvBean implements Env {
    public void display() {
    System.out.println("Welcome to EJB 3.0");
    }

    Presumably you're using the EJB3 tech preview, and not a vanilla WebLogic 9.2 install, right?
    Can you post the full stack trace?
    -Patrick

  • Getting error while doing simple ejb

    gettting error like ....javax.naming.NoInitialContextException: Cannot instantiate class: while try to use simple ejb through cliant application

    Hi!
    Check the following link to see if it solves your problem:
    http://support.microsoft.com/kb/952032
    Best regards
    Andreas Molin
    Andreas Molin | Site: www.guidestomicrosoft.com | Twitter: andreas_molin

  • Unable to deploy simple EJB example with J2EE Ref. Impl.

    Hi there,
    I'm new to EJB development so please bare with me. I've written a simple EJB, taken from Enterprise JavaBeans by Richard Monson-Haefel (O'Reilly). I can compile the code without problems, load it into the J2EE deployment tool (I'm using version 1.3.1 of the J2EE Reference Implementation), and have succesfully set up the data source and SQL commands for each persistent field.
    When it comes to deployment, I'm stumped with the following error:
    java.rmi.RemoteException: Error processing ejb jar: Compilation failed.
    Here's the stacktrace in the error logs:
    Compilation failed.
         at com.sun.ejb.codegen.GeneratorDriver.compileClasses(GeneratorDriver.java:232)
         at com.sun.ejb.codegen.GeneratorDriver.preDeploy(GeneratorDriver.java:610)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployEjbs(JarInstallerImpl.java:707)
         at com.sun.enterprise.tools.deployment.backend.JarInstallerImpl.deployApplication(JarInstallerImpl.java:221)
         at org.omg.stub.com.sun.enterprise.tools.deployment.backend._JarInstallerImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:350)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:250)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:79)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:104)Here's the source:
    ==============================CabinHome.java=========================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.FinderException;
    public interface CabinHome extends javax.ejb.EJBHome {
      public Cabin create (int d) throws CreateException, RemoteException;
      public Cabin findByPrimaryKey (CabinPK pk) throws FinderException;
    }================================CabinBean.java========================
    package com.titan.cabin;
    import javax.ejb.EntityContext;
    public class CabinBean implements javax.ejb.EntityBean {
      public int id;
      public String name;
      public int deckLevel;
      public int ship;
      public int bedCount;
      public CabinPK ejbCreate (int id) {
        this.id = id;
        return null;
      public void ejbPostCreate (int id) {
      public String getName () {
        return name;
      public int getShip () {
        return ship;
      public int getDeckLevel () {
        return deckLevel;
      public int getBedCount () {
        return bedCount;
      public void setName (String str) {
        this.name = str;
      public void setShip (int s) {
        this.ship = s; 
      public void setDeckLevel (int d) {
        this.deckLevel = d;
      public void setBedCount (int c) {
        this.bedCount = c;
      public void setEntityContext (EntityContext ctx) {}
      public void unsetEntityContext () {}
      public void ejbActivate() {}
      public void ejbPassivate () {}
      public void ejbLoad () {}
      public void ejbStore () {}
      public void ejbRemove () {}
    }===============================Cabin.java============================
    package com.titan.cabin;
    import java.rmi.RemoteException;
    public interface Cabin extends javax.ejb.EJBObject {
      public String getName() throws RemoteException;
      public void setName(String str) throws RemoteException;
      public int getDeckLevel() throws RemoteException;
      public void setDeckLevel (int level) throws RemoteException;
      public int getShip() throws RemoteException;
      public void setShip (int sp) throws RemoteException;
      public int getBedCount() throws RemoteException;
      public void setBedCount() throws RemoteException;
    }============================CabinPK.java=============================
    package com.titan.cabin;
    public class CabinPK implements java.io.Serializable {
      public int id;
      public int hashCode() {
        return id;
      public boolean equals (Object obj) {
        if (obj instanceof CabinPK) {
          return (id == ((CabinPK) obj).id);
        return false;
    }Has anyone else experienced anything similar, or is there something I'm obviously doing wrong?
    Thanks for your help.
    Matt

    Here's the ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8" ?>
    <!-- Created by matt on 10 September 2002, 14:32 -->
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN"
        "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd">
    <ejb-jar>
        <enterprise-beans>
            <entity>
                <description>
                    This Cabin enterprise bean entity represents a cabin on a cruise ship.
                </description>
                <ejb-name>CabinBean</ejb-name>
                <home>com.titan.cabin.CabinHome</home>
                <remote>com.titan.cabin.Cabin</remote>
                <ejb-class>com.titan.cabin.CabinBean</ejb-class>
                <persistence-type>Container</persistence-type>
                <prim-key-class>com.titan.cabin.CabinPK</prim-key-class>
                <reentrant>False</reentrant>
                <cmp-field><field-name>id</field-name></cmp-field>
                <cmp-field><field-name>name</field-name></cmp-field>
                <cmp-field><field-name>deckLevel</field-name></cmp-field>
                <cmp-field><field-name>ship</field-name></cmp-field>
                <cmp-field><field-name>bedCount</field-name></cmp-field>
            </entity>
        </enterprise-beans>
        <assembly-descriptor>
            <security-role>
                <description>
                    This role represents everyone who is allowed
                    full access to the cabin bean.
                </description>
                <role-name>everyone</role-name>
            </security-role>
            <method-permission>
                <role-name>everyone</role-name>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
            </method-permission>
            <container-transaction>
                <method>
                    <ejb-name>CabinBean</ejb-name>
                    <method-name>*</method-name>
                </method>
                <trans-attribute>Required</trans-attribute>
            </container-transaction>
        </assembly-descriptor>
    </ejb-jar>Thanks...

  • Ever seen this error message? You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only.

    Trying to load this site
    http://southcarolina.247sports.com/
    and it redirects me to this address
    http://media.247sports.com/Oops.html?aspxerrorpath=/
    and gives me the error message. "You tried to use HTML or other restricted code. We, currently, do not allow HTML or other types of code in our message board posts or signatures. Try again with simple text only. "
    Thanks for your help

    Clear the cache and the cookies from sites that cause problems.
    * "Clear the Cache": Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

Maybe you are looking for

  • Server not getting started!!!

    Hi All, We have written a server which acts as a service in Microsoft Windows 2000 in java. For that we also wrote a monitor which keeps connecting to server and tries to restart the service through net stat startserver command if the server stops. T

  • IDVD changing 16:9 PAL to 4:3 when burning

    Hi there I have some 16:9 footage which I export from iMovie 08 as a Quicktime Movie using Apple Intermediate Codec as PAL 720 x 576. I bring that footage into a 16:9 iDVD PAL project. But when I save the project as a VIDEO_TS folder and open it in D

  • Update Flash Player warning messsage

    Help needed.... I'm not a user of Flash player but probably downloaded because advised to by another programme... I'm now getting a continuous interuption warning sign on my screen "Update Flash Player (various, different letters and numbers) is requ

  • Connect using sqlplus

    Total noob question. I'm having trouble connecting to my database using sqlplus. The database is on a different machine and is 11g. I have 9i and 10g clients installed locally. I'm using the following syntax: sqlplus usrnm/pass@orcl and the error i g

  • FM to display table contents

    Hi all,         Is there any Fm that will display contents of transparent table. Right now i tried VIEW_MAINTENANCE_CALL but it is with tha maintemance menu I dont want that, i want to simply display table contents. Regards Nilesh