Method to return ArrayList or Vector doesn't work, why?

Hi, I try to return a ArrayList or Vector from a method but it does not work.. wondering why and how to fix it? Thanks:)
class Class1{
      public static main(...){
          Class2 test = new Class2();
          ArrayList<String> resp = test.class2method(...);
          if(resp.get(4).equals(...)) {        
class Class2{
    public ArrayList class2method(int NumInt1, int NumInt2, ...) {
       ArrayList<String> arrayTesting = new ArrayList<String>(13);
       responses.set(2, Integer.toString(NumInt1));
       responses.set(3, Integer.toString(NumInt2));
       responses.set(4, Integer.toString(NumInt3));
       responses.set(5, Integer.toString(NumInt4));
       responses.set(6, Integer.toString(NumInt5));
       return responses;
}

what is responses? don't you want to return
arrayTesting?yes, responses is arrayTesting, sorry did notmention
that.what do you mean? is the code you posted a typo or
what you actually have in your code?It's more than 1000 lines codes so I decided not to posted them but here is part of them. My point is that i tried to return a ArrayList or Vector even with a simple code, it does not work. Thanks for your help.
public class DemoScript {
    public DemoScript() throws IOException {
        // register the shutdown hook
        Runtime.getRuntime().addShutdownHook(new Thread() {
            public void run() {
                System.out.println("close prog");
                 endApp();
    public void endApp() {
        System.out.println("done!");
        System.exit(0);
     public static void main(String[] args) {
          Parameters p = new Parameters();
          VMF vm = null;
               //Elements: [0]time, [1]MsgType, [2]NumInt1, [3]NumInt2, [4]NumInt3, [5]NumInt4, [6]NumInt5, [7]NumLong,
               //               [8]String1, [9]String2, [10]String3, [11]String4, [12]String5
//               ArrayList<String> responses = new ArrayList<String>(13);
          try {
               MyScript my = new MyScript();
               if(args.length == 5) {
                   p.vmHost = args[1]; p.vmPort = Integer.parseInt(args[2]);
                   p.guiHost = args[3]; p.guiPort = Integer.parseInt(args[4]);
              } else if(args.length == 4) {
                   p.vmHost = args[1]; p.vmPort = Integer.parseInt(args[2]); p.guiHost = args[3];
              } else if(args.length == 3){
                   p.vmHost = args[1]; p.vmPort = Integer.parseInt(args[2]);
              } else if(args.length == 2){
                   p.vmHost = args[1];
              } else {
                   System.out.println("Usage: java MyScript [port #] [voice mail hostname] <voice mail socket #> <GUI hostname> <GUI socket #>");
                   System.out.println("Default: <voice mail socket #> = "+p.vmPort+", <GUI hostname> = "+p.guiHost+", <GUI socket #> = "+p.guiPort);
                   System.exit(-1);
//               String hostname;
               //int port;
               /* Check for input arguments */
               //if(args[0] != null){
               //     port = Integer.parseInt(args[0]);
               //     hostname = args[1];
               //} else {
               //     port = 2000;
               //     hostname = "10.0.0.228";
               //System.out.println("tews");
               vm = new VMF(p.vmHost, p.vmPort, p.guiHost, p.guiPort);
               vm.logon();
               //vm.portAbort(4);/*
               vm.portCapture(3, 0);
               //vm.portAbort(4);/*
               //vm.portOnhook();
               //vm.portOffhook();
               ////vm.portStop(3);  //to stop a port current operation
               //vm.portWaitring(); //vm will not resp until port detects ring
               //vm.portOffhook();
               //vm.portGetdigits(5, 7);
               //vm.portDialdigits("201");
               //for(int i=0;i<100000000;i++);
               //vm.portCallprogress(3, 0, 10);
               //System.out.println("d");
               //for(int i=0;i<1000000;i++);
               //vm.portGetdigits(5, 7);
               //vm.portRecordfile(30, 1, "\\\\kanapak.ctlinc.local\\VMfiles\\test.wmv");
               //vm.portClearDTMF();
               //vm.portPlayfile("\\\\kanapak.ctlinc.local\\VMfiles\\test.wmv");
               //vm.portPlayprompt(2);
               //vm.portSpeaknumber(3845);
               //vm.portSpeakdigits("1639123478866478909");//75655656566657867867*");
               //vm.portExternalcall(4, "933");
               ArrayList<String> response = vm.portInternalcall(2, "201");
               System.out.println(response.get(4));
               if(response.get(4).equals("DONE")) {
                    vm.portPlayprompt(1); vm.portPlayprompt(2);
               } else if(response.get(4).equals("GONE")) {
               vm.portSpeakttsstring("hello. This will create ");//a project with all of the proper SWT and JFace imports. Version 4.1.1 latest build released (SWT visual inheritance, enhanced SWT GridLayout support, non-visual beans, custom !!!SWT widgets, code generation enhancements, expose property, etc.)");
               vm.portRelease();
               vm.logoff();
               vm = new VMF(p.vmHost, p.vmPort, p.guiHost, p.guiPort);
               vm.logon();
               vm.portCapture(Integer.parseInt(args[0]), 0);
               vm.portOnhook();
               vm.portOffhook();
               //          vm.portGetdigits(5, 7);
               //vm.portRecordfile(30, 1, "\\\\kanapak.ctlinc.local\\VMfiles\\test.wmv");
               //vm.portClearDTMF();
               //vm.portPlayfile("\\\\kanapak.ctlinc.local\\VMfiles\\test.wmv");
               vm.portPlayprompt(86);
               //          vm.portSpeaknumber(3845);
               //vm.portSpeakdigits("1639123478866478909");//75655656566657867867*");
               //vm.portExternalcall(4, "933");
               //vm.portInternalcall(9, "82045");
               //vm.portSpeakttsstring("hello. This will create");// a project with all of the proper SWT and JFace imports. Version 4.1.1 latest build released (SWT visual inheritance, enhanced SWT GridLayout support, non-visual beans, custom !!!SWT widgets, code generation enhancements, expose property, etc.)");
               vm.portRelease();
               vm.logoff();
          } catch (IOException e) {
               e.printStackTrace();
          } catch (InterruptedException e) {
               //catch "STOP PORT"
               vm.logoff();
class VMF {
    public ArrayList<String> portInternalcall(int rings, String dial_string) {
         if (logon_status == 0) {
               System.err.println("Error: logon required");
               logoff();closeAndExit();
          } else if (capture_status == 0) {
               System.err.println("Warning: portCapture required");logoff();closeAndExit();
          } else if (rings <1 || rings >999 || !checkDigits(dial_string)) {
               System.err.println("Warning: portInternalcall( [1-999] , \"[0-9,A-D,F,P,a-d,f,p,*,#]\" )");
         breakString(dial_string);
         ostruct.write("", "IVR", "123", 188, captured_port, rings, 0, 0, 0, 0, str1, str2, str3, str4, str5);
         sendToGUI("s", "", "IVR", "123", "188", Integer.toString(captured_port),
                   Integer.toString(rings), "0", "0", "0", "0", str1, str2, str3, str4, str5);
         readStream();
         recToGUI("r", Integer.toString(MsgType),Integer.toString(NumInt1),Integer.toString(NumInt2),
                    Integer.toString(NumInt3),Integer.toString(NumInt4),Integer.toString(NumInt5),
                    Integer.toString(NumLong),String1,String2,String3,String4,String5);
          responses.set(2, Integer.toString(NumInt1)); responses.set(3, Integer.toString(NumInt2));
          responses.set(4, Integer.toString(NumInt3)); responses.set(5, Integer.toString(NumInt4));
          responses.set(6, Integer.toString(NumInt5));
          return responses;
}

Similar Messages

  • I push the cloud botton on the appstore to return the past purchased apps but it doesn't work.why?

    i push the cloud botton on the appstore to return the past purchased apps but it doesn't work.why?

    Oh gosh, this is ancient history for me.
    First, I remember some sort of third party boot enabler being required to install OSX on some G3s.  Not sure if it included iBook. http://eshop.macsales.com/OSXCenter/XPostFacto/Framework.cfm?page=XPostFacto.htm l
    Second, which exact set of installer discs?  They have to be black colored retail discs, not grey ones which came with a specific model Mac and will only boot that model.
    What are the exact specifications of the computer?  Does it have sufficient RAM?  You're asking a lot for a G3 to run Tiger.

  • I have downloaded my latest flash player and it still doesn't work, why?

    I have downloaded my latest flash player and it still doesn't work, why?

    Lightroom doesn't use the Camera Raw plug-in. All of the Camera Raw technology is part of the Lightroom program. You will either have to upgrade to Lightroom 5 or use the DNG converter to create digital negative copies that can be used with Lightroom 4.

  • Hi I'm new in this Ae and i loved it and started to get into editing but when i watch videos on how to use effects like magnify and CC light burst 2.5 it doesn't work why?

    hi I'm new in this Ae and i loved it and started to get into editing but when i watch videos on how to use effects like magnify and CC light burst 2.5 it doesn't work why?

    First, I want to clear up some vocabulary issues. After Effects is not intended for editing video. Editing involves cutting shots together to tell a story. Premiere Pro edits video. While you technically can cut video together in AE, Premiere is much, much better for that.
    After Effects is used for creating shots - visual effects, compositing, motion graphics, animation, color correction, color grading, etc.
    What exact version number of AE (down to the decimal points) are you using? Plus the questions Todd asked, plus the info in the link he gave.
    Also, if you're new to AE, you should really start here. This resource will give you a foundation in how to actually use After Effects that will probably clear up your current problem and prevent much more frustration in the future.

  • Help: v('p1_test'):=1; doesn't work why?

    I want to update states on p34_level_1, 2, 3, 4 etc..
    But it seems I can use v('p34_level_1') one way?
    for example:
    Variable_Value:= v('p34_level_1'); -- <----works correctly
    but I cant go:
    v('p34_level_1'):= Variable_Value; -- <----DOESN'T work
    Below show my code basically i want to loop through some fields and update the contents with values,
    any ideas? or suggestions?
    I get this error:
    ORA-06550: line 17, column 28: PLS-00103: Encountered the symbol ":" when expecting one of the following: := . ( % ;
    declare
    count_levels number(12,0);
    begin
    -- Count levels
    select count(level_id)
    into count_levels
    from wi_ccqual_level
    where bu = :p1_buid;
    -- update page
    FOR i IN 1 .. count_levels
    LOOP
    v('P34_LEVEL_' || i): = i;
    --i = i;
    END LOOP;
    END;

    Hi Vanadium
    Function v('ITEM') just reads item values from APEX environment.
    If you want to update item values from PL/SQL you should use apex_util.set_session_state API
    Syntax: apex_util.set_session_state(item,value)
    So you should write: apex_util.set_session_state('P34_LEVEL_'||i , i );
    I hope this helps you
    Oscar

  • My KeyListener doesn´t work, why?

    Hi!
    I am trying to ge my KeyListener working.
    My code is as follows:
    class C extends JPanel
              public C()
                   addMouseListener(new MListener());
                            addKeyListener(new KListener());Furher down in the code I have this:
    class KListener extends KeyAdapter
                public void keyPressed(KeyEvent e)
                       System.out.println(KeyEvent.getKeyText(e.getKeyCode()) + " was pressed");
                public void keyReleased(KeyEvent e)
                     System.out.println(KeyEvent.getKeyText(e.getKeyCode()) + " was released");
           }I do not get any errors when compiling the code but the KeyListener doesn´t work. The mouse listeners work perfekt.
    What´s wrong with my key listener?

    Add your keyListener to the JFrame and it will probably work, the JFrame has the focus when you use your JPanel.
    package Junk;
    import java.awt.Dimension;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import javax.swing.JFrame;
    class Junk extends JFrame {
      Junk(){
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        addKeyListener(new KListener());
        setPreferredSize(new Dimension(256, 256));
        setVisible(true);
      public static void main(String[] args){
        new Junk();
      class KListener extends KeyAdapter {
        public void keyPressed(KeyEvent e) {
                System.out.println(KeyEvent.getKeyText(e.getKeyCode()) + " was pressed");
              public void keyReleased(KeyEvent e) {
             System.out.println(KeyEvent.getKeyText(e.getKeyCode()) + " was released");
    }

  • HT1977 Can I return an app that doesn't work?

    K

    All App Stoe and itunes purchases are made on a no return/no refund basis.You can try contacting ITunes support: http://www.apple.com/support/itunes/contact/.
    You can also post what issues you are experiencing and someone may be able to assist you in getting it working.

  • Update methode in model-view-controller-pattern doesn't work!

    I'm writing a program in Java which contains several classes. It must be possible to produce an array random which contains Human-objects and the Humans all have a date. In the program it must be possible to set the length of the array (the number of humans to be produced) and the age of the humans. In Dutch you can see this where is written: Aantal mensen (amount of humans) and 'Maximum leeftijd' (Maximum age). Here you can find an image of the graphical user interface: http://1.bp.blogspot.com/_-b63cYMGvdM/SUb2Y62xRWI/AAAAAAAAB1A/05RLjfzUMXI/s1600-h/straightselectiondemo.JPG
    The problem I get is that use the model-view-controller-pattern. So I have a model which contains several methodes and this is written in a class which inherits form Observable. One methode is observed and this method is called 'produceerRandomArray()' (This means: produce random array). This method contains the following code:
    public void produceerMensArray() throws NegativeValueException{
         this.modelmens = Mens.getRandomMensen(this.getAantalMensen(), this.getOuderdom());
    for (int i = 0; i < this.modelmens.length; i++) {
              System.out.println(this.modelmens.toString());
    this.setChanged();
    this.notifyObservers();
    Notice the methods setChanged() and notifyObservers. In the MVC-patterns, these methods are used because they keep an eye on what's happening in this class. If this method is called, the Observers will notice it.
    So I have a button with the text 'Genereer' as you can see on the image. If you click on the button it should generate at random an array. I wrote a controller with the following code:
    package kristofvanhooymissen.sorteren;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    /**Klasse GenereerListener.
    * @author Kristof Van Hooymissen
    public class GenereerController implements ActionListener {
         protected StraightSelectionModel model;
         /**Constructor.
         *@param model Een instantie van het model wordt aan de constructor meegegeven.
         public GenereerController(StraightSelectionModel model) {
              this.model = model;
         /**Methode uit de interface ActionListener.
         * Bevat code om de toepassing te sluiten.
         public void actionPerformed(ActionEvent arg0) {
         this.model=new StraightSelectionModel();
         try{
         this.model.produceerMensArray();
         } catch (NegativeValueException e){
              System.out.println("U gaf een negatieve waarde in!");
         this.model.setAantalMensen((Integer)NumberSpinnerPanel.mensen.getValue());
         this.model.setOuderdom((Integer)NumberSpinnerPanel.leeftijd.getValue());
    StraighSelectionModel is of course my model class. Nevermind the methods setAantalMensen and setOuderdom. They are used to set the length of the array of human-objects and their age.
    Okay. If I click the button my observers will notice it because of the setChanged and notifyObservers-methods. An update-methode in a class which implements Observer.
    This method contains the follow code:
    public void update(Observable arg0,Object arg1){
              System.out.println("Update-methode");
              Mens[] temp=this.model.getMensArray();
              for (int i = 0; i < temp.length; i++) {
                   OnbehandeldeLijst.setTextArea(temp[i].toString()+"\n");
    This method should get the method out of the model-class, because the produceerRandomArray()-methode which has been called by clicking on the button will save the produce array in the model-class. The method getMensArray will put it back here in the object named temp which is an array of Mens-objects (Human-objects). Then aftwards the array should be put in the textarea of the unsorted list as you could see left on the screen on the image.
    Notice that in the beginning of this method there is a System.out.println-command to print to the screen as a test that the update-method has been called.
    The problem is that this update method won't work. My Observable class should notice that something happened with the setChanged() and notifyObservers()-methods, and after this the update class in the classes which implement Observer should me executed. But nothing happenens. My controllers works, the method in the model (produceerRandomArray() -- produce random array) has been executed, but my update-method won't work.
    Does anyone has an explanation for this? I have to get this done for my exam an the 5th of january, so everything that could help me would be nice.
    Thanks a lot,
    Kristo

    This was driving me nuts, I put in a larger SSD today going from a 120GB to a 240GB and blew away my Windows Partition to make the process easier to expand OS X, etc.  After installing windows again the only thing in device manager that wouldn't load was the Bluetooh USB Host Controller.  Tried every package in Bootcamp for version 4.0.4033 and 5.0.5033 and no luck.
    Finally came across this site:
    http://ron.dotsch.org/2011/11/how-to-get-bluetooth-to-work-in-parallels-windows- 7-64-bit-and-os-x-10-7-lion/
    1) Basically Right click the Device in Device manager, Go to Properties, Select Details tab, Choose Hardware ids from Property Drop down.   Copy the shortest Value, his was USB\VID_05AC&PID_8218 
    2) Find your bootcamp drivers and under bootcamp/drivers/apple/x64 copy AppleBluetoothInstaller64 to a folder on your desktop and unzip it.  I use winrar to Extract to the same folder.
    3) Find the files that got extracted/unzipped and open the file with notepad called AppleBT64.inf
    4) Look for the following lines:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    ; No action
    ; OS will load in-box driver.
    Get rid of the last two lines the following:
    ; No action
    ; OS will load in-box driver.
    And add this line, paste your numbers in you got earlier for USB\VID_05ac&PID_8218:
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    So in the end it should look like the following:
    ; for Windows 7 only
    [Apple.NTamd64.6.1]
    Apple Built-in Bluetooth=AppleBt, USB\VID_05ac&PID_8218
    5) Save the changes
    6) Select Update the driver for the Bluetooth device in device manager and point it to the folder with the extracted/unzipped files and it should install the Bluetooth drivers then.
    Updated:
    Just found this link as well that does the same thing:
    http://kb.parallels.com/en/113274

  • 6303i Classic modem doesn't work - why?

    In the 6303i user manual:  "You can use your device as a modem by connecting it to a compatible PC. For details, see the Nokia Ovi Suite documentation"
    Based on this I just bought a 6303i and wasted a morning trying to get the modem to work.  I can connect to it using Hyperterminal, interrogate it, find out what network it's connected to (AT+COPS), what the call quality is (AT+CSQ), but as soon as I type ATD [phone no] it returns ERROR.
    Why does AT+CSQ, +COPS etc work but ATD doesn't?

    nowadays, nokia phones which comes with computer compatibles(connectivity) and gprs enable, also can be used as a modem.
    I hope you are not typing your phone no. in atd command. it should be somewhat like *99#(contact your sp).
    to use your phone as a modem, no need to go such detail(but if for some reason you need).
    and there are lots of thread/topic on this forum
    hope someone add more input on this issue

  • Nextval('id_increment') doesn't work - why?

    sorry for crossposting this as i just joined and asked in the newbie section..
    I've got a main method as a driver to test a database insertion and in the line not working is -
    Customer c = new Customer (select nextval('id_increment'),"Mark","Jones");
    the error is to do with nextval...
    java.lang.Error: Unresolved compilation problem:
         Invalid character constant
    I've never used a database with java before and the line worked fine before I made the sequence. Inserting a 1 or 2 for example had worked fine before this.
    Any suggestions on where to look next would be appreciated. Thanks.

    main is just a simple test driver - the database accepts a sequenced integer, a string for name and a string for address...
    package week07;
    import java.sql.*;
    public class main {
         * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
    try {
         Customer c = new Customer (select nextval('id_increment'),"Mark","Jones");
         c.insertInDB();
         System.out.println("finished insertion");
    catch(SQLException ex)
    System.out.println("bugger");
    System.out.println();
    ex.printStackTrace();
    Customer.java are just getters and setters and constructor, I've addes an insert method I'm testing...
    package week07;
    import database.Database;
    import java.sql.*;
    * @author Steven Clark
    public class Customer {
         * @param args
         private int id;
         private String name, address;
         public Customer(int id, String name, String address) {
              super();
              // TODO Auto-generated constructor stub
              this.address = address;
              this.id = id;
              this.name = name;
         public String getAddress() {
              return address;
         public void setAddress(String address) {
              this.address = address;
         public int getId() {
              return id;
         public void setId(int id) {
              this.id = id;
         public String getName() {
              return name;
         public void setName(String name) {
              this.name = name;
    public void insertInDB() throws SQLException
              Database db = new Database();
              db.update("insert into customer values ('" + getId()
                        + "', '" + getName()
                        + "', '" + getAddress() + "')");
              db.disconnect();
    Finally, the table in postgreSQL is just those 3 fields - id with a sequence as primary key, a name and address. There's a sequence for id.
    I'm not sure where I've gone wrong and wonder if my syntax in teh main method calling nextval() is somehow wrong?

  • Line in red doesn't work, why?

    var nbTunes:Number = 43;
    var listeTunes:Array = new Array();
    var noTune:Number= 1;
    var max:Number = 43;
    var pick:Number = -1;
    var tune:Sound = new Sound(soundloader_mc);
    for (var i:Number = 1; i <= max; ++i)
    do{
      pick = random(nbTunes) + 1;
      trace(pick);
    while(! this.Available(pick))
    listeTunes.push(pick);
    trace (listeTunes);
    this.Play();
    tune.onSoundComplete= function(){
    Next();
    btnStop.onRelease= function(){
    tune.stop();
    btnPlay.onRelease= function(){
    tune.start();
    btnBack.onRelease= function() {
    BackTrack();
    btnNext.onRelease= function() {
    Next();
    function BackTrack(){
    if (noTune > 1){
      noTune-= 1;
    else{
      noTune= max;
    this.Play();
    function Next(){
    if (noTune < max)
      noTune+= 1;
    else{
      noTune= 1;
    this.Play();
    function Play(){
    this.WriteTune();
    var addZero:String = "" ;
    addZero.String = (noTune - 1) < 10 ? "0" : "" ;
    trace("addZero: " + addZero.String) ;
    tune.loadSound("Track No" + addZero.String + listeTunes[noTune - 1] + ".mp3", true); 
    function WriteTune(){
    trackNumber_txt.text = noTune + " / " + max;
    function Available(choice:Number):Boolean{
    var isAvailable = true;
    for(var j:Number = 0; j < listeTunes.length; ++j){
      if (listeTunes[j] == choice){
       isAvailable = false;
    return isAvailable;

    Thanks, it works now.
    I'm trying to learn ActionScript3 while finding snippets of code on Google to help me get started, but I guess I end up with code from earlier versions of ActionScript w/out my knowledge.  It's not easy for me to distinguish between the versions as I'm a novice at this.
    Example, in the following code, bigNum does have a dot to it even though it is just a regular variable.
    playbutt.addEventListener(MouseEvent.CLICK, playSound);
    function playSound(e:Event):void
    SoundMixer.stopAll();
    var num:Number = Math.ceil(Math.random()*43);
    bigNum.text = num < 10 ? "0"+String(num) : String(num);
    var path:String = "Track No" + bigNum.text + ".mp3";
    trace(path);
    var s:Sound = new Sound(new URLRequest(path));
    s.play();
    SoundChannel(1).addEventListener(Event.SOUND_COMPLETE, playSound);
    Ron

  • I have a iBook G3 and I'm trying to install OS X 10.4 but it doesn't work, why?

    I recieved my OS X 10.4.1 install discs today so I put disc into my iBook and rebooted it. As I did the apple logo appeared after the bong, no loading wheel appeared then a load of writing appeared. The last line said: "panic: We are hanging here...". At the top I noticed two error lines and they read: "Error: Extension archive doesn't contain software for this computer's CPU type." and
    "Error: Couldn't unpack multi-extension archive.". What does all of this mean and how do i fix it? If anyone needs more parts of the writing on the black screen I am willing to give it to you. Thanks

    Oh gosh, this is ancient history for me.
    First, I remember some sort of third party boot enabler being required to install OSX on some G3s.  Not sure if it included iBook. http://eshop.macsales.com/OSXCenter/XPostFacto/Framework.cfm?page=XPostFacto.htm l
    Second, which exact set of installer discs?  They have to be black colored retail discs, not grey ones which came with a specific model Mac and will only boot that model.
    What are the exact specifications of the computer?  Does it have sufficient RAM?  You're asking a lot for a G3 to run Tiger.

  • JSF 2.0 Beta1, simple example, doesn't work, why?

    I made a simple JSF 2.0 NetBeans (Web Application project) example. Only imported library jars are jsf-api.jar and jsf-impl.jar from mojarra-2.0.0-Beta1 release.
    These are files which I added:
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.xhtml</url-pattern>
        </servlet-mapping>
    </web-app>
    test.xhtml (example from DZone JSF 2.0 RefCard):
    <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:ui="http://java.sun.com/jsf/facelets">
         <h:head></h:head>
         <h:body>
              <h:form>
                   <h:outputText value="test" />
              </h:form>
         </h:body>
    </html>And that's it. There is no faces-config.xml, as it is not needed. There are no managed beans. JSF and Facelets plugins are disabled.
    When I try to deploy, a get an exception:
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at com.sun.faces.util.Util.loadClass(Util.java:200)
         at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:308)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:523)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:358)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:311)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:260)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:312)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:210)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
         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 org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: java.lang.ClassNotFoundException: com.sun.facelets.tag.jsf.ComponentHandler
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 39 moreI tried NetBeans versions: 6.5.1, 6.7-RC3 and 200906261401 Build. Tried with latest Apache-Tomcat and JBoss. It's all the same.
    What is the problem? Why it seeks for a facelets com.sun.faces.config.ConfigureListener, from conventional standalone facelets library? Shouldn't it use facelets classes from JSF 2.0 library?
    I tried to add facelets-1.1.15.B1 jar into project, just to see what happens, and the same exception is thrown ...
    Please help!

    It's because somewhere on your classpath there is a facelet-taglib.xml that's referencing Facelet 1.1.x classes which aren't present.

  • If I open my email server with firefox the autocomplete doesn't work. why?

    If I open my email server with Internet explorer I don't have this problem

    Thank you Alley!
    But still not working.
    I've just bought my Apple TV. I think it is impossible low battery and I tried to hold menu and left, but it didn't response again.
    When I press any buttom, the Apple TV LED doesn't flick. The light is just on... not flickering...
    Thanks again!
    Igor

  • Mini DisplayPort to DVI to VGA doesn't work (why?!)

    I purchased a Mini DisplayPort to DVI adaptor from eBay. It works just fine when connected to a DVI cable to a monitor, but there's no signal when I put a DVI to VGA adapter in-between to connect it to a VGA only display. I was hoping to use a single Mini DisplayPort cable to handle both DVI and VGA connections - am I missing something here?
    Here's an image of the connection path: http://img690.imageshack.us/img690/313/photors.jpg
    Thanks

    Someone on Twitter mentioned the Mini DisplayPort to DVI output is DVI-D only, which means the VGA adapter wouldn't receive an analogue signal to convert to VGA.
    Exactly correct. When you plug a DVI adaptor into mDP the port only sends out the digital signal. Likewise, when you plug a VGA adaptor into mDP the port sends only the analog signal. So using two adaptors in tandem is not possible. You need a separate adaptor for DVI and for VGA, unfortunately.
    --Travis

Maybe you are looking for

  • Saxophone and Trumpet

    Dear All, Newbie here, Just seeing if Saxophone and Trumpet Loops exist within Soundtrack Pro. Mine are greyed out. Thanks in advance for any help. Regards Chinmoku

  • How to install a certificate in OC4J

    Hi I want to connect a server from a java method in Jdeveloper (from local machine) using api which needs a certificate to be installed in the caller. I have installed the certificate in my machine by clicking the certficate file and clicking the Ins

  • Images do not load after XP SP3 install. IE works fine :-(

    I installed XP SP3 last night and now images do not load in web pages. Not all images do not load but Players photos on PGATOUR.com and item images on Ebay and item images on Amazon.com. You can click the images in Ebay you get a popup window with gr

  • How do I find and remove a spyware  that was placed on my iPod touch 4?

    HELP!!!! My ex has spy phoned my iPod touch 4, he is getting all my outgoing and incoming texts from Pinger. And he straight told me he did it. So how can I find this spyware and remove it?????

  • File.length issues

    I've been trying to make a terminal like program, but I've had issues detecting the file size. When I use file.length(), I get wildly different answers than use of the "du" unix command. Is this a bug in java? Mac OS X? Just me being an idiot? Thank