About XLIFF translation File Very urgent

Dear all ,
I am trying to translate the error messages in the APEX using the file XLIFF
I did the following :
1-Map your primary language application to a translated application
2-Seed and export the translation text of your application into a translation file.
3-Translate text identified in translation file.
4-Apply your translation file and publish.
but it didnt display the translation for the messages,so I opened the XLIFF file and i saw all the messages in the application inside the file but it is not translated,
so i changed it manually from the file itself then i exported the translation file into the application and i publish it ..
but it didnt make any effect to the application i checked the file itself it is changed there but it doesnt make effect on the application ...
actually i need to change the file manually from the OS not from the application coz it will not show all the component of the file ..
Thanks in advance
Regards
Ahmed ......

Hi,
SAP BC and SAP NetWeaver are based on different technologies: SAP BC is based
on webMethods’ proprietary Integration Server, whereas SAP NetWeaver is based
on open standards, such as BPEL4WS (business process execution language for
web services). Therefore, only parts of an SAP BC implementation, such as XSLT
mappings, can be migrated to a solution based on SAP NetWeaver. Any custom
programming based on SAP BC, such as SAP BC flow language, is unlikely to be
reusable in the SAP NetWeaver context.
The basic steps in the back-end systems are:
• Defining the logical systems
• Maintaining the ALE distribution model
• Maintaining partner profiles and EDI ports
• Maintaining RFC destinations
The basic steps in the SAP XI system are:
• Maintaining the System Landscape Directory
• Configuring the IDoc adapter
• Maintaining the receiver determinations, interface determinations, and
interface agreements
• Maintaining the communication channels
The type of scenario to migrate typically has an impact on the communication channels only.
>>>how to migrate from BC to XI in this kind of scenario. Will i use RFC and File adapters in my XI to configure the same?
Yes , for RFC communication you need to use the RFC adapter as you know in BC you need to create the connections and you can also test you RFC and BAPI and also you can check what XML string is coming in return. So i guess that XML you can use in XI also. Also you can use file adapter.
Hope this will help you.
Regards
Aashish Sinha
PS : reward points if helpful

