Simple question with arrays

Im a couple days new in java, Ive been searching for an answer for hours and havent found a solution.
This is the mistake it shows (when trying to use any element of the array):
array required, but java.util.ArrayList <java.lang.String> found
The array is:
public static ArrayList<String> numList = new ArrayList<String>();
Im filling it this way: (so that it contains each word of a file in separate)
BufferedReader br = new BufferedReader(new FileReader("Archivo.txt"));
try
while(true)
String aLine = br.readLine();
if(aLine == null) throw new EOFException("Le?do todo el archivo.");
if(!aLine.equals(""))
StringTokenizer st = new StringTokenizer(aLine);
while(st.hasMoreTokens())
numList.add(st.nextToken());
}catch(EOFException e)
The problem comes when I try to use the elements of the array (in specific when trying to convert each element of the array to int, so that i can do math operations with them).
for example:
for (a=0; w>a; a++)
int x = Integer.parseInt(numList[a])
Can anyone help me with this? (where is the mistake and how to convert from string array elements to int)
Thank you // Muchas Gracias

The trouble is that you're confusing ArrayLists with arrays. They're not the same thing.
Currently you're making an ArrayList. If you want an array of String, do this:
String[] myArray = new String[50];
int i = 0;
while(st.hasMoreTokens()) {
  myArray[i] = st.nextToken();
  i++;
}Or perhaps better yet:
String[] numListArray = numList.toArray(new String[0]);But you really don't need an array for what you're doing. Use an Iterator.
Iterator<String> strings = numList.iterator();
while(strings.hasNext()) {
  int x = Integer.parseInt(strings.next());
}You get the idea. Read the Collections tutorial about iterators. Read the language spec about arrays. Also look at the java.util.Arrays class.

