Help with EJB plz

Hi,
I'm new to EBJs and am playing with an entity bean pretty much identical to the one on the J2EE tutorial but the home interface does not compile and I've got no idea why. Would really appreciate your help.
COMPILER COMPLAINT*****
C:\j2sdkee1.3\nim\src\ejb\addresses>javac AddressesHome.java
AddressesHome.java:7: cannot resolve symbol
symbol : class Addresses
location: interface AddressesHome
public Addresses Create(String id, String firstname, String lastname, St
ring address, int contactno) throws RemoteException, CreateException;
^
AddressesHome.java:10: cannot resolve symbol
symbol : class Addresses
location: interface AddressesHome
public Addresses FindByPrimaryKey(String id) throws FinderException, Rem
oteException;
^
2 errors
HOME INTERFACE*****
import java.util.Collection;
import java.rmi.RemoteException;
import javax.ejb.*;
public interface AddressesHome extends EJBHome
     public Addresses Create(String id, String firstname, String lastname, String address, int contactno) throws RemoteException, CreateException;
     public Addresses FindByPrimaryKey(String id) throws FinderException, RemoteException;
     public Collection FindByLastName(String lastname) throws FinderException, RemoteException;
ADDRESSESSBEAN CLASS*****
import java.sql.*;
import javax.sql.*;
import java.util.*;
import javax.ejb.*;
import javax.naming.*;
public class AddressesBean implements EntityBean
     private String id;
     private String firstname;
     private String lastname;
     private String address;
     private int contactno;
     private Connection conn;
     private EntityContext context;
     private String dbName = "java:comp/env/jdbc/AddressesdB";
     public String ejbCreate(String id, String firstname, String lastname, String address, int contactno) throws CreateException
               if(address == null || address.length() == 0)
                    throw new CreateException("You must specify an address");
               try
                    insertRow(id, firstname, lastname, address, contactno);
               catch(Exception e)
                    throw new EJBException("ejbCreate: " + e.getMessage());
               this.id = id;
               this.firstname = firstname;
               this.lastname = lastname;
               this.address = address;
               this.contactno = contactno;
               return id;
     public void changeAddress(String address)
          this.address = address;
     public String getAddress()
          return address;
     public void changeContactno(int contactno)
          this.contactno = contactno;
     public int getContactno()
          return contactno;
     public String getFirstname()
          return firstname;
     public String getLastname()
          return lastname;
     public String ejbFindByPrimaryKey(String primaryKey) throws FinderException
          boolean result;
          try
               result = selectByPrimaryKey(primaryKey);
          catch(Exception e)
               throw new EJBException("ejbFindByPrimaryKey: " + e.getMessage());
          if(result)
               return primaryKey;
          else
               throw new ObjectNotFoundException("Row for id " + primaryKey + " not found");
     public Collection ejbFindByLastName(String lastname) throws FinderException
          Collection result;
          try
               result = selectByLastName(lastname);
          catch(Exception e)
               throw new FinderException("ejbFindByLastName :" + e.getMessage());
          return result;
     public void ejbRemove()
          try
               deleteRow(id);
          catch(Exception e)
               throw new EJBException("ejbRemove : " + e.getMessage());
     public void setEntityContext(EntityContext context)
          this.context = context;
          try
               makeConnection();
          catch(Exception e)
               throw new EJBException("Unable to connect to database: " + e.getMessage());
     public void unsetEntityContext()
          try
               conn.close();
          catch(Exception e)
               throw new EJBException("unsetEntityContext: " + e.getMessage());
     public void ejbActivate()
          id = (String)context.getPrimaryKey();
     public void ejbPassivate()
          id = null;
     public void ejbLoad()
          try
               loadRow();
          catch(Exception e)
               throw new EJBException("ejbLoad: " + e.getMessage());
     public void ejbStore()
          try
               storeRow();
          catch(Exception e)
               throw new EJBException("ejbStore: " + e.getMessage());
     public void ejbPostCreate(String id, String firstname, String lastname, String address, boolean contactno)
     /****************************** DataBase Routines ******************************/
     private void makeConnection() throws NamingException, SQLException
          InitialContext ic = new InitialContext();
          DataSource ds = (DataSource) ic.lookup(dbName);
          conn = ds.getConnection();
     private void insertRow(String id, String firstname, String lastname, String address, int contactno) throws SQLException
          String insertStatement = "inset into ADDRESSES values (?, ?, ?, ?, ?)";
          PreparedStatement prepStmt = conn.prepareStatement(insertStatement);
          prepStmt.setString(1, id);
          prepStmt.setString(2, firstname);
          prepStmt.setString(3, lastname);
          prepStmt.setString(4, address);
          prepStmt.setDouble(5, contactno);
          prepStmt.executeUpdate();
          prepStmt.close();
     private void deleteRow(String id) throws SQLException
          String deleteStatement = "delete from ADDRESSES where id = ?";
          PreparedStatement prepStmt = conn.prepareStatement(deleteStatement);
          prepStmt.setString(1, id);
          prepStmt.executeUpdate();
          prepStmt.close();
     private boolean selectByPrimaryKey(String primaryKey) throws SQLException
          String selectStatement = "select id from ADDRESSES where id = ? ";
          PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
          prepStmt.setString(1, primaryKey);
          ResultSet rs = prepStmt.executeQuery();
          boolean result = rs.next();
          prepStmt.close();
          return result;
     private Collection selectByLastName(String lastname) throws SQLException
          String selectStatement = "select id from ADDRESSES where lastname = ? ";
          PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
          prepStmt.setString(1, lastname);
          ResultSet rs = prepStmt.executeQuery();
          ArrayList a = new ArrayList();
          while(rs.next())
               String id = rs.getString(1);
               a.add(id);
          prepStmt.close();
          return a;
     private void loadRow() throws SQLException
          String selectStatement = "select firstname, lastname, address, contactno from ADDRESSES where id = ?";
          PreparedStatement prepStmt = conn.prepareStatement(selectStatement);
          prepStmt.setString(1, this.id);
          ResultSet rs = prepStmt.executeQuery();
          if(rs.next())
               this.firstname = rs.getString(1);
               this.lastname = rs.getString(2);
               this.address = rs.getString(3);
               this.contactno = rs.getInt(4);
               prepStmt.close();
          else
               prepStmt.close();
               throw new NoSuchEntityException("Row for id " + id + " not found in the dataBase");
     private void storeRow() throws SQLException
          String updateStatement = "update ADDRESSES set firstname = ?, lastname = ?, address = ? contactno = ? where id = ?";
          PreparedStatement prepStmt = conn.prepareStatement(updateStatement);
          prepStmt.setString(1, firstname);
          prepStmt.setString(2, lastname);
          prepStmt.setString(3, address);
          prepStmt.setInt(4, contactno);
          prepStmt.setString(5, id);
          int rowCount = prepStmt.executeUpdate();
          prepStmt.close();
          if(rowCount == 0)
               throw new EJBException("Storing row for id " + id + " failed.");
}

