Utilizing the Cards class...

Hello All,
Does anybody know how to slove this problem?
I need to implement the toString() method for the Card class...
Each suit of cards should be reprersented by a single letter:
S for Spade,
H for Heart,
D for Diamond and
C for Clover
When the rank of a card is no higher than 10, it should be represented by its numeric value. When the rank of a card is higher than 10, it should be represented as:
J for Jack,
Q for Queen,
K for King and
A for Ace.
In summary, the "Spade King" should be represented as "SK"...
Does anybody know how to approach this problem? I need a sample code and a guide to the "right"
direction...
Thanks for all your help!

class Card
     String[] suit = { "C", "D", "H", "S" };
     char[] card = { 'J', 'Q', 'K', 'A' };
     int s, c;
     public Card(int s, int c) {
          this.s = s;
          this.c = c;
     public String toString() {
          if (c > 9)
               return suit[s] + card[c-10];
          else
               return suit[s] + c;
}Mark

Similar Messages

  • Formatted SD card with disk utility, broke the card.

    I just bought a 4GB SD card for my camera. At first it couldn't recognize it at all but when I connected the camera (with the card) to my mac and formatted it using Disk Utility app as 1GB plus free space the camera could work with the card. When I decided to format it as 2GB plus free space the Disk Utility hung and I force quit it. After that neither Disk Utility nor camera can see the card. All menus in Disk Util are grayed out. I tried 'sudo diskutil' from terminal (the card is still mounted in /dev folder) but still get a message 'permission denied'. Does it mean that I completely damaged my newly bought 4GB card and waisted $30+? Any help or suggestions would be greatly appreciated!

    The camera wouldn't recognize the card at first, I guess just because it was too big for it. After I formatted it as 1GB it was fine, as I already mentioned. I was wondering is there any other than diskutil low-level formatting software I can use on the card.

  • The java class is not found:  oracle/aurora/util/Wrapper

    When I try and load my Java class file using 'loadjava' into Oracle I'm getting the error:
    The java class is not found: oracle/aurora/util/Wrapper
    What is causing this?

    On which machine should ORACLE_SID be set to solve this problem, server or client. I run into this error when run loadjava

  • I have a samsung 32gb sdhc micro card class 10 but my mac runningosx 10.9.1 maverick does not read/recognise the card at all

    I have a Samsung 32GB sdhc class 10 micro card but my mac(intel) running OSX 10.9.1 maverick does neither read or recognise the card apple have no answer?

    I have the same problem with a 32GB SanDisk card. In fact, I have the same problem with all my SDHC cards—none of them are recognised by Mavericks (10.9.2 here). I'm on an early 2011 MBP.
    In order to get images and video from my camera I have to tether it and upload via the camera.
    Prior to Mavericks I was on Lion, where the same SDHC cards mounted with no problems.

  • Give me *.scr script to simulate java card class

    this is the java file
    ++++++++++++++++++++++++++++++++
    //Package AID: 'D2 76 00 00 60 50 02'
    // Applet AID: 'D2 76 00 00 60 41 02'
    // Specification of the proprietary command READ
    // command APDU CLA = '80' || INS = '02' ||
    // P1 (= '00') || P2 (= offset [byte]) ||
    // Le (= number of bytes to read = DATA)
    // response APDU (good case) DATA (with length Le) || SW1 || SW2
    // response APDU (bad case) SW1 || SW2
    // Specification of the proprietary command WRITE
    // command APDU CLA = '80' || INS = '04' ||
    // P1 (= '00') || P2 (= offset [byte]) ||
    // Lc (= number of bytes to write) // DATA (bytes to write)
    // response APDU (all cases) SW1 || SW2
    package packmini; // this is the package name
    import javacard.framework.*; // import all neccessary packages for java card
    public class ReadWrite extends Applet {
    final static byte CLASS = (byte) 0x80; // class of the APDU commands
    final static byte INS_READ = (byte) 0x02; // instruction for the READ APDU command
    final static byte INS_WRITE = (byte) 0x04; // instruction for the WRITE APDU command
    final static short SIZE_MEMORY = (short) 9; // size of the data storage area
    static byte[] memory; // this is the data memory for the application
    //----- installation and registration of the applet -----
    public static void install(byte[] buffer, short offset, byte length) {
    memory = new byte[SIZE_MEMORY]; // this is the data storage area
    new ReadWrite().register();
    } // install
    //----- this is the command dispatcher -----
    public void process(APDU apdu) {
    byte[] cmd_apdu = apdu.getBuffer();
    if (cmd_apdu[ISO7816.OFFSET_CLA] == CLASS) {  // it is the rigth class
    switch(cmd_apdu[ISO7816.OFFSET_INS]) {      // check the instruction byte
    case INS_READ: // it is a READ instruction
    cmdREAD(apdu);
    break;
    case INS_WRITE: // it is a WRITE instruction
    cmdWRITE(apdu);
    break;
    default : // the instruction in the command apdu is not supported
    ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
    } // switch
    } // if
    else {                                        // the class in the command apdu is not supported
    ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
    } // else
    } // process
    //----- program code for the APDU command READ -----
    private void cmdREAD(APDU apdu) {
    byte[] cmd_apdu = apdu.getBuffer();
    //----- check the preconditions -----
    // check if P1=0
    if (cmd_apdu[ISO7816.OFFSET_P1] != 0) ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
    // check if offset P2 is inside the bound of the memory array
    short offset = (short) (cmd_apdu[ISO7816.OFFSET_P2] & 0x00FF); // calculate offset
    if (offset >= SIZE_MEMORY) ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
    // check if offset P2 and expected length Le is inside the bounds of the memory array
    short le = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); // calculate Le (expected length)
    if ((offset + le) > SIZE_MEMORY) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    // check if expected length Le is 0
    if (le == 0) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    //----- now all preconditions are fulfilled, the data can be send to the IFD -----
    apdu.setOutgoing(); // set transmission to outgoing data
    apdu.setOutgoingLength((short)le); // set the number of bytes to send to the IFD
    apdu.sendBytesLong(memory, (short)offset, (short)le); // send the requested number of bytes to the IFD
    } // cmdREAD
    //----- program code for the APDU command WRITE -----
    private void cmdWRITE(APDU apdu) {
    byte[] cmd_apdu = apdu.getBuffer();
    //----- check the preconditions -----
    // check if P1=0
    if (cmd_apdu[ISO7816.OFFSET_P1] != 0) ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
    // check if offset P2 is inside the bound of the memory array
    short offset = (short) (cmd_apdu[ISO7816.OFFSET_P2] & 0x00FF); // calculate offset
    if (offset >= SIZE_MEMORY) ISOException.throwIt(ISO7816.SW_WRONG_P1P2);
    // check if offset P2 and expected length Le is inside the bounds of the memory array
    short lc = (short)(cmd_apdu[ISO7816.OFFSET_LC] & 0x00FF); // calculate Lc (expected length)
    if ((offset + lc) > SIZE_MEMORY) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    // check if command length Lc is 0
    if (lc == 0) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    receiveAPDUBody(apdu); // receive now the rest of the APDU
    //----- now all preconditions are fulfilled, the data can be copied to the memory -----
    Util.arrayCopy(cmd_apdu, (short)((ISO7816.OFFSET_CDATA) & 0x00FF), memory, offset, lc); // this copy precedure is atomic
    ISOException.throwIt(ISO7816.SW_NO_ERROR); // command proper executed
    } // cmdWRITE
    //----- receive the body of the command APDU
    public void receiveAPDUBody(APDU apdu) {
    byte[] buffer = apdu.getBuffer();
    short lc = (short)(buffer[ISO7816.OFFSET_LC] & 0x00FF); // calculate Lc (expected length)
    // check if Lc != number of received bytes of the command APDU body
    if (lc != apdu.setIncomingAndReceive()) ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
    } // receiveAPDUBody
    ++++++++++++++++++++++++++++++++
    I hope u can give me sollution for my problem..
    Thank u all..

    need help ... somebody can help me ??
    I have java file..(on this below)..I want to run it with JCWDE...can you give me script APDU to run it on JCWDE ???
    thank for your attention .
    package packmini;
    import javacard.framework.APDU;
    import javacard.framework.ISO7816;
    import javacard.framework.Applet;
    import javacard.framework.ISOException;
    import javacard.framework.Util;
    public class IdCard extends Applet {
         //The Cla Value
         final static byte claValue = (byte) 0x08;
         //The Ins Value
         final static byte readName = (byte)0x01;
         final static byte readPhone = (byte) 0x02;
         final static byte writeName = (byte) 0x03;
         final static byte writePhone = (byte) 0x04;
         byte[] nameID;;
         byte[] phone ;
         public IdCard()
              nameID = new byte[12];
              phone = new byte[12];
         public static void install(byte[] bArray, short bOffset, byte bLength) {
              // GP-compliant JavaCard applet registration
              new packmini.IdCard().register(bArray, (short) (bOffset + 1),
                        bArray[bOffset]);
         public void process(APDU apdu) {
              // Good practice: Return 9000 on SELECT
              if (selectingApplet()) {
                   return;
              byte[] buf = apdu.getBuffer();
              if(buf[ISO7816.OFFSET_CLA]!= claValue)
                   ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
              switch (buf[ISO7816.OFFSET_INS]) {
              case writeName :     
                        writeNameIn(apdu);
                        break;
              case writePhone:
                        writePhoneIn(apdu);
                        break;
              case readName:
                        readNameOut(apdu);
                        break;
              case readPhone:
                        readPhoneOut(apdu);
                        break;
              default:
                   // good practice: If you don't know the INStruction, say so:
                   ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
         public void writeNameIn(APDU apdu)
              byte[] buff = apdu.getBuffer();
              short lcLength = buff[ISO7816.OFFSET_LC];
              short readCount = apdu.setIncomingAndReceive();
              if(readCount== 0 || lcLength == 0)
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
              Util.arrayCopy(buff,(short) ISO7816.OFFSET_CDATA, nameID, (short)0, readCount);     
         public void writePhoneIn(APDU apdu)
              byte [] buff = apdu.getBuffer();
              short readCount = apdu.setIncomingAndReceive();
              short lcLength = buff[ISO7816.OFFSET_LC];
              if(readCount== 0 || lcLength == 0)
                   ISOException.throwIt(ISO7816.SW_WRONG_LENGTH);
              Util.arrayCopy(buff, ISO7816.OFFSET_CDATA, phone, (short)0, readCount);     
         public void readNameOut(APDU apdu)
              byte [] buff = apdu.getBuffer();
              short le = apdu.setOutgoing();
              apdu.setOutgoingLength((short) nameID.length);
              Util.arrayCopy(nameID,(short) 0, buff,(short) 0,(short) nameID.length);
              apdu.sendBytes((short)0, (short) nameID.length);
         public void readPhoneOut(APDU apdu)
              byte [] buff = apdu.getBuffer();
              short le = apdu.setOutgoing();
              apdu.setOutgoingLength((short) phone.length);
              Util.arrayCopy(phone,(short) 0, buff,(short) 0,(short) phone.length);
              apdu.sendBytes((short)0, (short) phone.length);
    }

  • Listing applets on the card

    hi,
    I am trying to list the applets present on the card. But, I am getting the following error mesg. The source code is also pasted below.
    C:\J2SDK1.4.0_03\BIN\java.exe ReadFile
    initializing file...
    Before start
    After start
    After Card request
    [INFO     ] opencard.core.service.CardServiceRegistry.getCardServiceClass
    --- message no CardService for interface opencard.opt.applet.mgmt.AppletAccessCardService
    --- thread Thread[Thread-1,5,main]
    --- source opencard.core.service.CardServiceRegistry@422ede++ registered factory opencard.opt.util.PassThruCardServiceFactory@3c5982
    [INFO     ] opencard.core.service.CardServiceRegistry.isCardRequestSatisfied
    --- message requested CardService class interface opencard.opt.applet.mgmt.AppletAccessCardService not supported for opencard.core.terminal.CardID@820dda ATR: 3B 75 94 00 00 62 02 02 02 01
    --- thread Thread[Thread-1,5,main]
    --- source opencard.core.service.CardServiceRegistry@422ede++ registered factory opencard.opt.util.PassThruCardServiceFactory@3c5982
    [INFO     ] opencard.core.service.CardServiceRegistry.getSmartCard
    --- message CardRequest opencard.core.service.CardRequest@186fab NEWCARD
    service = interface opencard.opt.applet.mgmt.AppletAccessCardService cannot be satisfied with opencard.core.terminal.CardID@820dda ATR: 3B 75 94 00 00 62 02 02 02 01
    --- thread Thread[Thread-1,5,main]
    --- source opencard.core.service.CardServiceRegistry@422ede++ registered factory opencard.opt.util.PassThruCardServiceFactory@3c5982
    The source code:
    import opencard.core.service.SmartCard;
    import opencard.core.service.CardRequest;
    import opencard.opt.util.PassThruCardService;
    import opencard.opt.applet.BasicAppletCardService;
    import opencard.opt.iso.fs.CardFile;
    import opencard.core.terminal.*;
    import opencard.opt.applet.mgmt.*;
    import opencard.opt.applet.*;
    public class ReadFile {
         public static void main(String[] args)
              System.out.println("initializing file...");
         try {
              System.out.println("Before start");
              SmartCard.start();
              System.out.println("After start");
              // wait for a smartcard with file access support
              CardRequest cr = new CardRequest(CardRequest.NEWCARD, null, AppletAccessCardService.class);
              System.out.println("After Card request");
              SmartCard sc = SmartCard.waitForCard(cr);
              System.out.println("After waiting for card");
         AppletInfo [] templates = null;
         try {
         AppletAccessCardService aacs = null;
         aacs = (AppletAccessCardService)
         sc.getCardService(AppletAccessCardService.class, true);
         templates = aacs.list();
         } catch (Exception e) {
              sc.close();           
         catch (Exception e)
              e.printStackTrace(System.err);
              System.exit(0);
         finally
         { // even in case of an error...
              try {
                   SmartCard.shutdown();
              catch (Exception e)
              e.printStackTrace(System.err);
         System.exit(0);
    It would be of great help if anyone has code for reading list of applets from the card. We are using CyberFlex egate card and Reflex V2 USB reader.
    Thanks
    Nagesh

    JoesephSmith (and DurangoVa, if your still around),
    Please excuse my previous posts. I was in a sour mood when I wrote them, born out of frustration with trying to get answers from this list and the internet in general.
    JS, I have no personal problem with you at all. You were in the wrong place at the wrong time:
    I had been searching for answers to my query about AppletAccessCardService implementations for a few hours. No information on the OCF site. Little or no information here. During my searching, a great many posts with similar questions came up and, it seemed, the answer that seemed to come up was "RTFM" or "Do a search, this has been answered a million times" (yet the original answer never seemed to appear in the search). While I admit in some instances, this kind of answer might have been correct for that particular user, it wasn't helping me solve my problem. Many years on Slashdot, K5 and IRC has really made me despise that saying -"RTFM". I was upset that the OCF would publish a "Programmers Guide" with sample code that cannot possibly be run or used and I was upset that I could not find the appropriate information on the JavaCard forum here at Sun. A bad day all around.
    Then I came upon this post and the other that you responded to and I just flipped. Sorry about that. Let's try this again:
    While I agree that you cannot list applets without using the GP/OP to do an xauth first, knowing that will not help this individual in this instance. This particular error is caused not having an AppletAccessCardService implementation configured in his opencard.properties file. Without obtaining the proper card service, he cannot get a handle on the smarcard object or a handle on the cardchannel to which he will need to send the xauth commands, then the applet listing commands. So knowing how to do xauth according to GP won't help him if he can't send the commands to the card.
    I would suggest that he forget about the AppletAccessCardService, since there doesn't seem to be an implementation of it around, and use the PassThroughCardService instead. This is a little more low-level than the OCF applet packages (he will have to work directly with APDU commands instead of a wrapper class), but at least he can xauth and list with this one. And as you said JS, you must learn how to do the xauth <i>properly</i> first or you will bugger your card.
    I hope this is a more appropriate response.
    I hope this makes up somewhat for my poor behaviour the other day.
    Be well.

  • Get the values from the bean class?

    Hi Praveen and all can u please suggest in this,
    I have developped an application In that Create One java class that Extends PageProcesscomponenet and utilizing the Bean That have the Connetion method and retriving the query Based on the Logon customer and spoof customer.
    this functionality I have developped in Pageprocessor component.
    The same functinality I am utilizing another java Class that Extends AbstractPortalcomponent  and utilizing the same Bean.
    But the problem both java classes for I used one Jsp only Dynmic spoof customer will come from the JSP Input filed.
    In the new Java Class How can I capture the Event When I click the Buttong the InputField value capturing into the AbstractPortalcomponent Class.
    I tried like this but It comes as Null Value.
    Event event = myContext.getCurrentEvent();
                              if(event!=null)
                                  InputField ip= (InputField) myContext.getComponentForId("spoofCust");
                                  String spoofCust=ip.getValue().toString();
    Please suggest me in this.
    What is wrong with this.
    Thanks,
    Lohi.
    Message was edited by:
            Lohitha M

    Lohitha,
    Try replacing your two lines of code:
    InputField ip= (InputField) myContext.getComponentForId("spoofCust");
    String spoofCust=ip.getValue().toString();
    with:
    InputField ip = (InputField) getComponentByName("spoofCust");     
    String spoofCust = ip.getValueAsDataType().toString();
    Let me know how that works for you.
    -John

  • I am getting a NullPointerException when trying to use the Service class

    I am getting a NullPointerException which is as follows
    java.lang.NullPointerException
    file:/K:/Learner/JavaFx2/ProductApplication/dist/run166129449/ProductApplication.jar!/com/product/app/view/viewsingle.fxml
      at com.product.app.controller.ViewSingleController.initialize(ViewSingleController.java:70)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
      at javafx.fxml.FXMLLoader.load(Unknown Source)
    And my View SingleController is as follows
    package com.product.app.controller;
    import com.product.app.model.Product;
    import com.product.app.service.ViewProductsService;
    import com.product.app.util.JSONParser;
    import com.product.app.util.TagConstants;
    import java.net.URL;
    import java.util.ArrayList;
    import java.util.List;
    import java.util.ResourceBundle;
    import javafx.collections.ObservableList;
    import javafx.concurrent.Service;
    import javafx.concurrent.Task;
    import javafx.event.ActionEvent;
    import javafx.fxml.FXML;
    import javafx.fxml.Initializable;
    import javafx.scene.control.ProgressIndicator;
    import javafx.scene.control.TextArea;
    import javafx.scene.control.TextField;
    import javafx.scene.layout.Region;
    import javafx.stage.Stage;
    import javax.swing.JOptionPane;
    import org.apache.http.NameValuePair;
    import org.apache.http.message.BasicNameValuePair;
    import org.json.JSONArray;
    import org.json.JSONObject;
    * FXML Controller class
    * @author Arun Joseph
    public class ViewSingleController implements Initializable {
        private static String action = "";
        @FXML
        private TextField txtID;
        @FXML
        private TextField txtName;
        @FXML
        private TextField txtPrice;
        @FXML
        private TextArea txtDesc;
        @FXML
        private Region veil;
        @FXML
        private ProgressIndicator p;
        private ViewProductsService service = new ViewProductsService();
        private JSONObject product = null;
        private JSONParser parser = new JSONParser();
        private int pid = 1;
        public void setPid(int pid) {
            this.pid = pid;
         * Initializes the controller class.
        @Override
        public void initialize(URL url, ResourceBundle rb) {
            veil.setStyle("-fx-background-color: rgba(0, 0, 0, 0.4)");
            p.setMaxSize(150, 150);
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
            Product product = new Product();
            service.start();
            ObservableList<Product> products = service.valueProperty().get();
            products.get(pid);
            txtID.textProperty().set(String.valueOf(products.get(pid).getPid()));
            //product = service.valueProperty().get().get(pid);
            //txtID.setText(String.valueOf(product.getPid()));
            txtName.textProperty().set(product.getName());
            txtPrice.textProperty().set(String.valueOf(product.getPrize()));
            txtDesc.textProperty().set(product.getDescription());
        private SomeService someService = new SomeService();
        @FXML
        private void handleUpdateButtonClick(ActionEvent event) {
            action = "update";
            someService.start();
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
        @FXML
        private void handleDeleteButtonClick(ActionEvent event) {
            action = "delete";
            someService.start();
            p.progressProperty().bind(service.progressProperty());
            veil.visibleProperty().bind(service.runningProperty());
            p.visibleProperty().bind(service.runningProperty());
        @FXML
        private void handleCancelButtonClick(ActionEvent event) {
            closeStage();
        private void closeStage() {
            ViewSingleController.stage.close();
        private static Stage stage = null;
        public static void setStage(Stage stage) {
            ViewSingleController.stage = stage;
        private class SomeService extends Service<String> {
            @Override
            protected Task<String> createTask() {
                return new SomeTask();
            private class SomeTask extends Task<String> {
                @Override
                protected String call() throws Exception {
                    String result = "";
                    int success = 0;
                    List<NameValuePair> params = new ArrayList<NameValuePair>();
                    switch (action) {
                        case "update":
                            params.add(new BasicNameValuePair("pid", txtID.getText()));
                            params.add(new BasicNameValuePair("name", txtName.getText()));
                            params.add(new BasicNameValuePair("price", txtPrice.getText()));
                            params.add(new BasicNameValuePair("description", txtDesc.getText()));
                            product = parser.makeHttpRequest(TagConstants.url_update_product_with_id, "POST", params);
                            success = product.getInt(TagConstants.TAG_SUCCESS);
                            if (success == 1) {
                                result = "Successfully Updated the product";
                                JOptionPane.showMessageDialog(null, result);
                                closeStage();
                            break;
                        case "delete":
                            params.add(new BasicNameValuePair("pid", txtID.getText()));
                            product = parser.makeHttpRequest(TagConstants.url_delete_product_with_id, "POST", params);
                            success = product.getInt(TagConstants.TAG_SUCCESS);
                            if (success == 1) {
                                result = "Successfully Deleted the product";
                                JOptionPane.showMessageDialog(null, result);
                                closeStage();
                            break;
                    return result;

    Time Machine has its own mechanism for deleting files. The number you are seeing may represent a "underflow" or a number of files which exceeds the limit and becomes negative.
    The best way to remove TM files is via the TM interface: select the files and click the Gear and select delete from all backups.
    If you are deleting files on an external drive which once included TM files, it is best to use the terminal and just delete them directly. They go bye-bye without ever seeing the trash bucket.
    Of course, using the terminal is not for everyone.
    What you might be able to do is restore the files from trash and then delete them properly or in smaller bundles.

  • How can I format an SD card on my mac?  I have tried the erase thing but when I put the card into my 35mm camera it says that the card has to be formatted.

    I just purchased two new SanDisk 8gb SD cards for my trail cameras.  When I put the cards into the trail cameras, the cameras will take pictures but it won't store them on the cards.  When I put the cards into my 35mm camera the camera tells me that the cards need to be formatted.  I have went through the steps in the disk utilities and erased the cards, which I assume is the same as formatting them??  I have tried this for hours and have had no luck getting these things to work at all.  It was awful disgusting when I checked my two trail cameras the first time and found out that they had taken close to 75 pictures but the cards were empty.  When I bought my 35mm camera several years ago, I bought a couple of Kodak SD cards and used them right out of the package and never had to do any of this formatting thing.  I don't understand what is going on and could sure use some help with this.  Thanks for any information anyone can give me with this problem.  I would love to have seen what animals set my cameras off 75 times in the last few days.  Thanks again.
    Respectully
    Jim

    AFAIK cameras offer their own built-in format utility for inserted SD cards.  You should use that.  Otherwise, refer to the manual that came with your camera to determine precisely how your SD cards need to be formatted to work properly.  Personally, I'd suggest Partition Scheme: MBR, and Filesystem: FAT32.
    Try to limit the number of formats you perform on the SD cards, though, as you're reducing their lifespan.  I believe formatting causes re-writes to a portion of the SD card that has fewer read/write cycles than the rest of the card as a whole.

  • Multiple windows of the same class with a different argument

    Suppose I have a main window with a list of users. If I click on any one user, the "chat window" should open with the argument as that "user".
    If i click on another, a similar "chat window" should open but with a different user.
    I can't have so many stages because I don't know how many users are there.
    How do I open multiple windows of the same class but with a different argument?

    Here is a sample (opens, at random locations, a bunch of child windows parameterized by color).
    Could be simpler, but hopefully you get the gist.
    import java.util.Random;
    import javafx.application.Application;
    import javafx.geometry.Rectangle2D;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.layout.StackPane;
    import javafx.stage.*;
    public class ColoredStages extends Application {
      final String[] colors = { "firebrick", "palegreen", "azure", "chocolate", "goldenrod" };
      final Random random = new Random(42);
      Rectangle2D screenBounds;
      public static void main(String[] args) { launch(args); }
      @Override public void start(Stage stage) {
        screenBounds = Screen.getPrimary().getVisualBounds();
        stage.setTitle("Primary");
        stage.setScene(new ColoredScene("cornsilk"));
        stage.show();
        for (String color : colors) {
          Stage coloredStage = new ColoredStage(stage, color);
          coloredStage.show();
      class ColoredStage extends Stage {
        ColoredStage(Stage owner, String color) {
          super();
          initOwner(owner);
          initStyle(StageStyle.UTILITY);
          setX(screenBounds.getMinX() + random.nextInt((int) screenBounds.getWidth()));
          setY(screenBounds.getMinY() + random.nextInt((int) screenBounds.getHeight()));
          setScene(new ColoredScene(color));
      class ColoredScene extends Scene {
        ColoredScene(String color) {
          super(new StackPane());
          StackPane layout = (StackPane) getRoot();
          layout.getChildren().addAll(new Label(color));
          layout.setStyle("-fx-font-size: 20px; -fx-padding: 30px; -fx-background-color: " + color);
    }

  • What's the Java Class Type corresponding 2 projectGantt's SubTasks Accessor

    Hi,
    I expose my java class as data control, and use the data control as a projectGantt. I get problem when i try to set the SubTask Accessor.
    I have a Fusion Web App, in the Model project, i write 2 java class: ( all the private fields has public gettors and settors which are omitted here)
    1
    public class GanttTask {
    private List<GanttTask> _subTaskList = new ArrayList<GanttTask>();
    2
    public class GanttDataControl {
    private List<GanttTask> _dataList;
    I expose the 2nd class: GanttDataControl.java as a data control by right click on it and select _"Create Data Control "_ from the drop down list.
    The data control creation is ok.
    I Drag&Drop the +"dataList"+ from the data control as a projectGantt, and only finish the data binding in the _"Tasks"_ tab.
    I run the page, the projectGantt shows ok with a FLAT(list) structure.
    I try to set the binding in _"Subtasks"_ tab.
    In the _"Subtasks Accessor"_ LOV, the +"subTaskList"+ appears in the LOV.
    I select it and finish the binding below it.
    I try to run the page again, the page cannot be showed and an error appears in JDeveloper:
    <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase RENDER_RESPONSE 6
    oracle.jbo.NoDefException: JBO-25058: Definition subTaskList of type Attribute is not found in ViewDefGanttTask1_7.
         at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:7100)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding.getRootNodeBinding(FacesGanttBinding.java:157)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getParent(RowDataManager.java:312)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getRowCount(RowDataManager.java:287)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding$GanttModel.getRowCount(FacesGanttBinding.java:465)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding$ProjectGanttModel.getRowCount(FacesGanttBinding.java:613)
         at oracle.adfinternal.view.faces.bi.renderkit.gantt.RichProjectGanttRenderer.encodeGantt(RichProjectGanttRenderer.java:388)
         at oracle.adfinternal.view.faces.bi.renderkit.gantt.RichGanttRenderer.encodeAll(RichGanttRenderer.java:1307)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:538)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    <15-Feb-2012 11:46:59 o'clock CST> <Error> <HTTP> <BEA-101020> <[ServletContext@19732978[app:testGantt0214 module:testGantt0214-ViewController-context-root path:/testGantt0214-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
    oracle.jbo.NoDefException: JBO-25058: Definition subTaskList of type Attribute is not found in ViewDefGanttTask1_7.
         at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:7100)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding.getRootNodeBinding(FacesGanttBinding.java:157)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getParent(RowDataManager.java:312)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getRowCount(RowDataManager.java:287)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding$GanttModel.getRowCount(FacesGanttBinding.java:465)
         Truncated. see log file for complete stacktrace
    >
    <15-Feb-2012 11:46:59 o'clock CST> <Notice> <Diagnostics> <BEA-320068> <Watch 'UncheckedException' with severity 'Notice' on server 'DefaultServer' has triggered at 15-Feb-2012 11:46:59 o'clock CST. Notification details:
    WatchRuleType: Log
    WatchRule: (SEVERITY = 'Error') AND ((MSGID = 'WL-101020') OR (MSGID = 'WL-101017') OR (MSGID = 'WL-000802') OR (MSGID = 'BEA-101020') OR (MSGID = 'BEA-101017') OR (MSGID = 'BEA-000802'))
    WatchData: DATE = 15-Feb-2012 11:46:59 o'clock CST SERVER = DefaultServer MESSAGE = [ServletContext@19732978[app:testGantt0214 module:testGantt0214-ViewController-context-root path:/testGantt0214-ViewController-context-root spec-version:2.5]] Servlet failed with Exception
    oracle.jbo.NoDefException: JBO-25058: Definition subTaskList of type Attribute is not found in ViewDefGanttTask1_7.
         at oracle.jbo.server.ViewObjectImpl.findAttributeDef(ViewObjectImpl.java:7100)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding.getRootNodeBinding(FacesGanttBinding.java:157)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getParent(RowDataManager.java:312)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.RowDataManager.getRowCount(RowDataManager.java:287)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding$GanttModel.getRowCount(FacesGanttBinding.java:465)
         at oracle.adfinternal.view.faces.dvt.model.binding.gantt.FacesGanttBinding$ProjectGanttModel.getRowCount(FacesGanttBinding.java:613)
         at oracle.adfinternal.view.faces.bi.renderkit.gantt.RichProjectGanttRenderer.encodeGantt(RichProjectGanttRenderer.java:388)
         at oracle.adfinternal.view.faces.bi.renderkit.gantt.RichGanttRenderer.encodeAll(RichGanttRenderer.java:1307)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at org.apache.myfaces.trinidad.component.UIXCollection.encodeEnd(UIXCollection.java:538)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.FormRenderer.encodeAll(FormRenderer.java:220)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeChild(CoreRenderer.java:399)
         at oracle.adf.view.rich.render.RichRenderer.encodeChild(RichRenderer.java:2633)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeAllChildren(CoreRenderer.java:415)
         at oracle.adfinternal.view.faces.renderkit.rich.DocumentRenderer.encodeAll(DocumentRenderer.java:1273)
         at oracle.adf.view.rich.render.RichRenderer.encodeAll(RichRenderer.java:1396)
         at org.apache.myfaces.trinidad.render.CoreRenderer.encodeEnd(CoreRenderer.java:335)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.encodeEnd(UIXComponentBase.java:767)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:937)
         at javax.faces.component.UIComponent.encodeAll(UIComponent.java:933)
         at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:266)
         at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:197)
         at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
         at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:800)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:294)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:214)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = Pen-PC TXID = CONTEXTID = 026fd69aaf53f3f5:-30631c41:1357f1e4b9d:-8000-0000000000000028 TIMESTAMP = 1329277619970
    WatchAlarmType: AutomaticReset
    WatchAlarmResetPeriod: 30000

    i try to manually add the subTaskList from the data control to the page's "Bindings", it doesnt work.
    I solve this problem by using VO & View Link. Add using AM to expose data control.
    In the SubTasks dropdown list, I notice that, there is an additional SubTasks accessor which is the accessor that i defined in the View Link.
    I use this accessor, problem solves!

  • Why doesn't the Card show up from the CardLayout:used JPanel,JFrame

    hello guys,
    this is a question regarding. As I did not get nice responses i am posting again today.
    http://forum.java.sun.com/thread.jsp?forum=57&thread=235761
    Hi, I would like to re-arrange my question and put it in a simpler way. I have a frame(mainframes.java) with border layout. There is a panel on the west(borderlayout.west) which has a few buttons. The center panel(borderlayout.center) has a cardlayout and needless to mention that it contains a deck of panels. When I click on a button in the left panel, an appropriate panel in the deck should be displayed in the center panel. It's all simple so far, but here comes the real problem. I have designed my application in such a way that I have each of my panels in a separate class(each of which extend JPanel) and I am trying to integrate them all in my frame. When I click on the button on the left panel(p.s.:this panel is also in a separate class), then the appropriate panel should be displayed in the frame(i.e. in the center deck).
    mainframes.java:-
    //This is the local method which takes an argument from the invoking panel and displays the corresponding card in the deck.
    void showpanel(String p1)
    this.cardLayout2.show(CENTERPANEL,p1);
    System.out.println("Inside showpanel "+ p1);
    leftpanel.java:-
    void B_LOGIN_actionPerformed(ActionEvent e) {
    new mainframes().showpanel("lp");
    // I am trying to display the card "lp" when I click on a button in the leftpanel, but I can only get the console output as "Inside showpanel lp". This shows that the method showpanel(String lp) is getting invoked but the required card is not being displayed. i.e. this.cardLayout2.show(CENTERPANEL,p1) seems to be not working.
    Thanks for your time. Mail me, if you want to access the complete code, at [email protected]

    I'd check to make sure 3 things...
    1) You have added your Panels to the CardLayout Panel
    2) You have added the CardLayoutPanel to the center of your BorderLayout JPanel
    3) Try giving calls to validate()/invalidate() on the JPanel containing the CardLayoutPanel
    void showpanel(String p1)
    ... invalidate()
    this.cardLayout2.show(CENTERPANEL,p1);
    System.out.println("Inside showpanel "+ p1);
    ... validate()
    Otherwise, I may just need to check your source code, you can send to [email protected]

  • Using a List as the value class of a Map - How?

    Hello,
    I have a managed-property of the following type
    Map<String, List<String>> myMap;How can I set the values for the List in the faces-config.xml?
    I tried sth like this, but this is no valid XML according to the schema.
    Any ideas?
    Regards,
    Jan
    <managed-property>
    <property-name>myMap</property-name>
      <property-class>java.util.TreeMap</property-class>
      <map-entries>
      <key-class>java.lang.String</key-class>
      <value-class>java.lang.ArrayList</value-class>
        <map-entry>
          <key>key1</key>
          <value>
          <list-entries>
            <value>value1</value>
            <value>value2</value>
          </list-entries>
          </value>
        </map-entry>
      </map-entries>
    </managed-property>

    You don't need a cfloop. Try an IN(...) clause instead.
    Obviously you have to validate that the #riderlist# is not empty
    first or the query will error.
    SELECT riderId,
    SUM(IIf(month(rideDate)=1, rideDistance, 0)) AS janSum,
    SUM(IIf(month(rideDate)=2, rideDistance, 0)) AS febSum,
    SUM(IIf(month(rideDate)=3, rideDistance, 0)) AS marSum,
    SUM(IIf(month(rideDate)=4, rideDistance, 0)) AS aprSum,
    SUM(IIf(month(rideDate)=5, rideDistance, 0)) AS maySum,
    SUM(IIf(month(rideDate)=6, rideDistance, 0)) AS junSum,
    SUM(IIf(month(rideDate)=7, rideDistance, 0)) AS julSum,
    SUM(IIf(month(rideDate)=8, rideDistance, 0)) AS augSum,
    SUM(IIf(month(rideDate)=9, rideDistance, 0)) AS sepSum,
    SUM(IIf(month(rideDate)=10, rideDistance, 0)) AS octSum,
    SUM(IIf(month(rideDate)=11, rideDistance, 0)) AS novSum,
    SUM(IIf(month(rideDate)=12, rideDistance, 0)) AS decSum
    FROM mileageLog
    WHERE riderId IN (<cfqueryparam value="#riderList#"
    cfsqltype="the column type here" list="true"> )
    AND Year(rideDate)=#useYear#
    GROUP BY riderId
    ORDER BY riderId

  • Getting Bad Type Error when calling a method in the proxy class

    Hi,
    I have generated the proxy classes from wsdl.
    When I am calling the methods in the proxy class from one of external class, I am getting following error.
    Can anyone please help me in resolving this issue.
    javax.xml.ws.soap.SOAPFaultException: org.xml.sax.SAXException: Bad types (interface javax.xml.soap.SOAPElement -> class com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference) Message being parsed:
         at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:197)
         at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:125)
         at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:95)
         at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:136)
         at $Proxy176.find(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.spi.ClientInstanceInvocationHandler.invoke(ClientInstanceInvocationHandler.java:84)
         at $Proxy173.find(Unknown Source)
         at com.xxx.fs.FNServices.findAccountWs(FNServices.java:132)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:92)
         at weblogic.wsee.jaxws.WLSInstanceResolver$WLSInvoker.invoke(WLSInstanceResolver.java:74)
         at com.sun.xml.ws.server.InvokerTube$2.invoke(InvokerTube.java:151)
         at com.sun.xml.ws.server.sei.EndpointMethodHandlerImpl.invoke(EndpointMethodHandlerImpl.java:268)
         at com.sun.xml.ws.server.sei.SEIInvokerTube.processRequest(SEIInvokerTube.java:100)
         at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:866)
         at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:815)
         at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:778)
         at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:680)
         at com.sun.xml.ws.server.WSEndpointImpl$2.process(WSEndpointImpl.java:403)
         at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:532)
         at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:253)
         at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:140)
         at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:171)
         at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:708)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
         at weblogic.wsee.util.ServerSecurityHelper.authenticatedInvoke(ServerSecurityHelper.java:103)
         at weblogic.wsee.jaxws.HttpServletAdapter$3.run(HttpServletAdapter.java:311)
         at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:336)
         at weblogic.wsee.jaxws.JAXWSServlet.doRequest(JAXWSServlet.java:95)
         at weblogic.servlet.http.AbstractAsyncServlet.service(AbstractAsyncServlet.java:99)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Thanks
    Anoop

    Hi Vlad,
    The service has not been changed since i have generated the proxy.
    I tried calling the service from soapUI and I am getting the following error now.
    Request:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:uri="uri:webservice.subscribenet.intraware.com" xmlns:uri1="uri:subscribenet.intraware.com">
    <soapenv:Header>
    <uri:SessionHeader>
    <uri:SessionID>hjkashd9sd90809dskjkds090dsj</uri:SessionID>
    </uri:SessionHeader>
    </soapenv:Header>
    <soapenv:Body>
    <uri:Find>
    <uri:SubscribeNetObjectReference>
    <uri1:ID></uri1:ID>
    <uri1:IntrawareID></uri1:IntrawareID>
    <uri1:SharePartnerID></uri1:SharePartnerID>
    </uri:SubscribeNetObjectReference>
    </uri:Find>
    </soapenv:Body>
    </soapenv:Envelope>
    Response:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Header/>
    <soapenv:Body>
    <soapenv:Fault>
    <faultcode>soapenv:Server.generalException</faultcode>
    <faultstring>org.xml.sax.SAXException: WSWS3279E: Error: Unable to create JavaBean of type com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference. Missing default constructor? Error was: java.lang.InstantiationException: com.intraware.snetmgr.webservice.data.SubscribeNetObjectReference. Message being parsed:</faultstring>
    </soapenv:Fault>
    </soapenv:Body>
    </soapenv:Envelope>
    Thanks
    Anoop

  • Could not find the main class: oracle.ide.boot.Launcher.  Program will exit

    Hi,
    I have installed Oracle11g_win64_11gR1, Database and Client.
    The issue is unable to invoke "sqldeveloper", getting the following error message. Could you please help ?
    FYI. I have already downloaded and installed installed JRE and JDK.
    ie. C:\Program Files (x86)\Java\jre6\ and C:\Program Files\Java\jdk1.6.0_24, still did not work.
    C:\Users\oracle>java -version
    java version "1.6.0_24"
    Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
    Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
    Let me know, if you need more information. Here is the error message.
    Error Message
    =========
    (1) if I invoke sqldeveloper, directly from the location " C:\app\oracle\product\11.1.0\db_1\sqldeveloper\sqldeveloper\bin " using explorer, I do get error message
    "Unable to find a java Virtual Machine.
    To point to a location of java Virtual machine please refer to the Oracle9i JDeveloper Install Guide ( jdev/install.html)"
    (2) if I invoke sqldeveloper, directly from the locationC:\app\oracle\product\11.1.0\client_1\sqldeveloper, it prompts me to enter "full path for java.exe".
    When I enter full path and continue, still it continue to prompt and ask the same input.
    (3) if I invoke sqldeveloper from from command prompt using the batch file "sqldeveloper.bat"
    C:\Users\oracle>C:\app\oracle\product\11.1.0\client_1\sqldeveloper\sqldeveloper\
    bin\sqldeveloper.bat
    C:\Users\oracle>java -Xmx512M -Xverify:none -XX:JavaPriority10_To_OSPriority=10
    -XX:JavaPriority9_To_OSPriority=9 -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_F
    LAG=true -Dsun.java2d.ddoffscreen=false -Dwindows.shell.font.languages= -Dide.co
    nf="sqldeveloper.conf" -Dide.home.dir.name=.sqldeveloper -classpath ..\..\ide\l
    ib\ide-boot.jar;..\..\jdev\lib\xmleditor.jar;..\..\ide\lib\oicons.jar;..\..\..\j
    dbc\lib\ojdbc5.jar;..\..\jlib\jewt4.jar;..\..\jlib\share.jar;..\..\sqldeveloper\
    lib\jle2.jar oracle.ide.boot.Launcher
    Exception in thread "main" java.lang.NoClassDefFoundError: oracle/ide/boot/Launc
    her
    Caused by: java.lang.ClassNotFoundException: oracle.ide.boot.Launcher
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    Could not find the main class: oracle.ide.boot.Launcher. Program will exit.
    OS
    ==============
    MS Windows 7 Home Premium
    sqldeveloper.conf
    ===================
    SetSkipJ2SDKCheck true
    IncludeConfFile ../../jdev/bin/ide.conf
    AddVMOption -Dapple.laf.useScreenMenuBar=true
    AddVMOption -Dcom.apple.mrj.application.apple.menu.about.name="SQL_Developer"
    AddVMOption -Dcom.apple.mrj.application.growbox.intrudes=false
    AddVMOption -Dcom.apple.macos.smallTabs=true
    AddVMOption -Doracle.ide.util.AddinPolicyUtils.OVERRIDE_FLAG=true
    AddJavaLibFile ../../jdev/lib/xmleditor.jar
    AddJavaLibFile ../../ide/lib/oicons.jar
    AddJavaLibFile ../../jlib/jewt4.jar
    AddJavaLibFile ../../jlib/share.jar
    AddJavaLibFile ../ide/jlib/xmlef.jar
    AddJavaLibFile ../../sqldeveloper/lib/jle2.jar
    AddJavaLibFile ../../sqldeveloper/lib/oracle.dbtools.logging.jar
    AddVMOption -Dsun.java2d.ddoffscreen=false
    AddVMOption -Dwindows.shell.font.languages=
    IncludeConfFile sqldeveloper-nondebug.conf
    SetJavaHome C:\Program Files\Java\jdk1.6.0_24
    Edited by: sivapara on Feb 16, 2011 1:08 PM

    I was able to resolve this issue by performing following.
    1. Go to the location where sqldeveloperW.exe is being executed from.
    2. You will find a file sqldeveloper.conf in that location. Edit this file and change the value of IncludeConfFile to point to actual place. For me following were old and new values.
    OLD (Wrong) : IncludeConfFile ../../jdev/bin/ide.conf
    NEW (Correct) : IncludeConfFile ../../ide/bin/ide.conf
    After making above change in the sqldeveloper.conf file. Save and close it. Restart SQLDeveloper. You will not get the error anymore.
    Thanks
    Ravi

Maybe you are looking for

  • Background job SAP_PERIODIC_ORACLE_SNAPSHOT got cancelled.

    Hi All, Background job SAP_PERIODIC_ORACLE_SNAPSHOT got cancelled. Im SM37 the log shows that the job has been cancelled because 'No Vendor Specified' Is that any variant needs to be specified. Please help me on this. Thanks & Regards, Gopi L.

  • I just bought an new iMac 27 and is trying to transfer all my data from a late 2009 iMac 27

    I need your help. I connected the old Mac as a disk to the new one with Firewire / Thunderbolt adapter, went through the Migration Assistant menu. The new iMac rebooted and started with setup process again, did this twice then I tried to restore from

  • Transfer all music to ipad

    iTunes is not allowing me to transfer music that I haved loaded from a CD into iTunes on my PC from my iTunes into iPad.  How do I do that?

  • My caller speaker is not working

    My caller speaker is not working, I can hear the person on the other side but they can't hear me, but when I activate the speaker phone then they can hear me please help me why is this happening is it the software or my speaker???

  • Is there a raid controller build in

    I'm running a powermac g4 Mdd and i wanted to know if there is a raid controller build into it.  I've never done a raid but i'm told it could make my system run faster.  I plan to do a raid 10 because i have 4 drives.