Error : Array constants can only be used in initializers

Hello All,
I am using tableview model and declared two-dimensional array.
Getting error Array constants can only be used in initializers in the line retVal<i>[j] =  {  {  createBy,desc,dispName }  };
String[][] retVal;
retVal = new String[20][20]
//Fetching IResorce propeties here
int resourceCounter = 0;
for (int i = 0; i < list.size(); i++) {
   for (int j = 0; j < i; j++) {
      IResource ir = list.get(i);
      createBy = ir.getCreatedBy();
      desc = ir.getDescription();
        dispName = ir.getDisplayName();
     retVal<i>[j] =  {  {  createBy,desc,dispName }  };
     resourceCounter++;
return retVal;
Please help me out.
Thanks
Risha                              }

I created ArrayList 
static public String[] colnames =
               "News Title",
               "Short Description",
               "Published",
               "Valid To",
               "Read Count",
               "Users Details",
               "Reply" };
     public ArrayList createData() {
           ArrayList rowArrList = new ArrayList();
          ArrayList tableArrList = new ArrayList();
          String createBy = null;
          String desc = null;
          String dispName = null;
          String lastMod = null;
          String name = null;
          String resType = null;
          try {
               com.sapportals.portal.security.usermanagement.IUser user = null;
               user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
               IResourceContext resourceContext = new ResourceContext(user);
               String path = "/documents/Australia/News";
               RID rid = RID.getRID(path);
               com.sapportals.wcm.repository.IResource res =
                    ResourceFactory.getInstance().getResource(rid, resourceContext);
               IProperty prop = null;
               String propValue = null;
               PropertyName propName = null;
               if (res != null) {
                    if (res.isCollection()) {
                         ICollection collection = (ICollection) res;
                         IResourceList list = collection.getChildren();
                         int resourceCounter = 0;
                         for (int i = 0; i < list.size(); i++) {                              
//                              for (int j = 0; j < i; j++) {
                                   IResource ir = list.get(i);
                                   createBy = ir.getCreatedBy();
                                   desc = ir.getDescription();
                                   dispName = ir.getDisplayName();
                                   lastMod = ir.getLastModifiedBy();
                                   name = ir.getName();
                                   resType = ir.getResourceType();
                                   rowArrList.add(createBy);
                                   rowArrList.add(desc);
                                   rowArrList.add(dispName);
                                   rowArrList.add(lastMod);
                                   rowArrList.add(name);
                                   rowArrList.add(resType);
                                   tableArrList.add(i,rowArrList);
                              //}//Inside for loop
                         }//First for loop
                    }//Inside If
          } catch (ResourceException e) {
               // TODO Auto-generated catch block
               response.write("Error " + e.getMessage());
          } catch (UserManagementException ex) {
               ex.printStackTrace();
               response.write("Error " + ex.getMessage());
          return tableArrList;
      * Constructor.
     public TableViewBean() {
          ArrayList tabArr = createData();
          String[][] data = (String[][])tabArr.toArray();          
          model = new DefaultTableViewModel(data, colnames);
Edited by: Risha on May 26, 2011 8:52 AM

Similar Messages

  • ASP Web Forms Error: Session state can only be used when enableSessionState is set to true

    Hello,
    I am developing a custom application page for a custom Web Forms I am creating, which I plan on using for custom task form into SharePoint 2010 Foundation.
    Currently, I am trying to test it in Debug Mode using Visual Studio 2010 but when I am trying to use Sessions I get the error:
    Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration>\<system.web>\<httpModules> section in the application configuration
    I've already done this on trying to fix:
    On my page
    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="TestForm.aspx.cs" Inherits="TestForm" EnableSessionState="True" %>
    And on my web.config
    <pages enableSessionState="true">..<httpModules>
    <remove name="Session" />
      <add name="Session" type="System.Web.SessionState.SessionStateModule, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </httpModules>
    Note: I am getting an error when I try to add <module> into web.config
    ASP .NET State Service is currently running.
    And the part where it keeps error is when in PageLoad, I try to set a List object something like this:
    List<object> myobject
    get
    if (Session["object"] == null)
    Session["object"] = new List<object>();
    return Session["object"] as List<object>;
    set
    Session["object"] = value;
    protected void Page_Load(object sender, EventArgs e)
    myobject= new List<object>();
    BUT the error still persists! I also try to restart IIS but still the error still happens.
    I am running out of ideas so can you help me out?
    Thank you!

    Could be your skype intercepting your requests at 80 port, in Skype options uncheck
    Or Your IE has connection checked for Proxy when there is no proxy
    Or your fiddler could intercept and act as proxy, uncheck it!
    Solves the above problem, It solved mine!
    HydTechie
    HydPhani

  • AIR 3.8.0.440 / iOS: build fails with "ld: -pie can only be used when targeting iOS 4.2 or later"

    With AIR 3.8.0.440, iOS build with "adt -package -target ipa-ad-hoc" fails with a linker error:
    ld: -pie can only be used when targeting iOS 4.2 or later
    What's the correct option to suppress this error or does it need a fix for adt?
    In the app.xml,
    <key>MinimumOSVersion</key>
                <string>5.0</string>
    is already present in the iPhone InfoAdditions section.
    (Building the same app with AIR 3.8.0.370 is fine)

    Hi,
    Can you make sure that both your old ane and new ane are not present in your extensions directory.
    Also, how are you zipping/unzipping the ANE?
    If you are on a Mac, try these steps on the terminal:
    1) Create a new temp directory, say temp (mkdir temp)
    2) cd temp
    3) Copy the ane you need to make changes to into this directory.
    4) unzip nameofane.ane
    5) rm nameofane.ane
    6) Make changes to the platform.xml file using a text editor or vim
    7) cd to the temp directory again, (if you are now elsewhere)
    8) zip -r nameofane.ane .
    9) Copy the ane file created into your extensions directory, where you have placed the other extensions and then, package the IPA using adt.
    If you are on Win,
    1) Rename the .ane to .zip
    2) Extract the contents of .zip
    3) Make changes to platform.xml and save it.
    4) Go back to the directory where you extracted the files, select all the folders/files and right click to zip them back.
    5) Rename the .zip to .ane and then, package the IPA.
    It should work.

  • Re:  "Item category K can only be used without account assignment"

    Hi,
    while creating PO from PR the following error is coming.
    "Item category K can only be used without account assignment"
    How to solve this
    Regards,

    Hello,
    Item category K cannot be used with an account assignment as the goods are not physically used in the company. The stock is stilla consignment stock and belongs to vendor. Using an account assignment will book the cost in the company's expenses.
    use an account assignment if required when you transfer from consignment to own stock.
    Hope this helps,
    Regards,
    VS

  • Condition type PR00 can only be used once

    Hi Experts,
    Im faced with a strange problem. Request your help in resolving it.
    I tried to create my own pricing procedure by copying from RVAA01. Then i deleted all the steps and created my own steps. But when im trying to save the document, it says PR00 can only be used once. I deleted this condition type and tried to save it, it again says K004 can only be used once. Even after deleting all the earlier conditions which i copied from RVAA01, why am i getting this error.
    Your help is most appreciated.
    Warm regards,
    Sarat.

    You have deleted a row (i.e. condition type, say PR00).
    After that click icon "Save".
    Then when you create condition type PR00, system shall accept it.
    Currently, you are deleting a condition type (PR00) but it is still "in memory" of the pricing procedure. You can not create the same condition type more than once in a pricing procedure. Therefore you can not create PR00 again & you are getting the error message.
    First remove PR00 from the memory of the pricing procedure by clicking "Save", & then you can re-enter the same cond type.

  • Item category S can only be used with account assignment category

    Hello Gurus,
    When i tried to create a PO then error "Item category S can only be used with account assignment category" is coming
    for my plant and material.
    Could you please tell me where i have to maintain the setting of account assignement for a plant or material.
    In TA:-OMG0 item catergory S is maintained for a account assignement F but still this issue is coming.
    I think there is a problem in plant or a material.
    Please help me.
    BR

    Hi,
    How you are creating PO  ,so that you have error "Item category S can only be used with account assignment category"
    Check what t.code used for your PO creation and what document type used for your PO creation- which result defaulting item category S which in turn asking for  with account assignment category.
    Cross check transaction variant or screen variant used for your PO creation!
    Regards,
    Biju K

  • SubmitGenerateReportAsync Issue. Await operator can only be used with Async Method

    Hi,
    I am trying to submit a request to download keyword performance report using following .
     var reportId =await SubmitGenerateReportAsync(reportRequest); its giving me error 
    The 'await' operator can only be used within an async method. Consider marking this method with the 'async' modifier and changing its return type to 'Task'.
    Here is the SubmitGenerateReportAsync method. I am already using async in definition. Not sure what else is wrong.
     private async Task<string> SubmitGenerateReportAsync(ReportRequest report)
                var request = new SubmitGenerateReportRequest
                    ReportRequest = report
                return (await Service.CallAsync((s, r) => s.SubmitGenerateReportAsync(r), request)).ReportRequestId;
    Same issue with PollGenerateReportAsync
     reportStatus =await PollGenerateReportAsync(reportId.ToString());
      private async Task<ReportRequestStatus> PollGenerateReportAsync(string reportId)
                var request = new PollGenerateReportRequest
                    ReportRequestId = reportId
                return (await Service.CallAsync((s, r) => s.PollGenerateReportAsync(r), request)).ReportRequestStatus;
    Let me know if its easy fix.

    I fixed the link to our
    code example which shows how to run such a report from the console. You would create async methods, run, and wait from within Main.
    /// <summary>
    /// The entry point for the console application.
    /// </summary>
    /// <param name="args">Arguments are not required for this example.</param>
    public static void Main(string[] args)
    var example = new KeywordPerformance();
    Console.WriteLine(example.Description);
    try
    var authentication = new PasswordAuthentication(
    "<UserNameGoesHere>",
    "<PasswordGoesHere>");
    // The OAuthHelper class is available for download with the BingAdsExamples solution.
    // OAuthDesktopMobileImplicitGrant authentication = await OAuthHelper.AuthorizeImplicitly();
    var authorizationData = new AuthorizationData
    Authentication = authentication,
    CustomerId = <CustomerIdGoesHere>,
    AccountId = <AccountIdGoesHere>,
    DeveloperToken = "<DeveloperTokenGoesHere>"
    example.RunAsync(authorizationData).Wait();
    catch (Exception ex)
    Console.WriteLine(ex.Message);
    Best regards,
    Eric

  • Problem with ANE - "ld: -pie can only be used when targeting iOS 4.2 or later"

    I'm trying to compile a simple AIR Mobile app for iOS, incorporating an ANE to support Localytics
    http://flashsimulations.com/2012/06/18/localytics-adobe-air-native-extension/
    Compilation fails with the message "ld: -pie can only be used when targeting iOS 4.2 or later"
    Surely 7.0 is later than 4.2! (I'm using Flex 4.6 - AIR 3.9 SDKS). Tried building with FDT and with Flash CC, and against earlier versions of the iOS SDK (6.0, 5.0).
    Any suggestions?

    thanks, but can you be more specific? Presumably I add something in this part:
        <iPhone>
            <InfoAdditions><![CDATA[<key>UIDeviceFamily</key>
                                                  <array>
                                                      <string>1</string>
                                                      <string>2</string>
                                                  </array>
                                                  <key>UIStatusBarStyle</key>
                                                  <string>UIStatusBarStyleBlackOpaque</string>
                                                  <key>UIRequiresPersistentWiFi</key>
                                                  <string>YES</string>]]></InfoAdditions>
            <requestedDisplayResolution>high</requestedDisplayResolution>
        </iPhone>

  • GroupLayout can only be used with one Container at a time

    Dear all,
    I am a beginner so please don't throw rocks at me...
    I have created two frames with NetBeans. One is the main frame (extends from JPanel) and the other frame I put it to be started when pressing a button from the main frame (the second frame extends from JFrame). Both frames are created using the designer in NetBeans, so the code for creating the GUI is automatically generated by NetBeans, so both frames use the same layout (GroupLayout).
    Here is the code of the button from the main frame to start the second one:
    private void manageCustomersActionPerformed(java.awt.event.ActionEvent evt) {                                                
            // TODO add your handling code here:
            CustomerGUI custGUI1=new CustomerGUI();//CustomerGUI is the second frame
            custGUI1.setVisible(true);
    }When I press this button from the main frame I get this runtime exception: Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: GroupLayout can only be used with one Container at a time. The second frame is not opened.
    How should I handle this?
    What I want to do: I want to have a main frame, from which I can start additional ones (the main frame must be always opened, while the additional ones can be closed after performing certain actions). I read a little about internal frames and I think this can be a solution, but I must edit the existing design...
    Thank you
    With respect,
    Don
    Edited by: don1983p on Dec 16, 2008 2:21 AM

    AndrewThompson64 wrote:
    There are those that maintain that JFrame should never be extended. I am not convinced, but most cases where a JFrame is extended would be better coded as simply configuring the JFrame within the main(). GUI builders such as found in NetBeans seem to extend JFrame as a matter of course.I too am not rigorous or religious about this either, but try to adhere to this as a matter of practicality and convenience, I find that if I don't extend a JComponent but rather use composition rather than inheritance, it's much easier to use objects of my class when programming in Eclipse. For instance in Eclipse (and in most IDEs), if I type my object name and then a period, it will show all of the method's available for me to use on this object. If I subclass JPanel or JFrame, I'll see a gazillion methods most I don't want to see, and thus most are clutter. On the other hand if I use composition, I'll only see a small number of methods and these will be only the methods that I want to see and need to use.

  • Fedex can only be used with dreamweaver using metric, not pounds (lbs)

    Fedex can only be used with dreamweaver using metric, not pounds (lbs), evidently?
    This as per their tier 2 tech suport.
    They say I should just convert to metric, no joke!
    Any ideas would be greatly appreaciated?
    Also a warning to anyone thinking of using business catalyst for their site, sorry, their business.
    Their note to me:
    Your request (# 82816) has been solved. To reopen this request, reply to this email or go to the Help & Support page.
                  Silviu Ghimposanu (Adobe Business Catalyst Support)           
                  Apr 14 15:23           
        Thanks for contacting us Michael  
    Our engineering team has detected some problems when doing weight conversions (from the quantities entered in the interface to what’s used when making the API calls to FedEx) -
      He have added this to our internal bug tracker to be fixed for one of the future releases. 
        I realise that this might not be what you wanted to hear,but at this moment we do't have a workaround in order to send the
      dimensions in pounds and not in KG 
        Sorry for this inconvenience!
      Kind regards, 

    If you're in US it will be in pounds. If your site is set any other country
    in the rest of the world it will be metric. So BC or as you call it
    Dreamweaver will look at the site country, which you set when creating the
    site

  • Alternatives can only be used once?

    Hi
    In the Adobe form when creating an alternative I've discovered that it can only be used once.
    Is this correct?
    I've created an alternative e.g. name = FLAG_IS_X condition flag = X.
    When I use the alternative 'FLAG_IS_X' the first time it works as required.
    However, when I use it a second time on the form it does not work at all.
    Does this mean that a different alternative with the same condition has to be created even though the condition you want to use is the same?
    Thanks

    Hey,
    Well I stumble it seems on the same 'issue' . I have 3 master pages and have the requirement to put a watermark on it depending on the status. The first master is in portrait and contains the contact details, the second master page contains the line items and is in landscape and the third one contains the totals and is back portrait.
    First I had only one alternative and used it on the 3 masterpage to check if the watermark had to be printed. In this case it was only correct for the first page (contact-info) the rest all received the mark although they should not.
    Then I made 3 altenatives (one for each type of master page) all checking the same condition.
    This way it was correct for page 1 (contacts), the first page of the items (the two others had the watermark although they should not - so not correct) and the last page with the totals.
    In my case the contacts-page and totals-page can only have a page-count of 1 but I'm almost sure that if they could have a page count of 2 or more then only the first page would be correctly printed.
    Is this a bug you think?
    Faaiez,
    Did you find in the end a workaround for this?
    Otto.
    Any suggestion of how I could handle this with scripting (no experience with scripting though)
    Anyway tnx already for all the input !!
    best regards,
    Bart V.

  • Session state can only be used when enablesessionstate is set to true.

    When I try to open up a certain webpage it says; Session state can only be used when enablesessionstate is set to true. What does it mean and what should I do?

    Contact the webmaster for that site and report the problem.

  • I just purchased harry potter and the deathly hallows digital copy but i just synced my ipod and its not there. i went back to get the copy again and its sasy the cose can only be used once. I dont have the movie and now i cant get it at all.

    I just purchased harry potter and the deathly hallows digital copy but i just synced my ipod and its not there. i went back to get the copy again and its says the code can only be used once. I dont have the movie and now i cant get it at all. i paid for it when i bought the movie but now i dont own it at all. i feel cheated, somebody please help!

    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    iPhone and iPod touch: Charging the battery
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
      Apple Retail Store - Genius Bar 

  • MAC Mail:  I have 2 accounts set up.  I used to be able to add attachments to both accounts, but now I can only attach using 1 of the accounts.  The other one doesn't work.

    MAC Mail:  I have 2 accounts set up.  I used to be able to add attachments to both accounts, but now I can only attach using 1 of the accounts.  The other one doesn't work.

    Try unmounting the volume on your iMac using Disk Utility. Then mount it again. You may need to reboot the laptop or relaunch its Finder process (using the Force Quit window) after remounting the drive on your iMac. Remember that no process may be accessing any files on the drive you plan to unmount, or the unmount will fail. Unmounting and remounting an external drive on my iMac made it become visible on my MacBook Pro after it had disappeared.

  • Cannot submit app update - "Error The submission can only contain one appx or one appxbundle."

    I'm trying to submit my app update to the store and I get the following error:
    Error
    The submission can only contain one appx or one appxbundle.
    So I thought I should maybe utilize the "Delete" option to allow me to submit an updated appx or appxbundle (since these are the only file types that App Studio allows us to build). However, when I do, I get the
    following message:
    Can't delete this package
    You must have at least one 8.1 package in your submission.
    ... So I'm basically stuck. Can't delete to upload a new one. Can't upload a new one because there's one already there. It would be nice if you could automatically sunset the old appx/appxbundle package in favor of the new
    one.
    Update: Solved! Solution below.

    Since this is still an issue, shouldn't it be escalated for a fix so that the page works on any modern browser?
    I see two independent problems here:
    - Hitting Delete should work, not bash the user with a "You must have at least one 8.1 package in your submission." message (i.e. allow the developer to delete and then add a new file, if so desired). After all, when making the initial submission
    we are in the same situation (no file yet), so it can't be that bad, as long as this is checked for at a later stage.
    - Show that Replace button which seems to be hiding! If it is a Silverlight issue, why require Silverlight in the first place?
    P.S.: I am experiencing this with IE (no Replace button, Windows 8.1 x64 and latest updates).

Maybe you are looking for

  • Problem with OBIEE generated query

    Hi All, I'm working on OBIEE 10.1.3.4 version. For generating one report am using five tables , in thses five tables 2 are the fact tables and remaining all are dimensional tables. In these five tables am using one or more colums in each table and we

  • Best Hardware Server Specs for Wsus to run close to 3000 Clients

    Hello Team, I am currently configuring a Wsus server 2012 for my company. I am looking forward to buy a Dell rack server and would like to take your input on what is the best server specs I could go for. I am intending to use a San-box to store Wsus

  • Just purchased photoshop cs6 for windows and received installation disk.

    Just purchased photoshop cs6 for windows and received installation disk.  Where do you find the serial number on the disk?  What should the serial number start with?  The disk was in the original box and I see a number that start with 910..... The bo

  • What's app

    i delete what's app by mistake but i got the "messageStore-2015-03-14.2.db.crypt" and all backup data.i installed it again but when it asks me to restore the mssgs i push ok but it says an error occured and never backup help me i got important mssgs

  • JDBC (ODBC) Driver for linux

    Hello I am currently using JdbcOdbcBridge on Windows NT/2000 for accessing MS SQLServer. But I want to transfer my application servers to Linux RedHat 7.1. My database should remain MS SQLServer. Can you suggest me a way to connect to MSSQL Server fr