Iterating Through Properties Loaded from LoadedFromXML Method

For the first time, I am storing and retrieving application settings from properties files using Java 1.5. What I am looking for is the simplest way to iterate through the key/value pairs and print them out.
Any recommendation on the best way to accomplish this?

So you have a Properties object, and you want to
print the properties in it? Well, it doesn't make any
difference whether it was loaded from XML or
key-value pairs or Java code or whatever. Simplest
way (which you asked for before asking for best way)
is by calling its store(OutputStream) method.In the following code, I have an xml formatted configuration file that is loaded into a properties object ( prop ) , the properties are enumerated ( Enumeration ) , and finally the list of properties is looped through with the property name and its value printed out. This should help you out.
          try {
               fis = new FileInputStream( ftpConfigFile );
               prop.loadFromXML(fis);
               Enumeration e = prop.propertyNames();
               while ( e.hasMoreElements()) {
                    String elem = ( String )e.nextElement();
                    myLogger.debug( elem + "=" + prop.getProperty(elem)) ;
          catch ( NullPointerException e) {
               myLogger.error( "Error encountered " + e.getMessage() );
               return false;
          catch ( IOException e ) {
               myLogger.error( "Error encountered " + e.getMessage() );
               return false;
          finally  {
               try {
                    fis.close();
               catch ( Exception e){
          }

Similar Messages

  • Unable to load properties file from filesystem

    Hi,
    I have a client swing-applicatiion packaged in a jar-file. The application uses some resource files, including a xxxx.properties file to set defaults for the application. All resource files are included in the jar file and everything works as expected. I load the xxxx.properties file as follows:
    is_ = getClass().getResourceAsStream("/resources/xxxx.properties");
    Because it is not possibl to change any property values inside the jar-file without recreating this jar-file, i want to exclude the xxxx.properties file from the jar-file and put it in the folder containing the jar-file.
    So i have:
    drive:/folder/app.jar
    drive:/folder/xxxx.properties
    Now i read the xxxx.properties file from disk in stead of the 'resouce'-folder within my application (jar):
    is_ = getClass().getResourceAsStream("drive:/folder/xxxx.propoerties");
    but it doesn't work, the file isn't found.
    What am i missing here?
    Any suggestions?

    The best way to approach this is to include the properties file in the Jar as you originally did. If the user changes any property, save the entire set of properties to a sub-directory of user.home (perhaps based on the package name of the main class). Check for the copy in user.home before using the 'default' properties built into the Jar.
    Other places/ways to store the changed information.
    - java.util.prefs.Preferences
    - Assuming the app. has a GUI and can be deployed over a network, the JNLP API PersistenceService. Here is a demo. of the PersistenceService (http://pscode.org/jws/api.html#ps).
    Edit 1:
    I did not at first notice that this post was in Java Applet Development.
    <li> Applets can also (theoretically) use cookies to store information. This is prone to failure when users disable cookies.
    <li> To store information on the local file system (e.g. in user.home) or to use Preferences (AFAIU) would require trusted code.
    <li> If the user has the Next Generation Java Plug-In (Java 1.6.0_10+) it is possible to leverage the JNLP API services in an embedded & sand-boxed applet.
    Edited by: Andrew Thompson on Feb 1, 2011 9:32 AM

  • While trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'

    Hi,
    Our PI is getting data from WebSphere MQ and pushing to SAP. So our sender CC is JMS and receiver is Proxy. Our PI version is 7.31.
    Our connectivity between the MQ is success but getting the following error while trying to read the payload.
    Text: TxManagerFilter received an error:
    [EXCEPTION]
    java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'
           at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:73)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
           at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:348)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
    I have searched SDN but couldn't fix it. Please provide your suggestion.
    With Regards
    Amarnath M

    Hi Amarnath,
    Where exactly you are getting this error?
    If you are getting at JMS Sender communication channel, try to stop and start the JMS communication channel and see the status, also use XPI Inspector to get the exact error log.
    for reference follow below blogs:
    Michal's PI tips: ActiveMQ - JMS - topics with SAP PI 7.3
    Michal's PI tips: XPI inspector - help OSS and yourself
    XPI Inspector

  • Approval task SP09: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'

    Hi everyone,
    I just installed SP09 and i was testing the solution. And I found a problem with the approvals tasks.
    I configured a simple ROLE approval task for validate add event. And when the runtime executes the task, the dispatcher log shows a error:
    ERROR: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'
    And the notifications configured on approval task does not start either.
    The approval goes to the ToDO tab of the approver, but when approved, also the ROLE stays in "Pending" State.
    I downgraded the Runtime components to SP08 to test, and the approvals tasks works correctly.
    Has anyone passed trough this situation in SP09?
    I think there is an issue with the runtime components delivered with this initial package of SP09.
    Suggestions?

    Hi Kelvin,2016081
    The issue is caused by a program error in the Dispatcher component. A fix will be provided in Identity Management SP9 Patch 2 for the Runtime component. I expect the patch will be delivered within a week or two.
    For more info about the issue and the patch please refer to SAPNote 2016081.
    @Michael Penn - I might be able to assist if you provide the ticket number
    Cheers,
    Kristiyan
    IdM Development

  • How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods

    Hi All,
    How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods.
    This is a enhancement requirement.
    When ever user enter value in field 1 then automatically cursor should go to next field.

    Hello Bobb,
    You can create a trigger(when-list-changed) for each list item where you could:
    1.recreate the record groups and then use POPULATE_LIST so you can hide the selected values. In forms builder online help there are some good examples about create record groups dynamically.
    or
    2.you can perform a validation instead of hiding the selected values. If the values is already selected the display a message 'Value already selected....'
    Second option is much faster(only an 'if clause')
    Hope this helps.
    Regards,
    Alex

  • Loading values into drop down through properties file.

    Hi all,
    Can any one please let me know how to read a drop down through properties file I have two drop downs. I need to read the drop down values through the properties file .
    I would appreciate if you can provide me with the sample code to do this(i mean similar kind of operation)
    Say for example
    if i have in the properties file
    months.properties
    Month = "january,february,march.....december"
    january = "monday,tuesday, wednesday"
    for the first drop down i need to load the months i.e., january, february, march etc.
    After selecting the first drop down say january, then it should show me monday,tuesday and wednesday in the second drop down.
    I know it's a begineers question. any help would be appreciated.
    Thanks in advance for your help
    regards,
    sam

    Actually i want to use Jstl tag for this
    <select name="secQst1">
    <c:forEach var="flaglistdetail" items="${flaglist}">
    <option value="<c:out value="${flaglistdetail.seqId}"/>"><c:out value="${flaglistdetail.seqDesc}"/></option>
    </c:forEach>
    </select>
    The above operation is for getting the drop down values for the database. I want to hard code the values in the properties file and read it in the action and want to get it through the select tag.
    private Properties _appConfig;
         private static final String APP_CONFIG_NAME = "AppConfigProperties.properties";
    if (_appConfig == null) {
    _appConfig = new Properties();
    try {
    appConfig.load(FileUtil.getFileAsStream(APPCONFIG_NAME));
    } catch (Exception e) {
    throw new RuntimeException("can not find "
    + APP_CONFIG_NAME, e);
    I was trying to do the above thing. but for some reason i couldn't get it.
    if you have any sample code which does the same thing like this would be helpful

  • Data load from Legacy system to BW Server through BAPI

    Requirements: We have different kind of legacy systems and SAP BW server. We want to load all legacy system data into SAP BW server using BAPI. Before loading we have to validate all data. If there are bad data, data missing we have to let the legacy system user/ operator knows to fix the data into their system with detail explanation. When it is fixed, we have to load the data again.
    Load Scenario:  We have two options to load data from legacy systems to BW Server.
    1.     We need to load data directly from legacy system to BW Server using BAPI program.
    2.     Legacy Systems data would be in workstations or flash drive as .txt (one line separated by comma) or .csv file. Need to load from .txt /.csv file to BW Server using BAPI program.
    What we want in the BAPI program code?
    It will Read / Retrieve data from text / csv file and will put into the Internal table. Internal table structure would be based on BAPI InfoObject structure.
    Call BAPI InfoObject function module ‘BAPI_IOBJ_CREATE’ to create InfoObject, include all necessary / default components, do the error check, load the data and return the status.
    Could some one help me with the sample code please? I am new in ABAP / BAPI coding.
    Is there any other better idea to load data from legacy system to BW server? BTW we are using BW 3.10. Is there any better option with BI 7.0 to resolve the issue? I appreciate your help.

    my answers:
    1. this is a scendario for a data push into SAP BW. You can only use SOAP-Based Transfer of Data.
    http://help.sap.com/saphelp_nw04/helpdata/en/fd/8012403dbedd5fe10000000a155106/frameset.htm
    (here for BW 3.5, but you'll find similar for 7.0)
    In this scenario you'll have an RFC dinamically created for every Infosource you need to transfer data.
    2. You can make a chain for each data load, so you can call the RFC "RSPC_API_CHAIN_START" to start the chain from external.
    the second solution is more simply and available on every release.
    Regards,
    Sergio

  • How to get File Reference of a properties file from EJB

    Hi,
    I am using Sun App server 7 with Oracle 9i. I am keeping all my SQL statements in a properties file from which I am loading it while making a database operation from Stateless beans. My problem is I am not able to get the reference of the properties file. Here is the code through which I am getting the SQL statements loaded to a cache.
    String sqlFileName = "SQL.properties";
    sqlCache.load(new FileInputStream(sqlFileName));
    From the cache I am sending the SQL statement depending on the key value. But the problem is I have to keep the SQL.properties file on the App Server config directory of the instance where the server.xml file resides. Otherwise it is not able to find the properties file. But I don't want to put the properties file on the config directory of the server instance. Please help how to get the properties file from the packakge. My file is residing inside a package com.company.sql . Botht the properties file and the class accessing the file are residing in the same package. Please help how to get the reference of the file with out putting the file in the config directory.
    Thanks
    Amit Patnaik

    Just wanted to warn you of the hazards if you read a file from EJB
    So please make sure that these hazards will not affect your application. However the solution suggested to use getResourceStream() concurs with ejbSpec
    This snippet is from suns blueprint on ejb
    Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors?
    Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard.
    Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file.
    Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes.
    Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class.
    Hope this info helps!

  • Properties does have getProperty method

    I have this code but the Properties does have the method getProperty()
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class TestCode {
        static final String PROPERTY_FILE="JDBC-ODBC Driver.properties";
        String driverName, url, user, password;
        /** Creates a new instance of TestCode */
        public void access() {
            try{
                /* Create an object of the Properties class and load properties. */
                Properties prop=new Properties();
                prop.load(new FileInputStream(PROPERTY_FILE));           
                driverName=prop.getProperty("driver");  // Retrieve driver information.           
                url=prop.getProperty("url");    // Retrieve JDBC URL.
                user=prop.getProperty("user");  // Retrieve user name.
                password=prop.getProperty("password");  // Retrieve password.
                /* Initialize and load a driver. */           
                Class.forName("driverName");
                /* Establish a connection with a database. */
                Connection con=DriverManager.getConnection(url,user,password);
                /* Create Statement object. */
                Statement stmt=con.createStatement();
                /* Executes a SQL query to retrieve a ResultSet. */
                ResultSet rs=stmt.executeQuery("SELECT * FROM Registered_Users_Information");
                /* Iterate through the ResultSet to display data. */
                while(rs.next()){
                    System.out.println(rs.getString("UserName"));
                    System.out.println(rs.getString("Password"));
                con.close();
            }catch(Exception ex){
                ex.printStackTrace();
        public static void main(String args[]){
            TestCode t=new TestCode();
            t.access();
    }Please show me the problem.
    Thanks.
    Nguyen_Tom

    I used this code but it does not exist. Has anyone
    tell me why or please five me an advise? The object
    prop does not has the method load.
    Properties prop=new Properties();
    prop.load(new FileInputStream(PROPERTY_FILE));Thanks a lot.
    Nguyen_TomRefer to the JDK spec since 1.0, Properties should have all the methods you said you didn't have.
    Did your program throw any error messages?? Could you show me?
    :D

  • Errors upload Apps through Application Loader

    Trying to upload App through Applicatio loader had have never received these errors til 2 days ago. Same error on two different app uploads. I'm running the latest application loader version 2.9 and Mac 10.7.5. Using iMac 24" with 4 gb of ram
    First errors i received are
    The second error I get every other time I try to re upload is
    I have reset my router, restarted my computer and checked for any updates. I'm out of options. I also have developer recreate the pkg file without spaces in the name as I heard that might be an issue.
    Below is error report
    [2013-10-08 19:54:54 CDT] <main>  INFO: Transporter is skipping bundle update check: Already checked recently.
    [2013-10-08 19:54:54 CDT] <main>  INFO: MD5 checksum calculation in the transporter will be skipped.
    [2013-10-08 19:54:54 CDT] <main>  INFO: Logging level set to eXtreme
    [2013-10-08 19:54:54 CDT] <main>  INFO: Logging configured successfully.
    [2013-10-08 19:54:54 CDT] <main> DEBUG: Attempting refresh of configuration data from https://contentdelivery.itunes.apple.com/transporter/Defaults.properties
    [2013-10-08 19:54:54 CDT] <main> DEBUG: Configuration refresh successful.
    [2013-10-08 19:54:54 CDT] <main> DEBUG: Saving configuration to local path: /Users/marie/.itmstransporter/Defaults.properties
    [2013-10-08 19:54:54 CDT] <main>  INFO: iTMSTransporter : iTunes Store Transporter [1.7.9]
    [2013-10-08 19:54:54 CDT] <main>  INFO: OS identifier: Mac OS X 10.7.5 (x86_64); jvm=24.0-b26; jre=1.7.0-internal-root_2013_05_13_10_55-b00
    [2013-10-08 19:54:54 CDT] <main>  INFO: Memory: [JVM] 61M free, 80M total, 910M max [System] (Physical) 1506M free, 4096M total (Swap) 64M free, 64M total
    [2013-10-08 19:54:54 CDT] <main>  INFO: Client: Application Loader 2.9 (439)
    [2013-10-08 19:54:54 CDT] <main>  INFO: Upload mode selected.
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Memory: [JVM] 61M free, 80M total, 910M max [System] (Physical) 1506M free, 4096M total (Swap) 64M free, 64M total
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Using operation named: authenticateForTransportDiscovery
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Apple's web service operation input parameters:
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Application = iTMSTransporter
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter BaseVersion = 1.7.8.2
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Client = Application Loader
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter ClientVersion = 2.9 (439)
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter OSIdentifier = Mac OS X 10.7.5 (x86_64); jvm=24.0-b26; jre=1.7.0-internal-root_2013_05_13_10_55-b00
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Password = **hidden value**
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter TransporterArguments = -m upload -u [email protected] -p **hidden value** -f /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp -checksumValidation false -indicator true -v eXtreme -Dtransporter.client=Application Loader -Dtransporter.client.version=2.9 (439)
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Username = [email protected]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Version = 1.7.9
    [2013-10-08 19:54:54 CDT] <main>  INFO: id = 20131008195454-220
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Apple's web service operation return value:
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter TransportHosts.Aspera = [vgr105.apple.com:33001, vgr106.apple.com:33001]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter PreferredTransports = [Aspera, Signiant, DAV]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter TransportHosts.Signiant = [sgr205.apple.com:44001, sgr206.apple.com:44001]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter TransportHosts.DAV = [itmsdav.apple.com:443]
    [2013-10-08 19:54:54 CDT] <main>  INFO: Examining the package at: /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp
    [2013-10-08 19:54:54 CDT] <main>  INFO: Ensuring that package has well formed metadata file...
    [2013-10-08 19:54:54 CDT] <main> DEBUG: Getting case-sensitive metadata xml filename...
    [2013-10-08 19:54:54 CDT] <main>  INFO: Gathering the list of valid files from the package ...
    [2013-10-08 19:54:54 CDT] <main> DEBUG:   505app.zip will be verified by Apple's web service to determine if it is a valid file.
    [2013-10-08 19:54:54 CDT] <main> DEBUG:   metadata.xml will be verified by Apple's web service to determine if it is a valid file.
    [2013-10-08 19:54:54 CDT] <main>  INFO: Finished gathering the list of valid files from the package.
    [2013-10-08 19:54:54 CDT] <main> DEBUG:   Case-sensitive metadata filename is: metadata.xml
    [2013-10-08 19:54:54 CDT] <main>  INFO: Performing authentication of package 642092166.itmsp ...
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Memory: [JVM] 40M free, 80M total, 910M max [System] (Physical) 1505M free, 4096M total (Swap) 64M free, 64M total
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Deflated 453 bytes to 360
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Using operation named: validateMetadata
    [2013-10-08 19:54:54 CDT] <main> DBG-X: Apple's web service operation input parameters:
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Application = iTMSTransporter
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter BaseVersion = 1.7.8.2
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Client = Application Loader
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter ClientVersion = 2.9 (439)
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Files = [505app.zip, metadata.xml]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Metadata = <?xml version="1.0" encoding="UTF-8"?>
    <package version="software4.7" xmlns="http://apple.com/itunes/importer">
        <software_assets apple_id="642092166">
            <asset type="bundle">
                <data_file>
                    <file_name>505app.zip</file_name>
                    <checksum type="md5">31719646019410fc27c1e5679a4f06f9</checksum>
                    <size>8247180</size>
                </data_file>
            </asset>
        </software_assets>
    </package>
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter MetadataChecksum = 4503857f07b1792721121d8f0fb85e29
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter MetadataCompressed = (suppressed)
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter OSIdentifier = Mac OS X 10.7.5 (x86_64); jvm=24.0-b26; jre=1.7.0-internal-root_2013_05_13_10_55-b00
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter PackageName = 642092166.itmsp
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter PackageSize = 8247633
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Password = **hidden value**
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter TransporterArguments = -m upload -u [email protected] -p **hidden value** -f /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp -checksumValidation false -indicator true -v eXtreme -Dtransporter.client=Application Loader -Dtransporter.client.version=2.9 (439)
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Username = [email protected]
    [2013-10-08 19:54:54 CDT] <main> DBG-X:   parameter Version = 1.7.9
    [2013-10-08 19:54:54 CDT] <main>  INFO: id = 20131008195454-122
    [2013-10-08 19:54:55 CDT] <main> DBG-X: Apple's web service operation return value:
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter CPUToken = b90a8eb2-83ba-41dd-9be5-3e96b7e95c89/1381280095727
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter FileSizes = {505app.zip=8247180}
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter AssetsToDescribe = [{UTI=com.apple.ipa, Role=source, ShouldDescribeAsset=true, Filename=505app.zip}]
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter Checksums = {505app.zip=31719646019410fc27c1e5679a4f06f9}
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter Success = true
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter MinimumFileSizeThresholdForCheckum = 104857600
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter FilesToUpload = [metadata.xml, 505app.zip]
    [2013-10-08 19:54:55 CDT] <main> DBG-X:   parameter ProviderNameForToken = MrsNetworkLLC
    [2013-10-08 19:54:55 CDT] <main>  INFO: The list of files requested for upload by Apple is: [metadata.xml, 505app.zip].  These are the files that will be uploaded.
    [2013-10-08 19:54:55 CDT] <main> DEBUG: Using token file path /Users/marie/.itmstransporter/UploadTokens/Marie-home-iMac.local_MrsNetworkLLC_ 642092166.itmsp.token
    [2013-10-08 19:54:55 CDT] <main> DEBUG: Attempting exclusive file lock on token file
    [2013-10-08 19:54:55 CDT] <main> DEBUG: Token exists, examining
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Token pid: 83498, found process = false; my pid: 1439
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Reusing existing token: 1dc581dd-1400-4140-9dca-03cd839141fd/1381116618620
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Set token: 1dc581dd-1400-4140-9dca-03cd839141fd/1381116618620
    [2013-10-08 19:54:56 CDT] <main>  INFO: Starting media analysis of assets
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Handling asset: filename=505app.zip,uti=com.apple.ipa,role=source,describe=true
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Using container type tool name and version: iOS App Describer:1.22
    [2013-10-08 19:54:56 CDT] <main> DEBUG: Using path: /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp/505app.zip
    [2013-10-08 19:54:59 CDT] <main> DEBUG: Asset successfully described: com.apple.jingle.leghorn.software.AbstractSoftwareDescriber$1@41acbb99
    [2013-10-08 19:54:59 CDT] <main>  INFO: Asset media analysis has completed
    [2013-10-08 19:54:59 CDT] <main> DBG-X: Memory: [JVM] 49M free, 101M total, 910M max [System] (Physical) 1451M free, 4096M total (Swap) 64M free, 64M total
    [2013-10-08 19:54:59 CDT] <main> DBG-X: Deflated 453 bytes to 360
    [2013-10-08 19:55:00 CDT] <main> DBG-X: Deflated 322932 bytes to 22831
    [2013-10-08 19:55:00 CDT] <main> DBG-X: Using operation named: validateAssets
    [2013-10-08 19:55:00 CDT] <main> DBG-X: Apple's web service operation input parameters:
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Application = iTMSTransporter
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter BaseVersion = 1.7.8.2
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter CPUToken = 1dc581dd-1400-4140-9dca-03cd839141fd/1381116618620
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Client = Application Loader
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter ClientVersion = 2.9 (439)
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Files = [505app.zip, metadata.xml]
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter MetadataChecksum = 4503857f07b1792721121d8f0fb85e29
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter MetadataCompressed = (suppressed)
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter OSIdentifier = Mac OS X 10.7.5 (x86_64); jvm=24.0-b26; jre=1.7.0-internal-root_2013_05_13_10_55-b00
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter PackageName = 642092166.itmsp
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter PackageSize = 8247633
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Password = **hidden value**
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Transport = Aspera
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter TransporterArguments = -m upload -u [email protected] -p **hidden value** -f /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp -checksumValidation false -indicator true -v eXtreme -Dtransporter.client=Application Loader -Dtransporter.client.version=2.9 (439)
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Username = [email protected]
    [2013-10-08 19:55:00 CDT] <main> DBG-X:   parameter Version = 1.7.9
    [2013-10-08 19:55:00 CDT] <main>  INFO: id = 20131008195500-804
    [2013-10-08 19:55:01 CDT] <main> DBG-X: Apple's web service operation return value:
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter ErrorMessage = ERROR ITMS-9000: "Unsupported Architectures. Your executable contains unsupported architectures '[12-11]'." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage
    (1102)
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter CPUToken = 1dc581dd-1400-4140-9dca-03cd839141fd/1381116618620
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter FileSizes = {505app.zip=8247180}
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter AssetsToDescribe = [{UTI=com.apple.ipa, Role=source, ShouldDescribeAsset=true, Filename=505app.zip}]
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter Checksums = {505app.zip=31719646019410fc27c1e5679a4f06f9}
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter ErrorCode = 1102
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter Success = false
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter Errors = [ERROR ITMS-9000: "Unsupported Architectures. Your executable contains unsupported architectures '[12-11]'." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)]
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter MinimumFileSizeThresholdForCheckum = 104857600
    [2013-10-08 19:55:01 CDT] <main> DBG-X:   parameter FilesToUpload = [metadata.xml, 505app.zip]
    [2013-10-08 19:55:01 CDT] <main> ERROR: Apple's web service operation was not successful
    [2013-10-08 19:55:01 CDT] <main> ERROR: Unable to authenticate the package: 642092166.itmsp
    [2013-10-08 19:55:01 CDT] <main> ERROR: ERROR ITMS-9000: "Unsupported Architectures. Your executable contains unsupported architectures '[12-11]'." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)
    [2013-10-08 19:55:01 CDT] <main> DBG-X: The error code is: 1102
    [2013-10-08 19:55:01 CDT] <main>  INFO: Done performing authentication.
    [2013-10-08 19:55:02 CDT] <main> DBG-X: Returning 1
    Package Summary:
    1 package(s) were not uploaded because they had problems:
              /var/folders/f3/1vcrgzbd5zj3z22w273qbxl40000gn/T/642092166.itmsp - Error Messages:
                        Apple's web service operation was not successful
                        Unable to authenticate the package: 642092166.itmsp
                        ERROR ITMS-9000: "Unsupported Architectures. Your executable contains unsupported architectures '[12-11]'." at SoftwareAssets/SoftwareAsset (MZItmspSoftwareAssetPackage)

    if you mac os is not 10.8.5 and you ard using Application Loader 2.9,you should update your system,I know apple doc say:10.7 is ok,but i update my system to 10.8.5 from 10.8.4, every thing is ok, i dont konw the reason,maybe some error exist at application loader,so you can have a try,good luck.

  • Log4J - reading properties file from /WEB-INF directory issue..

    I'm just learning to implement Log4J; the approach I am taking for my JSF application running under Tomcat 5.5x is to create an initialization servlet to initialize the logger, and then access the logger instance within my backing beans and application module services. I include log4j.jar file in /WEB-INF/lib and log4j.properties in /WEB-INF.
    First I wanted to see if this was a good approach, and secondly I'm having trouble accessing the log4j.properties file from the /WEB-INF directory (see below) - any suggestions on how to set up the path so that the properties file can be found (I receive a java.io.filenotfoundexception)?
    Where I'm looking for direction is how to define a single instance of the logger and then access that instance from my java classes versus re-creating the logger in each class.
    ----- web.xml --------
    <servlet>
    <servlet-name>LogServlet</servlet-name>
    <servlet-class>com.sidehire.view.util.LogServlet</servlet-class>
    <init-param>
    <param-name>setup</param-name>
    <param-value>/WEB-INF/log4j.properties</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    ------ LogServlet class ------
    public void init()
    throws ServletException {
    String config = getInitParameter("setup");
    PropertyConfigurator.configure(config);
    Thanks
    Message was edited by:
    javaX

    Try to put the log4j.properties in your WEB-INF/classes/ directory.
    You could wrap one log4j instance in a static method in a utility class, but then you would probably lose other information depending on your logger configuration.
    If you create an instance in each class, which after all is just one line like this:
    static Logger logger = Logger.getLogger(ChangePasswrdAction.class.getName());
    then you are able to get time and method information.

  • Changing a .properties file from within a programme

    Hi, I was just wondering is there anyway that i can change a .properties file from within a programme?
    I have certain values in the .properties file and I want to add a username and password to the file once it has been entered in a login part of the programme.
    I have had a look at the docs and can not seem to find any suitable methods.
    Cheers Gareth.

    store is a good method.
    In practical use, sometimes you have a .properties file full of comments (properties files are to be modified by humans, and humans need comments), but they are not retrieved by "load" so they will not be stored back by "store". It's a pity that it happens (the equivalent Windows API, WritePrivateProfileString, has a better behaviour).
    Maybe someone has written a method that can modify a properties file, without changing the order of the pairs name=value and without throwing out comments.

  • Concurrent modification exception while iterating through list

    Hi,
    I have a list of objects. I use for each loop in java to iterate through that list of objects and display them.
    The problem is that while iterating other thread can add or remove some objects from that list, and I get ConcurrentModificationException.
    How can I handle this problem. How can I be sure that I am iteration through the updated list.
    Thank you

    Synchonize on the list before iterating through it, and make sure that other code also synchronizes on the list before adding to it or removing from it. Using a list implementation that simply synchronizes all the methods (e.g. Vector) will not do that, you have to do it yourself.

  • Iterating through a generic list of unknown type

    Hi,
    I am in the process of creating pdf reports for my project.I have to deal with a persistence api to get the data for the report.The data will be in the form of a list,like List<SomeObject>,all these lists returned by the persistence framework contains object of some type which implements a common interface.But through that interface I wont be able to get all the data for my reports.So I am looking for a generic way for iterating through the list,by providing some metadata for the data within the list. I am planning to use reflection to query through the list.Is there any feature of generic,through which I can easily iterate through this unknown type,preferrably a combination of reflection and generics,I want to reduce the LOC.Any suggestions??

    If the List returned by the framework isn't parameterized, Like
    public List<K> getList(Class<K> classType);
    then you have to cast it to the appropriate type. If you are not sure about the type of the Objects in the list, and you have a bunch of class types you could expect from the list, then you could use instanceof operator.
    If it could be Class A or B, then
    if (obj instanceof A){
    A castObject = (A) obj;
    else if(obj instanceof B){
    B castObject = (B)obj;
    }Even to do reflection to invoke methods, you need to know the method Names. Which tells me you have the knowledge of what could come out of the list. So cast them. Invoking methods using reflection is really slow.

  • Cannot seem to read properties file from JSP

    Hi all,
    In an ISA 4.0 application I want to read a properties file from a JSP to decide whether or not to execute some specific JavaScript code. I want the properties file because in it I can easily configure this externally. I put my properties file in /WEB-INF/classes.
    I develop on an environment using Tomcat where this works fine. On an acceptance machine using the SAP J2EE engine however this won't work, to my surprise. Can anyone give me a suggestion on why my properties file is not read?
    Here's the Java scriptlet code:
    UserSessionData userSessionData = UserSessionData.getUserSessionData(session);
    // theme will be something like "themes/zester":
    String theme = (String) userSessionData.getAttribute(Constants.THEME_KEY);
    boolean showScript = false;
    int slashIndex = theme.indexOf('/');
    String themeKey = null;
    // get the "zester"-like part from the theme:
    if(theme != null && slashIndex > -1) {
      themeKey = theme.substring(slashIndex + 1);
    Properties props = new Properties();
    InputStream is = application.getResourceAsStream("/WEB-INF/classes/script.properties");
    if(is != null) {
      props.load(is);
      is.close();
      Enumeration keysEnum = scriptProps.propertyNames();
      while (themeKey != null && keysEnum.hasMoreElements()) {
       if(theme.toUpperCase().endsWith((String) keysEnum.nextElement())) {
        showScript = true;
        break;
       showScript = false;

    Hi Kishor,
    Thank you for taking the time!
    I agree, this issue may have to do with the deployment. There is however a remark in the <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html">ServletContext</a>  interface documentation on methods <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResource(java.lang.String)">getResource()</a> and <a href="http://java.sun.com/products/servlet/2.3/javadoc/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String)">getResourceAsStream()</a> that may also be of interest here:
    "The servlet container must implement the URL handlers and URLConnection objects that are necessary to access the resource."
    Is this remark of relevance to the subject, or is this thought too far fetched? Mind you, the documentation also states that "This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a .war file". It should, therefore, be possible to read a file from disk???
    Cheers,
    Peter-Jan Bosch

Maybe you are looking for

  • USB gaming mouse unrecognized by Windows 7 Pro (via BootCamp)

    Hey, I bought a Zowie EC1 Gaming USB mouse. But when I plug it into my MacBook Pro 15" running Windows 7 Pro (via BootCamp), then the mousewheel flashes blue shortly for 1 second or so, and the driver installation process starts. After awhile it says

  • Automatic time zone... where is it?

    I have got iphone with o2. I am in France for a month when I go to general date and time I cannot see set up automatically and time zone is locked to London, anyone can explain this. Thanks you folks for help. David

  • Logic of Billing in Stock Transport Order

    Hello, Can you please tell me the logic of billing in a stock transport order between plants belonging to the same company code? Is billing mandatory and whats the use/advantage? Sincerely, Ketan

  • N8 wont connect to Ovi Suite..

    Hi, I'm facing a connectivity issue with ovi suite on my company laptop (windows XP). When i connect the cable, the phone says "connected via ovi suite", and the tray pop up bubble says N8 connected via Ovi Suite, but when I go to the Ovi suite home

  • MIC update in  QM - LIMS interface

    Hi friends, I am working with QM - LIMS interface. I am getting a problem for characteristic update in SAP specifically for 04 lots. The detailed descriptuion is as follows: Plant: 1000; Tasklist Group: 1 Tasklist Usage: Universal ; so that my taskli