Over riding a properties file?

Is there a way to pass a new properties file on the command line that will over-ride a properties file embeded in the jar file?
Our deployment would otherwise involve creating multiple copies of one jar file with slightly different properties files (and this is 3rd party so I can't get the devs to change it).
Cheers,
Seigers

Hmmm, I'll assign the dukes, but it wasn't a world changing answer - RTFM for dukes is a bit cheeky!
The correct answer appears to be that if we copy the properties file from the jar to the deployment directory and delete it from the original jar file, so long as we put the deployment dir in the classpath the new properties file will be picked up.
E.g.
c:\product\javalibs\myjar.jar <- Contains 'myprop.properties' on install.
Use zip to extract myprop.properties and copy it to say c:\myproject\props\
Use zip to delete myprop.properties from the jar file and include c:\myproject\props\ in your classpath.
Java will then find the properties file from the classpath when it can't find it in the jar file.
As intended you can now copy the properties file to c:\mynextproject\props and modify it then include it in that deployments classpath and you have one app install with multiple properties.
In fact no, I'm not going to award the dukes as the Jar command wouldn't even begin to help solving that lot (except arguably the extract of the props file).
Hope the above helps someone else as well as me.
Cheers

Similar Messages

  • Over-riding .LCK files on Inherited Website

    Is there any way of over-riding .LCK files?
    I’ve recently been given access to administer a
    department webpage at a university and defined a site on my
    computer - but when I accessed the server's directory I found the
    .htm files have the .LCK extension. I was able to download the
    files but am prevented from uploading any files. The original
    webperson has left and no one has any information.
    I was checking the archives and see that the .LCK is related
    to Dreamweaver's "check-in/check-out" feature which allows tracking
    of files when working in groups. But since I'm now become "the
    group", how do I over-ride this feature so I can work on the .htm
    files?
    ~CK

    Just delete the lck files on the server as I mentioned
    before.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Hurleyburley" <[email protected]> wrote in
    message
    news:[email protected]...
    > Unfortunately the previous person who opened the files
    and checked them
    > out did
    > not return/upload them - and didn't leave copies of the
    files to upload.
    >
    > So is there a way to access the files which have been
    locked when I don't
    > have
    > the original checked-out files to check-back-in?
    >
    >
    >
    >
    quote:
    Originally posted by:
    Newsgroup User
    > If the previous person opened the file in DW it would
    have checked it out,
    > in the process creating the LCK file. To remove this
    file DW needs to
    > check
    > the file back in. If you are using another program for
    this part of the
    > operation then you will have problems with DW.
    >
    > --
    > Paul Whitham
    > Certified Dreamweaver MX2004 Professional
    > Adobe Community Expert - Dreamweaver
    >
    > Valleybiz Internet Design
    > www.valleybiz.net
    >
    > "Hurleyburley" <[email protected]>
    wrote in message
    > news:[email protected]...
    > >
    quote:
    Originally posted by:
    Newsgroup User
    > >
    > > Thanks alot for the help!
    > >
    > > I did enable Contribute in my Remote site. I was
    able to download the
    > > files
    > > to my computer and make changes. When I tried to
    upload the updated
    > > .htm
    > > files
    > > I got an error message saying "Encountered 1 errors
    (sic) during the
    > > transfer."
    > >
    > >
    > > Due to security reasons our university permits file
    transfers using a
    > > product
    > > called SSH Secure File Transfer Client. Does using
    the SSH FTC product
    > > instead of Dreamweaver's FTP connection create a
    problem for the .LCK
    > > check-in/check-out feature? Or is there something
    else that needs to be
    > > addressed?
    > >
    > >
    > >
    > > You need to NOT do this. Have you enabled
    Contribute in your Remote
    > > site
    > > definition?
    > > --
    > > Murray --- ICQ 71997575
    > > Adobe Community Expert
    > > (If you *MUST* email me, don't LAUGH when you do
    so!)
    > > ==================
    > >
    http://www.dreamweavermx-templates.com
    - Template Triage!
    > >
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    > >
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    > >
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    > > ==================
    > >
    > >
    > > "Hurleyburley" <[email protected]>
    wrote in message
    > > news:[email protected]...
    > > > Is there any way of over-riding .LCK files?
    > > >
    > > > I?ve recently been given access to administer
    a department webpage at
    > > > a
    > > > university and defined a site on my computer -
    but when I accessed the
    > > > server's
    > > > directory I found the .htm files have the .LCK
    extension. I was able
    > > > to
    > > > download the files but am prevented from
    uploading any files. The
    > > > original
    > > > webperson has left and no one has any
    information.
    > > >
    > > > I was checking the archives and see that the
    .LCK is related to
    > > > Dreamweaver's
    > > > "check-in/check-out" feature which allows
    tracking of files when
    > > > working
    > > > in
    > > > groups. But since I'm now become "the group",
    how do I over-ride this
    > > > feature
    > > > so I can work on the .htm files?
    > > >
    > > > ~CK
    > > >
    > >
    > >
    > >
    > >
    > >
    > >
    >
    >
    >
    >
    >
    >

  • 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

  • JRE7Update25 Deployment Properties File Not Working And Cant Disable Next Gen Plugin

    Good Day
    Our organisation needs to deploy JRE7U25 to over 4000 workstations. Our desktops are running the following Windows and IE combinations:
    WinXP 32 Bit/IE7
    WinXP 32 Bit/IE8
    Win7 32 Bit/IE8
    Win7 32 Bit/IE9
    Win7 64 Bit/IE8
    Win7 64 Bit/IE8
    We use the 32bit JRE installer across all environments and all IE browsers use 32Bit IE. On all of our environments the Deployment.properties and config files no longer work due to what appears to be a bug in the JRE7U25 installer. Our deployment files are as follows:
    Deployment.config
    deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
    deployment.system.config.mandatory=true
    Deployment.properties
    deployment.security.level=MEDIUM
    deployment.security.level.locked=
    deployment.javaws.autodownload=NEVER
    deployment.javaws.autodownload.locked=
    deployment.security.mixcode=HIDE_RUN
    deployment.security.mixcode.locked=
    deployment.console.startup.mode=HIDE
    deployment.console.startup.mode.locked=
    Both files are being copied to the following location:
    C:\Windows\Sun\Java\Deployment
    After the installer runs and deployment files are copied to the workstation the deployment.properties and config files look like this:
    Deployment.config
    deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
    deployment.system.config.mandatory=true
    Deployment.properties
    #System Deployment Properties
    #Mon Jul 01 12:29:20 CAT 2013
    deployment.security.level=MEDIUM
    I have tried changing the deployment.config file as follows in an attempt to fix this to no avail:
    1. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=true
    2. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=false
    3. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=true
    4. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=false
    5. deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    None of the above mentioned works. So all our required settings in the deployment.properties file are being overwritten when opening the Java console? Our other major problem is that Changing the registry key to 0 in order to disable the next generation plugin does not disable the next generation plugin in Jre at the usual location as it worked for us machine wide (across multiple profiles for JRE6U29):
    [HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\10.25.2]
    "UseNewJavaPlugin"=dword:00000000
    ^^I have observed on a fresh install of JRE7U25 that the above mentioned registry key no longer exists in this version so a computer wide disablement of this option is no longer possible via the registry.
    On our 32Bit and 64bit machines running the 32 bit JRE 7U25 client when we disable the next generation plugin it keeps enabling itself again. Even when we run the javacpl.exe to run as administrator by changing the compatibility settings and disabling the next generation plugin it enables itself again. This is a huge problem for us because our company Oracle web based applications need this plugin to be disabled in order to run the apps properly.
    These are major obstacles for our deployment as we desperately require assistance or any advice in addressing these issues as there appear to be numerous bugs with the JRE7U25 release. Thank you in advance.
    Update 7 July 2013:
    I have observed that if you have the following options in your Deployment.config file it doesn't allow our java webstart apps which use jnlp extensions to run.
    1. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=true
    2. deployment.system.config=C:\\WINDOWS\\Sun\\Java\\Deployment\\deployment.properties
        deployment.system.config.mandatory=false
    3. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=true
    4. deployment.system.config=C:\WINDOWS\Sun\Java\Deployment\deployment.properties
        deployment.system.config.mandatory=false
    The jnlp file association is also broken on Windows XP workstations with JRE7U25. We are having to manually associate the .jnlp file extension with javaws.exe on workstation for Web start apps or else users cannot lauch JRE whn clicking on .jnlp links.
    The only Deployment.config syntax which allows our Webstart applications to run is as follows:
    deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
    What a mess!

    I don't have an answer to the problem, but I am having problems with the system level deployment.properties file and IE9 on Windows 7 32/64bit.
    Starting with version 13, the IE plugin seems to igonore the system level deployment.properties file in favor of the user level deployment.properties file. When I open the Java Control Panel, the settings are correct per the system deployment.properties file. Currently to get the Java Plugin to work reliably in IE9 I have to set the following:
    _JAVA_OPTIONS = -Djava.net.preferIPv4Stack=true
    Disable caching
    Set the proxy to Direct Connection.
    If I set the _JAVA_OPTIONS as an environment variable and the other two in the system deployment.properties file, Firefox works fine, but IE wont load either of the Java tests. If I removed the system deployment.properties files and configure the user deployment.properties file, both IE and Firefox work fine.
    I find it interesting that if I set the configuration through the control panel, then apply the system deployment.propteries file, the user deployment.properties file reverts to defaults when the system file is removed.

  • In a new Application, the ApplicationResources_en.properties file is not having the constraint messages created

    Hi Everyone:
              We are using JDev 11.1.2 and JHeadstart 11.1.2.  We have been having a multitude of problems when running applications through the migrator (and we have now been told by an Oracle consultant that the migrator is problematic), so we are trying to re-write things from scratch to bring them over from 11.1.1.4 to 11.1.2.
              I have been working on a simple application from scratch and discovered that the messages for constraints on the entities that I am using are not showing up in the ApplicationResources_en.properties.file.  We noticed a similar thing with converting an application using the migrator and that post is found here - java.lang.NullPointerException ADF_FACES-60097 message ***WITH SOLUTION*** -. 
              However, I didn't get a single reply to that thread. 
              I initially thought it was a migration issue, but this application is from scratch.  Whenever I tried to input an invalid value into a page column, the following exception would be received.
    "java.lang.NullPointerException  ADF_FACES-60097:For more information, please see the server's error log for an entry beginning with: ADF_FACES-60096:Server Exception during PPR, #"
               This Null Pointer turned out to be the missing message from the ApplicationResources_en.properties file.  In the new application I just wrote, I had to manually edit to add the following lines to the ApplicationResources_en.properties file and the application no longer gives me the error if I input an invalid value.
    VALIDATE_FEE_CATEGORY_3=Feecategory with this FeeCategory does not exist
    VALIDATE_ACADEMIC_TERM36=Academicterm with this EffectiveTermStart does not exist
    VALIDATE_ACADEMIC_TERM36_CASDEL=Cannot delete Academicterm while dependent Specialexchange exists
    VALIDATE_ACADEMIC_TERM37=Academicterm with this EffectiveTermEnd does not exist
    VALIDATE_ACADEMIC_TERM37_CASDEL=Cannot delete Academicterm while dependent Specialexchange exists
    VALIDATE_CURRENCY23=Currency with this Currency does not exist
    VALIDATE_CURRENCY23_CASDEL=Cannot delete Currency while dependent Specialexchange exists
    VALIDATE_FEE_CATEGORY_3=Feecategory with this FeeCategory does not exist
    VALIDATE_FEE_CATEGORY_3_CASDEL=Cannot delete Feecategory while dependent Specialexchange exists
    These constraints are found in the Entities .xml files  as shown below.  We are using a re-usable business components .jar file to import them in.
      <Key
        Name="UniqueFeeCategory"
        PrimaryKey="true">
        <DesignTime>
          <Attr Name="_DBObjectName" Value="UNIQUE_FEE_CATEGORY"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.FeeCategory"/>
          <Item Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.Currency"/>
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermEnd"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateAcademicTerm36">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_ACADTERM_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_ACADEMIC_TERM36"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermStart"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateAcademicTerm37">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_ACADTERM_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_ACADEMIC_TERM37"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.EffectiveTermEnd"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateCurrency23">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_CURRENCY_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_CURRENCY23"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.Currency"/>
        </AttrArray>
      </Key>
      <Key
        Name="ValidateFeeCategory3">
        <DesignTime>
          <Attr Name="_referencedKey" Value="UNIQUE_FEECAT_CODE"/>
          <Attr Name="_isForeign" Value="true"/>
          <Attr Name="_DBObjectName" Value="VALIDATE_FEE_CATEGORY_3"/>
        </DesignTime>
        <AttrArray Name="Attributes">
          <Item
            Value="its.sis.uwbm.AREdit.entityobjects.Specialexchange.FeeCategory"/>
        </AttrArray>
        Is this a known bug (I have searched and havent found it) and is there anything that I can do about it without having to manually add the messages?
    Mary
    UofW

    Hi Everyone:
               I have done some further testing.  We are using a re-usable Business Components .jar file to access our entities.  We import the .jar file into the project and create the ViewObjects and ViewLinks from that .jar file.
                It APPEARS that a test case using the HRSchema and using the Entities & Associates generates the constraint error messages, but when I use the .jar file of re-usable business components imported into the project, those constraint error messages are not created in the ApplicationResources_en.properties file.  I have created two testcases as well as the re-usable .jar file that I can send to you to show what I mean. 
                This behaviour seems to have shown up in 11.1.2 as there was no problem before this.
                 Please let me know where you'd like me to upload the testcases.
                 Thank you.
    Mary
    UofW

  • Properties File

    Are properties file secure? Would someone over the net be able to obtain my properties file used for a JSP page?

    It depends on where you put it. With JSPs you can use Java to access the server's file system. This means you can place the properties files anywhere you want. If you place the properties file in a place accessable to the web, like under webapps folder in Tomcat, than the rest of the world can view it if they find its name. (note, the user will not see your JSP code when they access your site, they will only see the HTML output, so they will not automatically know the name of the properties file...) If you put the properties file outside the web-accessable context, like in a WEB-INF directory, then you can still access it through the JSP, and it will remain un-reacheable from the internet.

  • Retreiving only particular keys from a properties file

    hello friends,
    can someone kindly tell me , is there any way to retreive only particular keys from a properties file .
    for e.g the file is as follows
    abc.properties
    ad_1 = "hello"
    ad_1_fg = "bye"
    ad_1_hj = "dfd"
    ad_1_jk = "sdfsdf"
    bk_2_jk = "sdfdsf"
    bk_2_lk = "klklk"
    so lets say at run time , i get the key ad_1 , and i am told to retreive all the keys from the properties file starting only with ad_1, then how do i do it.
    I tried using ResourceBundl,PropertyResourceBundle, but they all get all the keys, and tehre is no way to specify within them that get only keys with particular format.
    please do help me

    Retrieve all the properties, and then loop over them
    looking for those whose names match the pattern you
    need.hello jverd thanks for your quick response, i was thinking the same, but lets say i retreive all keys, then how do i match them to my pattern, i mean if some keys is like this jhk_ad_1 , so i dont want that , i only want keys starting from ad_1 , hope u got what i am trying to say.
    i mean i want all the keys that are starting from the runtime value i am getting

  • Passing Arguments/Properties File to SUN JAVA ONE WEBSERVER at startup

    We are porting a Java App currently running on an Orion Web Server to Sun Java One Web Sever.
    We have found that with the various java application servers we've used over the years, that each want to find the properties file in a different spot. They way we've got around this is that we start Orion with a -D option to java to set a system property called cdsProps. Example: java -DcdsProps=Path_to_properties_file. We then reference that cdsProps arugment throughout the java code so it knows where to find the properties file. Because the cdsProps argument is used thoughout the java code, if the -D option is not used when starting the webserver to point to the properties file, the website will not function properly.

    in the case above, the command line arguments are passed in the aaaaaaaaaaaaaaaaaaaaaaarggggggggggs array
    you probably want aaaaaaaaaaaaaaaaaaaaaaarggggggggggs[0] for the filenameAm not sure i understand, do you mean i must change the param of the main method to String[] args[0] as this resulted in error when i did so. Or do you mean at command line instead file simply being passed to the Compressor program as
    "java Compressor < examplefilename"
    It has to be "java Compressor < examplefilename[0]" ?
    If you could expand on this, would be grateful,
    Thanks.

  • JNDI Properties file

    Hi,
    Im having trouble setting up my first J2EE EJB and client program. I have managed to pinpoint the problem to be with the selection of the JNDI service provider (keep getting a NoInitialContextException).
    Both client and EJB are on the same machine, and Im using Sun's app server v8 . Could someone tell me what I should have in the jndi.properties file, and where this file should be put. I have tried hard-coding the details into the program, but w/o success.
    I assume that using the jndi.properties file will assign a provider globally across all applications in this server - is this true?
    Thanks.

    I read somewhere that the standard j2ee.jar file (which I have in my classpath) contains a default jndi.properties file to allow basic JNDI access.
    If this is true, then the problem is not with these properties. Heres what I have:
    I compiled the classes using javac, no problems (j2ee.jar is in the classpath).
    I am trying to run the client using java -classpath ClientApp.jar FirstClient, where ClientApp.jar is the stubs/skeletons produced at deployment. This method keeps throwing a NoInitialContextException.: need to specify class name . . .
    I also tried using appclient, but that threw even more errors (not entirely sure whats going on here).
    I have checked over my code, and as far as I can see the problem is not in there - Im sure its something to do with the classpath or something - is there a classpath I should be adding to get the client working?
    Why is J2EE so hard to learn? I find myself struggling more with footery errors than I do actuially reading and learning about how to use it.
    Thanks.

  • NT Realm and Properties Files

    Hi,
    Does anyone experience similar problem. I am using NT Realm using a user already define in my NT domain. The properties File for WLS required that password be present for the system user.
    Having this when I start weblogic, I can log onto WLS with password define for the system user in NT domain as well as the funny password I put in the properties file just to fill the requirement.
    I thought that the password define in NT domain should prevail over the one define in the properties file. Is there any solution around this? Any help will be greatly appreciate?
    Thanks.
    Amen Akakpo

    hi,
    use PreferredMaxBytes=0 in the config.xml something like.
    <NTRealm Name="MyNTRealm" PreferredMaxBytes="0"
    PrimaryDomain="xyz.com"/>
    thanks
    kiran
    "Marco Righetti" <[email protected]> wrote in message
    news:3cc745f8$[email protected]..
    >
    I´m facing a problem with JVM when configured my NT Security Realm in WLS6.1 SP2.
    NT server 4 SP6a. When WLS started, I got message reporting ACCESSVIOLATION at module
    NTAPI32.DLL (outside JVM) in Function: LocalGroupEnum. After teh WLS isterminated.
    The user that start WLS has rights in Domain as part of system and tokensand he
    is member of Administrators (both Local and Domain groups)
    Does anyone know what is happening ?
    Regards
    Marco

  • Very weird issue with server logging when using log4j.properties file

    I'm using log4j logging. In log4j.properties the root logger is set up to use the ServerLoggingAppender class so that all our application logs go to the main server logfile. In addition, there are several appenders defined for specific components, with output going to specific per-component log files. Everything is going fine until I launch the server console. At this point all of those per-component log files get wiped out (zero length) and some non-ASCII lines are written to at least one of these files, after which the logs appear to be fine. The main server log file does not appear to be affected (because the root logger is set to "warn" level, while component-specific loggers are set to trace, the contents in these files is different; however I tried disabling all the other appenders and turning the root logger up to trace, and that still did not re-create the problem in the main server log file.
    And here's the really weird part -- if I use the same configuration, but in a log4j.xml file, the problem does not happen.

    Figured it out.
    We were passing in the configuration for log4j as -Dlog4j.configuration=file:/<properties file> and this was added to the command line for both the managed and admin servers. Problem is that the console app starts its own instance of log4j, and when it reads the configuration for the appenders it initializes or rolls over the files. At some point we have two JVMs accessing the same files, so some corruption is bound to happen.
    I'm not clear why the .xml file made a difference, but earlier we had been passing the log4j configuration as a jar file placed in the domain/lib folder, so perhaps the designer reverted to that (placed the log4j.xml file in a jar in lib, and not simply changed the -Dlog4j.configuration=file:/ option.

  • Error reading properties file upon deployment

    hi. i'm still relatively new with regards to the Java programming language. in any case... i am developing a simple project wherein the application has to make a database connection to a server. the application is finished already however.. i am having problems deploying it.
    my project has a "resources" package containing the file "config.properties" which contains various information (connection details among others). correct me if im doing something wrong, but in deploying in, i copied the "dist" folder of my compiled code and then tried to run the java exe independently which resulted in an error. i already tried copying the "config.properties" file to the dist folder and even creating a "resources\config.properties" file but it still results in an error. could you please help me figure out how to deploy the application with the properties file. the code i used in referencing my .properties file is as follows:
    Properties configFile = new Properties();
                configFile.load(this.getClass().getClassLoader().getResourceAsStream("Resources\\config.properties"));
                String username = configFile.getProperty("username");
                String password = configFile.getProperty("password");
                String url = configFile.getProperty("url");
                String dbtype = configFile.getProperty("dbtype");
                Class.forName(dbtype);
                conn = DriverManager.getConnection(url, username, password); thanks in advance. ^^

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Error reading Properties file

    I have a main method which i am using to call a servlet located in the same Development Component. Until recently i had the servlet location hard coded and it was working without issues. Now i decided to make the location configurable. For this i created an sap.application.global.properties file in the EAR DC which contains the WAR of this DC.
    The contents of the above file are as follows:
    SAP application properties
    SERVLET.LOCATION=http://<server-name>/ControllerServlet/servlet/com.nike.xapps.eqptsp.swem.controller.ControllerServlet
    The code i am using in the main method to call this properties file and access the property is as follows:
    Context ctx = new InitialContext();
    ApplicationConfigHandlerFactory cfgHdlr = (ApplicationConfigHandlerFactory)ctx.lookup("ApplicationConfiguration");          
    Properties props = cfgHdlr.getApplicationProperties();
    String servlet = props.getProperty("SERVLET.LOCATION");
    contained in a try...catch block.
    On dubugging i get a NoInitialContextException repeatedly in the statement where the lookup is performed.
    These are all the additions i have made for reading this properties file. Does anyone know if there is anything more that needs to be done for this to work.
    Thanks,
    Murtaza.

    thank for the help mangst. i guess the IO approach is also applicable ^^; i changed my code to:
    configFile.load( new FileInputStream( ".\\resources\\config.properties" ) );but i had a little trouble in debugging it since it starts the file search from the main project directory. however it works fine upon deployment. ^^; thanks again.
    Edited by: xnofate on Sep 23, 2008 6:21 PM

  • Display data on ADF table using a VO binded to a message.properties file

    Hi,
    I want to display data in a JSPX page using ADF table which is based on a ViewObject. The attributes of the ViewObject should get it's value from a abc.properties file(static file).How can i achieve this.
    thanks in advance.
    regards,
    Himanshu.

    Hi Himanshu,
    When you create a VO based on static values, all of the records from your VO are generated into the MessageBundel.properties file like this
    devguide.entity.ViewObj.SL_0_0=1
    devguide.entity.ViewObj.SL_0_1=<val1>
    devguide.entity.ViewObj.SL_0_2=<val2>
    devguide.entity.ViewObj.SL_1_0=2
    devguide.entity.ViewObj.SL_1_1=<val1>
    devguide.entity.ViewObj.SL_1_2=<val2>
    You could add more lines to the properties files maintaining the same pattern. Also noticed that you can read all the values from a CSV file as well.
    The last resource is to programmatically read the file and start creating new rows on the VO, which won't use any of the declarative tools for VOs.
    -Juan Camilo.

  • When I sync my iPhone to itunes it shows over 7GB of "other" files.

    My phone has been showing a "full" status and when I synced it I saw that no matter how many songs and apps I deleted, the "other" category kept growing. My brother told me about a trick to swipe the "music" section in the "about/ usage" setting and this seemed to get rid of the "other" but it also seemed to mess up my music player app- it keeps skipping through my songs. 
    I have attempted to fix it using this again but it has not worked.  I have over 7GB of "other" files, my voice memos are no longer on my playlist despite selecting it to sync.  I also seem to have lost over 200 songs which will not sync.  I have only ever purchased music via itunes. 
    My phone continues to warn me that it is full but I do not know how to get rid of the "other" category.  I am surprised to find out that apple charges $35 to get support.  Wow.
    Any help on this would be great, because I seem to have lost access to my music, I've lost important voice memos, my music app is not playing properly, and my phone continues to warn me that it is full.
    Thank you. 

    I should mention that I also did a restore hoping that would solve the problem but it did not, and it was after this that I lost some of my music. 

Maybe you are looking for

  • How do you sync your music from I tunes to a new device Nano

    I can't seem to download music that I have bought from I tunes on to my new device which is the I Pod Nano

  • Receiver File Adapter - Create File on another SAP System

    I am working on a project that includes this requirement:  PDF files to be copied from a third party company via SFTP to a directory on our ECC system. We have worked out the sender side config, and the transfer of the files into PI works fine via SF

  • Method Not Found Invoke Node error 1316 using Solid Works IEdm

    Hi Forum members, I have been having a problem with calling a function in a dll file.  I have attached the VI as example.  When I use the GetFile method I get a reference to that.  I then use the Invoke node and recieve a list of methods, the first o

  • IBook hard drive disappears!

    I installed Leopard on my ibook last week and it has been running pretty much problem free for the past week. This morning I woke the computer from sleep and it was running very slow, and then it froze. I went to restart, but I was greeted with the f

  • Datasources getting deactivated after system restart

    Hi, We are facing a issue while system restart the datasources are getting deactivated. Can anyone let me know where to check to debug this issue. Thanks & Regards, Ankur Deshpande P.S: Points will be awarded