EJB questions should be posted in the EJB forum! :=)
I did find the compiler message a bit strange. Usually if I don't have a class defined it complains that it cannot find package_name.class_name (when I'm using packages for my own code).

Similar Messages

  • Help with EJB Arch: Synchronous front-end -- Asynchronous back-end

    Hi folks, We are developing an application with the following characteristics: - users can invoke requests on our appl and they will expect a quick response - to obtain the information requested by the user, our application talks with Tibco using RV. This communication follows a pub/sub messaging paradigm and is asynchronous. - thus, we have a synchronous req/resp front-end and an asynch back-end.
    We would like some advice as to the best way of architecting this application. Here is our approach. Please critic and suggest alternatives.
    1. Consider an user who has requested something from our app. 2. The user will be using a JSP based front-end. (S)he submits the request on a form and a servlet is driven. 3. The servlet uses a session EJB and invokes one of its methods, which handles some business-specific logic. 4. The method in the session EJB then instantiates a helper class. 5. A method on our helper class is now driven. This method sends a message to Tibco and it provides a callback method in the helper class. 6. The method in the helper class blocks the thread - basically, it waits. 7. Meanwhile, Tibco does the processing and invokes the callback method (in the helper class) with the result. 8. In the callback method, the data sent by Tibco is stored in member variables of the helper class. 9. The callback method wakes up the blocking thread. 10. The method in step 6 wakes up and returns the information to the session EJB. 11. The session EJB returns the information to the invoking servlet. 12. The servlet provides the information back to the user.
    The version of Tibco-RV that we are using is not JMS compliant.
    We keep hearing that threads should be handled very carefully in an EJB container environment, so we would like to know if the way we are handling the thread in the helper class is okay. Could we remove the helper class and do the same thread-handling in the session EJB itself?
    Can we use JMS in this solution even though our Tibco-RV does not support JMS?
    Tools: Weblogic App Server 6.1, JBuilder 5.0.
    Thanks for your advice and suggestions!

    Let me start off by mentioning that Sonic MQ (an excellent JMS server) now provides a bridge for TIB/Rendezous. I am also wrestling with a simliar issue, something that requires threading at the servlet or ejb level, and have given some thought to using JMS. My concern was that JMS is an asynchronous process so it's model does not fit well with the synchronous front end. Technically I can see a few ways to implement it but architecturally I am not convinced that they are sound. You could send a message from the session bean to the TIB via SonicMQ and have a JMS message bean registered as a listener for messages from the TIB, again via SonicMQ. The JMS bean could update a static class or singleton which your session checks but you still have the issue of making the session bean wait on that event.
    I'll do a bit more digging and see if there's a design pattern available for this situation.
    -Dat

  • Help with chat plz

    Hi im really new to java so this question must be kinda easy so plz help
    Im able to connect several clients with threads to a central server but how am i able to send the msgs to all the clients connected?
    Some simple code would be really apreciated.
    thx a lot.

    A Solution can be like this.
    make a static object of class vector in your main server class.
    static vector connections=null;
    If you are unaware of Vector class,refer any JAVA book.
    you may initialise it in your constructor.
    Now whenever your client connects, the thread which will be responsible for handling the connections, adds to the vector object connections. As the object connections is static, you would be able to directly call it and add the hostname of the client which just got connected. It should be something like this....
    mainclass.connections.AddItem( " Hostname" );
    I forgot the vector class methods for adding up items....try refering the same in a book.
    This way you will be able to maintain a list of clients connected on your server.
    Hope this resolves ur problem ..
    Regards
    Arvind

  • Help With EJB Client

    I have successfully gotten my client to run when I use the appclient with the reference implementation. When I try to run my simple client outside of appclient I get the following error.
    Exception: javax.naming.NameNotFoundException [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: I
    DL:omg.org/CosNaming/NamingContext/NotFound:1.0]
    I have my client.jar which is returned from the deploy tool, I have the j2ee.jar in my classpath, and I have my jndi name set up as ejb/Hello in the server. My code to access this is such:
    public static void main(String[] args)
    try
    System.out.println("Adding properties");
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
    env.put(Context.PROVIDER_URL, "iiop://MyHost:3700");
    Context initial = new InitialContext(env);
    System.out.println("Got initial context!");
    Object o = initial.lookup("java:comp/env/ejb/Hello");
    System.out.println("got object from lookup");
    HelloHome home = (HelloHome)PortableRemoteObject.narrow(o, com.tosht.ejb.HelloHome.class);
    System.out.println("got home object back and did remote narrow cast");
    Hello h = home.create();
    System.out.println("got component interface");
    System.out.println(h.sayHello());
    System.out.println("called business method on component interface");
    catch(Exception ex)
    System.out.println("Exception: " + ex.toString());
    I am sure this is a jndi issue, but in the deploy tool my applications jndi name for my component is ejb/Hello just as it is in code?
    Any help would be greatly appreciated!!!!!

    Hi Tim,
    Couple things I can think of. 1) Are you sure that the ejb application deployed correctly? ejb/Hello does look like the right global JNDI name given the sun-ejb-jar.xml, so one explanation is that the ejb is not found because it wasn't deployed at all or wasn't deployed successfully. 2) It's worth double-checking that you have the correct client code compiled and found at runtime. Is it possible there is still the old version of the client main class that is looking up java:comp/env/ejb/Hello?
    One final suggestion is to print the exception.printStackTrace() rather than exception.toString(). There is often very valuable information about the exception that is not printed out as part of toString().
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     

  • Help with EJB & JNDI

    I am getting following error while compiling EJB session client
    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 client.SimpleSessionClient.main(SimpleSessionClient.java:20)
    My session client code is
    package client;
    import java.util.Hashtable;
    import beans.*;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import javax.ejb.*;
    import javax.naming.spi.InitialContextFactory;
    import javax.naming.NamingException;
    public class SimpleSessionClient {
         public static void main(String[] args) {
              try {
                   Context jndiContext = new InitialContext();
                   Object ref = jndiContext.lookup("ejb/beans.SimpleSession");
                   SimpleSessionHome home = (SimpleSessionHome)PortableRemoteObject.
                   narrow(ref, SimpleSessionHome.class);
                   SimpleSession simpleSession = home.create();
                   for (int i=0; i<args.length; i++) {
                        String returnedString = simpleSession.getEchoString(args);
                        System.out.println("Sent String:" + args[i] +", " +
                                  "recieved string" + returnedString);
              } catch(Exception e) {
                   e.printStackTrace();
    I have include j2ee.jar in the classpath too and I could deploy the EJB home and remote interface as well as Bean class in sun application server.
    Any help wuld be appreciated.
    Rashmi

    I am using Sun App server for deploying EJB. In the same system, I am running eclipse where I run the EJB client with JNDI to connect to EJB component.
    If this is not the right way, please suggest. I am trying to do this for the first time and completely clueless. I have tried to include different jar files in my classpath and even I am in the process of downloading websphere in case that could help me.

  • Help with EJB and JNDI, please

    Hello. My name is Santiago, and i am a student from the University of Valladolid, in Spain. I am newcome in the world of EJB, I have done the first EJB from de Sun tutorial (I�m using the Sun Java System Application Server PE 8.2) and now I am trying to improve it in that way: I have the EJB and the client in diferent machines conected.
    I am trying to understand how to use JNDI, but i have not good results :( I have read about using ldap but i dont know if it is apropiated, or if it is installed automaticaly with the sun aplication, or if i have to download and install it... i am not sure about anything :)
    This is my client�s code (part of it)
    Hashtable envirom = new Hashtable();
    envirom.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
    envirom.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
    envirom.put(Context.PROVIDER_URL,"iiop://Santiago:389");
    envirom.put(Context.PROVIDER_URL,"ldap://192.168.1.101:389");
    envirom.put(Context.SECURITY_AUTHENTICATION,"none");
    InitialContext ctx = new InitialContext(envirom);
    Object objref = ctx.lookup("java:comp/env/ejb/Multiplica");
    When I try to connect in local mode (client and EJB in the same machine) i get something like that:
    javax.naming.CommunicationException: 192.168.1.101:389 [Root exception is java.n
    et.ConnectException: Connection refused: connect]
    at com.sun.jndi.ldap.Connection.<init>(Connection.java:204)
    at com.sun.jndi.ldap.LdapClient.<init>(LdapClient.java:118)
    at com.sun.jndi.ldap.LdapClient.getInstance(LdapClient.java:1578)
    at com.sun.jndi.ldap.LdapCtx.connect(LdapCtx.java:2596)
    at com.sun.jndi.ldap.LdapCtx.<init>(LdapCtx.java:283)
    It is even worse when i try it in different machines:
    10-mar-2006... com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImp1<init>
    ADVERTENCIA: "IOP00410201: <COMM_FAILURE> Fallo de conexion: Tipo de socket: IIOP_CLEAR_TEXT;
    name of host: portatil; puerto: 3700"
    org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code:201 completed:No
    Both SSOO are XP and I have disabled Firewalls.
    PLEASE, if you colud help me It would fantastic, because I am in that trouble, i have tryed 1000 solutions but i am not able to understand it.
    Hoping you can help me.
    Santiago.

    This thread is now being followed up in:
    http://swforum.sun.com/jive/thread.jspa?threadID=64092

  • Help with EJB 3.0 MEssage Driver Bean Wizard in NetBeans 5.5 preview

    I am using NetBeans 5.5 preview with sun apps server 9.0 .
    But I am not able to write message driver beans .
    Can anybody help in this regards
    ^^ Unni

    Russ thanks for checking back. I did try the prefernce manager but no luck there. I ended up downloarding promaintance as a trail and ran thier error code analysis. http://www.digitalrebellion.com/promaintenance/
    So I found that the reason it wouldn't open was that there was a missing framework. I don't know much about frameworks but I do know that when I ran digital rebelions fcp uninstaller it removed this framework. When I reinstalled fcp studio this framework was not reinstalled, even after running all of the proap updates. Consequently I found that my aperature program was affected by this framework as well and wouldn't open. I ended up having to copy the framework off of a another computer and pasting it into the appropriate folder on my Mac Pro.
    Viola, compressor now will launch at least and so will apperture. The problem still remains though that I can not ad custom destinations in Compressor with out it crashing. Another thing is that compressor will only quit if I forced quit it. I have tried uninstalling and reintalling FCP studio 4 times now with the same results. After that frameworks fiasco I am a little hesitant to mess with it any more for fear of messing up any other application.
    pretty bummed on my set up right now.
    -jon

  • Help with Basics PLZ!

    So i'm really bad with Photoshop. I was trying to edit my pic seeing tutorial and understand the step given in this image --
    Plz If any one explain everything I need to do in it!
    How do i paste my image into the canvas? And how do i resize it?

    Hi Vicas.
    Ctrl+C will copy the source image.
    Ctrl+V will paste it into Ps.
    With the Move Tool (V), tic "Show Transform Controls". You will be able to resize the image by dragging a corner. Holding down Shift will maintain the aspect ratio.
    For best results, in your general preferences, choose an Image Interpolation mode approprate to your needs. Enlarging or reducing.
    Lee

  • Help with McAfee plz

    Hi to all Im new to this site/forum and would like some help plz
    Just installed Mcafee from BT and I was wondering if anyone else is using it ?
    my question is Im trying to find in the settings where you can exclude files/folders/ drives(external) from being scanned  but I cant find it any where in any of the settings
    ca anyone help plz
    n
    thanks in advance

    Click on the shield bottom right of screen:
    Select Virus and spyware protection
    Select Scan your PC
    Select Run a custom scan
    Then there are a number of options for you to chooses what to scan.
    However I would get a different anti virus software as the one thing I do not like about this is that it has a mind of its own when it comes to updates and will update when it wants to which slows the PC down and whatever you do you can not stop the update. This is very annoying if you are trying to do something which is time dependent.

  • Help with program plz (long code)

    anyone know how i can fix these 2 errors:
    Driver2.java:47: code is already defined in main(java.lang.String[])
    String code = JOptionPane.showInputDialog(
    ^
    Driver2.java:51: incompatible types
    found : java.lang.String
    required: int
    int val = bc.getCode();
    ^
    the case 2 in the driver is where it messes up, i believe..it works with just the case 1...any help/advice is appreciated(i am aware of spacing errors)
    import javax.swing.JOptionPane;
    import java.util.Scanner;
    public class Driver2
       public static void main(String[] args)
          String userChoice;
          int choice;
    Scanner keyboard = new Scanner(System.in);
    userChoice = JOptionPane.showInputDialog("Enter 1 to enter a numeric zip code:\n"
    + "Enter 2 to enter a bar code:\n"
    + "Enter 3 to exit program:\n");
    choice = Integer.parseInt(userChoice);
    while (choice != 3)
           switch (choice)
           case 1:
           String input = JOptionPane.showInputDialog( "Please enter a five-digit zip code: ");
    int num = Integer.parseInt(input);
    BarCode bc = new BarCode(num);
    String code = bc.getCode();
    JOptionPane.showMessageDialog(null, "The barcode of the zip is: " + code);
    System.exit(0);
    break;
    case 2:
    String code = JOptionPane.showInputDialog( "Please enter bar code: ");
    int val = bc.getCode();
    if (val >= 0)
    System.out.println("The zip code is: " + val);
    else
    System.out.println("Incorrect bar code data");
    System.exit(0);
    break;
    case 3:
    break;
    userChoice = JOptionPane.showInputDialog("Enter 1 to enter a numeric zip code:\n"
    + "Enter 2 to enter a bar code:\n"
    + "Enter 3 to exit program:\n");
       public BarCode(int n)
          zip = n;
       public String getCode()
          String barCode = "|";
          int sum = 0;
          int temp = 0;
          temp = zip / 10000;
          sum = sum + temp;
          Digit d1 = new Digit(temp);
          barCode = barCode + d1.getCode();
          zip = zip % 10000;
          temp = zip / 1000;
          sum = sum + temp;
          Digit d2 = new Digit(temp);
          barCode = barCode + d2.getCode();
          zip = zip % 1000;
          temp = zip / 100;
          sum = sum + temp;
          Digit d3 = new Digit(temp);
          barCode = barCode + d3.getCode();
          zip = zip % 100;
          temp = zip / 10;
          sum = sum + temp;
          Digit d4 = new Digit(temp);
          barCode = barCode + d4.getCode();
          zip = zip % 10;
          temp = zip;
          sum = sum + temp;
          Digit d5 = new Digit(temp);
          barCode = barCode + d5.getCode();
          temp = 10 - (sum % 10);
          Digit d6 = new Digit(temp);
          barCode = barCode + d6.getCode() + "|";
          return barCode;
       private int zip;
    public class BarCode1
       public BarCode1(int n)
          zip = n;
       public String getCode()
          String barCode = "|";
          int sum = 0;
          int temp = 0;
          temp = zip / 10000;
          sum = sum + temp;
          Digit d1 = new Digit(temp);
          barCode = barCode + d1.getCode();
          zip = zip % 10000;
          temp = zip / 1000;
          sum = sum + temp;
          Digit d2 = new Digit(temp);
          barCode = barCode + d2.getCode();
          zip = zip % 1000;
          temp = zip / 100;
          sum = sum + temp;
          Digit d3 = new Digit(temp);
          barCode = barCode + d3.getCode();
          zip = zip % 100;
          temp = zip / 10;
          sum = sum + temp;
          Digit d4 = new Digit(temp);
          barCode = barCode + d4.getCode();
          zip = zip % 10;
          temp = zip;
          sum = sum + temp;
          Digit d5 = new Digit(temp);
          barCode = barCode + d5.getCode();
          temp = 10 - (sum % 10);
          Digit d6 = new Digit(temp);
          barCode = barCode + d6.getCode() + "|";
          return barCode;
       private int zip;
    public class Digit
       public Digit(int n)
          zip = n;
       public String getCode()
          String bar = "";
          if (zip == 1)
             bar = ":::||";
          else if (zip == 2)
             bar = "::|:|";
          else if (zip == 3)
             bar = "::||:";
          else if (zip == 4)
             bar = ":|::|";
          else if (zip == 5)
             bar = ":|:|:";
          else if (zip == 6)
             bar = ":||::";
          else if (zip == 7)
             bar = "|:::|";
          else if (zip == 8)
             bar = "|::|:";
          else if (zip == 9)
             bar = "|:|::";
          else
             bar = "||:::";
          return bar;
       private int zip;
    public class Digit1
       public Digit1(int n)
          zip = n;
       public String getCode()
          String bar = "";
          if (zip == 1)
             bar = ":::||";
          else if (zip == 2)
             bar = "::|:|";
          else if (zip == 3)
             bar = "::||:";
          else if (zip == 4)
             bar = ":|::|";
          else if (zip == 5)
             bar = ":|:|:";
          else if (zip == 6)
             bar = ":||::";
          else if (zip == 7)
             bar = "|:::|";
          else if (zip == 8)
             bar = "|::|:";
          else if (zip == 9)
             bar = "|:|::";
          else
             bar = "||:::";
          return bar;
       private int zip;
    }

    > i got it to compile now...i can toy around w/
    it..thanks for the help
    Good.
    Stick with this handle, ok?I must say I am not thrilled with
    a) when I questioned the first post of WhiteSox asking if it was bugz or a classmate or what I was ignored by the OP
    b) I guess the OP is trying to distance himself from his very first thread where somebody did part of his homework for him with results that are now plainly evident. As I predicted at the end of the last thread.
    http://forum.java.sun.com/thread.jspa?threadID=703258 Reply 11
    I hope that matsabigman and others who help homework posters by doing it for them will take note of the results of this help thus far. Not much good has come of this.
    BigMan/WhiteSox I am still detecting a fundamental lack of basic concepts on your part. This is the underlying cause of your compile errors but those are only a symptom. You can continue treating the symptoms but it would be a better use of your time to treat the disease, which in this case means spending some time getting a better grasp of Java fundamentals.

  • Help with EJB Named Query

    How do you reference a user-defined database function in an EJB Named Query. There doesn't seem to be any problems in using built in functions like max and min. Any help is greatly appreciated.

    A little more information. It seems I have to retract one thing I said, I stated that the internal functions of the database were ok, this is incorrect. If I use the upper function in a named query I get the following.
    example:
    Internal Exception: Exception [TOPLINK-0] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.EJBQLException
    Exception Description: Syntax Recognition Problem parsing the EJBQL [select object(o) from SysUsers o where o.racfId = :racfId and o.inactiveDate is null and upper(o.pswd) = :pswd]. The parser returned the following [unexpected token: upper].
    In this example query I am trying to use the database upper function. Any Help?
    Thanks

  • HELP with EJB to JSP Integration tool WLS 7.0

              Hi,
              Has anyone used the EJB2JSP Integration tool in WLS 7.0? I can't find any documenation
              except for the page at http://edocs.bea.com/wls/docs70/jsp/ejb2jsp.html. It is
              not much help. I can get the graphical tool to run, but not import a .jar file.
              This is the error I get when trying to open an ejb.jar.
              C:\bea\user_projects\myTestDomain\applications\DefaultWebApp\WEB-INF\classes\EJB\Spike>java
              weblogic.servlet.ejb2jsp.gui.Main
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:287)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
              at weblogic.servlet.ejb2jsp.Utils.createBeanDescriptor(Utils.java:343)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:314)
              at weblogic.servlet.ejb2jsp.Utils.createDefaultDescriptor(Utils.java:266)
              at weblogic.servlet.ejb2jsp.gui.Main.loadFromPaths(Main.java:391)
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:378)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              error occurred: java.lang.NullPointerException
              java.lang.NullPointerException
              at weblogic.servlet.ejb2jsp.gui.Main.doNew(Main.java:379)
              at weblogic.servlet.ejb2jsp.gui.Main$5.run(Main.java:575)
              at weblogic.servlet.ejb2jsp.gui.MainWorker.run(Main.java:757)
              at java.lang.Thread.run(Thread.java:479)
              Is this error and the fix to it obvious to someone else? If so, I would appreciate
              some help!
              THank you!!
              Wendy
              

    Try weblogic.servlet.ejb2jsp.gui.Main
    Kris

  • Help with ejb-jar file

    Hello everybody;
    Have any of you read the article "HOWTO: Use a BC4J Application Module in a Stateless EJB Session Bean" ?
    Well, what I am trying to do is a Stateles CMT Session Bean with more than 1 method, and my question is what can I do in order to specify the container that I am going to use a container transaction per each method in my EJB Session bean.
    I hope you read it, because I am clueless in al this stuff!

    The EJB JAR DTD looks like this visually:
    So you can include multiple <method> element siblings as the child of a <container-transaction> element.

  • Help with RX1600 plz

    Hi, I just bought a new MSI RX1600 PRO and when I installed with the driver that came with it my Windows XP shows two cards in the device manager, one R530 and one R530 Secondary??!!! Also, the 3D Mark 2005 reports the core clock to be 375 when according to the MSI site it should be 500 MHz, and the video memory speed is 0.0 MHz, does any one know whats wrong?

    Quote
    3D Mark 2005 reports the core clock to be 375 when according to the MSI site it should be 500 MHz, and the video memory speed is 0.0 MHz, does any one know whats wrong?
    Yes, 3D Mark is wrong. It is a software issue that even in 3d Mark 06 the problem remains (wrong Core clock, and wrong Memory speed). The Ram speed of my vid card is 700 MHz... 3d Mark show it as 0.0.
    Your vid card is fine. I recommend you to use Everest Home Edition, it will give you a lot information about your whole PC:  http://www.majorgeeks.com/download4181.html

  • Help with brasso plz!!!!!!!!!!!

    to put it plain and simple i would like to use brasso on my ipod but not sure how to. I mean i put it on and scrubbed it off,didnt harm the screen; but didn't seem to help it any to. Im probably doing it wrong . any help?

    I don't know, but search the forum for Brasso (near top right of this page 'more options') and you'll get a gizillion hits. Good luck.

Maybe you are looking for

  • Not enough port fields in port forwarding for Linksys E4200

    I have always used netgear routers in the past. After a series of issues regarding configurations not working correctly I invested in what appeared to be a semi pro router, the cisco linksys e4200. I have a centralized server which I use to access a

  • Application Log Issue

    Hello all, I need to get the application log data into an internal table. I have the following parameters with me: 1) OBJECT ID                                                                   2) SUBOBJECT                                            

  • Ipad mini to tv

    I plugged my 30 pin av cord into a lightning adapter then into my iPad mini...why do i get sound but no picture on my tv? is there a setting on the iPad to get the picture?

  • VAT / Service Tax recievable amount to be added to Fixed assets

    Hi, I have an issue where VAT / Service Tax on purchase of Plant and machinery, furniture and vehicle was debited to VAT / Service Tax Receivable account to set off the VAT / Service tax liability. Now the same is not eligible to be set off against t

  • Hide subform on 2nd Instance

    Please help me preserve my sanity. I have a subform (sfB) inside a repeating instance subform (sfA) that is hidden or visible depending on the Report Period selected with a radio button outside of sfA. I want sfB to be hidden for all sfA added by the