Issue when stats are run

Hi All,
When we execute the stats we get the below error.Its a MSCS cluster enterpise portal oracle 10g
C:\Documents and Settings\ql0adm>brconnect -u ql0adm/<pwd> -c -f stats -t ora
dict_stats
BR0801I BRCONNECT 7.00 (44)
BR0252E Function NetShareGetInfo() failed for 'sapmnt' at location BrEnvProcess-
89
BR0253E errno 2310: This shared resource does not exist.
BR0806I End of BRCONNECT processing: ceehwaio.log 2010-10-11 16.18.54
BR0280I BRCONNECT time stamp: 2010-10-11 16.18.54
BR0804I BRCONNECT terminated with errors

>
Ambarish annapureddy wrote:
> HI Volker,
>
> You are a champ.I dont have anyother words to express.
> The issue got resolved.We gave SAPEXE and SAPMNT.We faced issue when we used ops$ then i used system user and it went through.Before closing the thread i want to know how did you get the note.Thanks a ton again.
Sorry,
I did not come across this for a while
Well it was not such an obvious search as for your message, but just from my memory of
installing on MSCS and that there was something special to the brtools. So that knowlegde
in behind, my search was "MSCS brtools" -> two hits -> one bingo
Volker

Similar Messages

  • Error when we are running the job "AS ABAP - Initial Load" for a ABAP Syste

    Hi,
    We are getting the below error when we are running the job "AS ABAP - Initial Load" for a ABAP System.
    Pls note that we have maintained the below entry types to the Identieny Store & we are still getting the error.
    Request you to help me
    MX_TITLE_SUPPLEMENT
    MX_SALUTATION
    MX_NAME_PREFIX
    MX_ACADEMIC_TITLE
    Error----
    runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_ACADEMIC_TITLE!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_ACADEMIC_TITLE' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_ACADEMIC_TITLE!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_ACADEMIC_TITLE' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_NAME_PREFIX!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_NAME_PREFIX' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_NAME_PREFIX!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_NAME_PREFIX' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_SALUTATION!!Mr.!!EN)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_SALUTATION' AND ValText = 'Mr.' AND ValLocale = 'EN') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_TITLE_SUPPLEMENT!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_TITLE_SUPPLEMENT' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_ACADEMIC_TITLE!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_ACADEMIC_TITLE' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_ACADEMIC_TITLE!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_ACADEMIC_TITLE' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_NAME_PREFIX!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_NAME_PREFIX' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_NAME_PREFIX!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_NAME_PREFIX' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_SALUTATION!!Mr.!!EN)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_SALUTATION' AND ValText = 'Mr.' AND ValLocale = 'EN') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error runFunctionsInString($FUNCTION.sap_getHelpValKey(MX_TITLE_SUPPLEMENT!!)$$) got exception
    org.mozilla.javascript.EvaluatorException: uSelect(select ValKey from dbo.mxi_attrvaluehelp where ValId = 'MX_TITLE_SUPPLEMENT' AND ValText = '') got exception java.sql.SQLException: ORA-00942: table or view does not exist
    Error putNextEntry failed storingMANJUHB
    Exception from Add operation:com.sap.idm.ic.ToPassException: ToIDStore.addEntry failed storing entry 'MANJUHB'. IDStore returned error message: " Value not legal for this attribute:Attribute: MX_ACADEMIC_TITLE_2" when storing attribute 'MX_ACADEMIC_TITLE_2=$FUNCTION.sap_getHelpValKey(MX_ACADEMIC_TITLE!!)$$'
    Exception from Modify operation:com.sap.idm.ic.ToPassException: ToIDStore.modEntry failed updating entry 'MANJUHB'. IDStore returned error message: "Entry does not exist" when fetching entry

    The Probelm was resolved after editing the Script..... "sap_getHelpValKey.js"

  • Latency is very high when SELECT statements are running for LONG

    We are a simple DOWN STREAM streams replication environment ( Archive log is shipped from source , CAPTURE & APPLY are running on destination DB).
    Whenever there is a long running SELECT statement on TARGET the latency become very high.
    SGA_MAX_SIZE = 8GB
    STREAMS_POOL_SIZE=2GB
    APPLY parallelism = 4
    How can resolve this issue?

    Is the log file shipped but not acknowledge? -- NO
    Is the log file not shipped? -- It is shipped
    Is the log file acknowledged by not applied? -- Yes...But Apply process was not stopped. it may be slow or waiting for something?
    It is 10g Environment. I will run AWR.. But what should i look for in AWR?

  • Content Server - Which SQL statements are running?

    Hi sap lovers! Does anyone aware of which sql statements being run on the maxDB part when, e.g saving a document (or retrieving a document) (on the ABAP part) within our DMS landscape?
    And at the whole, Is It possible to monitor sqls running on MAXDB, like we can see in ST04
    -> Oracle Session
    Regards,
    Vladimir

    You can find that out doing the following:
    - on any ABAP system start DB59
    - enter the data to connec to the content server database
    - doubleclick on the made entry so you get in "DB50 for remote databases"
    - switch on the command monitor
    - then use the task manager and press on "running commands"
    Markus

  • How to Improve performance issue when we are using BRM LDB

    HI All,
    I am facing a performanc eissue when i am retriving the data from BKPF and respective BSEG table....I see that for fiscal period there are around 60lakhs records. and to populate the data value from the table to final internal table its taking so much of time.
    when i tried to make use of the BRM LDB with the SAP Query/Quickviewer, its the same issue.
    Please suggest me how to improve the performance issue.
    Thanks in advance
    Chakradhar

    Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting - post locked
    Rob

  • Permission issues when trying to run any adobe app, tech support guy quit after trying to fix it for 2 hours

    I don't know what to do. Any of my adobe apps give the same error:
    Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item.
    The aforementioned tech support person was a test account he made, and spent a long time doing stuff with all the permissions for the adobe files. Eventually he got it so illustrator at least would launch, then immediately crash. He just quit without a work not too long after that.
    I'm running windows 7, 64bit. On my own personal computer. Please help
    note: I was also having issues with creative cloud, which managed to get fixed

    Caps folder contains database file like Cache.db , Media,db , pdb.db which holds the information regarding Apps installation on system and other essential data, in some cases if the files are corrupted , it is essential to remove Caps folder .
    Once you delete Caps folder , CC app will list Apps with Install button as it does not have information regarding installation of CC apps as the Media.db file will be deleted along with it.
    In this case , it is better that you uninstall the Apps which is not listed as Up to Date ,and being listed with Install button even though it is already installed.

  • Lookup issue when staging area diff from target

    Hi,
    I am using staging area different from target (csv file to database)
    Everything is working fine the source data is moved to target. The interface runs suiceessfuly.
    Now i want to add a lookup during transformation using a lookup table.
    When i do that using lookups in quick edit section, i am getting an error.
    When i run the interface, the C$ gets created in staging area - that is correct.
    However when inserting from staging to target, now the ODI searches for the C$ table in target area instead of the staging..
    Please help.
    Thanks,
    Rosh

    Hi
    1st thing you have to give the workschema for temp tables when creating physical schema in dataserver for target.
    Then you have to select the workschema in overview of interface as "staging different from target".
    After doing this when you will use predefined KM for the interface it will create temp tables in workschema.
    Now suppose you are not giving the workschma at the time of creating physical schema and you have selected "staging different than target" in interface.Here your C$ table will be created in your workschema but I$ table that is used by IKM is going to be created on target schema.So for this again you have change the IKM KM i.e. where to create I$ table (wokrschema) by selecting the corresponding logical schema.
    So its better you give the workschema at the time of creating physical schema.
    Here is the query to give privilege by the sys_dba
    Grant create any table to ODI_TEMP.
    Hope you got it
    (Please mark the answer as correct or helpful and close the thread)
    Thanks

  • Select list with submit issue when they are referred in report region query

    I have a page with a reporting region. Same region also has 3 different list items and depending on the value selected in each item, the report is refreshed. All the 3 list items are "Select list submit with submit"
    Out of 3 items, 2 (say item2 and item3) are populated through dynamic LOV using the value in item1.
    Additionally, when I select a default "ALL" value in in item1, I ignore values in item2 and item3.
    With this background, I am a following issue:
    1. I select a value other than Default value in item1 which filters the report.
    2. Then I select some value in item2 which further shrinks the reports.
    3. Now if I go back to item1 and select the default "All" value, the report is not refreshed with the new values of item1, item2 and item3. But it still shows the report based on value of item2 that I selected in step2.
    How do I set the value of item2/item3 to null if value of item1 is default which is "All"
    Any word of advise will be a great help!
    Thanks,
    Girish

    Hi,
    Make two computations each with the computation text NULL; or
    Make one process with code like:
    BEGIN
    :P1_ITEM2 := NULL;
    :P1_ITEM3 := NULL;
    END;With the condition "Value of Item in Expression 1 = Expression 2"
    Expression 1: P1_ITEM1
    Expression 2: ALL
    (or whatever the return value of ALL is...remember that this is case sensitive)
    Mike

  • JDeveloper 12.c ListView issue when elements are repeated.

    Hi
    Using the ListView, and choosing the panel grid layout, if my view object has repeated rows, then the styles are not applied for those rows messing up the row (it doesn't display correctly, no height - width styles whatsoever). I have checked the source code generated and this is what I've found - This is for each element of my list. The ones that repeat (0 and 3) are the one with the issues. They should be treated as different records.
    <div id="r2:0:lv1:0:li1" class="xvl" data-afrrk="0">
    <div id="r2:0:lv1:0:li1" class="xvl" data-afrrk="0">
    <div id="r2:0:lv1:1:li1" class="xvl" data-afrrk="1">
    <div id="r2:0:lv1:2:li1" class="xvl" data-afrrk="2">
    <div id="r2:0:lv1:3:li1" class="xvl" data-afrrk="3">
    <div id="r2:0:lv1:3:li1" class="xvl" data-afrrk="3">
    If I explore "data-afrrk="0"" element, just one have style applied. And the same for data-afrrk="3".
    This is what I see:
    Well I couldn't insert an image. It is disabled.
    Regards

    Hi. I just used the drag and drop. It works fine when using panel group instead the panel grid layout.
    <af:listView value="#{bindings.UserPersonalInfo3.collectionModel}" var="item"
                     emptyText="#{bindings.UserPersonalInfo3.viewable ? 'No data to display.' : 'Access Denied.'}"
                     fetchSize="#{bindings.UserPersonalInfo3.rangeSize}" id="lv1" selection="single"
                     selectionListener="#{bindings.UserPersonalInfo3.treeModel.makeCurrent}">
          <af:listItem id="li1">
            <af:panelGridLayout id="pgl8">
              <af:gridRow marginTop="5px" height="auto" marginBottom="5px" id="gr1">
                <af:gridCell marginStart="5px" width="15%" id="gc1">
                  <af:panelGroupLayout id="pgl2" layout="horizontal">
                    <af:outputFormatted value="#{item.bindings.UserName.inputValue != null ? item.bindings.UserName.inputValue : 'NONE'}"
                                        id="of1"/>
                  </af:panelGroupLayout>
                </af:gridCell>
                <af:gridCell marginStart="5px" width="60%" id="gc2">
                  <af:panelGroupLayout id="pgl7" layout="horizontal">
                    <af:panelGroupLayout id="pgl3" layout="vertical" halign="left">
                      <af:panelGroupLayout id="pgl4">
                        <af:outputFormatted value="#{item.bindings.FirstName.inputValue}" id="of2"
                                            inlineStyle="font-size:medium;"/>
                        <af:spacer width="10" height="10" id="s1"/>
                        <af:outputFormatted value="#{item.bindings.LastName.inputValue}" id="of3"
                                            inlineStyle="font-size:medium;"/>
                      </af:panelGroupLayout>
                      <af:panelGroupLayout id="pgl5">
                        <af:outputFormatted value="#{item.bindings.JobName.inputValue}" id="of4"
                                            inlineStyle="font-size:small;"/>
                      </af:panelGroupLayout>
                    </af:panelGroupLayout>
                  </af:panelGroupLayout>
                </af:gridCell>
                <af:gridCell marginStart="5px" width="25%" marginEnd="5px" id="gc3">
                  <af:panelGroupLayout id="pgl6">
                    <af:outputFormatted value="#{item.bindings.OrganizationName.inputValue}" id="of5"/>
                  </af:panelGroupLayout>
                </af:gridCell>
              </af:gridRow>
            </af:panelGridLayout>
          </af:listItem>
        </af:listView>

  • Client access issues when mailboxes are mounted on a specific mailbox server

    One of our 3 mailbox servers gives us an error when mailbox databases are mounted on it.
    All web services are not functioning properly, there is an event log error for each web service web.config file saying file not found, If I open each web.config file and look at the line in question they all point to:
    <assemblies>
            <add assembly="Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
          </assemblies>
    Does anyone know what this is pointing at or what my server is missing?
    It is Exchange 2013 Sp1 RU7 as are my other 2 mbx servers which work fine...
    all pre-req's are installed as I double checked and no difference between the 3 mbx servers that I can see...
    ***Don't forget to mark helpful or answer***

    IIS error
    === Pre-bind state information ===<o:p></o:p>
    LOG: DisplayName = Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35<o:p></o:p>
    (Fully-specified)<o:p></o:p>
    LOG: Appbase = file:///C:/Program Files/Microsoft/Exchange Server/V15/ClientAccess/Autodiscover/<o:p></o:p>
    LOG: Initial PrivatePath = C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Autodiscover\bin<o:p></o:p>
    Calling assembly : (Unknown).<o:p></o:p>
    ===<o:p></o:p>
    LOG: This bind starts in default load context.<o:p></o:p>
    LOG: Using application configuration file: C:\Program Files\Microsoft\Exchange Server\V15\ClientAccess\Autodiscover\web.config<o:p></o:p>
    LOG: Using host configuration file: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet.config<o:p></o:p>
    LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.<o:p></o:p>
    LOG: Post-policy reference: Microsoft.Exchange.Security, Version=15.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/autodiscover/b455e468/cbaac37d/Microsoft.Exchange.Security.DLL.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/autodiscover/b455e468/cbaac37d/Microsoft.Exchange.Security/Microsoft.Exchange.Security.DLL.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft/Exchange Server/V15/ClientAccess/Autodiscover/bin/Microsoft.Exchange.Security.DLL.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft/Exchange Server/V15/ClientAccess/Autodiscover/bin/Microsoft.Exchange.Security/Microsoft.Exchange.Security.DLL.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/autodiscover/b455e468/cbaac37d/Microsoft.Exchange.Security.EXE.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/Temporary ASP.NET Files/autodiscover/b455e468/cbaac37d/Microsoft.Exchange.Security/Microsoft.Exchange.Security.EXE.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft/Exchange Server/V15/ClientAccess/Autodiscover/bin/Microsoft.Exchange.Security.EXE.<o:p></o:p>
    LOG: Attempting download of new URL file:///C:/Program Files/Microsoft/Exchange Server/V15/ClientAccess/Autodiscover/bin/Microsoft.Exchange.Security/Microsoft.Exchange.Security.EXE.<o:p></o:p>
    ***Don't forget to mark helpful or answer***

  • [solved] Python issues when trying to run tpfanco-svn from AUR

    I installed tpfanco-svn [1] from the AUR, and all that went smoothly. However, I do get some serious Python related errors when I actually try to run tpfand or tpfan-admin, and I do not know whether they are actually Python 2 or Python 3 related.
    Here are the error messages:
    $ tpfand
    Traceback (most recent call last):
    File "/usr/sbin/tpfand", line 26, in <module>
    import tpfand.control
    File "/usr/lib/python2.7/site-packages/tpfand/control.py", line 27, in <module>
    import dbus, dbus.service, dbus.mainloop.glib, dbus.glib
    File "/usr/lib/python3.3/site-packages/dbus/__init__.py", line 82, in <module>
    import dbus.types as types
    File "/usr/lib/python3.3/site-packages/dbus/types.py", line 6, in <module>
    from _dbus_bindings import (
    ImportError: /usr/lib/python3.3/site-packages/_dbus_bindings.so: undefined symbol: PyBytes_Type
    And for the other command:
    $ tpfan-admin
    Traceback (most recent call last):
    File "/usr/bin/tpfan-admin", line 21, in <module>
    import tpfanadmin.globals
    File "/usr/lib/python2.7/site-packages/tpfanadmin/globals.py", line 24, in <module>
    import gtk, gtk.glade, gobject, gtk.gdk
    File "/usr/lib/python2.7/site-packages/gtk-2.0/gtk/__init__.py", line 40, in <module>
    from gtk import _gtk
    File "/usr/lib/python3.3/site-packages/cairo/__init__.py", line 2
    SyntaxError: Non-ASCII character '\xc2' in file /usr/lib/python3.3/site-packages/cairo/__init__.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
    Any ideas how to debug this? Maybe I am missing some package?
    1: https://aur.archlinux.org/packages/tpfanco-svn/
    EDIT/Solution: The scripts, both tpfand and the tpfan-admin GUI, are only meant to be run as root. If done so, no errors are thrown.
    Last edited by Stalafin (2013-04-19 14:12:01)

    clfarron4 wrote:A possible related bug is this, referenced in this thread.
    clfarron4: It looks like it could be however the suggested solution in the bug report did not solve the problem.
    As I did not want to solve it dirty as Thorsten Reinbold did to build his package I downgraded automake from 1.15 to 1.14 temporarily and built the package with no errors. I then installed the package and all is working properly. I then reupgraded to version 1.15.

  • IPhone 5S now shutting off display, even when apps are running?

    Hi guys,
    I've had my iPhone 5S since it released (and a 4S before that since its release), and just today I noticed that my iPhone 5S is automatically shutting off its screen after a handful of minutes when plugged in and charging.
    My iPhones have never done this before. I have an alarm clock app, and leave that running 100% of the time when my phone is plugged in since it shows a clock on the display, and I prefer that to a blank, powered-off screen. However, just this morning I noticed that it shut off overnight (never did that before), and now -- even when I'm watching it to see if anything happens, it shuts off.
    Something weird did happen this morning though: when my phone alarm woke me up, I noticed my phone was just randomly loading apps, regardless of my input. I shut it off and turned it on again, and then it stopped doing that. This likely has something to do with the new phone display issue.
    I can't find a specific setting on the phone or anything that would cause it to do this. Any ideas? I would greatly appreciate it!

    Hi, no idea what you tried, but...
    Open console in Applications>Utilities, check the system log for the date/time of the last problem  & the Wakeup/Startup right after that for clues.

  • Front Row Issue When iTunes is Running

    On my Mac Mini (which is our media centre), I've noticed some strange behaviour. Namely, if I leave iTunes running and then start Front Row, after a while (up to 24 hours sometimes), Front Row can no longer see the iTunes library. With iTunes shutdown this doesn't happen.....

    I have confirmed that this issue only exists with a library on a network share. Local libraries seem to work fine. I have submitted a bug report to Apple.
    To anyone from Apple who may be reading: this is a huge degradation in capability for those of us who use our Macs as media servers and need the ability to simultaneously use front row locally and share the music library with other computers. I am looking forward to a fix.

  • J2ee_admin is used as the user when RFCs are run on the web dynpro appln.

    I have created a web dynpro application which has some RFCs on the model.
    View is an adobe form which send the data to the RFC and upon submit executes the RFC to create an item in SAP (xRPM).
    When the RFC is run, user is taken as J2EE_ADMIN even when authentication is enabled on the application and
    a different user is used.
    Is it due to the adobe form or  the web dynpro application?
    Is there anyway we can change this default and capture the user logged in accordingly.
    Versions used:
    NWDS 7.0
    SAP NW 2004s SP 15
    Adobe Live cycle designer 7.0
    Thank you,
    Vasu

    Hi Subramanya,
    Please check the user Id, what your given for JCO connection (MODELDATA & METADATA).
    Regards
    Ponnusamy

  • Arrays.sort() issue when Numbers are a string!

    Hey guys -- here is my problem.
    I am working on a TOP TEN SCORES mechanism for a trivia game. I have read in the score and the players name from a file. SO I have 2 different arrays topScores[] and topNames[] ---
    Now if someone plays the game and has a higher score than the lowest score, they get to put their score and name in the file and replace the low score.
    HOWEVER -- I do not know how to sort topSCORES[] and then make whatever sorted changes apply also to the topNAMES[] array.
    SO I thought - HEY I will concatenate the topScores and topNames into a single String array. And then SORT! This sounded like a great idea until I realized that the following will happen:
    100 tvance (first one)
    1000 dvance (second score)
    250 danderson (third score) !!!
    See my problem? When I sort this way - it is sorting alphabetically so it will put a 1000 score before a 200-900 score! ---
    **I hope I explained this adequately -- can someone help? Is there a way to sort the topScores array and have it also change the order of the topNames array as well?

    Create a new class - HighScore, which has a highScore and a name?Yup. This technique even has a name: object-oriented programming!
    Demo:
    import java.util.*;
    public final class HighScore implements Comparable<HighScore> {
        private final int score;
        private final String name;
        public HighScore(int score, String name) {
            if (name == null)
                throw new NullPointerException();
            this.score = score;
            this.name = name;
        public int getScore() {
            return score;
        public String getName() {
            return name;
        public int compareTo(HighScore that) {
            if (this.score < that.score)
                return -1;
            else if (this.score > that.score)
                return +1;
            else
                return this.name.compareTo(that.name);
        public boolean equals(Object obj) {
            if (this == obj)
                return true;
            else if (obj instanceof HighScore) {
                HighScore that = (HighScore) obj;
                return this.score == that.score && this.name == that.name;
            } else
                return false;
        public int hashCode() {
            return score ^ name.hashCode();
        public String toString() {
            return score + " " + name;
        //demo
        public static void main(String[] args) {
            HighScore[] top = {
                new HighScore(250, "danderson"),
                new HighScore(1000, "dvance"),
                new HighScore(100, "dvance")
            Arrays.sort(top);
            for(int i=0; i<top.length; ++i) {
                System.out.println(top);
    If you are using an older version of Java (1.4 or earlier), the generics won't be
    recognized. In that case the class definition would begin:
    public final class HighScore implements Comparable {And the compareTo method would begin:
    public int compareTo(Object obj) {
        HighScore that = (HighScore) obj;Good luck!

Maybe you are looking for