Similar Messages

  • Trying to teach self Java-question with arrays

    I have a question with arrays. I have a simple inventory program that I am writing(very simple). I have declared and created my array. Is this the time I should build a new class outside of my main in order to hold my array? I am still trying to sort through classes and when to create them. My thought is that because it is a hierarchy I should have a new class. For example, Albums is at the top and then there are specific types of albums, like TributeAlbum, PremiereAlbum, etc. Do I need a class for each of these? When I create the class, do I use the same name as the array?
    More info, just in case: My original class is AlbumInventory. I have created an array to hold 25 TributeAlbums which has 4 instance variables.
    Question 2: Why can I not refer to an album variable like TributeAlbums[0].itemNumber?
    Thanks in advance for your input.
    Denise

    I have a question with arrays. Okay.
    I have a simple
    inventory program that I am writing(very simple). I
    have declared and created my array. Is this the time
    I should build a new class outside of my main in
    order to hold my array? In an OO language classes are usually a good idea.
    I am still trying to sort
    through classes and when to create them. My thought
    is that because it is a hierarchy I should have a new
    class.This sounds a bit confused. You should have a new class when it is appropriate to do so.
    For example, Albums is at the top and then
    there are specific types of albums, like
    TributeAlbum, PremiereAlbum, etc. Do I need a class
    for each of these? Not sure. Why is the type not an attribute of the Album class? This (attribute) seems at first glance to be the way to do it.
    When I create the class, do I use
    the same name as the array?
    ? I am going to say no but I'm not following what you are really asking here.
    More info, just in case: My original class is
    AlbumInventory. I have created an array to hold 25
    TributeAlbums which has 4 instance variables.
    Can you please post some of your actual formatted code? It would also be helpful to know what the attributes for an Album are as you have them.

  • Simple program with array do not want to compile

    Please do not laugh but I wrote the following program to create a array of
    strings. The program do not want to compile and I can not see why.
    Can somebody please tell me what I am doing wrong.
    class MyArrayOfStrings5
    puplic static void main(String[] args)
    String[] anArray;
    anArray = new String[5];
    System.out.println("Value at index 2 is: " + anArray[2]);
    }

    Firstly thank you very much for responding to my cry of help. Saying that, I am a little
    confused about the fact that "new String" is being used for declaration and initialisation.
    1. String[] anArray = new String[5];
    I understand that this is telling me that variable anArray will contain String values and will
    be a array of 5
    2. anArray = new String();
    This is the one that is confusing me. Am I correct to assume that
    (because it is in a for loop) for every position in the array we are assigning
    String() to the variable anArray. Why do we need the new command before
    String()?

  • Noobie simple question with || operator

    while(!keyb.nextLine().equalsIgnoreCase("y" || "n"))
    keyb is my Scanner variable -- i know its kinda stupid but it's late and I feel dumb atm
    its not letting me put the || "n" part in...maybe something is wrong with the syntax?
    Edited by: sheky on Sep 12, 2008 6:31 PM

    This line of code has two basic concept errors.
    The || operator, is applied to booleans
    logicalValue || logicalValue"y" and "n" are Strings not booleans and the || operation is not allowed.
    The second error is that, the result of a || operation is a boolean and the equalsIgnoreCase method expect a Object as parameter, to call its toString() method and compare it to the associated String.
    What you probably want is:
    String answer;
    do {
        answer = keyb.nextLine();
    } while( ! (answer.equalsIgnoreCase("y") || answare.equalsIgnoreCase("n") );

  • Simple question with deleting from computer

    I imported a couple of my cds to itunes in order to move them to my ipod, but now that they are there I do not want them on my computer eating my memory. Can I delete the songs from my computer without deleting them from my ipod?
    Thank you

    If you want to delete songs from iTunes and keep them on the iPod you need to change the update option of your iPod to "manually manage music and videos". Your iPod will not sync with iTunes in this mode so it can have different content, you can get details here:
    Managing content manually on iPod
    iPod 101: Fill 'er Up
    One major word of caution. If you delete songs or videos from your computer and have no back up other than the iPod you will risk losing them permanently if your iPod fails or you find you have to restore it to solve a problem. You should consider investing in an additional internal or external hard drive to store/back up your music. Alternatively at the very least back up anything you can't replace such as iTunes downloads to CD or DVD: How to back up your media in iTunes

  • Simple question with JLabel

    hi,
    I am new to swing. I hava a basic question.
    Is it possible to give a ToolTipText to a JLabel .
    i have given l1.setToolTipText where l1 is the lable name and added to the frame f 1. f1.add(l1).
    But i am getting an error.
    Can anyone help me?
    Thanks in advance

    hi dek,
    thanks for the quick reply..
    i have made Label l83 = new Label("CAME Tools");
    l83.setBounds(880, 630, 150, 20);
    f1.add(l83);
    l83.setToolTipText("press button for calculation");
    and error i got is
    Z:\JCREATOR LE\MYPROJECTS\MAINWINDOW\MainWindow.java:365: cannot resolve symbol
    symbol : method setToolTipText (java.lang.String)
    location: class java.awt.Label
    l83.setToolTipText("To calculate Measured Software process you have to select Metrics covered by CAME Tool(Select YES from CAME Tools Choice)");
    ^
    1 error

  • Simple question on arrays

    how do I get the length of an array? could you please
    post an example? I've tried using the API but I don't
    understand what it's saying

    int[] myArray= {x, y, z, a, b);
    int bar = myArray.length;                                                                                                                                                                                                

  • A fairly simple question with a quick answer :)

    Hi there,
    So i have just purchased a mac pro to edit on.
    I currently run Final Cut Studio on a macbook pro. I purchased final cut studio in Feb 06.
    I need to uninstall FCS from my macbook pro. What's the easiest way to do this?
    However, the main question...
    Can i then install all of the same version of Final Cut Studio using the installation discs i used to install it on my MBP on my new Mac Pro. (Bare in mind i will uninstall FCS on my macbook pro)
    Also, if if this is possible - Can i upgrade to Final Cut Studio 2 on the new Mac Pro once the previous version of FCS is installed?
    Many thanks,
    Jamie Mc

    It is possible.
    Make sure you don't happen to have the lappy hooked up to the network at the time you install on the Pro.
    Also -- there was something I thought that changed in the EULA that said you could "could" have it on a desktop AND a laptop... but don't quote me. If it isn't in the EULA then you can't have it on both...
    But yes... you can install on the desktop for sure and then take it off the lappy.
    Good luck,
    CaptM

  • Just a simple question with restoring.

    Alright, so I am about to sell my iPod Touch, and I just finished restoring, I didn't set it up at all, so that the customer who purchases it can follow through with the "Hello" screen and set up everything themselves... But since I want to leave it in this state, I can't really figure this out myself without setting it up. So, when the new person goes through the setup screen, it won't somehow keep the old Apple ID or iCloud accounts to select right? Before I restored it, I logged out of my Apple ID and iCloud, turned off iMessage, and FaceTime, just in case. So, I am pretty sure the accounts won't be there, right? I just need some verification although I am pretty much sure it should be 100% clean of my old content.

    Hi
    If you have logged out and restored from scratch everything accounts wise should have been wiped along with the rest of the content. I recently sold my iphone 4 and thought the same thing after restoring but the new buyer set it up next to me and i never saw any of my account info come back up!
    Hope this helps

  • Simple question with running JSP!

    I download a whole project from https://sourceforge.net/projects/javamyadmin/
    There are hundreds of files inside. I just want to run them.
    When I tried index.jsp, it will display errors.
    My machine: XP, Tomcat 4.1.24 How can I sort it out?? Thanks.
    When I run, http://localhost:8080/jmyadmin/web/index.jsp It said that ......
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: /jmyadmin/web/index.jsp(13,28) Unable to load class rewrite
    at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
    at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
    at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:219)
    at org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:712)
    at org.apache.jasper.compiler.Parser.parseElements(Parser.java:804)
    at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
    at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
    at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
    at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
    at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
    at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
    at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
    at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
    at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
    at java.lang.Thread.run(Thread.java:534)

    It will display "Directory Listing For /jmyadmin/ - Up To /...."

  • Simple question with a button action

    Im having some slight problems setting up my script so that when you click on the button a method is performed called encrypt().
    I have...
    public class Easy_Encrypt {
    public static void main(String[] args) {
    ..Class stuff
    JButton convert = new JButton("convert text");
    encrypt() { ..stuff inside }
    How do I make it so when you press convert it does the function encrypt() Ive searched through java's documentaries but every script does'nt work.....

    try this:
    convert.addActoinListener(new
    ActionListener()
    public void actionPerformed(ActionEvent event)
    encrypt()

  • Simple question with adobe advisor

    My adobe support  manager is not opening at all i have tryed to update my adobe air , all updates and everythign still nothing.  Im running on a windows vista x54 bit OS.  Any  help at all would be appreciated.

    Please see Troubleshoot AIR installation | Windows- http://helpx.adobe.com/air/kb/troubleshoot-air-installation-windows.html for information on how to resolve most Adobe AIR installation difficulties.

  • Simple Question with Clock in Logic 8

    Need some help here!!
    I am in the arrange window and have my piece set on measure/bar 1.
    The clock down in the transport bar, however, reads: 00:53:03;00.00
    On my other files it reads properly at measure : (00:00:00;00.00)
    What's going on here and how can I fix this file to read the correct clock time?
    THANKS

    Hi Josh,
    Go to File>Project Settings>Synchronization (or use ⌥Y). I think you'll find it there.
    regards, Erik.

  • TMG Standalone Array simple question

    hi everyone i have what i think is a simple question but i don't know if i'm missing something in all the tutorials about standalone arrays i've read.
    i'm working with 2 tmg enterprise editions in 2008R2 in a test environment. both are on sp2 fully updated and a single 20 Mbit connection. i would like for this two tmg's to work for high availability using that connection only and i was able to join both in
    a standalone array. here's how they're configured:
    tmg01
    internal nic ip range: 192.168.1.1/24
    second internal nic: not connected at the moment, considering for intra-array network if needed later on (if anyone suggest is absolutely necessary)
    external nic ip: dhcp supplied by isp.
    tmg02
    internal nic ip range: 192.168.1.2/24
    second internal nic: not connected at the moment.
    external nic: not connected. (where do i connect this one if i only have one modem for that 20 Mbit connection??)
    i have read that the intra-array network is not absolutely necessary so i’m leaving those unplugged.
    now, here’s my question, since they’re both already on an array, if tmg01 fails to deliver (let’s assume it has a hardware malfunction), how is tmg02 going to take over and connect to the external network if by definition my modem only accepts one cable? will
    i have to be near the server and change the cable to the other nic in tmg02 for it to work or do i have to add something in between the modem and the two tmg’s?
    is there something i’m missing? will i be needing 2 connections? maybe it’s too obvious or stupid and it just went passed me. i’m open to criticism and opinions.
    thanks

    Hi
    Let follow the best practice.
    In Production Normal setup for Full redundant Architecture, we need three servers, one for Array and other two servers for TMG for HA.
    1 . TMG Array Server – Subnet Routable with Internal TMG Subnet ( You can also have this in any one TMG but best practice is to separate it )
    2. 
    TMG – 1 – Two NIC, Internal / External
    3. 
    TMG – 2 – Two NIC, Internal / External
    Second Internal NIC is not required in your setup. So you can go with two NIC. External and Internal on two TMG
    Join TMG 1 and TMG 2 to Single Array which is server 1. By this all the configuration you make on one TMG will sync with other TMG.
    How TMG will handle in case of Server failure
    You need to Create two NLB in TMG
    One for Internal and one for External
    Internal NLB
    You need to create an Internal NLB, Since you are using 192.168.1.0 / 24 Network for Internal, assign an internal NLB as 192.168.1.3
    If you want to use TMG as gateway for all internet connection, then you need to have default Route from internal network pointing to 192.168.1.3 which is TMG NLB internal IP
    address
    External NLB
    Since you have not mentioned  External Network, let’s assume you are using 10.10.10.0 / 24 and External Interface of TMG 1 is 10.10.10.1 and TMG 2 is 10.10.10.2, Then create
    an External NLB and assign an IP address 10.10.10.3
    You need to have a Switch in between your Router and TMG servers,
    Connect TMG -1 and TMG – 2 External Interface NIC to Switch
    On external NIC – Set gateway as Modem IP address of Both TMG
    Connect an internet cable from modem to the same switch
    Ensure that, you have a route to 10.10.10.0 /24
     from Modem to External NLB IP address Ie 10.10.10.3
    Now you don’t have to switch cables to Modem,
    Good Luck !!

  • Load Balancing Directory Servers with Access Manager - Simple questions

    Hi.
    We are in the process of configuring 2 Access Manager instances (servers) accessing the same logical LDAP repository (comprising physically of two Directory Servers working together with Multi-Master Replication configured and tested) For doing this, we are following guide number 819-6258.
    The guide uses BigIP load balancer for load balancing the directory servers. However, we intend to use Directory Proxy Server. Since we faced some (unresolved) issues last time that we used DPS, there are some simple questions that I would be very grateful to have answers to:
    1. The guide, in section 3.2.10 (To configure Access Manager 1 with the Directory Server load balancer), talks about making changes at 4 places, and replacing the existing entry (hostname and port) with the load balancer's hostname and port (assuming that the load balancer has already been configured). It says that changes need not be made on Access Manager 2 since the LDAPs are in replication, and hence changes will be replicated at all places. However, the guide also states that changes have to be made in two files, namely AMConfig.properties, and the serverconfig.xml file. But these changes will not be reflected on Access Manager 2, since these files are local on each machine.
    Question 1. Do changes have to be made in AMConfig.properties and serverconfig.xml files on the other machine hosting Access Manager 2?
    Question 2: What is the purpose of putting these values here? Specifically, what is achieved by specifying the Directory server host and port in AMConfig.properties, as well as in serverconfig.xml?
    Question 3. In the HTTP console, there is the option of specifying multiple primary LDAP servers, as well as multiple secondary LDAP servers. What is the purpose of these? Are secondary servers attempted when none of the list in the primary list are accessible? Also, if there are multiple entries in the primary server list, are they accessed in a round robin fashion (hereby providing rudimentary load balancing), or are other servers accessed only when the one mentioned first is not reachable etc.?
    2. Since I do not have a load balancer setup yet, I tried the following deviation to the above, which, according to me, should have worked. If viewed in the HTTP console, LDAP / Membership / MSISDN and Policy configuration all pointed to the DS on host 1. When I changed all these to point to the directory server on host 2 (and made AMConfig.properties and serverconfig.xml on host 1 point to DS of host 2 as well), things should have worked fine, but apparently Access manager 1 could not be started. Error from Webserver:
    [14/Aug/2006:04:30:36] info (13937): WEB0100: Loading web module in virtual server [https-machine_1_FQDN] at [search]
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: Exception in thread "EventService" java.lang.ExceptionInInitializerError
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at com.iplanet.services.ldap.event.EventServicePolling.run(EventServicePolling.java:132)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at java.lang.Thread.run(Thread.java:595)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: Caused by: java.lang.InterruptedException
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: at com.sun.identity.sm.ServiceManager.<clinit>(ServiceManager.java:74)
    [14/Aug/2006:04:31:48] warning (13937): CORE3283: stderr: ... 2 more
    In effect, AM on 1 did not start. On rolling back the changes, things again worked like previously.
    Will be really grateful for any help / insight / experience on dealing with the above.
    Thanks!

    Update to the above, incase anyone is reading:
    We setup a similar setup in Windows, and it worked. Here is a detailed account of what was done:
    1. Host 1: Start installer, install automatically, chose Directory server, Directory Administration server, Directory Proxy server, Web server, Access Manager.
    All installed, and worked fine. (AMConfig.properties, serverconfig.xml, and the info in LDAP service, all pointed to HOST1:389)
    2. Host 2: Start installer, install automatically, chose Directory server, Directory Administration server, Directory Proxy server, Web server, Access Manager.
    All installed, and worked fine. (AMConfig.properties, serverconfig.xml, and the info in LDAP service, all pointed to HOST2:389)
    3. Host 1: Started replication. Set to Master
    4. Host 2: Started replication. Set to Master
    5. Host 1: Setup replication agreement to Host 2
    6. Host 2: Setup replication agreement to Host 1
    7. Initiated the remote replica from Host 1 ----> Host 2
    Note that since default installation uses abc.....xyz as the encryption key, setting this to same was not an issue.
    9. Started webserver for Host 1 and logged into AM as amadmin.
    10. Added Host 2 FQDN in DNS Aliases / Realms
    11. Added http://HOST2_FQDN:80 in the Platform server (instance) list.
    12. Started Host 2 webserver. Logged in AM on Host 2, things worked fine.
    At this stage, note the following:
    a) Host 1:
    AMConfig.properties file has
    com.iplanet.am.directory.host=host1_FQDN
    and
    com.iplanet.am.directory.port=389
    serverconfig.xml has:
    <Server name="Server1" host="host1_FQDN" port="389" type="SIMPLE" />
    b) Host 2:
    AMConfig.properties file has
    com.iplanet.am.directory.host=host2_FQDN
    and
    com.iplanet.am.directory.port=389
    serverconfig.xml has:
    <Server name="Server1" host="host2_FQDN" port="389" type="SIMPLE" />
    c) If one logs into AM, and checks LDAP servers for LDAP / Policy Configuration / Membership etc services, they all contain Host2_FQDN:389 (which makes sense, since replica 2 was initialized from 1)
    Returning back to the configuations:
    13. On Host 1, login into the Admin server console of the Directory server. Navigate to the DPS, and confgure the following:
    a) Network Group
    b) LDAP servers
    c) Load Balancing
    d) Change Group
    e) Action on-bind
    f) Allow all actions (permit modification / deletion etc.).
    g) any other configuations required - Am willing to give detailed steps if someone needs them to help me / themselves! :)
    So now, we have DPS configured and running on Host1:489, and distributing load to DS1 and DS2 on a 50:50 basis.
    14. Now, log into AM on Host 1, and instead of Host1_fqdn:389 (for DS) in the following places, specify Host1_fqdn:489 (for the DPS)--
    LDAP Authentication
    MSISDN server
    Membership Service
    Policy configuation.
    Verified that this propagated to the Policy Configuration service and the LDAP authentication service that are already registered with the default organization.
    15. Log out of AM. Following the documentation, modify directory.host and directory.port in AMConfig.properties to point to Host 1_FQDN and 489 respectively. Make this change in AMConfig.properties of both Host 1 as well as 2.
    16. Edit serverconfig.xml on both hosts, and instead of they pointing to their local directory servers, point both to host1_FQDN:489
    17. When you start the webserver, it will refuse to start. Will spew errors such as:
    [https-host1_FQDN]: Sun ONE Web Server 6.1SP5 B06/23/2005 17:36
    [https-host1_FQDN]: info: CORE3016: daemon is running as super-user
    [https-host1_FQDN]: info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.5.0_04] from [Sun Microsystems Inc.]
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amserver]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [ampassword]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amcommon]
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [amconsole]
    [https-host1_FQDN]: warning: WEB6100: locale-charset-info is deprecated, please use parameter-encoding
    [https-host1_FQDN]: info: WEB0100: Loading web module in virtual server [https-host1_FQDN] at [search]
    [https-host1_FQDN]: warning: CORE3283: stderr: netscape.ldap.LDAPException: error result (32); matchedDN = dc=sun,dc=com; No such object (DN changed)
    [https-host1_FQDN]: warning: CORE3283: stderr: Got LDAPServiceException code=-1
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getConnection(DSConfigMgr.java:357)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewFailoverConnection(DSConfigMgr.java:314)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewConnection(DSConfigMgr.java:253)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewProxyConnection(DSConfigMgr.java:184)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.services.ldap.DSConfigMgr.getNewProxyConnection(DSConfigMgr.java:194)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.initLdapPool(DataLayer.java:1248)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.(DataLayer.java:190)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.getInstance(DataLayer.java:215)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ums.DataLayer.getInstance(DataLayer.java:246)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ldap.SMSLdapObject.initialize(SMSLdapObject.java:156)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ldap.SMSLdapObject.(SMSLdapObject.java:124)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    [https-host1_FQDN]: warning: CORE3283: stderr: at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.Class.newInstance0(Class.java:350)
    [https-host1_FQDN]: warning: CORE3283: stderr: at java.lang.Class.newInstance(Class.java:303)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.SMSEntry.(SMSEntry.java:216)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.identity.sm.ServiceSchemaManager.(ServiceSchemaManager.java:67)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.am.util.AMClientDetector.getServiceSchemaManager(AMClientDetector.java:219)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.am.util.AMClientDetector.(AMClientDetector.java:94)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.sun.mobile.filter.AMLController.init(AMLController.java:85)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:322)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:120)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3271)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3747)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: warning: CORE3283: stderr: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: warning: CORE3283: stderr: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]: failure: WebModule[amserver]: WEB2783: Servlet /amserver threw load() exception
    [https-host1_FQDN]: javax.servlet.ServletException: WEB2778: Servlet.init() for servlet LoginLogoutMapping threw exception
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:949)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]: ----- Root Cause -----
    [https-host1_FQDN]: java.lang.NullPointerException
    [https-host1_FQDN]: at com.sun.identity.authentication.UI.LoginLogoutMapping.init(LoginLogoutMapping.java:71)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:921)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3478)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardContext.start(StandardContext.java:3760)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebModule.start(WebModule.java:251)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardHost.start(StandardHost.java:652)
    [https-host1_FQDN]: at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1133)
    [https-host1_FQDN]: at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:355)
    [https-host1_FQDN]: at org.apache.catalina.startup.Embedded.start(Embedded.java:995)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.start(WebContainer.java:431)
    [https-host1_FQDN]: at com.iplanet.ias.web.WebContainer.startInstance(WebContainer.java:500)
    [https-host1_FQDN]: at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:161)
    [https-host1_FQDN]:
    [https-host1_FQDN]: info: HTTP3072: [LS ls1] http://host1_FQDN:58080 [i]ready to accept requests
    [https-host1_FQDN]: startup: server started successfully
    Success!
    The server https-host1_FQDN has started up.
    The server infact, didn't start up (nothing even listening on 58080).
    However, if AMConfig.properties is left as it originally was, and only serverconfig.xml files were changed as mentioned above, web servers started fine, and things worked all okay. (Alright, except for some glitches when viewed in /amconsole. If /amserver/console is accessed, all is good. Can this mean that all is still not well? I am not sure).
    So far so good. Now comes the sad part. When the same is done on Solaris 9, things dont work. You continue to get the above error, OR the following error, and the web server will refuse to start:
    Differences in Solaris and Windows are as follows:
    1. Windows hosts have 1 IP and hostname. Solaris hosts have 3 IPs and hostnames (for DS, DPS, and webserver).
    No other difference from an architectural perspective.
    Any help / insight on why the above is not working (and why the hell does the documentation seem so sketchy / insecure / incorrect).
    Thanks a bunch!

Maybe you are looking for