Need a Help to Run the EJB client

Hello Friends,
I'm using EJB3.0. while running my client side bean I got a Exception like this " javax.naming.NameNotFoundException: maheshwaran.count not bound." I'm new to EJB so i couldn't find specifically what is the mistake in my files.
I created the following files. It are listed below
FileName: count.java
"package maheshwaran;
public interface count {
public int count();
public void set(int val);
public void remove();
FileName2 : countBean.java
"package maheshwaran;
import javax.ejb.*;
import javax.interceptor.Interceptors;
@Stateful
@Remote(count.class)
@Interceptors(countCallBacks.class)
public class countBean implements count{
private int val;
public int count(){
System.out.println("count()");
return ++val;
public void set(int val){
this.val=val;
System.out.println("set()");
@Remove
public void remove(){
System.out.println("remove()");
FileName3: countCallBacks.java
" package maheshwaran;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.ejb.*;
import javax.interceptor.InvocationContext;
public class countCallBacks {
@PostConstruct
public void construct(InvocationContext ctx){
System.out.println("cb:construct()");
@PostActivate
public void activate(InvocationContext ctx){
System.out.println("cb:activate()");
@PrePassivate
public void passivate(InvocationContext ctx){
System.out.println("cb:passivate()");
@PreDestroy
public void destroy(){
System.out.println("cb:destroy()");
The client side class is following: countClient.java
"package maheshwaran;
import javax.naming.*;
public class countClient {
public static final int noofClients=3;
public static void main(String args[]){
try{
Context ctx=new InitialContext(System.getProperties());
count count[]=new count[noofClients];
int countval=0;
System.out.println("Instatntiating Beans");
for(int i=0;i<noofClients;i++){
count=(count) ctx.lookup(count.class.getName());
count.set(countval);
countval=count.count();
System.out.println(countval);
Thread.sleep(100);
System.out.println("Calling count on Beans");
for(int i=0;i<noofClients;i++){
countval=count.count();
System.out.println(countval);
count.remove();
Thread.sleep(50);
}catch(Exception e){e.printStackTrace();}
The Deployment Descriptor file is following: 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">
<description>Stateful Session Bean Example</description>
<display-name>Stateful Session Bean Example</display-name>
<enterprise-beans>
<session>
<ejb-name>countBean</ejb-name>
<business-remote>maheshwaran_dd.count</business-remote>
</business-remote>
<ejb-class>maheshwaran_dd.countBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<interceptors>
<interceptor>
<interceptor-class>maheshwaran_dd.countCallBacks</interceptor-class>
<post-construct>
<lifecycle-callback-method>construct</lifecycle-clallback-method>
</post-construct>
<post-activate>
<lifecycle-callback-method>activate</lifecycle-callback-method>
</post-activate>
<pre-passivate>
<lifecycle-callback-method>passivate</lifecycle-callback-method>
</pre-passivate>
</interceptor>
</interceptors>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>countBean</ejb-name>
<interceptor-class>maheshwaran_dd.countCallBacks</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar> "
please help me to rectify this problem.
Thanks & regards,
Maheshwaran Devaraj

Hi,
user586 wrote:
i want to write the query to select the coupon whose Expiry date in the table is NOT within 30 days.If you mean expirationdate (datatype: DATE) is not within 30 days (past or future) of run time, then:
SELECT  coupon          -- or whatever columns you want
FROM    table_x
WHERE   expirationdate  NOT BETWEEN  SYSDATE - 30
                            AND      SYSDATE + 30
;

Similar Messages

  • Help:How can I run the J2EE Client Application? Thanks

    Help:How can I run the J2EE Client Application that will access the remote J2EE1.4 application server which runs on another host computer?
    I have developped a stateles senterprise java bean name converter and deloyed it in the j2ee1.4 application server on the host machine A. The converterbean provides the remote home interface and remote interface. At the same time I have developped the j2ee application client named convertappclient. When I access the conveter bean at host computer A through the script 'appclient.bat' as 'appclient -client convertappclient.jar', the client can access the bean sucessfully. Now I want to access the bean through the script 'appclient.bat' at host computer B,what files should I copy from host computer A to host computer B;and what the command line should be like? Thanks!
    The following are the code of the enterprise java bean and it's home interface .
    The client code is also provided.
    The enterprise java bean:
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import java.math.*;
    public class ConverterBean implements SessionBean {
    BigDecimal yenRate = new BigDecimal("121.6000");
    BigDecimal euroRate = new BigDecimal("0.0077");
    public ConverterBean() {
    public BigDecimal dollarToYen(BigDecimal dollars) {
    BigDecimal result = dollars.multiply(yenRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public BigDecimal yenToEuro(BigDecimal yen) {
    BigDecimal result = yen.multiply(euroRate);
    return result.setScale(2, BigDecimal.ROUND_UP);
    public void ejbCreate() {
    public void ejbRemove() {
    public void ejbActivate() {
    public void ejbPassivate() {
    public void setSessionContext(SessionContext sc) {
    The bean's remote home interface :
    package converter;
    import java.rmi.RemoteException;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    public interface ConverterHome extends EJBHome {
    Converter create() throws RemoteException, CreateException;
    The bean's remote interface:
    package converter;
    import javax.ejb.EJBObject;
    import java.rmi.RemoteException;
    import java.math.*;
    public interface Converter extends EJBObject {
    public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
    public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
    The j2ee application client:
    import converter.Converter;
    import converter.ConverterHome;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.rmi.PortableRemoteObject;
    import java.math.BigDecimal;
    public class ConverterClient {
    public static void main(String[] args) {
    try {
    Context initial = new InitialContext();
    System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
                   System.setProperty("java.naming.provider.url","jnp://10.144.97.250:3700");
    Context myEnv = (Context) initial.lookup("java:comp/env");
    Object objref = myEnv.lookup("ejb/SimpleConverter");
    ConverterHome home =
    (ConverterHome) PortableRemoteObject.narrow(objref,
    ConverterHome.class);
    Converter currencyConverter = home.create();
    BigDecimal param = new BigDecimal("100.00");
    BigDecimal amount = currencyConverter.dollarToYen(param);
    System.out.println(amount);
    amount = currencyConverter.yenToEuro(param);
    System.out.println(amount);
    System.exit(0);
    } catch (Exception ex) {
    System.err.println("Caught an unexpected exception!");
    ex.printStackTrace();
    }

    Surprisingly I find an upsurge in the number of posts with this same problem. I recently found a post which gave a nice link for this. Follow the steps and it should help:
    http://docs.sun.com/source/819-0079/dgacc.html#wp1022105

  • How to run the ejb project in j2ee server

    How to run the EJB project.
    I give like
    java conveterClient converterClient.jar
    here conveterClient is class file name and converterClient.jar is deployed file
    like wise i give some exception is come
    give some help pls friends

    Navigate to the "DBOrders" module in the catalog, right click on the "ORDERS" database below and click "Export Schema Stucture". That will produce a file containing the DML needed to create the database

  • Command line to run the SCCM client installation

    SCCM Client package have been distributed to all servers.  It will be available in \\servername\smspkgf$\GS2002B2
    Do we need a command line to run the SCCM client installation manually?

    More info:
    About Client Installation Properties in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg699356.aspx
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • Steps to deploy an ejb application and running an ejb client in weblogic server6.1

    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet

    Hi.
    Check out the beanManaged example that ships with WLS and read the accompanying docs. This
    is a simple EJB with a servlet that invokes it.
    Michael
    shekhar sachdev wrote:
    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Need some help to unlock the Ipad. Cannot contact the previous owner he is in the shelter and I do not know were. After I restore the Ipad is asking that the previous owner has to remove it from his account

    need some help to unlock the Ipad. Cannot contact the previous owner he is in the shelter and I do not know were. After I restored the Ipad is asking that the previous owner has to remove it from his account

    Nobody on these boards or at Apple will unlock that device for you. Sorry.
    (117810)

  • Need some help here on the proper settings for quicktime exporting from imovie that won't degredate the footage from my handycam

    need some help here on the proper setting for quicktime exporting that won't denegrate my footage from handycam canon fs200

    What are the existing settings iMovie?
    Al

  • Hello, I need some help on renaming the title on mi web pages!

    Hello, I need some help on renaming the title on mi web pages! appear to be locked by the template and I would like to know if is posible rename each page with diferent title? Thanks,

    @ Gary: No, there is no need to specify an editable region in the page title.
    If you make a template from a page, by saving it as a template (using "save as template"), the page title is automatically made editable.
    @ Jesus: if you look into the code of your template or of any childpage, it should read like this:
    <!-- TemplateBeginEditable name="doctitle" -->
    <title>Mi PageTitle</title>
    <!-- TemplateEndEditable -->
    meaning that the page title is indeed editable.
    If it does not look like this, something went wrong.
    Maybe do a little test, save your page as a template and see if the code reads as above.
    It is important that you keep your templates in the Templates folder in your root folder
    Do not move the folder or change its name, otherwise it will not work.

  • 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

  • Error while running a EJB client

    Hi All,
    I am trying to execute a Hello World Prgram using EJB's. I have Deployed a Stateless Session bean in J2EE 1.3 deploytool.I am also able to compile my Client, but when i a executing the Client i am getting this error.
    =========================
    java.rmi.RemoteException: CORBA BAD_OPERATION 0 No; nested exception is: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDeleg ate.java:137) at javax.rmi.CORBA.Util.mapSystemException(Util.java:65) at headfirst._Advice_Stub.getAdvice(Unknown Source) at AdviceClient.go(AdviceClient.java:21) at AdviceClient.main(AdviceClient.java:11) Caused by: org.omg.CORBA.BAD_OPERATION: vmcid: 0x0 minor code: 0 completed: No at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java :39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorI mpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:274) at java.lang.Class.newInstance0(Class.java:296) at java.lang.Class.newInstance(Class.java:249) at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemException(ReplyMessage _1_2.java:93) at com.sun.corba.ee.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl. java:108) at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:132) at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457) at headfirst._Advice_Stub.getAdvice(Unknown Source) ... 2 more ===============================
    I have undeployed and redeployed couple of time but i am still getting the same problem. I am using J2EE 1.3 deploytool for deploying the EJB.
    Can anyone please help me in figuring out the problem.
    Thanks in Advance.
    ~Ravi.

    You are having network-related errors to the client.
    Let me see your Remote interface

  • Security exception while running the java client for a secured web service.

    hi,
    I created a proxy for a secured web service.
    When I run the client java program I am getting the following exception :
    java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
    Its saying that password is invalid.
    Can you please help me on this thanks in advance.
    Regards,
    Chandra

    hi,
    I created a proxy for a secured web service.
    When I run the client java program I am getting the following exception :
    java.io.IOException: could not load the default-keystore.jks file because The keystore file is tampered or password is incorrect.
    Its saying that password is invalid.
    Can you please help me on this thanks in advance.
    Regards,
    Chandra

  • Need a help to write the query

    Hi,
    I need a small help to write the query.
    I have a table contains couponid,coupon,createdate,expirationdate,assigndate from couponday table
    i want to write the query to select the coupon whose Expiry date in the table is NOT within 30 days.
    Thanks in advance

    Hi,
    user586 wrote:
    i want to write the query to select the coupon whose Expiry date in the table is NOT within 30 days.If you mean expirationdate (datatype: DATE) is not within 30 days (past or future) of run time, then:
    SELECT  coupon          -- or whatever columns you want
    FROM    table_x
    WHERE   expirationdate  NOT BETWEEN  SYSDATE - 30
                                AND      SYSDATE + 30
    ;

  • How to run Session ejb client program?

    Hi
    I am using weblogic server8.1 . I was running an ejb session client program it throws exception like below. Can any one tell me how to run a client in weblogic server. give the syntax for running ejb client.
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB\stateful>jav
    a -cp .;c:\j2ee\j2ee.jar;c:\weblogic\classes;D:\Weblogicserver\weblogic81\server
    \lib\weblogic.jar PortfolioClient
    Exception in thread "main" java.lang.NoClassDefFoundError: PortfolioClient (wron
    g name: stateful/PortfolioClient)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
    3)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    bye

    If stateful is the package for the client application, you should be executing from
    D:\Weblogicserver\user_projects\domains\mydomain\applications\MyEJB
    on the command line. The command should look like -
    java -classpath <whatever should be here> stateful.MyClient

  • Could not dereference object when running the EJB

    Hi,
    I want to reference my jsp page to EJB but get a "could not dereference object" upon running the jsp with this as it went into the catch exception instead of looking up to the EJB:
    Part of my jsp codes in jspinit( ):
    try {
    objref = initial.lookup("java:comp/env/ejb/MyMusicCart");
    System.out.println("lookup success for ejb/MyMusicCart");
    // a reference to the home interface is shareable
    cartHome = (MusicCartHome)PortableRemoteObject.narrow(objref, MusicCartHome.class);
    System.out.println("created MusicCartHome object");
    } catch (Exception ex) {
    System.out.println("Unexpected Exception: " +ex.getMessage());
    My web.xml
    Code:
    <ejb-ref>
    <ejb-ref-name>ejb/MyMusicCart</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>asg.MusicCartEJB.MusicCartHome</home>
    <remote>asg.MusicCartEJB.MusicCart </remote>
    <ejb-link>ejb-jar-ic.jar#MusicCartBean</ejb-link>
    </ejb-ref>
    anyone encounter this problem before? Please help.. I
    I can produce more of my files if you guys feel that is not enough
    Message was edited by:
    [email protected]

    Is the EJB you are referencing part of the same EAR file as your JSP?
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • I need heed help for Handle the JButton

    hi, guys
    I am writing a small program
    It has name and number field.
    It also has the first, privious, next , last and add buttons.
    i want to load the myData.txt file to the name and number field.
    and I want to make the buttons handle the events.
    and when the application is closed, it will save the data into the files.
    I can assign the the add button to save the files, and save the data when it is closed, but I can not make it save more than one record.
    i need ur help to the rest of the buttons, and load the file back to the field.
    andy suggestion would be great!
    Thank !
    here codes
       import javax.swing.*;
       import java.awt.event.*;
       import java.awt.*;
       import javax.swing.event.*;
       import java.io.*;
        public  class buttonAction extends JFrame
          private JLabel nameL;
          private JLabel numberL;               
          private JTextField name;
          private JTextField number;
          private JButton first;
          private JButton prev;
          private JTextField current;
          private JButton next;
          private JButton last;
          private JButton add;
          private JButton exit;
          private final int winw = 410;
          private final int winh = 200;
           private buttonAction()
             super("Wage Calculate");
             setSize(winw, winh);
             setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
             addWindowListener(new Closing());
             setLayout (new BorderLayout());
             loadData();        
             buildPanel();
             buildButtomButtons();
             setVisible(true);
           private void buildPanel()
             nameL = new JLabel("Name:");
             numberL = new JLabel("Number:");
             name = new JTextField(10);
             number = new  JTextField(5);
             JPanel panel =new JPanel();
             panel.setLayout(new GridLayout(2,1));
             panel.add(nameL);
             panel.add(name);
             panel.add(numberL);
             panel.add(number);
             add(panel, BorderLayout.NORTH);
           private void buildButtomButtons()
             first = new JButton("First");
             prev = new JButton("Prev");
             current = new JTextField(5);
             current.setEditable(false);
             next = new JButton("Next");
             last = new JButton("Last");
             add = new JButton("Add");
             exit = new JButton("Exit");
             JPanel button = new JPanel();
             first.addActionListener(new ButtonListener());
             prev.addActionListener(new ButtonListener());
             current.addActionListener(new ButtonListener());
             next.addActionListener(new ButtonListener());
             last.addActionListener(new ButtonListener());
             add.addActionListener(new ButtonListener());
             button.add(first);
             button.add(prev);
             button.add(current);
             button.add(next);
             button.add(last);
             button.add(add);
             add(button, BorderLayout.SOUTH);
            // save the data into the file when the application is close
           public class Closing extends WindowAdapter
              public void windowClosing(WindowEvent e)  
                try {
                   PrintWriter out = new PrintWriter (new FileWriter("myData.txt"));
                   out.println (name.getText());
                   out.println(number.getText());
                   out.close();
                    catch (IOException ee) {
                   // Happens if the file cannot be written to for any reason
                      JOptionPane.showMessageDialog(null, "Could not save the file " + ee.getMessage());
                System.exit(0);
           private void loadData()
             try {
                BufferedReader fileReader = new BufferedReader(new FileReader(new File("myData.txt")));
                String lineRead = fileReader.readLine();
                  // I need help how to load the data
                 catch (FileNotFoundException e)
                   e.printStackTrace();
                 catch (IOException e) {
                   e.printStackTrace();
            //handle the first, previous, next, last, add buttons
           private class ButtonListener implements ActionListener
              public void actionPerformed(ActionEvent e)
                Object button = e.getSource();
                if (button == add)
                   try
                      PrintWriter out = new PrintWriter (new FileWriter("myData.txt"));
                      out.println (name.getText());
                      out.println(number.getText());
                      out.close();
                       catch (IOException ee)
                      // Happens if the file cannot be written to for any reason
                         JOptionPane.showMessageDialog(null, "Could not save the file " + ee.getMessage());
                        //I need help for the first, privious and last buttons
           public static void main(String[] args)
             buttonAction pr = new buttonAction();
       }

    are you trying to load a multi line textfile int a JTextField? If you try to load this in a while loop as you read the file, it will zoom through the file, and you will probably only see the last line of the file (or nothing if the last line is blank) in the jtextfield. Consider using a JTextArea or some other component that can hold multiple lines. Also your file reading method calls look wrong to me. You appear to read a line, then continually check if that one read line is null, and if not do a while loop, that looks to loop forever. Look at the java I/O examples for how to do this right.
    Good luck

Maybe you are looking for

  • Bridge Problem opening files in Photoshop CS6

    CS6 Bridge appears to work fine, however when I try to open a file into Photoshop CS6 I get a flag saying it cannot find Photoshop CS4? Any ideas? TIA Keith

  • Thumbs up from a new MPB owner

    After 18 months of research, and subscribing to Macworld and Maclife and spending alot of time in my local Apple stores ---- I made the move this past Saturday to a stock 2.16 Ghz MBP Matte display. I have been using it every day since Saturday and i

  • Apex 4.0 import error - integrity constraint (APEX_040000.WWV_FLOWS_FK)

    I have a new Oracle Express 10G instance with Application Express 4.0 installed on it. I am trying to import an existing application that has been exported using Application Express. I get this error. How do I fix this? SQL> connect apex_040000/xxxxx

  • Cant pair a wireless speaker

    I have a HP Pavilion notebook with windows 8.1 I want to pair with Sony sbsbtx300 wireless speaker with bluetooth. Is it possible? I can't get them to sync.

  • 'File / Send link' is loopy.

    When I click on File / Send to, FF starts opening hundreds of new tabs labelled 'Mailto:?= .......', and I have to shut it down to make it stop. A similar thing happens if I click on a 'mailto:' link on a website page.