Mdadm RAID5 array errors

This week there was a power blackout at my town, which seems to have corrupted my RAID5 array. When I first booted my server, the array seemed normal. I could browse my folders at the machine, but when I tried to access them through samba from a Windows pc, it didn't show all files in the directories. After restarting samba, I finally tried rebooting the system, which is when the real troubles started.
After the reboot the array didn't get mounted at al and cat /proc/mdstat showed me:
Personalities :
md0 : inactive sde[0](S) sdc[3](S) sdb[2](S) sdd[1](S)
3907049984 blocks
mdadm --assemble --scan told me: mdadm: /dev/md0 assembled from 2 drives - not enough to start the array.
After some reading I tried mdadm --assemble --force /dev/md0 I got:
[root@htpc ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sde[0] sdb[3] sdc[2]
2930287488 blocks level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
unused devices: <none>
This made me think that /dev/sdd was kicked out of the array (like real RAID controllers do when a disk is not responding) so I tried to re-add it with mdadm --add /dev/md0 /dev/sdd which gave me a message stating that the disk was re-added to the array. It seemed like the array was rebuilding, given this /proc/mdstat output:
md0 : active raid5 sdd[4] sde[0] sdb[3] sdc[2]
2930287488 blocks level 5, 64k chunk, algorithm 2 [4/3] [U_UU]
[>....................] recovery = 0.0% (710784/976762496) finish=274.6min speed=59232K/sec
However, when I checked the array this morning, I got this:
[root@htpc ~]# cat /proc/mdstat
Personalities : [raid6] [raid5] [raid4]
md0 : active raid5 sdd[4](S) sde[0] sdb[5](F) sdc[2]
2930287488 blocks level 5, 64k chunk, algorithm 2 [4/2] [U_U_]
Can anyone tell me if my data is totally screwed, or would there be any way to get this array back to life?
The machine is running Arch x86_64, which I update weekly. The harddisks are WD Caviar Green WD10EACS.

(S) is spare, (F) is faulty.
[root@htpc ~]# mdadm --assemble --scan --force
mdadm: forcing event count in /dev/sdb(3) from 202 upto 208
mdadm: clearing FAULTY flag for device 3 in /dev/md0 for /dev/sdb
mdadm: /dev/md0 has been started with 3 drives (out of 4) and 1 spare.
[root@htpc ~]# mdadm --detail /dev/md0
/dev/md0:
Version : 0.90
Creation Time : Thu Dec 18 00:34:55 2008
Raid Level : raid5
Array Size : 2930287488 (2794.54 GiB 3000.61 GB)
Used Dev Size : 976762496 (931.51 GiB 1000.20 GB)
Raid Devices : 4
Total Devices : 4
Preferred Minor : 0
Persistence : Superblock is persistent
Update Time : Fri Apr 3 09:52:01 2009
State : clean, degraded, recovering
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1
Layout : left-symmetric
Chunk Size : 64K
Rebuild Status : 0% complete
UUID : 725ee0e7:c5d5778a:950b469e:87adda2c
Events : 0.208
Number Major Minor RaidDevice State
0 8 64 0 active sync /dev/sde
4 8 48 1 spare rebuilding /dev/sdd
2 8 32 2 active sync /dev/sdc
3 8 16 3 active sync /dev/sdb

Similar Messages

  • How to find which disk is faulty in a degraded RAID5 array? Then fix?

    (I already posted a question in an old RAID thread, but I was told people who know the answers don't read old threads... And I checked the Sticky.)
    My 4-disk RAID5 array (the K8N "PC1" machine) suddenly degraded today, and one disk is marked as faulty. The manuals aren't especially helpful in helping to find out which particular disk is faulty, and nothing is pointing out what kind of error it is, or what I should (safely) try...
    Here's from the Event Viewer:
    Quote
    The description for Event ID ( 7 ) in Source ( nvraid ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: .
    From MediaShield:
    nVidia reference boards have a "Disk Alert" utility showing the connector for the faulty disk, which seems like a good start (just follow the cable...). But it doesn't seem like the K8N has anything similar? That MediaShield picture doesn't at least make it 100% clear which of the disks is thrown out of the array.
    Samsung has a DOS program that can test their disks, boot from a floppy I guess. I will download that and see if I can pin-point the disk. But if not, how? And if I find which one is marked faulty, how to find out if it's really faulty or if there is a "glitch" in the RAID routine?

    <F10> at startup gets me into the MediaShield Utility, showing the degraded array.
    It gives info about the three disks in the array, and the one removed:
    Code: [Select]
    Adapt  Channel  Index
      1       0       0
      1       1       1
      2       0       2
      2       1       3 This indicates that the disk marked faulty indeed also is the one connected to the SATA connector with the highest number.
    So I guess I can try removing that disk and see if the machine still starts up, then temporarily put in a 500GB disk I have in an ESATA box (not containing anything useful). Then rebuild the array (for a couple of days?), then try testing the faulty-marked disk with the Samsung HUTIL program.

  • Can you "expand" a RAID5 Array?

    I had another post earlier about not being able
    to hook up a 2.73TB RAID5 Array to a win2k file server
    so I'm using a 1.82TB RAID5 Array with disks 6 and 7
    on a bank being idle.
    Now can I add disk 6 and 7 to the 1.82TB Array and
    get a full 2.73TB Raid5 array without deleting
    the original array?
    I'm inclined to think no, but wanted to make sure.
    Thanks,
    Tadashi

    Cool, I found the expansion function on RAID Admin
    The problem with the 2 TB limit on win2k server might be resolved with one of two ways:
    upgrade to win2k3 or
    since the IBM x335 hw is ~4 years old, a newer x336 hw
    may be able to handle >2TB volumes
    I'm not really sure if the 2TB vol limit is OS related
    or hw (MotherB, Bios, HBA) limitation so I'll probably
    just to do some trial and error. I'm finding stuffs
    pointing both ways on the internet.
    But your point about HFS+ not supporting volume expansion also means that ntfs probably will not either.
    bummer, but more reasons to go to some type of SAN.
    Thanks for your help,
    Tadashi

  • Adding a pre-existing RAID5 array

    I'm running a solaris file server. I'm booting solaris off of a single disk and then have a RAID5 array across three disks for my data. I removed the disk that solaris was on, put in an empty hard drive and installed solaris again.
    My Question: How can I add my RAID5 array from my previous solaris install while keeping my data?

    Ok, so I ran metastat -p on the old install and got
    d0 -r c3d0s2 c1d0s2 c4d0s2 -k -i 32b
    Meaning that the name is d0, the disks it's on are
    c3d0s2 c1d0s2 c4d0s2 with an interlace size of 32b
    Assuing my disks are named the same thing on the new
    solaris install (they should be) I just feed that
    line there to metainit? As long as you have SVM configured on the machine, yes.
    Edit Final: Tried metainit, got the following
    metainit: pbfs01: there are no existing databasesThen you haven't set it up yet. You need to create metadevice replicas somewhere. They can be on the boot disk somewhere or on the array. It doesn't matter.
    The location of the old ones on the other machine would be shown by 'metadb'.
    If they were on the array, you can use the same location. When you do that, it will overwrite the old replicas.
    Once done, the 'metainit' command will work.
    Darren

  • Associative Array error

    I am using a couple associative arrays in my code and comparing the data in one, and if it is an asterisk, I change it to use the data in the other. Here is the meat of my code. I am running into an error at the bolded line saying I have too many values, which I don't understand because the code is the exact same as the block of code right before it where I populate the first array. FYI, the table it is pulling from only has one row. The error is listed below the code.
    Code
    DECLARE
    TYPE refresh_file_t IS TABLE OF test.loading_dock%ROWTYPE ;
    refresh_data refresh_file_t ;
    prospect_data refresh_file_t ;
    TYPE CV_TYPE IS REF CURSOR ;
    c_id CV_TYPE ;
    v_id NUMBER(10) ;
    v_phone VARCHAR2(10) ;
    v_project VARCHAR2(10) ;
    BEGIN
    OPEN c_id FOR
    'SELECT id
    FROM test.loading_dock
    WHERE rownum = 1' ;
    LOOP
    FETCH c_id INTO v_id ;
    EXIT WHEN c_id%NOTFOUND ;
    SELECT * BULK COLLECT
    INTO refresh_data
    FROM test.loading_dock
    WHERE id = v_id ;
    SELECT * BULK COLLECT
    INTO prospect_data
    FROM test.prospects
    WHERE id_number = v_id ;
    IF refresh_data(1).home_phone = '*' THEN
    v_phone := prospect_data(1).phone ;
    ELSE
    v_phone := refresh_data(1).home_phone ;
    END IF ;
    DBMS_OUTPUT.PUT_LINE(v_phone) ;
    END LOOP ;
    CLOSE c_id ;
    END ;
    Error
    ORA-06550: line 29, column 13:
    PL/SQL: ORA-00913: too many values
    ORA-06550: line 27, column 13:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 34, column 46:
    PLS-00302: component 'PHONE' must be declared
    ORA-06550: line 34, column 13:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"

    Collection prospect_data is of type refresh_file_t, which is a table of records of test.loading_dock%TYPE. Most likely tables test.loading_dock and test.prospects have different structure - test.prospects has fewer columns. So when you try to fetch from test.prospects into prospect_data you get the error Try replacing
    prospect_data refresh_file_t ;with
    TYPE prospect_data_t IS TABLE OF test.prospects%ROWTYPE ;
    prospect_data prospect_data_t ;SY.

  • ODI-40406: Bytes are too big for array error

    Hello ,
    I am trying to load a flat file from a table. I am working on ODI 11G.
    Following are performed.
    Staging area different from SOurce is checked.
    IKM used is : IKM SQL to File Append
    Truncate is True
    No LKM is used.
    I am getting following error:
    java.lang.IllegalArgumentException: ODI-40406: Bytes are too big for array
    create header (RECORDTYPE,
    ASSIGN_NUM,
    USR_ID,
    START_TIME,
    JOBCODEID,
    AISLE_AREA_ID,
    PLANE_DATE,
    CLIENT_ID,
    CSTNUM,
    WH_ID)
    /*$$SNPS_START_KEYSNP$CRDWG_TABLESNP$CRTABLE_NAME=UNITIME TO RPSNP$CRLOAD_FILE=C:\Program Files\ODI_BI_APPS/UNITIME TO RP.txtSNP$CRFILE_FORMAT=FSNP$CRFILE_SEP_FIELD=0x0009SNP$CRFILE_SEP_LINE=0x000D0x000ASNP$CRFILE_FIRST_ROW=0SNP$CRFILE_ENC_FIELD=SNP$CRFILE_DEC_SEP=SNP$CRSNP$CRDWG_COLSNP

    There is a possibility of mismatch of datatype, that can cause the problem.
    Say in ODI model, you have defined a 'Date type' field to be stored as 'String' however at the time of mapping in 'Interface', no conversion happens (from date to string)  for this particular object. This causes the problem.
    The original query remains valid at DB side (fires for datetype) however fails while integrating (anticipating String which may be longer than defined in modelbecause of your NLS setting in DB). Therefore the best way would be to apply conversion for that particular field (in this case, use TO_CHAR(Date type,'Desired Date Format').

  • Adf input complex arrays error

    I have web service that contains array of complex type as input. I want to invoke web service from jspx page using adf. I have added web service data control and followed this guide [http://www.oracle.com/technetwork/developer-tools/adf/learnmore/54-ws-complex-input-type-169197.pdf] to add input form into jspx page, But I have table for array input. In PageDef.xml page, I have updated NDValue according to the pdf tutorial, now it is
    <NamedData NDName="refSys"
    NDValue="#{bindings.theIterator.currentRow.dataProvider}"
    NDType="java.lang.Object[]"/>
    But, when ever I click on submit button it gives following error:
    Cannot create an object of type:[Ljava.lang.Object; from type:java.util.HashMap
    How can I cope with this problem?
    I am using JDeveloper 11gR1.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hi,
    with respect to my previously posted thread, its hard to understand that oracle does not support complex type arrays,
    let me rephrase the question again :
    I have a complex type as the following:
    <xs:complexType name="updateRefSys">
    <xs:sequence>
    <xs:element name="id" type="xs:string" minOccurs="0"/>
    <xs:element name="refSys" type="tns:refSys" minOccurs="0"
    maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="refSys">
    <xs:sequence>
    <xs:element name="pltfrm" type="xs:string" minOccurs="0"/>
    <xs:element name="custNo" type="xs:string" minOccurs="0"/>
    <xs:element name="ExtSys" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    It contains a refsys which is a complex type which may contain zero or many elements, this complex type is an input to my web service, what I need to know is that how can i copy rows from adf table into this complex type so that I may pass this parameter to the web service.

  • Consume web service I get an unable to cast array error?????

    Hi All,
    I do not know what I have done but I am getting the following error?
    Error(24,30): cannot cast array webserviceproj2.proxy.Employee[] to interface java.util.List&lt;webserviceproj2.proxy.Employee&gt;
    Here is my Scenario
    Project 1
    I have a Project which contains One class that was generated by Toplink "Employees" I have a Map with a few queries
    I Create a Java Service Facade to test and everything works fine...
    I create a session bean with a Remote, Local and Web service endpoint which generates the deploy file for me.
    I Deploy to Oracle AS 10.1.3 and test the web service. Again all is working so far.
    Project 2
    I Create an empty project and add a web service proxy, I use the WSDL from the deployed Session Bean to generate all the files. So far I have added no code.
    I create a test class. One of the methods should get a list of Employees from the web service so I can loop through the list to prove it's working, this is where it fails. For some reason findEmployees is returning a type of Employee[] rather than a List&lt;Employee&gt; which is what should be returned?
    Can anyone please help????
    List&lt;Employee&gt; emps = (List&lt;Employee&gt;)port.findEmployeesByName("Jeremy","");
    for(Iterator i = emps.iterator(); i.hasNext();)
    Employee emp = (Employee)i.next();
    System.out.println(emp.getFirstName());

    JungleTaxi Cabbie wrote:
    Csound1: iCloud: Configuring Mail with Mac OS X v10.6 or iOS 4
    Enter your Incoming Mail Server, User Name, and Password using the following settings:
    Incoming Mail Server: mail.me.com
    User Name: Your iCloud email address (excluding @me.com)
    Password: Your password
    Last Modified: Jun 27, 2013
    Maybe you should test these things before calling people out, because these settings do function perfectly well.
    iCloud is not supported on Snow Leopard or lower, why bother to mention it?
    The OP has an iCloud account, and that can not be opened without Lion or Mountain Lion (on a Mac), IOS5 or 6 (on an iPhone/iPad)
    The document I linked to is Apples documentation for iCloud on current devices,I don't care whether you believe that you know better than they do, but it will affect the people who follow your advice as it won't work
    JungleTaxi Cabbie wrote:
    Also, if you're not running Lion or Mountain Lion, there is no "Mail, Contacts & Calendars" prefpane.
    I never said that there was, perhaps you imagined it.

  • Wierd Array Error

    So I was making a simple selection sort program that would read in an array and then sort it using the aforementioned method and received a very strange error. I have made similar programs before and never encountered this error and cannot find what has went wrong. Any assistance is appreciated. Here is the code and error.
    import java.util.Scanner;
    public class Q1assignment5
    public static void main (String[] args)
    int i, j, N = 0;
    int [] a = new int[N];
    Scanner keyb = new Scanner(System.in);
    System.out.print("Enter the number of integers you want in the array");
    N = keyb.nextInt();
    System.out.println ("Enter the integers to be sorted: ");
    for (i=0;i<a.length;i++)
    a[i] = keyb.nextInt();
    System.out.println ("The array sorted looks like this: ");
    for (i=0;i<N;i++)
    for (j=(i+1);j<N;j++)
    if (a> a[j])
    int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
    for (i=0;i<N;i++)
    System.out.print (a[i] + " ");
    And the out put/error
    --------------------Configuration: <Default>--------------------
    Enter the number of integers you want in the array 6
    Enter the integers to be sorted:
    The array sorted looks like this:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
    at Q1assignment5.main(Q1assignment5.java:29)
    Process completed.
    It is skipping the assignment loop so I believe the problem is located in the first for loop, but cannot see where.
    Edited by: BinaryReaper on Nov 25, 2008 7:06 PM
    Edited by: BinaryReaper on Nov 25, 2008 7:13 PM

    Here is the Exact error
    "Cannot find symbol variable N" that is shown 5 times on line 19 20 25 27 37
    import java.util.Scanner;
    public class Q1assignment5
      public static void main (String[] args)
           int i, j;
        Scanner keyb = new Scanner(System.in);
        System.out.print("Enter the number of integers you want in the array");
        N = keyb.nextInt();
        int [] a = new int[N];
        System.out.println ("Enter the integers to be sorted: ");
        for (i=0;i<a.length;i++)
         a[i] =  keyb.nextInt();
        System.out.println ("The array sorted looks like this: ");
        for (i=0;i<N;i++)
          for (j=(i+1);j<N;j++)
               if (a> a[j])
         int temp = a[i];
    a[i] = a[j];
    a[j] = temp;
    for (i=0;i<N;i++)
    System.out.print (a[i] + " ");
    }Edited by: BinaryReaper on Nov 25, 2008 7:55 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • UISelectMany :  must be of type List or Array (ERROR with rich:pickLisT )

    Hi
    I have a problem with my <rich:pickList> I can't display the items. When executing the application I got the following error:
    java.lang.IllegalArgumentException: ValueBinding for UISelectMany :  must be of type List or Array
            at org.richfaces.utils.PickListUtils.findUISelectManyConverter(PickListUtils.java:59)
            at org.richfaces.utils.PickListUtils.findUISelectManyConverterFailsafe(PickListUtils.java:79)as the error message the selectItems is not a List but it is I can't understand.
    I transmit to you my backing bean
    @Stateful
    @Name("adminAction")
    @Scope(ScopeType.SESSION)
    public class AdminActionBean implements AdminActionLocal {
    @In(required=false)
       private List<String> customersChoice;
    @Out(required=false)
       private List<String> companyNames;
    @Factory("companyNames")
       public void selectCompanyNames(){
           setCompanyNames((List<String>) getEm().createQuery("select c.companyName from Customer c")
                        .getResultList());
    //getter() and settter...... my .xhtml page
    <rich:pickList id="customersChoice" value="#{customersChoice}">
                        <f:selectItems  id="companyNames" value="#{companyNames}" />
              </rich:pickList>Have you got any Idea. thanks for help
    regards
    bibou

    You might look up the SelectItem, as the value parameter for a f:selectItems must be a List<SelectItem>. Each SelectItem has both a value and a label.
    Or, you could use Tomahawk's t:selectItems which uses a more dataList-style attribute set to allow you to have the value be any List, and you can select items in the List's node to be the Label and the Value of the select option.
    Look em up, they're useful.

  • Can't write to one array - error -50

    I have an XServe RAID with a 7 disk 3TB RAID 5 volume on one side and a 4 disk 1.2TB RAID 5 volume on the other side. I am suddenly no longer able to write to the 3TB volume. The smaller volume works fine. The same error (-50) occurs from a client trying to access their files via AFP as well as directly in the finder on the server. Any ideas as to what might cause this and how to go about fixing it?
    Disk util etc. don't show any errors.
    Thanks,
    Miles
    XServe G4 dual 1.33, 2GB RAM, Apple Fibre card and cables (optical, I think).

    Hey Miles,
    I've found errors to pop up when a drive or a controller starts to go sour... naturally, controllers failing is almost underheard of (but it does happen) so always best to make sure its a drive acting funny first. Of course if the drive isnt yellow or red, apple wont really help you.. here's a way to see if a drive is the case and if so, how to speed up the process to make it trigger yellow or red:
    Go to Raid Admin
    Go to the drive conditioning option ( i believe this is raid admin 1.5 only)
    start conditioning on the array in question and let it go...
    You should see all the drives go blue.
    First way to check is to see if any errors start popping up in raid admin (and apple would help you from there)
    Second way to check is to see if one of the drive's blue LEDs is acting funny (stays solid all the time, blinks out of sequence with the other drives, etc)
    If those happen, chances are that drive's gonna go soon and either a colored light or an error is more than enough for applecare to replace it if you have warentee/applecare.

  • Array error!!

    Hello all!!  I am using CR 2008.  I am working on a subreport that will get scores passed to it from a string variable in the main report.  The string will look like this: "94.296.093.893.892.0"
    The scores come from a formula in the main report "Value RT".  Here is the formula:
    shared valuert as string
    valuert = ToText({@FactorAvg1}) + "^" + ToText({@FactorAvg2}) + "^" + ToText({@FactorAvg3}) + "^" + ToText({@FactorAvg4}) + "^" + ToText({@FactorAvg5})
    formula = valuert
    I then created a subreport link against "Value RT" that created a parameter in my subreport named "Pm-@Value RT".
    I then created a formula in my subreport named "Display Array" with this formula:
    tonumber(split({?Pm-@Value RT}, "^")[recordnumber+1])
    What I am wanting to do is create a graph against these numbers.  I have created a record filter that brings back 5 records to match the number of scores.  This will never change, there will always be 5 scores even if some of them are "0.0".
    When I try to run the subreport all by itself and put in the 5 "scores" in the parameter i get an error in my "Display Array" formula of "A subscript must be between 1 and the size of the array."  I have Googled this error but I can't find anything that will help me.
    Does anybody have any ideas?

    I had just figured this out this morning but thanks for the post.  It was the [RecordNumber+1] that was causing the problem.
    I substituted that with the field that gave me the five points and it now works perfectly.  Here is the new code:
    tonumber(split({?Pm-@Value RT}, "^")[{TJG_Survey_CSS.Response_Number}])

  • Oracle.sql.ARRAY error "Non supported character set: oracle-character-set-"

    Hi Folks,
    I am getting error :
    java.sql.SQLException: Non supported character set: oracle-character-set-178
    at oracle.gss.util.NLSError.throwSQLException(NLSError.java:46)
    in the following code :
    Object[] arrayToPassToDB=new Object[7];
    ArrayDescriptor arraydesc = ArrayDescriptor.createDescriptor(arrayDesc,con);
    ARRAY array = null;
    array = new ARRAY(arraydesc, con, arrayToPassToDB);
    i am using jdk1.6 and oracle 10g.
    I have copied the orai18n.jar and ojdbc6.jar in WEB-INF\lib directory of my project and also in the Tomcat\lib directory.
    can you please help me?
    Thanks in advance.

    java.sql.SQLException: Non supported character set:oracle-character-set-178

  • Creating Button Array Error

    Rookie here, I'm attempting to create a button array but I get the following errors:
    import javax.swing.*;
    import java.awt.*;
    import java.text.*;
    public class CreateButtonArray extends JFrame{
         public static void main(String[] args){     
              CreateButtonArray calcPad = new CreateButtonArray();
              calcPad.setVisible(true);
         public CreateButtonArray(){
              super("Calculator");
                   setSize(200, 300);
                   setResizable(false);
                   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   setLayout(new BorderLayout());
                   JPanel numPad = new JPanel();
                   numPad.setLayout(new GridLayout(4, 4, 5, 5));
                   add(numPad.CENTER);
                   private static final String[] buttons = {  // CreateButtonArray.java:23: illegal start of expression
                       "7", "8", "9", "/",
                   "4", "5", "6", "*",
                   "1", "2", "3", "-",
                   "0", "CE", "C", "+"
                   private static final JButton [] calcButtons = new JButton[buttons.length];
                        for(int i = 0; i < buttons.length; i++){  // "for" <-- CreateButtonArray.java:34: illegal start of type
                             JButton b = new JButton(buttons); // buttons.length; <-- CreateButtonArray.java:34: > expected
                             calcButton[i] = b;                              / i++; <-- CreateButtonArray.java:34: <identifier> expected
                             numPad.add(calcButton);                         //
    }//CreateButtonArray.java:41: class, interface, or enum expecte

    Thank you, AnanSmriti . See I told you I was a rookie. During my travel back home today I read up on Methods and Arrays. It seems I fix (with the forums feedback), I find another one. Here is my latest error. Again, thanks all for your assistance. This is very educational.
    Error: CreateButtonArray.java:40: cannot find symbol
    symbol : method add(javax.swing.JButton[])
    location: class javax.swing.JPanel
    numPad.add(calcButton);
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JButton;
    import java.awt.*;
    import java.text.*;
    public class CreateButtonArray extends JFrame{
         public static void main(String[] args){     
              CreateButtonArray calcPad = new CreateButtonArray();
              calcPad.setVisible(true);
         public CreateButtonArray(){
              super("Calculator");
                   setSize(200, 300);
                   setResizable(false);
                   setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                   setLayout(new BorderLayout());
                   JPanel numPad = new JPanel();
                   numPad.setLayout(new GridLayout(4, 4, 5, 5));               
                   String[] buttons = { 
                       "7", "8", "9", "/",
                   "4", "5", "6", "*",
                   "1", "2", "3", "-",
                   "0", "CE", "C", "+"
                   add(numPad);
                   JButton [] calcButton = new JButton[buttons.length];
                        for(int i = 0; i < buttons.length; i++){ 
                             JButton b = new JButton(buttons);
                             calcButton[i] = b;                                   
                             numPad.add(calcButton);     //Error is here

  • Array error Ljava.lang.string;@3e25a5

    Hi,
    I have the following code, but it doesn't print anything, except the error "Ljava.lang.string;@3e25a5." The code compiles without any errors.
    class Array {
    public static void main (String[] arg) {
         String[] CharArray = {"I am stuck."};
         System.out.println (CharArray);     
    Thanks, in advance.

    That's not an error message. That's the kind of thing that arrays output when their toString method is called. If you pass an object (like an array) to the println method of PrintStream (that's what System.out is) it calls the object's toString method.
    If you want to print a nicely formatted array, use java.util.Arrays.toString. Like this:
    import java.util.Arrays;
    class Array {
      public static void main (String[] arg) {
        String[] charArray = {"I am stuck."};
        System.out.println (Arrays.toString(charArray));
    }By the way, you should follow Java naming conventions. Local variables, non-constant fields, and method names should start with a lower-case letter.

Maybe you are looking for

  • How to connect an acoustic electric guitar to macbook pro

    whats to best way to use an acoustic electric guitar with garage band without a buying additional gear, macbook pro. thanks

  • Short Dunp While Creating a BP - Awarded points

    Hello Guru's, We have Implemented Accounts & Contact Magt in SAP CRM 4.0. I got a Ticket saying - An Account (BP) has created just and While Creating Contact person to the above Account they found a Short Dump. 500 SAP Internal Server Error Err Msg:

  • Lightroom Noise reduction versus DPP

    I have been playing with DPP for al little while because the EOS 50d wasn't supported until a few days ago. DPP has some kind of intelligent support of NR depending on the ISO of the photo. If I analyzed it whell it is supporting the NR level of the

  • LMS 3.1 Baseline Template Fails

    NEED HELP! :-) I made a baseline template that basicaly says: If you encounter an interface with a vlan24, apply a port-security mac-address sticky command. TEMPLATE FOLLOWS: In Conditional Block's SUBMODE: interface [#.*Ethernet.*#] CLI Command (of

  • No cursor when waking, can see log on screen and wallpaper (non retina)

    Hi everyone Just made the jump from Windows to Mac and am loving it! However, occasionally when waking my MBP's screen will show the password box and the wallpaper, but no cursor. It's super frustrating as I can't log on. It doesn't happen every time