Loading ...
Sorry, an error occurred while loading the content.
 

salam

Expand Messages
  • Andre Prasetya
    hi, saya baru masuk sini, saya Andre programming java baru 2 tahun, lg pelajari EJB3. salam.... mo nanya, saya punya Stateful session bean dengan nama class
    Message 1 of 1 , Mar 1, 2007
      hi, saya baru masuk sini, saya Andre programming java baru 2 tahun, lg pelajari EJB3. salam....

      mo nanya,

      saya punya Stateful session bean dengan nama class ShoppingCartBean dengan attribute : @Stateful(name="ShoppingCart")

      nah saya buat project applicationclient dengan tag berikut :

          @EJB
          static ShoppingCartBean shoppingCart;

      nah pas run, ada mesage gini :
      ADM1006:Uploading the file to:[/tmp/s1astempdomain1server388464812/SessionTest.jar]
      Class [ Lcom/apress/ejb3/chapter02/ShoppingCartBean; ] not found. Error while loading [ class sessiontest.Main ]
      Error in annotation processing: java.lang.NoClassDefFoundError: Lcom/apress/ejb3/chapter02/ShoppingCartBean;
      deployed with moduleid = SessionTest

      trus dapat NullPointerException di bagian yg akses shoppingCart, salah di mana ya ?
      methodnya kayak gini
          public void doTest() {
              InitialContext ic;
              try {
                  ic = new InitialContext();
                  System.out.println("ShoppingCart lookup");
                  System.out.println("adding WineItem");
                  shoppingCart.addWineItem("Zinfandel");
                  ArrayList cartItems = shoppingCart.getCartItems();
                  for (String wine: (List <String>) cartItems) {
                      System.out.println("wine : " + wine);
                  }
              } catch(NamingException e) {
                  e.printStackTrace();
              }
          }

      thx before,

      --
      -Andre-

      People see things the way they are and say "why ?" I see things that never were and say "Why not ?"
    Your message has been successfully submitted and would be delivered to recipients shortly.