Similar Messages

  • Communication b/w SAP and VB .exe file - Very urgent.

    hi,
      I am currently in a project implementing SAP for a cement manufacturing company. Here we have a VB .exe file which takes parameters and return values. now we need to connect this to application to SAP R/3 to pass data to that application and access the data from that .exe file.
    Note: we don't have any source code for that vb .exe file its a third party software.
    Its an very urgent one....
    please guide me how to do it with all steps.
    Any material please pass to [email protected]
    Thanks in advance.

    form grosswt .
      refresh itab3.
      clear itab3.
       Executing VB EXE file to get the weight from weigh bridge
      call function 'WS_EXECUTE'
       exporting
          DOCUMENT                 = ' '
          CD                       = ' '
          COMMANDLINE              = ' '
         inform                   = 'X'
           cd      = 'C:\SAPWEI'
         program                  = 'C:\sapwei\MyVB.exe'
          STAT                     = ' '
          WINID                    = ' '
          OSMAC_SCRIPT             = ' '
          OSMAC_CREATOR            = ' '
          WIN16_EXT                = ' '
          EXEC_RC                  = ' '
        IMPORTING
          RBUFF                    =
        EXCEPTIONS
          FRONTEND_ERROR           = 1
          NO_BATCH                 = 2
          PROG_NOT_FOUND           = 3
          ILLEGAL_OPTION           = 4
          GUI_REFUSE_EXECUTE       = 5
          OTHERS                   = 6
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
       Fetching Value from VB text file
      call function 'WS_UPLOAD'
       exporting
        CODEPAGE                      = ' '
         filename                      = 'C:\sapwei\w1.txt'
        FILETYPE                      = 'ASC'
        HEADLEN                       = ' '
        LINE_EXIT                     = ' '
        TRUNCLEN                      = ' '
        USER_FORM                     = ' '
        USER_PROG                     = ' '
        DAT_D_FORMAT                  = ' '
      IMPORTING
        FILELENGTH                    =
        tables
          data_tab                      = itab3
      EXCEPTIONS
        CONVERSION_ERROR              = 1
        FILE_OPEN_ERROR               = 2
        FILE_READ_ERROR               = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        NO_AUTHORITY                  = 10
        OTHERS                        = 11
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
      loop at itab3.
        v1 = itab3-num.
        pgrwt = v1.
      endloop.
      message 'Save Gross Weight' type 'S'.
    endform.                    " grosswt

  • Problem uploading XLIFF translation file

    Hi,
    I am trying to carry out a translation process on an application but am getting an error which is stopping me progressing.
    I have exported the text to a XLIFF file successfully, however when I try to import the translated XLIFF, I get the 'Page
    cannot be displayed' screen in Internet Explorer (with url 'http://ijmstra57.ijmuiden.corusgroup.com:7782/pls/tsuit/wwv_flow.accept').
    Could anybody give me an idea what could be causing this and any way to resolve it please.
    Thanks
    Simon

    Hi
    what if you validate the file using an off-line XML validation tool like XMLSpy?
    You should try that one first, as a malformed XML file can lead to every kind of weird errors.
    Bye,
    Flavio
    http://www.oraclequirks.com

  • Running a batch file - VERY URGENT .. help

    Hi people
    I am attempting to run a batch file from with a JSP page.
    the code i am using is:
    Runtime runtime = Runtime.getRuntime();
    Process process = runtime.exec("cmd.exe /c d:\\uploadfiles.bat");
    This jsp file is located on the c: of a webserver.
    the uploadfiles.bat is located on the d: of the webserver and the code is:
    copy d:\videos\008214?.rm d:\blah
    copy d:\images\008214.* d:\blah
    copy d:\xml\008214.* d:\blah
    cd \blah
    pkzip -es -m 008214.zip *.*
    copy 008214.zip d:\upload\008214.zip
    del 008214.zip
    If I run this batch file from a command line, it works fine, though when I try and call it through my JSP page, it doesnt do anything .. a command window just pops up for a while, and then closes.
    How can I fix this ... I need this quite quickly
    Thanks people

    1) It is O.K. that you see nothing in that console. Its output is captured by Java and is not displayed on the screen.
    In general, that console should not be visible, but actually it behaves differently according to JDK and OS versions (treat that as a feature).
    2). Look at this article:
    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
    It it does not answer your problem, try to search the forums:
    http://search.java.sun.com/search/java/index.jsp?qp=%2Bforum%3A31&nh=10&qt=%2B%22exec%22+-%22Replies%3A+0%22&col=javaforums
    Questions about Runtime.exec() has been asked hundreds of times.
    3) runtime.exec() can execute BAT files. It is not necessary to specify that "cmd /C".

  • Create text files-very urgent

    how can i create a text file using 'comma' as delimiter.moreover table is having
    around million records,i want to create a sy for eg.about 10 thousansd.is it a
    time consuming process.Pls help me

    Using SQL*Plus to format the output is easiest way
    set colsep ,
    set lines 1000
    set pages 1000 -- or you can use pages 0 to suppress the column headings
    spool output.txt
    select * from emp where rownum < 10
    spool off
    EMPNO,ENAME ,JOB , MGR,HIREDATE , SAL, COMM, DEPTNO
    7369,SMITH ,CLERK , 7902,17-DEC-80, 800, , 20
    7499,ALLEN ,SALESMAN , 7698,20-FEB-81, 1600, 300, 30
    7521,WARD ,SALESMAN , 7698,22-FEB-81, 1250, 500, 30
    7566,JONES ,MANAGER , 7839,02-APR-81, 2975, , 20
    7654,MARTIN ,SALESMAN , 7698,28-SEP-81, 1250, 1400, 30
    7698,BLAKE ,MANAGER , 7839,01-MAY-81, 2850, , 30
    7782,CLARK ,MANAGER , 7839,09-JUN-81, 2450, , 10
    7788,SCOTT ,ANALYST , 7566,19-APR-87, 3000, , 20
    7839,KING ,PRESIDENT, ,17-NOV-81, 5000, , 10
    You can play around with your SQL and column data format to how you want
    Cheers
    Dave

  • How to load a Properties file : Very URGENT

    I have properties file ie., SQLProperties.properties
    SQLProperties.properties
    logdetails = SELECT USERNAME AND PASSWORD FROM USER_TBL
    I want to load this file .
    I used like this
    public static Properties prop = null;
    strKey ="logdetails";
    FileInputStream fis = new FileInputStream("SQLProperties.properties");
    prop.load(fis);    // Since load parameter is file input stream
    prop.getProperty(strKey);But it is coming error while loading

    You did not initialize prop.
    //public static Properties prop = null;
    public static Properties prop = new  Properties ();
    strKey ="logdetails";
    FileInputStream fis = new FileInputStream("SQLProperties.properties");
    prop.load(fis);    // Since load parameter is file input stream
    prop.getProperty(strKey);
    [/prop]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Create a batch file "very urgent"

    i want to create a batch file that run every hour to update the user_status table fields according to the following formula
    if login = 1 and login_time status = 0 then login =3

    Write this statement into a text file and name it as
    say test.sql
    UPDATE user_status
       SET login = 3
    WHERE login = 1
       AND login_time = 0;Then write a script in UNIX as following
    $vi test_script.ksh
    !# /bin/ksh
    sqlplus `@test.sql`save it
    write a crom job for every hour.
    Codes not tested...
    Hope this helps
    Ghulam

  • How to send Zip files as attachments !! Very urgent, Please help!

    I am sending PDF files as attachments using java mail (it works fine). But now my requirement is to zip the PDFs and send them as attachments instead of actual PDF's. But i don't know how to achieve that. does java mail API support zip attachment facilities? I have looked in activation API also, but i couldn't find anything helpful. even i searched the forums, but no clue. Please, anybody help me about this, it's very urgent.
    thanks
    sri

    Check the first "if". If I specify an attachment, then a myme multipart doby is created: one for text and the other for the attachemnt I use this myme ovbject only for attachemnts, because some ISPs have problems and report error in email format if the attachemnet is missing and it contains only text and no attachment.
    static public void send(String to,
         String from,
         String host,
         String smtpPort,
         String subject,
         String body,
         String fileAttachment,
         String attachmentMimeType,
         String username,
         String password,
         String debug)
    throws Exception
         // create some properties and get the default Session
         Properties props = new Properties();
         props.put("mail.smtp.host", host);
         props.put("mail.smtp.port", smtpPort);
         props.put("mail.smtp.timeout","5000");
         props.put("mail.debug", debug);
         Session session = null;
         if (username != null && password != null)
              props.put("mail.smtp.auth", "true");
              MyPasswordAuthenticator auth = new MyPasswordAuthenticator(username, password);
              session = Session.getDefaultInstance(props,auth);
         else
              session = Session.getDefaultInstance(props, null);
         //session.setDebug(true);
         // create a message
         MimeMessage message = new MimeMessage(session);
         message.setFrom(new InternetAddress(from));
         InternetAddress[] address = InternetAddress.parse(to, false);
         message.setRecipients(Message.RecipientType.TO, address);
         message.setSubject(subject);
         message.setSentDate(new Date());
         // create the message part
         if ( fileAttachment != null && fileAttachment != "NO" )
              MimeBodyPart messageBodyPart = new MimeBodyPart();
              //fill message
              messageBodyPart.setText(body);
              //Multipart multipart = new MimeMultipart();
              Multipart multipart = new MimeMultipart("alternative");
              multipart.addBodyPart(messageBodyPart);
              // Part two is attachment
              System.out.println("----->fileAttachment DISTINTO de NULL");
              messageBodyPart = new MimeBodyPart();
              FileDataSource fds = new FileDataSource(fileAttachment);
              messageBodyPart.setDataHandler( new DataHandler(fds));
              messageBodyPart.setFileName(fileAttachment); //<-- El archivo atachado.
              multipart.addBodyPart(messageBodyPart);
              //EN DESARROLLO el envio de attachment!!          
              // Put parts in message
              message.setContent(multipart);
         } else { //Envio es solamente TEXTO
              message.setText(body);
         // send the message
         Transport.send(message);
    Regards,
    Vladimir

  • Very Urgent, files, threads, and swing !!!!

    Dear friends, i have a swing application, in that application i have a class that extends a thread, that thread will do nothing but read the contents of my data file and puts them in an array, but i am getting a NullpointerException in my thread, could any friend help me please, it is very urgent, i will post my code below.
    import java.awt.*;
    import java.awt.event.*;
    import java.text.DateFormat;
    import java.util.*;
    import javax.swing.*;
    import java.sql.*;
    import java.net.URL;
    import java.io.*;
    public class FinalMachine extends JFrame
    private JPanel MainPanel, ThicknessPanel, MainManager,fieldsPanel, sub_panel;
    private Container c;
    private CardLayout CardManager;
    private String timezone;
    private static final int ONE_SECOND = 1000;
    private JLabel welcome_label, label1, label2, label3,field_label;
    private JTextField data_entry;
    private Connection connection;
    public JPanel thick_figure;
    public int num_of_hits, next_index, recCount;
    public int dataBuffer[];
    public FileReader data_file;
    public BufferedReader b_data_file;
    public File tem_file;
    final int num_of_rec = 20;
    public FinalMachine()
    super("PHOENIX MACHINERY s.a.l");
    /* Start all threads */
    /* Start filling data file in global array */
         loadData dataFile = new loadData();
         dataFile.start();          
    /* Adding control to window application */
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent windowevent)
    // setDefaultCloseOperation(0);
              System.exit(0);
    public void windowDeiconified(WindowEvent eve)
    setState(0);
    addComponentListener(new ComponentAdapter() {
    public void componentResized(ComponentEvent componentevent)
    setSize(500, 500);
    Dimension dimension1 = Toolkit.getDefaultToolkit().getScreenSize();
    if(dimension1.width == 800 && dimension1.height == 600)
    setLocation(150, 25);
    else
    if(dimension1.width == 1024 && dimension1.height == 768)
    setLocation(200, 100);
    /* Setting the location of the application on the screen */
    Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
    if(dimension.width == 800 && dimension.height == 600)
    setLocation(150, 25);
    else
    if(dimension.width == 1024 && dimension.height == 768)
    setLocation(200, 100);
    /* Constructing the main menu */
         JMenuBar bar = new JMenuBar();
         setJMenuBar( bar );
         JMenu fileMenu = new JMenu( "File");
         fileMenu.setMnemonic( 'F' );
         JMenuItem mainItem = new JMenuItem( "Main page" );
         mainItem.setMnemonic( 'M' );
         mainItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "main");
         fileMenu.add( mainItem );
         JMenuItem dataItem = new JMenuItem( "Database page" );
         dataItem.setMnemonic( 'D' );
         dataItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "data_base");
         fileMenu.add( dataItem );
         JMenuItem printItem = new JMenuItem( "Print" );
         printItem.setMnemonic( 'P' );
         printItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   PrintUtilities.printComponent(MainManager);
         fileMenu.add( printItem );
         JMenuItem exitItem = new JMenuItem( "Exit" );
         exitItem.setMnemonic( 'P' );
         exitItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                        System.exit(0);
         fileMenu.add( exitItem );
         bar.add( fileMenu );
         JMenu figureMenu = new JMenu( "Figures");
         figureMenu.setMnemonic( 'G' );
         JMenuItem thicknessItem = new JMenuItem( "Thickness" );
         thicknessItem.setMnemonic( 'T' );
         thicknessItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "thickness");
         figureMenu.add( thicknessItem );
         bar.add( figureMenu );
         JMenu helpMenu = new JMenu( "Help");
         helpMenu.setMnemonic( 'H' );
         JMenuItem aboutItem = new JMenuItem( "About us" );
         aboutItem.setMnemonic( 'A' );
         aboutItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   JOptionPane.showMessageDialog(null, "Engineer Bilal Haidar (Computer & "+                     "Communication Engineering)\n\n All Rights Reserevd. @ 2002",
                        "About me...", JOptionPane.PLAIN_MESSAGE);
         helpMenu.add( aboutItem );
         bar.add( helpMenu );
    /* Intializing global values */
    dataBuffer = new int[60];
    /* Initializing the panels */
    c = getContentPane();
    c.setLayout(new FlowLayout());
    CardManager = new CardLayout();
    MainManager = new JPanel(false);
    MainManager.setLayout(CardManager);
    c.add(MainManager);
    javax.swing.border.Border border = BorderFactory.createEmptyBorder(10, 10, 5, 10);
    MainPanel = new JPanel(false);
    MainPanel.setLayout(new BoxLayout(MainPanel, 1));
    MainPanel.setBorder(border);
    ThicknessPanel = new JPanel(false);
    ThicknessPanel.setLayout(new BoxLayout(ThicknessPanel, 1));
    ThicknessPanel.setBorder(border);
    fieldsPanel = new JPanel(false);
    fieldsPanel.setLayout( new BoxLayout( fieldsPanel,1));
    fieldsPanel.setBorder(border);
    sub_panel = new JPanel(false);
    sub_panel.setLayout( new BoxLayout(sub_panel,0) );
    sub_panel.setBorder(border);
    thick_figure = new JPanel(false);
    thick_figure.setBorder(border);
    /* Filling the main panel */
    JLabel jlmain = new JLabel("Main Page");
    MainPanel.add(jlmain);
    timezone = showTime(new Locale("en", "US"));
    JLabel jltime = new JLabel(" " + timezone);
    MainPanel.add(jltime);
    MainManager.add(MainPanel, "main");
    /* Filling the thickness panel */
    num_of_hits = 0;
    next_index = 0;
    /* fill in with ero values for everything*/
    /*display the figure*/
    ThicknessPanel.add(thick_figure);
    JLabel blanklabel = new JLabel(" ");
    ThicknessPanel.add(blanklabel);
    JButton build_fig = new JButton("Draw Figure");
    build_fig.addActionListener(
         new ActionListener() {  // anonymous inner class
         public void actionPerformed( ActionEvent e )
    if ( num_of_hits == 0 )
    /* draw figure based on first 20 points in the array */
    next_index = num_of_rec;
    else
    if ( num_of_hits > 3 )
    JOptionPane.showMessageDialog(null,"No more data to draw","Error Drawing",JOptionPane.ERROR_MESSAGE);
    else
    /* draw the figure starting the data from index 20*/
    next_index = next_index + num_of_rec;
    num_of_hits += 1;
    ThicknessPanel.add(build_fig);
    MainManager.add(ThicknessPanel, "thickness");
    /* filling the database panel */
    label1 = new JLabel(" ",SwingConstants.CENTER);
    welcome_label = new JLabel(" Database Page ",SwingConstants.CENTER);
    label2 = new JLabel(" ",SwingConstants.CENTER);
    fieldsPanel.add( label1 );
    fieldsPanel.add( welcome_label );
    fieldsPanel.add( label2 );
    field_label = new JLabel(" Enter your name: ");
    data_entry = new JTextField( 10 );
    sub_panel.add( field_label );
    sub_panel.add( data_entry );
    fieldsPanel.add( sub_panel );
    JButton add_data = new JButton( "Add me" );
    add_data.addActionListener(
         new ActionListener() {  // anonymous inner class
         public void actionPerformed( ActionEvent e )
    // try {
    //          url = "jdbc:odbc:DataEntry";
    //          Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    //          connection = DriverManager.getConnection( url );
    //               System.out.println( "Connection Suucessfull");
    // Statement statement = connection.createStatement();
    //                String get_field;
    //               get_field = data_entry.getText();
    //               String query = "INSERT INTO data (anyField) VALUES ('get_field')";
    //                int result1 = statement.executeUpdate( query );
    //           if ( result1 == 1 )
    // JOptionPane.showMessageDialog(null, "Thanks for the info..."," Data Entry Success",JOptionPane.INFORMATION_MESSAGE);
    //                else
    //                     JOptionPane.showMessageDialog(null, "Sorry, your name was not added...","Data entry error",JOptionPane.ERROR_MESSAGE);
    //     catch ( ClassNotFoundException cnfex ) {
    //          // process ClassNotFoundExceptions here
    //          cnfex.printStackTrace();
    //               System.out.println( "Connection UN Suucessfull");
    //          catch ( SQLException sqlex ) {
    //     // process SQLExceptions here
    //          sqlex.printStackTrace();
    //                System.out.println( "Connection UN Suucessfull");
    //          catch ( Exception ex ) {
    //          // process remaining Exceptions here
    //          ex.printStackTrace();
    //               System.out.println( "Connection UN Suucessfull");
    fieldsPanel.add(add_data);
    MainManager.add(fieldsPanel, "data_base");
    /* display time */
    Timer timer = new Timer(1000, new ActionListener() {
    public void actionPerformed(ActionEvent actionevent)
    timezone = showTime(new Locale("en", "US"));
    setTitle("PHOENIX MACHINERY s.a.l " + timezone);
    timer.start();
    public static void main(String args[])
    FinalMachine finalmachine = new FinalMachine();
    finalmachine.setSize(500, 500);
    ImageIcon imageicon = new ImageIcon("images/pc.gif");
    finalmachine.setIconImage(imageicon.getImage());
    finalmachine.show();
    public static String showTime(Locale locale)
    java.util.Date date = new java.util.Date();
    byte byte0 = 2;
    DateFormat dateformat = DateFormat.getTimeInstance(byte0, locale);
    String s = dateformat.format(date);
    return s;
    /* Thread loadData starts here */
    class loadData extends Thread
    public void run()
    try {
              readMyFile();
    catch( Exception x )
    System.out.println("The following error occured in LoadData thread : "+x.toString() ); }
    } // run() ends here
    /* method read file inside thread loadData */
    void readMyFile() {
    String record = " ";
    recCount = 0;
    try {
              tem_file = new File("mydata.dat");
              data_file = new FileReader(tem_file);
              b_data_file = new BufferedReader( data_file );
              record = new String();
              while ( (record = b_data_file.readLine()) != null ) {
              dataBuffer[recCount] = Integer.parseInt(record);
              recCount += 1; }
         b_data_file.close();     
              catch (IOException e) {
         System.out.println("Uh oh, got an IOException error!");
         e.printStackTrace();
         } // end of readMyFile()
    } // thread loadData ends
    mydata.dat
    2
    4
    3
    1
    2
    3
    5
    2
    4
    1
    6
    3
    2
    5
    4
    1
    2
    5
    8
    2
    6
    9
    7
    4
    2
    1
    0
    2
    5
    4
    8
    7
    5
    6
    3
    2
    1
    4
    3
    0
    2
    3
    6
    5
    2
    1
    4
    5
    6
    9
    8
    5
    2
    1
    6
    8
    3
    1
    7
    5

    Thank you Mr. jobuck, you helped me a lot, i wonder if you can provide me with a tutorial on how threads work and how runnables work too. i fixed the error ut old me about but still when i try to add another thread to my program i got an error saying that, i must decalre the new thread in a seperate file please can u have a look on what i have:
    import java.awt.*;
    import java.awt.event.*;
    import java.text.DateFormat;
    import java.util.*;
    import javax.swing.*;
    import java.sql.*;
    import java.net.URL;
    import java.io.*;
    public class FinalMachine extends JFrame
    private JPanel MainPanel, ThicknessPanel, MainManager,fieldsPanel, sub_panel;
    private Container c;
    private CardLayout CardManager;
    private String timezone;
    private static final int ONE_SECOND = 1000;
    private JLabel welcome_label, label1, label2, label3,field_label;
    private JTextField data_entry;
    private JPanel thick_figure;
    private int num_of_hits, next_index, recCount, read_flag;
    private int dataBuffer[];
    private FileReader data_file;
    private BufferedReader b_data_file;
    private File tem_file;
    private Connection connection;     
    final int num_of_rec = 20;
    public FinalMachine()
    super("PHOENIX MACHINERY s.a.l");
    /* load JDBC drivers */
    try {
    String url = "jdbc:odbc:DataEntry";
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
         connection = DriverManager.getConnection( url );
         System.out.println( "Connection Suucessfull");
    catch ( ClassNotFoundException cnfex ) {
    // process ClassNotFoundExceptions here
    cnfex.printStackTrace();
         System.out.println( "Connection UN Suucessfull");
    catch ( SQLException sqlex ) {
    // process SQLExceptions here
    sqlex.printStackTrace();
         System.out.println( "Connection UN Suucessfull");
    catch ( Exception ex ) {
    // process remaining Exceptions here
    ex.printStackTrace();
         System.out.println( "Connection UN Suucessfull");
    /* Intializing global values */
    dataBuffer = new int[60];
    /* Start all threads */
    /* Start filling data file in global array */
         loadData dataFile = new loadData();
         dataFile.start();          
         setData setdata = new setData();
         setdata.start();          
    /* Adding control to window application */
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent windowevent)
    // setDefaultCloseOperation(0);
              System.exit(0);
    public void windowDeiconified(WindowEvent eve)
    setState(0);
    addComponentListener(new ComponentAdapter() {
    public void componentResized(ComponentEvent componentevent)
    setSize(500, 500);
    Dimension dimension1 = Toolkit.getDefaultToolkit().getScreenSize();
    if(dimension1.width == 800 && dimension1.height == 600)
    setLocation(150, 25);
    else
    if(dimension1.width == 1024 && dimension1.height == 768)
    setLocation(200, 100);
    /* Setting the location of the application on the screen */
    Dimension dimension = Toolkit.getDefaultToolkit().getScreenSize();
    if(dimension.width == 800 && dimension.height == 600)
    setLocation(150, 25);
    else
    if(dimension.width == 1024 && dimension.height == 768)
    setLocation(200, 100);
    /* Constructing the main menu */
         JMenuBar bar = new JMenuBar();
         setJMenuBar( bar );
         JMenu fileMenu = new JMenu( "File");
         fileMenu.setMnemonic( 'F' );
         JMenuItem mainItem = new JMenuItem( "Main page" );
         mainItem.setMnemonic( 'M' );
         mainItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "main");
         fileMenu.add( mainItem );
         JMenuItem dataItem = new JMenuItem( "Database page" );
         dataItem.setMnemonic( 'D' );
         dataItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "data_base");
         fileMenu.add( dataItem );
         JMenuItem printItem = new JMenuItem( "Print" );
         printItem.setMnemonic( 'P' );
         printItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   PrintUtilities.printComponent(MainManager);
         fileMenu.add( printItem );
         JMenuItem exitItem = new JMenuItem( "Exit" );
         exitItem.setMnemonic( 'P' );
         exitItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                        System.exit(0);
         fileMenu.add( exitItem );
         bar.add( fileMenu );
         JMenu figureMenu = new JMenu( "Figures");
         figureMenu.setMnemonic( 'G' );
         JMenuItem thicknessItem = new JMenuItem( "Thickness" );
         thicknessItem.setMnemonic( 'T' );
         thicknessItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   CardManager.show(MainManager, "thickness");
         figureMenu.add( thicknessItem );
         bar.add( figureMenu );
         JMenu helpMenu = new JMenu( "Help");
         helpMenu.setMnemonic( 'H' );
         JMenuItem aboutItem = new JMenuItem( "About us" );
         aboutItem.setMnemonic( 'A' );
         aboutItem.addActionListener (
              new ActionListener() {
                   public void actionPerformed( ActionEvent e )
                   JOptionPane.showMessageDialog(null, "Engineer Bilal Haidar (Computer & "+                     "Communication Engineering)\n\n All Rights Reserevd. @ 2002",
                        "About me...", JOptionPane.PLAIN_MESSAGE);
         helpMenu.add( aboutItem );
         bar.add( helpMenu );
    /* Initializing the panels */
    c = getContentPane();
    c.setLayout(new FlowLayout());
    CardManager = new CardLayout();
    MainManager = new JPanel(false);
    MainManager.setLayout(CardManager);
    c.add(MainManager);
    javax.swing.border.Border border = BorderFactory.createEmptyBorder(10, 10, 5, 10);
    MainPanel = new JPanel(false);
    MainPanel.setLayout(new BoxLayout(MainPanel, 1));
    MainPanel.setBorder(border);
    ThicknessPanel = new JPanel(false);
    ThicknessPanel.setLayout(new BoxLayout(ThicknessPanel, 1));
    ThicknessPanel.setBorder(border);
    fieldsPanel = new JPanel(false);
    fieldsPanel.setLayout( new BoxLayout( fieldsPanel,1));
    fieldsPanel.setBorder(border);
    sub_panel = new JPanel(false);
    sub_panel.setLayout( new BoxLayout(sub_panel,0) );
    sub_panel.setBorder(border);
    thick_figure = new JPanel(false);
    thick_figure.setBorder(border);
    /* Filling the main panel */
    JLabel jlmain = new JLabel("Main Page");
    MainPanel.add(jlmain);
    timezone = showTime(new Locale("en", "US"));
    JLabel jltime = new JLabel(" " + timezone);
    MainPanel.add(jltime);
    MainManager.add(MainPanel, "main");
    /* Filling the thickness panel */
    num_of_hits = 0;
    next_index = 0;
    /* fill in with ero values for everything*/
    /*display the figure*/
    ThicknessPanel.add(thick_figure);
    JLabel blanklabel = new JLabel(" ");
    ThicknessPanel.add(blanklabel);
    JButton build_fig = new JButton("Draw Figure");
    build_fig.addActionListener(
         new ActionListener() {  // anonymous inner class
         public void actionPerformed( ActionEvent e )
    if ( num_of_hits == 0 )
    /* draw figure based on first 20 points in the array */
    next_index = num_of_rec;
    else
    if ( num_of_hits > 3 )
    JOptionPane.showMessageDialog(null,"No more data to draw","Error Drawing",JOptionPane.ERROR_MESSAGE);
    else
    /* draw the figure starting the data from index 20*/
    next_index = next_index + num_of_rec;
    num_of_hits += 1;
    ThicknessPanel.add(build_fig);
    MainManager.add(ThicknessPanel, "thickness");
    /* filling the database panel */
    label1 = new JLabel(" ",SwingConstants.CENTER);
    welcome_label = new JLabel(" Database Page ",SwingConstants.CENTER);
    label2 = new JLabel(" ",SwingConstants.CENTER);
    fieldsPanel.add( label1 );
    fieldsPanel.add( welcome_label );
    fieldsPanel.add( label2 );
    field_label = new JLabel(" Enter your name: ");
    data_entry = new JTextField( 10 );
    sub_panel.add( field_label );
    sub_panel.add( data_entry );
    fieldsPanel.add( sub_panel );
    JButton add_data = new JButton( "Add me" );
    add_data.addActionListener(
         new ActionListener() {  // anonymous inner class
         public void actionPerformed( ActionEvent e )
              try {
    Statement statement = connection.createStatement();
                   String get_field;
              get_field = data_entry.getText();
              String query = "INSERT INTO data (anyField) VALUES ('"+get_field+"')";
              int result1 = statement.executeUpdate( query );
              if ( result1 == 1 )
              JOptionPane.showMessageDialog(null, "Thanks for the info..."," Data Entry Success",JOptionPane.INFORMATION_MESSAGE);
                        data_entry.setText(" ");     
              else
                        JOptionPane.showMessageDialog(null, "Sorry, your name was not added...","Data entry error",JOptionPane.ERROR_MESSAGE);
         catch ( SQLException sqlex ) {
         // process SQLExceptions here
              sqlex.printStackTrace();
                   System.out.println( "Connection UN Suucessfull");
              catch ( Exception ex ) {
              // process remaining Exceptions here
              ex.printStackTrace();
                   System.out.println( "Connection UN Suucessfull");
    fieldsPanel.add(add_data);
    MainManager.add(fieldsPanel, "data_base");
    /* display time */
    Timer timer = new Timer(1000, new ActionListener() {
    public void actionPerformed(ActionEvent actionevent)
    timezone = showTime(new Locale("en", "US"));
    setTitle("PHOENIX MACHINERY s.a.l " + timezone);
    timer.start();
    public static void main(String args[])
    FinalMachine finalmachine = new FinalMachine();
    finalmachine.setSize(500, 500);
    ImageIcon imageicon = new ImageIcon("images/pc.gif");
    finalmachine.setIconImage(imageicon.getImage());
    finalmachine.show();
    public static String showTime(Locale locale)
    java.util.Date date = new java.util.Date();
    byte byte0 = 2;
    DateFormat dateformat = DateFormat.getTimeInstance(byte0, locale);
    String s = dateformat.format(date);
    return s;
    /* Thread loadData starts here */
    public class loadData extends Thread
    public void run()
    try {
              readMyFile();
              read_flag = 1;
              notify();
    catch( Exception x )
    System.out.println("The following error occured in LoadData thread : "+x.toString() );
    } // run() ends here
    /* method read file inside thread loadData */
    void readMyFile() {
    String record = " ";
    recCount = 0;
    try {
              tem_file = new File("mydata.dat");
              data_file = new FileReader(tem_file);
              b_data_file = new BufferedReader( data_file );
              record = new String();
              while ( (record = b_data_file.readLine()) != null ) {
              dataBuffer[recCount] = Integer.parseInt(record);
              recCount += 1; }
         b_data_file.close();     
              catch (IOException e) {
         System.out.println("Uh oh, got an IOException error!");
         e.printStackTrace();
         } // end of readMyFile()
    } // thread loadData ends
    public class setData extends Thread {
    public void run()
    try {
              while ( !read_flag ) {
                   try {     wait(); }
                   catch( InterruptedException e ) {
                        e.printStackTrace();
              } // end while
              for(int index = 0; index < 60; index++)
              System.out.println("Array["+index+"] = "+dataBuffer[index]);
    catch( Exception x )
    System.out.println("The following error occured in LoadData thread : "+x.toString() );
    } // run() ends here
    the only added thing is the setData thread, i want this thread to start printing out the array whenever, loadData thread has finished filling the data inside the array please i need ur help.

  • Upload file in clustered environment- Very Urgent

    Hi,
    My requirement is to upload a file onto the WebServer and also list out the file names on the front end and provide a funcionality to delete them from the server.
    Environment Details:
    -Product: WebSphere Portal
    -Type - Clustered Enviroment with 2 nodes
    -Framework: JSF
    The problem I am facing here is:
    1) I login to the application using a common URL: Say abc.com/wps/portal
    2) I dont know which node I am logged into, it can be either Primary(X1) or Secondary(X2).
    3) I click on the browse button and select a file and click on the Upload button. The file is uploaded successfully on say primary node X1.
    4) I can at that time read the name of the file and display it on screen and also select and delete it. But if I log off and login again and say I am now redirected to secondary node, I am not able to read the name of the file I uploaded as it is stored on the primary node.
    Can some body provide me a solutions to this.
    What I can think of is , While uploading the file, I will check if I am on the primary node or secondary node and Upload the file only on one node rather than uploading them on both. Say uploading only on primary node X1, Now if I am logged into primary I can just mention the directory name and upload it.
    But I f am on the secondary node I need to upload the file on the primary node using URL connection.
    Can some body tell me the feasibility of this approach ?? Also how do I upload a file on a remote machine(Logged into the secondary but putting the file onto the primary node.) ???
    Please help me this very very urgent.
    Thanks.

    Hi!
    I would simply use a network share which is accessible from both nodes as storage. This way you don't have to care to which server the file is uploaded too, because both share the same filesystem.
    If you are on windows, simply share a folder and access it from both nodes. In Linux I'd suggest using samba & mount, on solaris use share & mount.
    Another approach would be to use a database as storage.
    hth Chris

  • Very urgent..Can a batch file be executed from a button in application?

    HI!
    Please this is very urgent..
    I want to know wheather it is possible to provide a button in an htmldb application,
    that executes a batch(dos .bat file) file from a network location????
    Thanks
    Asit.
    Message was edited by:
    user459887

    It will be possible to do that but I suggest you search the HTML DB Forum first and place your question there rather than in this forum .
    Greg

  • HT201317 I had 250 photos stored in photo stream but i restore them now they are just 150. I m missing about 100 photos those were very urgent please please help

    I had 250 photos stored in photo stream but i restore them now they are just 150. I m missing about 100 photos those were very urgent please please help

    Photo stream only keeps photos in iCloud for 30 days, even though up to 1000 photos will remain on your device until you delete them (such as by restoring your phone).  When you turned on photo stream again you only got back the photos added in the last 30 days as the others have already been removed.
    If the missing photos were still in your camera roll when you last backed up, restoring the backup should recover them.  (The backup includes camera roll photos but not photo stream photos.)

  • How use class file in jsp(very urgent)

    i have class file called birds (birds is actually a xslt file transformed to java class file) now this class file i have to use in my jsp file. how can i use them. if possible can any one give me sample code please very urgent
    can any one help me

    java files
    import org.w3c.dom.*;
    import javax.servlet.http.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    import java.io.*;
    public class XmlParser
         public String XmlParser()
              try
    String strXML= "employee.xml";
                   String xslFile = "employeeId.xsl";
                   TransformerFactory tFactory = TransformerFactory.newInstance();
                   StreamResult theTransformationResult = new StreamResult( new ByteArrayOutputStream() );
                   Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile));
                   transformer.transform(new StreamSource(new StringReader(strXML)), theTransformationResult);
                   String output = theTransformationResult.getOutputStream().toString()
              catch(Exception e)
                   System.out.println(" ***** XmlParser.XmlParser ERROR ***** " + e);
    return output;
    using class files in jsp
    <%@ page import="com.qqqq.aaaa.XmlParser"%>
    <%
         XmlParser xmlParser          =     new XmlParser();
    out.println(xmlParser.XmlParser());
    %>
    i think it will help you.

  • A very urgent deployment issue about DBAdapter

    Hello All,
    I have a very urgent deployment issue about DBAdapter.
    That DBAdapter is connect to DB2 AS400 Database. I have a developing database (jdbc:as400://server01/TEST) and a production database (jdbc:as400://server01/PROD).
    During developing, I used DBAdapter wizard to create it, and import some tables, and set the Adapter to use jabc/DB2DS as connection information for easily deployment later.
    Then I deploy to Production. I configured Data-source.xml and oc4j-ra.xml rightly; I set DB connection point to production database. But the DBAdapter still write into developing Database.
    I checked the DBAdapter, the imported tables are something like this, TEST.table1, TEST.table2. And there are a lot "TEST" located in DB2Writer_toplink_mapping.xml, DB2Writer.xml, TEST.schema, DB2Writer.table1.ClassDescriptor.xml.
    This TEST is refrer to the TEST in connect String jdbc:as400://server01/TEST.
    I think this might be the reason cause the problem. As to production database, "TEST" should replaced by "PROD". If I changed it manually, I have to change every time when switch between TEST and PROD. And I also don't know if it is safe to do it? (I tried, and bring some toplink mapping problem)
    By the way, for Oracle Database, because we use 2 instances for testing and production with same schema name, and do not have this issue.
    Anyone could help and many thanks.
    Kerr
    Message was edited by:
    Kerr

    Hi Kerr,
    The idea is to set up all connections in the BPEL or ESB services with logical names, e.g. typically of the form eis/DB/MyFinancialSystem or eis/DB/MyLogisticsSystem. This way, you do not have to modify code when deploying it onto different environments that serve different purposes.
    When moving your services through their lifecyle, on every environment you deploy these to you will have the same logical connections configured on each instance, e.g. for DEV, QA, SIT, UAT and PROD. Only, in case of QA the actual physical connection is configured to point to the QA instance of the systems that your services interact with whereas in case of UAT it points to the UAT instance of the same system.
    Maybe your problem is caused by connecting as user "SomeUser" when running the DB Adapter wizard during development and actually selecting objects from a different schema than you used to connect with, e.g. "Test" in your case.
    Hth,
    Sjoerd

  • Help with DAQmx tension measurement and saving to spreadsheet file with NI USB-6218 (very urgent !)

    Hello people,
    I've been given at the last minute a project at school where I need to do some data acquisitions (tensions) with a DAQ NI USB-6218 and it has
    been miserable ever since, I first tried the "easy" way with DAQ assistant to save a given number of samples per channel to a text file
    in order to use it in matlab, well...it isn't working : every time in my text file I have a different number of samples, I used the "Write to spreadsheet" function within a while loop where I wired the path outputs to a shift register in order not to have it asking me the path all the time,
    but I'm still not getting the X number of samples per channel as specified at the beginning.
    So I've been using another method with the DAQmx where I get each individual waveform into a vector of samples, when I look for the size
    of the vector it looks Ok, 100 in my case but the problems start when I try to have a text file where each column will represent a channel for
    subsequent matlab treatment, what I'm doing doesn't seem to be working, it's really unbearable, please help me sort this mess out.
    I'll add both VIs as attachment so it can help you help me, thank you.
    Basically what I need is to acquire 15 tensions with a given number of samples per channel (the same for each channel) and then plot it in matlab.
    Note the first VI has switches to "unblock" each channel but it doesn't seem to be working, please look at both VIs.
    It's very urgent, I could fail my school year if I fail this project.
    Thank you very much for your help.
    Attachments:
    Projet EM acquisition - Copie.zip ‏78 KB
    projet autre version envoyer sur forum.zip ‏20 KB

    Hi Thank you very much for your help, in the meantime, I've changed the project to (see attachment), now
    it is at least writing the waveforms to the txt file, but again there is an another problem, it seems to be ignoring the
    number of samples I specified per channel, it seems to be writing into the txt file for as long as I keep the VI running.
    What is missing ? Also I'd like to have a clock for my samples, that is when I plot in matlab I do not just plot random numbers, but the
    physical analogical inputs as a function of time, that is for instance the first line corresponds to time 0, line 2 to time 0,001
    ect...How could I do that ? For the meantime I got only 5 channels, when I know what my mistake is, I'll expand it to 15 channels.
    Please help me.
    Attachments:
    acquisition 5 voies.zip ‏61 KB

Maybe you are looking for