J2me simple game application

when i select the new Game option Game Screen doesn't work properly.please help me ican't find problem in this program but the project build sucsessfully;
Midlet class....
//@Author Lasantha PW
//Title Java Developer
//Project Name Simple Midlet Game Application
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
//main midlet
public class Mario extends MIDlet{
Display display; //display object
     //private String player,background;
     private Image splashLogo;//splash image
     MainMenuScreen mainMenuScreen;//main menu object
     AboutScreen about;
     boolean isSplash=true; //splash condition
     MarioCanvas marioCanvas;//=new MarioCanvas(this);
     public int noOfLives=3; //player lives
     public Mario(){
          marioCanvas=new MarioCanvas(this);
          about=new AboutScreen(this);
     public void startApp(){
          display=Display.getDisplay(this);
          mainMenuScreen=new MainMenuScreen(this);
          if(isSplash) {
          isSplash=false;
               try {
               splashLogo=Image.createImage("/splash.png");
               new SplashScreen(display,mainMenuScreen,3000,splashLogo);
          catch(Exception ex){}
     public void pauseApp(){
     public void destroyApp(boolean unconditional){
          notifyDestroyed();
     public void mainMenuScreenQuit(){
          destroyApp(true);
     public void mainMenuScreenShow(){
          display.setCurrent(mainMenuScreen);
     public void gameScreenShow(){
          display.setCurrent(marioCanvas);
          marioCanvas.start1();
     public void aboutScreenShow(){
          display.setCurrent(about);
     public void gameScreenQuit(){
          destroyApp(true);
     public Display getDisplay(){
          return display;
Main Menu class..................................
//@Author Lasantha PW
//Title Java Developer
//Project Name Simple Midlet Game Application
import javax.microedition.lcdui.*;
import java.io.IOException;
public class MainMenuScreen extends List implements CommandListener{
     //create midlet object
     private Mario midlet;
     //create command objects
     private Command exit=new Command("Exit",Command.EXIT,1);
     private Command select=new Command("Select",Command.ITEM,1);
     //private MarioCanvas marioCanvas;
     public MainMenuScreen(Mario midlet){
     super("Tank32",Choice.IMPLICIT);
     this.midlet=midlet;
     append("New Game",null);
     append("Settings",null);
     append("High Score",null);
     append("Help",null);
     append("About",null);
     addCommand(exit);
     addCommand(select);
     setCommandListener(this);
     public void commandAction(Command c,Displayable d){
     if(c==exit){
     midlet.mainMenuScreenQuit();return;
     else if(c==select){
     processMenu();return;
     else{
     processMenu();return;
     private void processMenu(){
     List down=(List)midlet.display.getCurrent();
     switch(down.getSelectedIndex()){
     case 0:scnNewGame();break;
     case 1:scnSettings();break;
     case 2:scnHighScore();break;
     case 3:scnHelp();break;
     case 4:scnAbout();break;
     //private methods for processMenu method
     private void scnNewGame(){     
          midlet.gameScreenShow();     
     private void scnSettings(){}
     private void scnHighScore(){}
     private void scnHelp(){}
     private void scnAbout(){
          midlet.aboutScreenShow();
GameScreen......................................
//@Author Lasantha PW
//Title Java Developer
//Project Name Simple Midlet Game Application
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import java.util.*;
public class MarioCanvas extends GameCanvas implements Runnable,CommandListener{
//command objects
     private Command exit=new Command("Exit",Command.EXIT,1);
     //main midlet
     public Mario midlet;
     public boolean isPlay=true;
     public int dx=4;
     public int dy=4;
     public int BASE=(2*getHeight())/3;
     public Vector allObstacles;
     //Resourse for player
     public Image playerPic;
     Player player;
     public boolean leftTrueRightFalse=true;
     //Power power;
     Image powerPic;
     //resourse for devils
     public Image devilPic;
     Devil devil1;
     LayerManager layerManager;
     public MarioCanvas(Mario midlet){
          super(true);
          this.midlet=midlet;
          addCommand(exit);
          setCommandListener(this);
     public void start1(){
          try{
               //initialize all image objets
               playerPic=Image.createImage("/player.png");
               //powerPic=Image.createImage("/power.png");
               devilPic =Image.createImage("/Devil.png");
               //player object
               Player player=new Player(playerPic,0,BASE-15,this);
               //obstacle objects
               devil1=new Devil(devilPic,player,100,BASE-15);
               //vector object
               allObstacles=new Vector(0,100);
               //bullets=new Vector();
               //add obstacles to the vector
               allObstacles.addElement(((Sprite)devil1));
               //set all obstacles to player
               player.setAllObstacles(allObstacles);          
               layerManager=new LayerManager();
               //append to the layermanager     
               layerManager.append(player);
               layerManager.append(devil1);
               Thread t=new Thread(this);
               t.start();
          catch(Exception ex){
               System.err.println("Error"+ex);
     public void run(){
          while(isPlay){
               userInput();
               verifyGameState();
               updateBackground();
               updateGameScreen();
          try{Thread.currentThread().sleep(15);}
          catch(Exception ex){}                    
     public void updateBackground(){
          Graphics g=getGraphics();
          g.setColor(0,124,0);
          g.fillRect(0,0,this.getWidth(),this.getHeight());
          g.setColor(0,224,0);
          g.fillRect(0,BASE+30,this.getWidth(),80);
     public void updateGameScreen(){
          Graphics g=this.getGraphics();
          if(player.Y<BASE){
          //player.incrementY(dy);
          else if(player.Y>BASE){
          player.Y=BASE;
          player.setY(BASE);}
          g.setColor(0,244,0);
          g.fillRect(0,BASE+30,1500,80);
          layerManager.paint(g,0,0);
          flushGraphics();
     public void userInput(){
          if((this.getKeyStates()&LEFT_PRESSED)!=0){}
          if((this.getKeyStates()&RIGHT_PRESSED)!=0){}
          if((this.getKeyStates()&FIRE_PRESSED)!=0){}     
     public void verifyGameState(){
     public void commandAction(Command c,Displayable d){
          if(c==exit){
               midlet.gameScreenQuit();
}

pwlasantha wrote:
when i select the new Game option Game Screen doesn't work properly.please help me ican't find problem in this program but the project build sucsessfully;
...If it "doesn't work properly", there's "something going wrong".

Similar Messages

  • How to design a simple game?

    my programming skills are pretty much limited and as most beginners i was coding simple things by build and fix method, but wanna try to do it properly so i'm looking for help. i've been trying to design simple Connect4 game and as i'm coding in java i taken oo aproach. i'll explain exactly steps i've taken and i'd really appreciate if someone familiar with oo design and software engineering in all would point out what i'm douing wrong and if theres is anything ok with my approach.
    1. i've started with use-case modelling and created first scenario
    scenario created:
    1. user clicks start button
    2. player1 is presented with empty board and asked to insert token in column of his choice
    3. player1 clicks on column where he wants to insert token. token drops (appears) in chosen column
    4. player2 is asked to insert token into column
    5. player2 clicks on column where he wants to insert token
    token drops (appears) in chosen column
    6. steps 2-5 are repeated
    7. player1 connects 4 in a row and information is displayed player1 has won
    i know scenarios should include every possible way of utilizing the software but it gives countless possbilities and i was wonder if scenario for every single way of utilizing the product should be created or maybe not? i suppose that number of scenarios depends on how the product is complicated but in case of very simple game like connect4 aproximately how many scenarios would be expected?
    2. having above scenario ready i've used noun extraction method to extract candidate classes and so i have:
    players inserts tokens into the board consisting of 7 rows and 6 columns. players trying to connect their four tokens in a row (horizontally, vertically or diagonally) to win.
    classes extracted:
    player
    token
    board
    row
    column
    assuming that state of token, row, column will not change, i skipped those and left only two classes board and player. after a while i also noticed that another class named connect4 would be needed to put it all together.
    3. having one scenario ready and classes extracted i went directly to drawing sequence state diagram which i've put here
    4. next i draw detailed class diagram (here) and more or less decided on methods for every class
    5. then i started writing pseudocode but while writing i'm finding myself adding additional methods, variables etc and keep changing design while coding, what dosent seem to be a good practice. i was wonder how it works in real life and what is the chance to get application designed correctly for the first time, i mean extract the classes with methods etc.
    to be honest i got lost a little cause according to shach's book i missed state diagram and few other things and dont know how important those bit are in real life and designing real software. as i said i'm real beginner in software engineering and any help would be much appreciated. than you very much in advance for any comments regarding my design and help

    i know scenarios should include every possible way of
    utilizing the software but it gives countless
    possbilities and i was wonder if scenario for every
    single way of utilizing the product should be created
    or maybe not? i suppose that number of scenarios
    depends on how the product is complicated but in case
    of very simple game like connect4 aproximately how
    many scenarios would be expected?Very few. This program is small and the interaction
    with the user is minimal.
    2. having above scenario ready i've used noun
    extraction method to extract candidate classes and so
    i have:
    player
    token
    board
    row
    column
    assuming that state of token, row, column will not
    change, i skipped those and left only two classes
    board and player. after a while i also noticed that
    another class named connect4 would be needed to put it
    all together.Things like "player" or "person" are rarely if ever real classes.
    Imagine you were designing the control program for an
    elevator. Just because a person clicks on the button for
    a floor doesn't mean you make them a class in your design.
    Likewise, just because a player clicks on a column doesn't
    mean you make them a class.
    In reality, this program is small enough for one major class,
    the gameboard itself. You may have an enum for the token
    color but that's about it.
    What can you do with this gameboard? Not much:
    1. Add a token to column X.
    2. Check for a win.
    3. Obtain a copy of the board.
    Your gameboard only has to maintain the state of the
    board and allow you to add a token or check for a win.
    Your class to display the gameboard and accept user
    input will probably be larger than anything else.
    You can write this program with only two classes. The
    gameboard and the display.
    3. having one scenario ready and classes extracted i
    went directly to drawing sequence state diagram which
    i've put hereOverkill for a program of this size.
    4. next i draw detailed class diagram (here) and more
    or less decided on methods for every classAlso overkill for a program of this size. Unless this is
    an assignment at work or school, all of these documents
    are unnecessary and likely to be several times larger than
    your entire program.
    5. then i started writing pseudocode but while writing
    i'm finding myself adding additional methods,
    variables etc and keep changing design while coding,
    what dosent seem to be a good practice. i was wonder
    how it works in real life and what is the chance to
    get application designed correctly for the first time,
    i mean extract the classes with methods etc.If you find your design doesn't work while writing code
    then yes, you should go back and change your design
    document. This isn't too big of a sign of disaster unless
    you need to step back another step and change the
    requirements document. That's usually a sign you
    really messed up.
    By all means, go back and change the design document
    if you need to before you finish coding.
    In this case however, its probably overkill.
    to be honest i got lost a little cause according to
    shach's book i missed state diagram and few other
    things and dont know how important those bit are in
    real life and designing real software. as i said i'm
    real beginner in software engineering and any help
    would be much appreciated. than you very much in
    advance for any comments regarding my design and helpIts next to impossible to go through a structured design
    process on a project this small while working by yourself.
    You really need a bigger project with multiple team members
    to see how its all supposed to play out.
    Projects of this size are written almost as soon as you start
    thinking about them and any documentation you generate will
    dwarf your source code printout.

  • Building a simple JXME application

    Hi,
    I have created a simple JXME application. I am using netbeans 5.5 beta and I get following error:
    Error preverifying class net.jxta.j2me.tools.Jad
    java/lang/NoClassDefFoundError: org/apache/tools/ant/Task
    ant.jat is in the classpath, but still I'm not sure where this error is coming from. any help will be much appreciated.
    Thanks,
    S.

    Hi there
    I'm having the same problem. I'm using Netbeans 5.0 with the mobility pack. My version of JDK is 1.5.0_02.
    I include the jxme-cdc.jar file to the project but when I try to run the application I get:
    Error preverifying class net.jxta.id.ID
    java/lang/NoClassDefFoundError: java/io/Serializable
    Have you figured out how to resolve this???

  • Comments/Suggestions for Simple Game?

    I have a super simple game I made. You can download it here:
    http://www.filedropper.com/catchphrase2
    Anybody have suggestions/ideas?

    TokyoTony wrote:
    I'd like to try something else please. The reason is as follows:
    When I put in a name for the document and then scan the documents, the file still comes up as untitled. I don't get that.
    When I want to rotate a page that is supposed to be landscape and do the rotation in Image Capture, all it does is cut the top and bottom out--it rotates the selection, not the image. I know I can do this in a PDF editor but why not have everything I need done in one application?
    When I do want to select A4 size, I don't see it unless I hide details. Seems a bit strange.
    Thanks,
    Tony
    Are you scanning into a program, or to a file? Either way, it seems to work for me with Preview. I didn’t try another app.
    I can’t replicate your other problems, either. Rotation works as expected and I have both Letter and A4 available on both interfaces.
    I have an Epson all-in-one, though.
    Perhaps if you listed your HP model number, others with that same printer/scanner could help.
    One thing to try, though. Log into another user on the Mac and try to scan. Same results?
    Boot into Safe Mode and try to scan. Same results?
    OS X: What is Safe Boot, Safe Mode?
    Those two steps will see if the problem is system-wide or caused by some additional software you have running at startup.

  • How To Download Free Games & Application For IPhone 4 From Itunes & Store !

    Hi guys iam amrit from Nepal I have IPhone 4, I want to download free games & application for iPhone 4 from itunes or application store.Guys please tell me how to download free games & application for iPhone 4 without credit card or debit card.

    Log out of any iTunes account on iPhone then go to the app store. Find a free app and purchase it. Create a new account and select none for payment. Pretty simple
    http://support.apple.com/kb/ht2534

  • Urgent: need help in creation of a simple PCUI application

    Hi Experts,
        I am new to this PCUI. i need the help of urs.
    My requirement is
    >>>>To create a simple PCUI application.This contains a Search and Result list.
    >>>>Then i have to find the BSP coding or the HTML coding for the the PCUI
      application.
    >>>Can anyone please tell me the detailed steps for creating a simple PCUI application that displays the search and a result list???
    >>>Then how can i find the BSP coding or script(such as HTML,XML..) coding used for the  application.
    Pls help me , its urgent.... If anyone have any kind of useful documents pls mail me in my id <b>[email protected]</b>
    Thanks & Regards
    Sudhansu

    Hi Experts,
    I am new to this PCUI. i need the help of urs.
    My requirement is
    To create a simple PCUI application.This contains a Search and Result list.
    Then i have to find the BSP coding or the HTML coding for the the PCUI
    application.
    Can anyone please tell me the detailed steps for creating a simple PCUI application that displays the search and a result list???
    Then how can i find the BSP coding or script(such as HTML,XML..) coding used for the application.
    Pls help me , its urgent.... If anyone have any kind of useful documents pls mail me in my id [email protected]
    Thanks & Regards
    Preethika

  • We just moved from the United States to Costa Rica.  The first two days my mac worked great.  Then all of a sudden I was trying to use a game application and the screen went black and there is a white cursor which I can move around, but I can't escape it

    We just moved from the United States to Costa Rica.  The first two days my mac worked great.  Then all of a sudden I was trying to use a game application and the screen went black and there is a white cursor which I can move around, but I can't escape it. When I restart it seems okay and I see my main screen, but only for a second and then it goes black again. 
    This computer was brand new in June.  Is it the humidity???   What can I do.  Please help!!!!

    No guarantess but try smc and pram resets,

  • Can Flex be used to create simple games?

    Hi. I'm thinking of creating some simple games for children 6 - 10 years of age.The games can be things such as drag-and-drop and multiple choice. I'd like to store the results on a database. Can I use Flex Builder to do this or do you recommend Flash? Can you point me to a resource on this?
    The reason I ask is that I've built web apps using Flex and have some basic experience with Flash. Will building games be very challenging if I have to use Flash? The project in question will start in January and have to be completed by the end of March 2010. Thank you.

    As per your description for games Flex should be fine. It also depends on the skills and experience you have in the technology.

  • Looking for a simple drawing application for my grand-daughters

    Well, that's more or less it, I'm looking for a simple drawing application for my grand-daughters. In the children section of iTunes store, there's only a few books and nothing more. I bought the iPad mainly for my grand-children to teach them a bit and I don't find interesting things for them.
    Can anybody help me with that?
    Pedro Godfroid Goffin

    Brushes is a nice finger drawing app. Since you didn't say how old they are, I don't know if the interface is to difficult for them to use.
    Sketchbook is another nice drawing app.
    Neither are free.
    Glor

  • Step by step instructions to create a Simple PCUI Application

    I am very new to PCUI and have been trying to get a simple application up and running for the last few days. There always seems to be some problem or the other. At times it gives a dump, at times it gives me a screen without the search request or search result area and when i get all of these done, my application just does not invoke the Query method.
    I would appreciate it if you could give me Step by Step instructions to create a simple PCUI application to search for some data from an existing database table and display it.
    Thanks in advance!!!

    Hi Mithun
    You can also download the PCUI Cookbook from:
    http://service.sap.com/instguides -> my SAP Business Suite Solutions -> my SAP CRM -> my SAP 2005. The title is PCUI Book for CRM 2005.
    The direct link is (which may change so I recommend that you follow the menu path) https://websmp209.sap-ag.de/~sapidb/011000358700001093962006E/PCUIBook50_06.pdf
    Refer the following weblog
    /people/vijaya.kumar/blog/2005/06/10/people-centric-user-interface-pcui--getting-started
    Hope this will help
    Regards,
    Rekha Dadwal
    <b>You gain a point for every point that you reward. So reward helpful answers generously</b>

  • Help needed in creating a simple paint application

    I want to create a simple paint application using swings in java, i am able to draw different shapes using mouse but the problem is when i select some other shape it simply replaces the already drawn object with the new one but i want the already drawn object also, like appending, what should be done for this, any logic missing here or i should use some other approach?
    Please help me
    package test;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class bmp extends JFrame implements MouseListener, MouseMotionListener,
              ActionListener {
         int w, h;
         int xstart, ystart, xend, yend;
         JButton elipse = new JButton("--Elipse--");
         JButton rect = new JButton  ("Rectangle");
         JPanel mainframe = new JPanel();
         JPanel buttons = new JPanel();
         String selected="no";
         public void init() {
              //super("Bitmap Functions");
              // display.setLayout(new FlowLayout());
              buttons.setLayout(new BoxLayout(buttons,BoxLayout.Y_AXIS));
              buttons.add(Box.createRigidArea(new Dimension(15,15)));
              buttons.add(elipse);
              buttons.add(Box.createRigidArea(new Dimension(0,15)));
              buttons.add(rect);
              Container contentpane = getContentPane();
              contentpane.add(buttons, BorderLayout.WEST);
              //getContentPane().add(display, BorderLayout.WEST);
              addMouseListener(this); // listens for own mouse and
              addMouseMotionListener(this); // mouse-motion events
              setSize(1152, 834);
              elipse.addActionListener(this);
              rect.addActionListener(this);
              setVisible(true);
         public void mousePressed(MouseEvent event) {
              xstart = event.getX();
              ystart = event.getY();
         public void mouseReleased(MouseEvent event) {
              xend = event.getX();
              yend = event.getY();
              repaint();
         public void mouseEntered(MouseEvent event) {
              //repaint();
         public void mouseExited(MouseEvent event) {
              //repaint();
         public void mouseDragged(MouseEvent event) {
              xend = event.getX();
              yend = event.getY();
              repaint();
         public void mouseMoved(MouseEvent event) {
              //repaint();
         public static void main(String args[]) {
              bmp application = new bmp();
              application.init();
              application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         public void mouseClicked(MouseEvent arg0) {
         public void actionPerformed(ActionEvent event) {
              if (event.getSource() == elipse) {
                   selected = "elipse";
                   repaint();
              else if(event.getSource() == rect)
                   selected = "rectangle";
                   repaint();
         public void paint(Graphics g) {
              System.out.println(selected);
              super.paint(g); // clear the frame surface
              bmp b=new bmp();
              if (selected.equals("elipse"))
                   w = xend - xstart;
                   h = yend - ystart;
                   if (w < 0)
                        w = w * -1;
                   if (h < 0)
                        h = h * -1;
                   g.drawOval(xstart, ystart, w, h);
              if (selected.equals("rectangle"))
                   w = xend - xstart;
              h = yend - ystart;
              if (w < 0)
                   w = w * -1;
              if (h < 0)
                   h = h * -1;
              g.drawRect(xstart, ystart, w, h);
    }

    bvivek wrote:
    ..With this code, when i draw an elipse or line the image doesnt start from the point where i click the mouse. It added the MouseListener to the wrong thing.
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    import javax.swing.*;
    public class test_bmp extends JPanel implements MouseListener,MouseMotionListener,ActionListener
           static BufferedImage image;
           Color color;
           Point start=new Point();
           Point end =new Point();
           JButton elipse=new JButton("Elipse");
           JButton rectangle=new JButton("Rectangle");
           JButton line=new JButton("Line");
           String selected;
           public test_bmp()
                   color = Color.black;
                   setBorder(BorderFactory.createLineBorder(Color.black));
           public void paintComponent(Graphics g)
                   //super.paintComponent(g);
                   g.drawImage(image, 0, 0, this);
                   Graphics2D g2 = (Graphics2D)g;
                   g2.setPaint(Color.black);
           if(selected=="elipse")
                   g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y));
                   System.out.println("paintComponent() "+start.getX()+","+start.getY()+","+(end.getX()-start.getX())+","+(end.getY()-start.getY()));
                   System.out.println("Start : "+start.x+","+start.y);
                   System.out.println("End   : "+end.x+","+end.y);
           if(selected=="line")
                   g2.drawLine(start.x,start.y,end.x,end.y);
           //Draw on Buffered image
           public void draw()
           Graphics2D g2 = image.createGraphics();
           g2.setPaint(color);
                   System.out.println("draw");
           if(selected=="line")
                   g2.drawLine(start.x, start.y, end.x, end.y);
           if(selected=="elipse")
                   g2.drawOval(start.x, start.y, (end.x-start.x),(end.y-start.y));
                   System.out.println("draw() "+start.getX()+","+start.getY()+","+(end.getX()-start.getX())+","+(end.getY()-start.getY()));
                   System.out.println("Start : "+start.x+","+start.y);
                   System.out.println("End   : "+end.x+","+end.y);
           repaint();
           g2.dispose();
           public JPanel addButtons()
                   JPanel buttonpanel=new JPanel();
                   buttonpanel.setBackground(color.lightGray);
                   buttonpanel.setLayout(new BoxLayout(buttonpanel,BoxLayout.Y_AXIS));
                   elipse.addActionListener(this);
                   rectangle.addActionListener(this);
                   line.addActionListener(this);
                   buttonpanel.add(elipse);
                   buttonpanel.add(Box.createRigidArea(new Dimension(15,15)));
                   buttonpanel.add(rectangle);
                   buttonpanel.add(Box.createRigidArea(new Dimension(15,15)));
                   buttonpanel.add(line);
                   return buttonpanel;
           public static void main(String args[])
                    test_bmp application=new test_bmp();
                    //Main window
                    JFrame frame=new JFrame("Whiteboard");
                    frame.setLayout(new BorderLayout());
                    frame.add(application.addButtons(),BorderLayout.WEST);
                    frame.add(application);
                    application.addMouseListener(application);
                    application.addMouseMotionListener(application);
                    //size of the window
                    frame.setSize(600,400);
                    frame.setLocation(0,0);
                    frame.setVisible(true);
                    int w = frame.getWidth();
                int h = frame.getHeight();
                image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
                Graphics2D g2 = image.createGraphics();
                g2.setPaint(Color.white);
                g2.fillRect(0,0,w,h);
                g2.dispose();
                    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           @Override
           public void mouseClicked(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mouseEntered(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mouseExited(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void mousePressed(MouseEvent event)
                   start = event.getPoint();
           @Override
           public void mouseReleased(MouseEvent event)
                   end = event.getPoint();
                   draw();
           @Override
           public void mouseDragged(MouseEvent e)
                   end=e.getPoint();
                   repaint();
           @Override
           public void mouseMoved(MouseEvent arg0) {
                   // TODO Auto-generated method stub
           @Override
           public void actionPerformed(ActionEvent e)
                   if(e.getSource()==elipse)
                           selected="elipse";
                   if(e.getSource()==line)
                           selected="line";
                   draw();
    }

  • Simple J2EE application fails under activation

    Hi,
    I have a simple J2EE application which contains one Servlet.
    I have two DCs: SSORedirector (Enterprise application project) and SSORedirectWebModuleWebModule (Web Module)
    (there is a third DC which is a child DC to SSORedirector, but I don't think it causes any problems)
    The web module has by default public part called war (an I haven't touched this).
    The Enterprise application project I have addeed the required references to the web module in the application.xml(this automatically set a Used DC reference).
    When right-clicking the enterprise application and selecting build, it builds a correct ear file, and if I deploy it to my local workplace installation, the J2EE application works as expected.
    However, when I try to check in and activate the activity the SDM deployment fails with the message: Info:java.lang.RuntimeException: Incorrect EAR file. EAR /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda does not contain entry META-INF/application.xml as required by the J2EE specification.
    I've retrieved the .sda file on the file system (shouldn't it be an .ear file) and it contains the application.xml under the folder meta-inf. The complete contents of the sda file is
    ./d1c66970ddbec7e6ffcc4d01c4705600.HASH
    ./META-INF/application-j2ee-engine.xml
    ./META-INF/application.xml
    ./META-INF/MANIFEST.MF
    ./META-INF/SAP_MANIFEST.MF
    ./META-INF/sda-dd.xml
    ./src/java/src.zip
    ./bouvet.com~SSORedirectorServlets.war
    What could possibly be wrong?
    Below are some logs.
    <b>Deployment log</b>
    SAP Change Management Service
    System sapJDI.st.bouvet.no
    Build space JDI_ZEPSSO_D
    Request 8554
    Step Deployment
    Log /sapmnt/JDI/global/TCS/LOG/JDI_ZEPSSO_D2006021618420025.log
    Info:deploy every archive associated to the buildspace: JDI_ZEPSSO_D
    Info:getting DC SSORedirector from CBS for buildspace: JDI_ZEPSSO_D
    Info:archive /sapmnt/JDI/global/TCS/DEPLOYARCHIVES/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda for DC SSORedirector was transfered
    Info:Start deployment:
    Info:The following archives will be deployed (on http://sapED2.st.bouvet.no:50018)
    Info:/sapmnt/JDI/global/TCS/DEPLOYARCHIVES/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda
    Info:SDM log:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:
    Info:Feb 16, 2006 7:39:58 PM  Info: -
    Starting deployment -
    Info:Feb 16, 2006 7:40:01 PM  Info: Loading selected archives...
    Info:Feb 16, 2006 7:40:01 PM  Info: Loading archive '/usr/sap/ED2/JC00/SDM/program/temp/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda'
    Info:Feb 16, 2006 7:40:11 PM  Info: Selected archives successfully loaded.
    Info:Feb 16, 2006 7:40:11 PM  Info: Actions per selected component:
    Info:Feb 16, 2006 7:40:11 PM  Info: Update: Selected development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596' updates currently deployed development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8590'.
    Info:Feb 16, 2006 7:40:14 PM  Info: The deployment prerequisites finished withtout any errors.
    Info:Feb 16, 2006 7:40:14 PM  Info: Saved current Engine state.
    Info:Feb 16, 2006 7:40:15 PM  Info: Error handling strategy: OnErrorSkipDepending
    Info:Feb 16, 2006 7:40:15 PM  Info: Update strategy: UpdateAllVersions
    Info:Feb 16, 2006 7:40:15 PM  Info: Starting: Update: Selected development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596' updates currently deployed development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8590'.
    Info:Feb 16, 2006 7:40:15 PM  Info: SDA to be deployed: /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda
    Info:Feb 16, 2006 7:40:15 PM  Info: Software type of SDA: J2EE
    Info:Feb 16, 2006 7:40:15 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Info:Feb 16, 2006 7:40:15 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Info:Feb 16, 2006 7:40:15 PM  Error: Aborted: development component 'SSORedirector'/'bouvet.com'/'JDI_ZEPSSO_D'/'8596':
    Info:Caught exception during access of archive "/usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda":
    Info:java.lang.RuntimeException: Incorrect EAR file. EAR /usr/sap/ED2/JC00/SDM/root/origin/bouvet.com/SSORedirector/JDI_ZEPSSO_D/8596/bouvet.com_PASSTHROUGH_SSO_1_default_bouvet.com_SSORedirector_200602161842250637.sda does not contain entry META-INF/application.xml as required by the J2EE specification.
    Info: (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).null)
    Info:Feb 16, 2006 7:40:26 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
    Info:Feb 16, 2006 7:40:27 PM  Error: -
    At least one of the Deployments failed -
    Info:end of log received from SDM
    Info:End deployment:
    Info:deploy finished for SSORedirector (8554) with rc=12
    Info:deployment finished for buildspace: JDI_ZEPSSO_D
    <b>CBS log</b>
      CBS Request Log - [  8554/JDI_ZEPSSO_D  ]
      sapjdi.st.bouvet.no SAP Component Build Server   
    Build number assigned: 8596
    Change request state from QUEUED to PROCESSING
    ACTIVATION request in Build Space "JDI_ZEPSSO_D" at Node ID: 37,956,050
         [id: 8,554; parentID: 0; type: 4]
         [options: NO OPTIONS]
    REQUEST PROCESSING started at 2006-02-16 18:41:35.949 GMT
    ===== Pre-Processing =====
    List of activities to be activated:
         1 activity in compartment "bouvet.com_PASSTHROUGH_SSO_1"
              C049689.6 - Passthrough SSO
                   [seq. no 17][created by 433937 at 2006-02-16 19:41:49.0][ID 44ed44bc9f1911daae5b0012799e50b6]
    Analyse activities... started at 2006-02-16 18:41:35.967 GMT
         Synchronizing component "bouvet.com/SSORedirector" from repository... finished at 2006-02-16 18:41:37.129 GMT and took 1 s 10 ms
              Component "bouvet.com/SSORedirector" is to be CHANGED by this activation.
         Synchronizing component "bouvet.com/SSORedirectWebModule" from repository... finished at 2006-02-16 18:41:37.933 GMT and took 802 ms
              Component "bouvet.com/SSORedirectWebModule" is to be CHANGED by this activation.
         Synchronizing component "bouvet.com/SSORedirectorServlets" from repository... finished at 2006-02-16 18:41:39.144 GMT and took 1 s 211 ms
         3 components to be build in compartment "bouvet.com_PASSTHROUGH_SSO_1"
    Analyse activities... finished at 2006-02-16 18:41:39.202 GMT and took 3 s 235 ms
    Calculate all combinations of components and variants to be built...
         "bouvet.com/SSORedirector" variant "default"
         "bouvet.com/SSORedirectorServlets" variant "default"
         "bouvet.com/SSORedirectWebModule" variant "default"
    Prepare build environment in the file system... started at 2006-02-16 18:41:39.410 GMT
         Synchronize development configuration... finished at 2006-02-16 18:41:39.430 GMT and took 20 ms
         Synchronize component definitions... finished at 2006-02-16 18:41:39.469 GMT and took 38 ms
         Synchronize sources...
         Synchronize sources... finished at 2006-02-16 18:41:40.891 GMT and took 1 s 422 ms
         Synchronize used libraries...
              public part "war" of component "bouvet.com/SSORedirectWebModule" ... OK
                   [PP "war" of DC 381 variant "default"][SC 142][last successfull build: 0]
              public part "default" of component "sap.com/ejb20" ... OK
                   [PP "default" of DC 128 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jdbc20" ... OK
                   [PP "default" of DC 145 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jms" ... OK
                   [PP "default" of DC 147 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/servlet" ... OK
                   [PP "default" of DC 166 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/ejb20" ... OK
                   [PP "default" of DC 128 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jdbc20" ... OK
                   [PP "default" of DC 145 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/jms" ... OK
                   [PP "default" of DC 147 variant "default"][SC 139][last successfull build: 8020]
              public part "default" of component "sap.com/servlet" ... OK
                   [PP "default" of DC 166 variant "default"][SC 139][last successfull build: 8020]
         Synchronize used libraries... finished at 2006-02-16 18:41:43.712 GMT and took 2 s 820 ms
    Prepare build environment in the file system... finished at 2006-02-16 18:41:43.712 GMT and took 4 s 302 ms
    ===== Pre-Processing =====  finished at 2006-02-16 18:41:43.713 GMT and took 7 s 755 ms
    ===== Processing =====
    BUILD DCs
         "bouvet.com/SSORedirectorServlets" in variant "default"
              Public Part "war" has been changed. Dependent components will be marked as DIRTY and re-built later.
              The build was SUCCESSFUL. Archives have been created.
         "bouvet.com/SSORedirectWebModule" in variant "default"
              Public Part "war" has been changed. Dependent components will be marked as DIRTY and re-built later.
              The build was SUCCESSFUL. Archives have been created.
         "bouvet.com/SSORedirector" in variant "default"
              The build was SUCCESSFUL. Archives have been created.
    ===== Processing =====  finished at 2006-02-16 18:41:56.154 GMT and took 12 s 436 ms
    ===== Post-Processing =====
    Check whether build was successful for all required variants...
         "bouvet.com/SSORedirectorServlets" in variant "default"   OK
         "bouvet.com/SSORedirectWebModule" in variant "default"   OK
         "bouvet.com/SSORedirector" in variant "default"   OK
    Update component metadata...
         "bouvet.com/SSORedirector"  has been CHANGED
         "bouvet.com/SSORedirectWebModule"  has been ACTIVATED
    STORE build results...
         "bouvet.com/SSORedirectorServlets": store meta-data
         "bouvet.com/SSORedirectorServlets" in "default" variant  is PROCESSED
         "bouvet.com/SSORedirectWebModule": store meta-data
         "bouvet.com/SSORedirectWebModule" in "default" variant  is PROCESSED
         "bouvet.com/SSORedirector": store meta-data
         "bouvet.com/SSORedirector" in "default" variant  is PROCESSED
    Change request state from PROCESSING to SUCCEEDED
    Analyse effect of applied changes to buildspace state... started at 2006-02-16 18:41:56.364 GMT
    Handle Cycles...
         No cycles detected.
    Determine components that have become DIRTY due to the results of this request...
         No such components have been found.
    Integrate activities into active workspace(s)...
         Integration of activities in compartment "bouvet.com_PASSTHROUGH_SSO_1" started at 2006-02-16 18:41:56.785 GMT
              "C049689.6 - Passthrough SSO"   OK
         Integration of 1 activities in compartment "bouvet.com_PASSTHROUGH_SSO_1" finished at 2006-02-16 18:42:16.614 GMT and took 19 s 829 ms
    Analyse effect of applied changes to buildspace state... finished at 2006-02-16 18:42:16.615 GMT and took 20 s 251 ms
    Request SUCCEEDED
    ===== Post-Processing =====  finished at 2006-02-16 18:42:16.617 GMT and took 20 s 451 ms
    REQUEST PROCESSING finished at 2006-02-16 18:42:16.618 GMT and took 40 s 669 ms

    Managed to solve it in a obscure way.
    I had earlier deployed the .ear file directly from NWDS to our dev system (hadn't installed dev workplace then). By removing the application from the deploy service in visual admin, the import suddenly worked.
    Dagfinn

  • What's wrong with my ipad2? I just can't bear it always restart again and again when I just play a simple game!

    What's wrong with my ipad2? I just can't bear it always restart again and again when I just play a simple game! What's wrong with the apple without Jobs?!

    Try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until the screen blacks out or you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.

  • Java.lang.ClassCastException in simple struts application. please help me!

    I have a simple struts application, it only have a login form. however, it's alway throw java.lang.ClassCastException when I submit the form. Here is full stack trace:
    14-03-2007 17:04:50 org.apache.struts.chain.ComposableRequestProcessor init
    INFO: Initializing composable request processor for module prefix ''
    14-03-2007 17:04:50 org.apache.struts.chain.commands.servlet.CreateAction getAction
    INFO: Initialize action of type: ndlinh.struts.lab.RegistrationForm
    14-03-2007 17:04:50 org.apache.struts.chain.commands.AbstractExceptionHandler execute
    WARNING: Unhandled exception
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    14-03-2007 17:04:50 org.apache.struts.chain.commands.ExceptionCatcher postprocess
    WARNING: Exception from exceptionCommand 'servlet-exception'
    java.lang.ClassCastException: ndlinh.struts.lab.RegistrationForm
         at org.apache.struts.chain.commands.servlet.CreateAction.getAction(CreateAction.java:66)
         at org.apache.struts.chain.commands.AbstractCreateAction.execute(AbstractCreateAction.java:82)
         at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:48)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
         at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
         at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:280)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1858)
         at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:459)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Here is my code:
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class RegistrationForm extends ActionForm {
         private String userid = null;
         private String password = null;
         private String password2 = null;
         public RegistrationForm() {
              System.out.println("************ Registration Form created *************");
          * @return the password
         public String getPassword() {
              return password;
          * @param password the password to set
         public void setPassword(String password) {
              this.password = password;       
          * @return the password2
         public String getPassword2() {
              return password2;
          * @param password2 the password2 to set
         public void setPassword2(String password2) {
              this.password2 = password2;
          * @return the userid
         public String getUserid() {
              return userid;
          * @param userid the userid to set
         public void setUserid(String userid) {
              this.userid = userid;
         public void reset(ActionMapping arg0, HttpServletRequest arg1) {
              userid = "";
              password = "";
              password2 = "";
    package ndlinh.struts.lab;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class RegistrationAction extends Action {
         public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                             HttpServletRequest request, HttpServletResponse response)
              try {
                   System.out.println("*******************" + actionForm.toString() + "*******************");
                   RegistrationForm form = (RegistrationForm)actionForm;     
                   String username = form.getUserid();
                   String password = form.getPassword();
                   System.out.println(username);
                   // simple login checking.
                   // if userid equals password, user can login to system
                   if ( username.equalsIgnoreCase(password)) {
                        return mapping.findForward("success");
                   } else {
                        return mapping.findForward("failure");
              } catch (Exception e) {
                   e.printStackTrace();
                   return mapping.findForward("failure");
    }registration.jsp
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
         <html:form action="/register">
              Username: <html:text property="userid" /> <br />
              Password: <html:password property="password" /> <br />
              Re-type: <html:password property="password2" />
              <html:submit value="Register" />
         </html:form>
    </body>
    </html>struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationForm"
                   name="registrationForm"
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
    <web-app>
      <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>
    </web-app>System information:
    Tomcat 5.5.20
    Struts 1.3.5
    JDK1.5.08

    struts-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    <struts-config>
      <form-beans>
           <form-bean name="registrationForm" type="ndlinh.struts.lab.RegistrationForm" />
      </form-beans>
      <action-mappings>
           <action path="/register"
                   type="ndlinh.struts.lab.RegistrationAction" // action class
                   name="registrationForm" // form bean name
                   validate="false"
                   scope="request"
                   input="registration.jsp" >
                <forward name="success" path="/jsp/success.jsp"  />
                <forward name="failure" path="/jsp/failure.jsp"  />
           </action>
      </action-mappings>
    </struts-config>HTH

  • BPM Simple Sample Application Error!!!

    hi,
    i have some problems with the bpm simple sample applications on our local sap nw ce system (7.1 ehp1 sp0)?
    on the esworkplace i have download the *.sca file and have import this file into my nwds.
    i following the simple sample documentation an define and configure the ERP and ERP_META Destinations on the nwds and our local sap nw ce system.
    also i do the future steps which was described (service registry, proxy settings, ...).
    on page 16 of the simple sample documetation is defined which Sofware Component has dependencies to other SC´s.
    the SC "BPEM_BUILDT" depends on the SC "ESMP_BUILDT" and "COMP_BUILDT", the SC "COMP_BUILT" doesnt exist on my nwds (7.1 ehp1 sp0).
    has everybody any idea why the SC "COMP_BUILT" not exist on my nwds???
    still this absent SC i can deploy the bpm simple sample successful to our sap nw ce system.
    now i do the post deployment steps for the bpm samples.
    after this i call the simple sample application on my sap nw ce portal and can execute the "Initiate Equipment Phase In Process".
    now i can see a new entry on my uwl, i open the uwl task.
    at step 1, 2, 3 i change no data an click next, after step 3 (create equipment) i get the following error:
    com.sap.esi.esp.service.server.query.discovery.ExtendedServiceException: no endpoints found for interface <br>
    IndividualMaterialERPCreateRequestConfirmation_In_V1 <br>
    <br>
    detailed error message: <br>
    com.sap.tc.webdynpro.model.webservice.exception.WSModelRuntimeException: Exception on creation of service metadata for WS metadata <br>
    destination 'ERP_META' and WS interface 'IndividualMaterialERPCreateRequestConfirmation_In_V1'. One possible reason is that
    Caused by: com.sap.esi.esp.service.server.query.discovery.ExtendedServiceException: no endpoints found for interface
    IndividualMaterialERPCreateRequestConfirmation_In_V1
    at com.sap.esi.esp.service.server.query.discovery.DestinationsHelperImplSoa.getEndpointConfigurations(DestinationsHelperImplSoa.java:1184)
    at com.sap.esi.esp.service.server.query.discovery.DestinationsHelperImplSoa.getWSDLUrl(DestinationsHelperImplSoa.java:847)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.getWSDLUrl(GenericServiceFactory.java:547)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService_NewInstance(GenericServiceFactory.java:377)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:230)
    at com.sap.engine.services.webservices.espbase.client.dynamic.GenericServiceFactory.createService(GenericServiceFactory.java:195)
    at com.sap.tc.webdynpro.model.webservice.metadata.WSModelInfo.getOrCreateWsrService(WSModelInfo.java:529)
    ... 82 more
    after this error i test the endpoint manually. i call the service registry (sr.esworkplace.sap.com) an search the service:
    IndividualMaterialERPCreateRequestConfirmation_In_V1
    now i test the endpoint with the following data:
    MaintenancePlanningPlantID: 0001
    WorkCentreID: TECH.SER
    CategoryCode: M
    the return is the following:
    TypeID:005(PLM_SE_EAM_SC)
    SeverityCode:1
    Note:Individual Material 000000000010006703 is created
    i think the return from the service was successful.
    i hope somebody can help me!!!
    thanks,
    Fabian

    Hi Arafat,
    the destinations for the services are already configured::
    at destination template management > destination templates the following is defined:
    - Tab: General
    Destination Name: ERP
    Destination Type: Service Registry
    System: ABAP
    System Name: HU2
    Hostname: iwdf2379
    Installation Nr.: 0120003411
    Client: 800
    - Tab: Security
    Authentication: HTTP Authentication, User ID/Password (Basic)
    User ID: <es workplace user (suser)>
    pw: ******
    and
    - Tab: General
    Destination Name: ERP_META
    Destination Type: Service Registry
    System: ABAP
    System Name: HU2
    Hostname: iwdf2379
    Installation Nr.: 0120003411
    Client: 800
    - Tab: Security
    Authentication: HTTP Authentication, User ID/Password (Basic)
    User ID: <es workplace user (suser)>
    pw: ******
    also i have configured the same destination on my nwds.
    i think this is correct?
    futher ideas, why this doesnt work?
    thanks,
    fabian

Maybe you are looking for

  • Oracle DB version for windows(64 bit)

    Greetings, I want to install oracle on my system which has the following properties. OS:WINDOWS SERVER 2003 Enterprise Edition Service pack2(64 bit) Processor:Dual Core AMD Opteron(TM)-2.39Ghz RAM-16GB Which Oracle 10g version i need to download so t

  • [solved] SD card in my card reader does not appear as a device

    Greetings. I have an Asus EEE 1015PEM netbook, which has a built-in card reader. I found some old SD cards that I am trying to get files from. When I insert them into the SD card reader in my netbook, the SD card does not appear as a device, and thus

  • Should i send iphone back?

    i have about 3 stuck/dead pixels on my screen none of them are in the middle they are all around the side. Im getting a empty box to ship mine back in should i take the chances in getting a refurbished one that could be worst then the one i have or k

  • PICS IN ALL SORTS OF FILES AND ACCOUNTS

    I am trying to get together all the pictures on my computer in one file, so I can sort them out. My mac has been used by different people over the time, and I myself have a business and a private account. Very confusing! I am 'the administrator' and

  • Fragment view in unicode systems.

    Hi all, Every one working on the new unicode enabled system must be aware of the concept of <b><i>fragment views</i></b>. There is a piece of code that i have used which says that the two structures are incompatible. Here is the piece of code i used