URLconnection.getLastModified cannot identify file changes after connection

In my code, I am using URLconnection.getLastModified to watch for file changes. Unfortunately, when the file changes after the URLconnection is made, it does not recognize the file changes. Any ideas on how to make this work?
Thanks
public FileChangeMonitor(URL fileURL) throws IOException {
targetURLconnection = fileURL.openConnection();
targetURLconnection.setUseCaches(false);// This didn't seem to help - can be deleted.
public static void main(String[] args) throws InterruptedException {
FileChangeMonitor testFileChangeMonitor = null;
try {
URL MyDataFile = new URL("http://localhost/MyDataFile.xml");
testFileChangeMonitor = new FileChangeMonitor(MyDataFile);
} catch (IOException i) {
testFileChangeMonitor.start();
@Override
public void run() {
long lm = targetURLconnection.getLastModified();
long lm2 = 0;
try {
while (true) {
Thread.sleep(POLL_INTERVAL);
lm2 = targetURLconnection.getLastModified();
if (lm2 != lm) {
flag = FLAG_CHANGED;
lm = lm2;
fireStateChanged();
System.out.println("MyDataFile Changed!!!");
} catch (InterruptedException e) {
e.printStackTrace();
}

If (hypothetically speaking) you had an HTTP URL (which of course points to a resource in general but it might happen to be a file in your case), then a common way to examine its last-modified date is to send an HTTP HEAD request and examine the headers in the response.

Similar Messages

  • Alias Name Changed after Connecting a Disabled Mailbox

    Hi all, Good day.
    I have a quetion. A mailbox was disabled by mistake, so I have to connect it. Now problem appearred: the correct format of our email address is
    [email protected], but after connecting, the email address became
    [email protected], but the username is still peter.fiala.
    Environment: Windows Server 2008 R2 + Exchange Server 2013.
    How can I connect the disabled mailbox with the correct address/alias? Thank you.

    Hi,
    I was wondering if you have setup of the global email address policy, though you can manually add the email address via going into the properties of the mailbox >> mailbox features >> email address but you need to identify the cause of this email
    change, global email address policy should be at the HUB server - check the properties of the policy.
    To edit the existing email address follow the below steps
    In the EAC, navigate to Recipients > Mailboxes.
    In the list of user mailboxes, click the mailbox that you want to add an email address to, and then click Edit .
    On the mailbox properties page, click Email Address.
    Note:
    On the Email Address page, the primary SMTP address is displayed in bold text in the address list, with the uppercase SMTP value in the Type column.
    Click Add ,
    and then click SMTP to add an SMTP email address to this mailbox.
    Note:
    SMTP is the default email address type. You can also add Exchange Unified Messaging (EUM) addresses or custom addresses to a mailbox. For more information, see "Change user mailbox properties" in the Manage
    user mailboxes topic.
    Type the new SMTP address in the Email address box, and then click OK.
    The new address is displayed in the list of email addresses for the selected mailbox.
    Click Save to save the change.
    Best of luck
    Inderjit

  • Rman restoration - Cannot identify file

    Hi,
    I am doing a RMAN restoration in linux server named I have a full backup plus next two days incremental backup to restore database till time.
    I have created a instance started it wilth a pfile and restored the control file with below option
    RMAN> restore control file from C:\backups\control_123.ctl';
    The control file is succesfully restored...
    RMAN > Alter database mount;
    Database Mounted.
    when i tried to restore the USERS tablespace i am getting the below error that file cannot be identified.
    ORA-19870: error reading backup piece C:\Rman_files\hth_data_full_6304_1_770178761.bkp
    ORA-19505: failed to identify file "C:\Rman_files\hth_data_full_6304_1_770178761.bkp
    ORA-27037: unable to obtain file status
    My question is it mandatory to move the rman and archive log backup files to the path that is specified in the backup control file, can we copy the RMAN files to some other location instead of default control file location and restore from there ?
    Thanks
    Edited by: user11981262 on Mar 6, 2012 3:58 AM

    user11981262 wrote:
    Hi,
    I am doing a RMAN restoration in linux server named I have a full backup plus next two days incremental backup to restore database till time.
    I have created a instance started it wilth a pfile and restored the control file with below option
    RMAN> restore control file from C:\backups\control_123.ctl';
    The control file is succesfully restored...
    RMAN > Alter database mount;
    Database Mounted.
    when i tried to restore the USERS tablespace i am getting the below error that file cannot be identified.
    ORA-19870: error reading backup piece C:\Rman_files\hth_data_full_6304_1_770178761.bkp
    ORA-19505: failed to identify file "C:\Rman_files\hth_data_full_6304_1_770178761.bkp
    ORA-27037: unable to obtain file status
    My question is it mandatory to move the rman and archive log backup files to the path that is specified in the backup control file, can we copy the RMAN files to some other location instead of default control file location and restore from there ?
    Thanks
    Edited by: user11981262 on Mar 6, 2012 3:58 AM
    can we copy the RMAN files to some other location instead of default control file location and restore from there ? Catalog the backup before restoring the tablespace
    or just put the backup in the default location as in your case it is in folder "C:\Rman_files\"
    --neeraj

  • Cannot locate file, even after it's copied to itunes

    I download a mp3 from a radio show I like everyday. I use to be able to download the file to my desktop, and then drag it to the right playlist in itunes. After it's in itunes, I would delete the one on the desktop and I would have it in my library and be done with it.
    Well now for some reason after I copy it to itunes, as soon as I delete the 1st one from the desktop, it says it can't locate it and offers for me to locate it. I don't want to leave it on the desktop. Why the sudden change?
    Any ideas?

    By default iTunes stores it's files in <your profile>\<profile's music>iTunes\iTunes Music\etc... When you add music to iTunes from outside this folder structure there is an option to either make a copy inside the folder or simply create a link to the file at it's current location. It would seem that this option has changed on your system so that iTunes no longer makes it's copy, thus when you delete the seeemingly redundant file from the desktop, iTunes then cannot find the file. Goto *Edit... Preferences > Advanced* and enable the option *Copy files to iTunes Music/Media folder when adding to the library*. If you're running iTunes 9 you could create a shortcut on your desktop to the new *Automaticaly add to iTunes* folder. You could then save your download into that folder and iTunes will automatically import it without the need for copies to be made or deleted.
    tt2

  • Subject Key Identifier (SKI) changed after RootCA upgrade

    Hello,
    I have a RootCA running windows 2003 ENT SP2 and I made an upgrade to a new machine (newer HW) and Windows 2008 R2.  The original rootCA was configured with an HSM, so the backup CA is not an option for me since the keys can not be exported (I dont
    have a .p12 file).
    I exported the HSM settings together with the keys (HSM vendor's procedure) and during the CA setup wizard, I select the option: "Use existing private key” and then “Select an existing private key on this computer” .  Then I click on "edit"
    select the correct CSP (the one from the HSM) and click on "Search".  The private key appears immediately, I select it and i keep going with the installation.  It all goes smoothly and CA services are correctly installed.
    The problem is that the SKI of the new CA certificate does not match with the SKI of the original CA certificate, it is changed somehow during the installation. 
    I have performed the same test, but migrating to another windows 2003 server, and the SKI is kept exactly the same, there is no difference (maybe the way the SKI is generated is different from windows 2003 to 2008).
    My applications communicate to each other using this SKI, replacing it everywhere is something that i dont want to consider.
    Does somebody know if it is possible to force this setting to be kept?
    Thanks in advance
    Best regards

    Hi Vadims,
    Thanks for your reply,  I have been playing a bit with openssl and a CA certificate, and in the meantime i solved the issue, and this is what I "guess" or what I understand from it:
    1) If you install CA services and use the options:  select and existing key --> select a certificate  --> then you will have to choose a p12 file which contains both (public and private key) and will use both values to generate a NEW certificate,
    but it will NOT generate the SKI value, it will just use the one from the p12 file.  That is why the SKI does not change if you use this option
    2) I am using an HSM and the private key is stored there and can not be exported, so, i can not generate a p12 file, in that case, I have the opther option in the wizard:  select an existing key --> use an existing key.... Then i can choose the correct
    private key from the HSM once i select the correct CSP... And then the fun begins:
    3) Acording to the RFC
    For CA certificates, subject key identifiers SHOULD be derived from
       the public key or a method that generates unique values.  Two common
       methods for generating key identifiers from the public key are:
          (1) The keyIdentifier is composed of the 160-bit SHA-1 hash of the
          value of the BIT STRING subjectPublicKey (excluding the tag,
          length, and number of unused bits).
          (2) The keyIdentifier is composed of a four bit type field with
          the value 0100 followed by the least significant 60 bits of the
          SHA-1 hash of the value of the BIT STRING subjectPublicKey
          (excluding the tag, length, and number of unused bit string bits).
    4) After all my openssl adventure, it all came down to 2 files containing the public key and the BIT STRING of the public key,  I opened them both and I confirmed that for the SKI generated on the windows 2008 machine, the method used to calculate the
    SKI is using the BIT STRING (option (1) from the RFC) 
    While for the SKI generated in the windows 2003 machine, the method is :  ???????
    What I think is that from windows 2003 to windows 2008 the certificate services changed the way they calculate the SKI.
    First they were maybe doing a SHA1 of the whole public key and now they are using a SHA1 of only the bitstring of the public key which is more similar to what is said on the RFC (point 1)).
    Then I started to look if there was a way to change this, and....

  • Disk Permissions changed after connecting mac via firewire on Target Disk Mode.

    I have connected 2 macbook pros using firewire in target disk mode and the permissions on the destination macbook pro have changed. Now when I try to start the macbook pro, it stays on the grey screen and the apple sign changes to a prohibitory sign, therefore I cant log in.
    Please help!
    Thanks

    I am unable to perform a safe boot, it simply wont happen.
    I tried to start from mac osx install disk and that works so I am able to go disk utility, I can run 'verify disk' and 'repair disk' and it shows that everything is ok, however, I cant 'verify disk permissions' or 'repair disk permissions' as both are greyed out because 'the selected disk is not mounted'. I try mounting but that wont work either, I am told to 'disk can not be mounted, run first aid first and then retry'.
    Furthermore, I try to perform 'archive and install' so I follow these instructions:
    http://support.apple.com/kb/HT1710
    But on number 7, intead of being able to choose volume to install to, there is nothing I can choose! There is no list. And of course I cant continue.
    Any help is appreciated!

  • Acrobat/Reader cannot cope with internal Webserver connectivity problems, leading to comments being hidden/deleted. Any thoughts?

    Adobe Acrobat/Reader do not cope with interruptions to access to the internal WebServer hosting the PDF/XML review files.
    Steps to reproduce the issue:
    Connection is lost to the WebServer hosting the PDF review files.
    After connection to the WebServer is regained, access to the PDF review files is blocked by Adobe Acrobat/Reader.
    Sometimes this can be resolved by deleting the entire contents of the folder:
              C:\Users\<user-name>\AppData\LocalLow\Adobe\Acrobat\11.0\Synchronizer
    NOTES:
    We have experienced this behaviour especially when connecting to the WebServer via VPN. I reckon the connectivity issues could be initially our problem, that Acrobat/Reader simply do not handle.
    Clearing the contents of the Synchronizer folder does not always work.
    Team members have also seen situations where significant numbers of review comments or status values have been not been displayed, but exist in the XML review files. In some cases comments/status values have been automatically deleted without warning from the Adobe review XML files.
    PDF reviews are sent out via email as links to the PDF review file hosted on an internal WebServer.
    Writers and reviewers in the team either have either:
    Acrobat XI Pro 11.0.08 with Reader 11.0.08
    Acrobat XI Pro 9.5.5 with Reader 11.0.08
    I have personally experienced the above behaviour with Acrobat XI Pro 11.0.08 and Reader 11.0.08.
    Could this experience be connected the Synchronizer (http://helpx.adobe.com/acrobat/kb/known-issues-acrobat-xi-reader.html )?
    For example, where a reviewer uses a different version of Acrobat/Reader?
    Could anyone please provide a list of compatible versions of Acrobat/Reader?
    Expected results:
    Adobe Acrobat/Reader should really handle connection issues with a warning and later check for recovered connections.
    However, what appears to be happening is that Acrobat/Reader writes some sort of blocking code to the Synchronizer folder that prevents future checks of the PDF review files on the review WebServer.
    As far as I understand, the connection issues are not caused by Adobe software, however the problems we are experiencing relate to how Adobe Acrobat/Reader handle this loss of connection.
    Plea for Help!
    I have checked and the experience of missing comments and persistent "connectivity issues" seems to be a reported but sadly outstanding issue...
    This has been an ongoing headache for some time, so solutions would be great, but any thoughts or suggestions are welcome...?
         For example, has anyone using SharePoint to host PDF reviews experienced anything similar?
    Many thanks!

    Adobe Acrobat 11.0.09 with Microsoft SharePoint Repository Trial Update
    We've completed week one of a three week trial (see above) that will go on until Friday 24th October.
    We currently have just four PDF files out for review that make use of the SharePoint repository.
    To-date:
    Each review file has had multiple concurrent reviewers posting comments over several days from both over the office LAN and also via VPN when working remotely.
    Dynamic stamps seem to be working as hoped and are all visible.
    We have not experienced any connection-type issues and the we have not had reason to clear out the Synchronizer folder as described above.
    Counter balance:
    I have experienced the situation with a remote VPN connection, where Adobe Acrobat could not connect to our internal WebServer repository. At the same time, I was able to connect to PDF review files hosted in SharePoint.
    Summary:
    The experience so far does suggest that problems are caused by the an inconsistent connection to the WebServer repository (especially over VPN) combined with Adobe Acrobat/Reader's inability to cope with the resulting situation.
    At the moment I must say that while it is early days, I am hopeful that the combination of SharePoint as the repository and the update to Adobe Acrobat/Reader 11.0.09 will continue to prove to be reliable.
    I'll provide an update to this post on Friday 24th October...
    Here's hoping!

  • IPlanet WebServer Hangs on JSP file change

    Hello,
    I am using IPlanetWebServer-Enterprise/4.1SP5 and the server just hangs when there is a JSP file changed after the first successfull load. Looking at ther errors log, I can see that it is doing:
    compileJSP(): invoking Java compiler, file =/.....
    When the first time its successful, it follows that compilsJSP() with
    For JSP Compilation : JDKLocation-/usr/java/, fork_java_c=no,enable_debug=yes
    Is there a fix for this problem?? Please help
    Thanks

    I did all of the 3 things that you told me in the context.properties file.
    The same behavior is still happening....here is the sequence
    1) start the server from scratch
    2) load the jsp file (ok)
    3) change the jsp file with emacs
    4) reload the jsp file (ok, see the changes)
    5) change ths jsp file with emacs again
    6) reload the jsp file (HANGS, browser is just waiting for reply)
    errors file trace...
    04/Mar/2002:11:49:44] info (12964): Service(): uri=/seehawk/optimizer/jsp/omCost.jsp cgiScriptName=/seehawk/optimizer/jsp/omCost.jsp token=null cached=false
    [04/Mar/2002:11:49:44] info (12964): JSP: This is a jsp 1.x file
    [04/Mar/2002:11:49:44] info (12964): JSP: Before JSP1x compiler.compile, servletName = /seehawk/optimizer/jsp/omCost.jsp servletPath = /usr/local/home/gasweb/seehawk/optimizer/jsp/omCost.jsp & dir = ../ClassCache
    [04/Mar/2002:11:49:44] info (12964): JSP1x Jasper Trace: Package name is: jsps.seehawk._optimizer._jsp
    [04/Mar/2002:11:49:44] info (12964): JSP1x Jasper Trace: Class name is: omCostjsp
    [04/Mar/2002:11:49:44] info (12964): JSP1x Jasper Trace: Java file name is: /usr/local/netscape/server4/https-kw_chan/config/../ClassCache/_jsps/_seehawk/_optimizer/_jsp/_omCost_jsp.java
    [04/Mar/2002:11:49:44] info (12964): JSP1x Jasper Trace: Class file name is: /usr/local/netscape/server4/https-kw_chan/config/../ClassCache/_jsps/_seehawk/_optimizer/_jsp/_omCost_jsp.class
    [04/Mar/2002:11:49:45] info (12964): JSP1x Jasper Trace: Compiling with: -classpath /usr/local/soap-2_2:/usr/local/xerces-2_0_0/xercesImpl.jar:/usr/local/xerces-2_0_0/xmlParserAPIs.jar:/usr/local/soap-2_2/lib/soap.jar:/usr/local/:/usr/local/netscape/server4/plugins/samples/servlets/beans.10/SDKBeans10.jar:/usr/local/netscape/server4/plugins/samples/servlets/beans/SDKBeans.jar:/usr/local/netscape/server4/bin/https/jar/Bugbase.jar:/usr/local/netscape/server4/bin/https/jar/Calljsac.jar:/gasweb:/usr/local/netscape/server4/webagent/java/SafeAdapter.jar:/usr/local/netscape/server4/webagent/java/SafeAdapterHelper.jar:/usr/local/netscape/server4/webagent/java/env.jar:/usr/local/netscape/server4/webagent/java/jsafe.jar:/usr/local/netscape/server4/webagent/java/msr.jar:/usr/local/netscape/server4/webagent/java/smjavaagentapi.jar:/usr/local/netscape/server4/webagent/java/smjavasdk.jar:/usr/local/netscape/server4/bin/https/jar/NSServletLayer.jar:/usr/local/netscape/server4/bin/https/jar/NSJavaUtil.jar:/usr/local/netscape/server4/bin/https/jar/NSJavaMiscUtil.jar:/usr/local/netscape/server4/bin/https/jar/servlets.jar:/usr/local/netscape/server4/bin/https/jar/jsp092.jar:/usr/local/netscape/server4/bin/https/jar/xml.jar:/usr/local/netscape/server4/bin/https/jar/jspengine.jar:/usr/local/netscape/server4/bin/https/jar/SSJS.jar:/usr/local/netscape/server4/bin/https/jar/js14lc30.jar:/usr/local/netscape/server4/bin/https/jar/ldapjdk.jar:::../ClassCache:/usr/local/netscape/server4/https-kw_chan/config/../ClassCache -d /usr/local/netscape/server4/https-kw_chan/config/../ClassCache /usr/local/netscape/server4/https-kw_chan/config/../ClassCache/_jsps/_seehawk/_optimizer/_jsp/_omCost_jsp.java
    [04/Mar/2002:11:49:45] info (12964): IWSJavaC.compile(): forking external compiler, java=/usr/java//bin/javac
    Thanks
    Ka-Wai

  • ORA-01157: cannot identify/lock data file 13 - see DBWR trace file

    Hi all,
    I've a Oracle Database 11g Release 11.1.0.6.0 - 64bit Production With the Real Application Clusters option.
    I'm using ASM.
    Yesterday I added new disks and then I changed the +/etc/udev/rules.d/98-oracle.rules+ file.
    Now it looks like this (the bolded are the new ones):
    # Oracle Configuration Registry
    KERNEL=="emcpowerd1", OWNER="root", GROUP="oinstall", MODE="640", NAME="ocr"
    # Voting Disks
    KERNEL=="emcpowerr1", OWNER="oracle", GROUP="oinstall", MODE="640", NAME="voting"
    # Spfile ASM+
    KERNEL=="emcpowers1", OWNER="oracle", GROUP="dba", MODE="660", NAME="spfileASM"
    # ASM Devices
    KERNEL=="emcpowerj1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm0" #onlineredo asm disk
    KERNEL=="emcpowern1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm1" #data asm disk
    KERNEL=="emcpowerh1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm2" #data asm disk
    KERNEL=="emcpowerq1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm3" #data asm disk
    KERNEL=="emcpowere1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm4" #data asm disk
    KERNEL=="emcpowerg1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm5" #data asm disk
    KERNEL=="emcpowerl1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm6" #data asm disk
    KERNEL=="emcpowero1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm7" #data asm disk
    KERNEL=="emcpowerf1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm8" #data asm disk
    KERNEL=="emcpowerm1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm9" #data asm disk
    KERNEL=="emcpoweri1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm10" #data asm disk
    KERNEL=="emcpowerp1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm11" #data asm disk
    KERNEL=="emcpowerk1", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm12" #data asm disk
    KERNEL=="emcpowert", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm210" #data asm disk SATA
    KERNEL=="emcpowerc", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm211" #data asm disk SATA
    KERNEL=="emcpowerb", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm212" #data asm disk SATA
    KERNEL=="emcpowera", OWNER="oracle", GROUP="dba", MODE="660", NAME="asm213" #data asm disk SATA
    It's the same on both RAC nodes.
    The operating system, a RedHat 5.4, see the new devices (both nodes):
    ls -ltr /dev/asm*
    brw-rw---- 1 oracle dba 120, 16 May 18 10:03 /dev/asm212
    brw-rw---- 1 oracle dba 120, 304 May 18 10:03 /dev/asm210
    brw-rw---- 1 oracle dba 120, 32 May 18 10:03 /dev/asm211
    brw-rw---- 1 oracle dba 120, 0 May 18 10:03 /dev/asm213
    brw-rw---- 1 oracle dba 120, 209 May 18 10:05 /dev/asm1
    brw-rw---- 1 oracle dba 120, 81 May 18 13:40 /dev/asm8
    brw-rw---- 1 oracle dba 120, 97 May 18 13:40 /dev/asm5
    brw-rw---- 1 oracle dba 120, 193 May 18 13:40 /dev/asm9
    brw-rw---- 1 oracle dba 120, 161 May 18 13:40 /dev/asm12
    brw-rw---- 1 oracle dba 120, 241 May 18 13:40 /dev/asm11
    brw-rw---- 1 oracle dba 120, 177 May 18 13:40 /dev/asm6
    brw-rw---- 1 oracle dba 120, 225 May 18 13:40 /dev/asm7
    brw-rw---- 1 oracle dba 120, 65 May 18 13:40 /dev/asm4
    brw-rw---- 1 oracle dba 120, 129 May 18 13:40 /dev/asm10
    brw-rw---- 1 oracle dba 120, 257 May 18 13:40 /dev/asm3
    brw-rw---- 1 oracle dba 120, 113 May 18 13:40 /dev/asm2
    brw-rw---- 1 oracle dba 120, 145 May 18 13:40 /dev/asm0
    Both ASM instance see new devices:
    From ASM1
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue May 18 13:43:10 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM1
    SQL> select path from v$asm_disk;
    PATH
    /dev/asm212
    /dev/asm211
    /dev/asm213
    /dev/asm210
    /dev/asm1
    /dev/asm4
    /dev/asm5
    /dev/asm0
    /dev/asm12
    /dev/asm9
    /dev/asm2
    /dev/asm10
    /dev/asm7
    /dev/asm11
    /dev/asm3
    /dev/asm8
    /dev/asm6
    17 rows selected.
    SQL>
    From ASM2
    SQL*Plus: Release 11.1.0.6.0 - Production on Tue May 18 13:42:39 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    Connected to:
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM2
    SQL> select path from v$asm_disk;
    PATH
    /dev/asm213
    /dev/asm211
    /dev/asm210
    /dev/asm212
    /dev/asm8
    /dev/asm7
    /dev/asm6
    /dev/asm11
    /dev/asm4
    /dev/asm12
    /dev/asm5
    /dev/asm9
    /dev/asm1
    /dev/asm3
    /dev/asm10
    /dev/asm2
    /dev/asm0
    17 rows selected.
    SQL>
    Then I created a disk group:
    CREATE DISKGROUP STORE EXTERNAL REDUNDANCY DISK '/dev/asm210';
    Then I created a new tablespace:
    CREATE TABLESPACE store DATAFILE '+STORE';
    I did all this operations from NODE1.
    What is happening now is that everytime I try to read something from new diskgroup FROM NODE2 I get the ORA-01157:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: '+STORE/evodb/datafile/store.256.719232707
    No problem to read from NODE1.
    The simple query on dba_data_file work from NODE1 and fails from NODE2 with the ORA-01157.
    I found this on the alert log:
    <msg time='2010-05-18T10:06:41.084+00:00' org_id='oracle' comp_id='rdbms'
    client_id='' type='UNKNOWN' level='16'
    module='' pid='11014'>
    <txt>Errors in file /u01/app/oracle/diag/rdbms/evodb/EVODB2/trace/EVODB2_smon_11014.trc:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: &apos;+STORE/evodb/datafile/store.256.719232707&apos;
    </txt>
    </msg>
    And this from the trace:
    Trace file /u01/app/oracle/diag/rdbms/evodb/EVODB2/trace/EVODB2_smon_11014.trc
    Oracle Database 11g Release 11.1.0.6.0 - 64bit Production
    With the Real Application Clusters option
    ORACLE_HOME = /u01/app/oracle/product/11.1.0/db1
    System name: Linux
    Node name: node02
    Release: 2.6.18-128.7.1.el5
    Version: #1 SMP Wed Aug 19 04:00:49 EDT 2009
    Machine: x86_64
    Instance name: EVODB2
    Redo thread mounted by this instance: 2
    Oracle process number: 19
    Unix process pid: 11014, image: oracle@node02 (SMON)
    *** 2010-05-18 10:06:41.084
    *** SESSION ID:(151.1) 2010-05-18 10:06:41.084
    *** CLIENT ID:() 2010-05-18 10:06:41.084
    *** SERVICE NAME:(SYS$BACKGROUND) 2010-05-18 10:06:41.084
    *** MODULE NAME:() 2010-05-18 10:06:41.084
    *** ACTION NAME:() 2010-05-18 10:06:41.084
    DDE rules only execution for: ORA 1110
    ----- START Event Driven Actions Dump ----
    ---- END Event Driven Actions Dump ----
    ----- START DDE Actions Dump -----
    ----- DDE Action: 'DB_STRUCTURE_INTEGRITY_CHECK' (Async) -----
    Successfully dispatched
    ----- (Action duration in csec: 0) -----
    ----- END DDE Actions Dump -----
    *** 2010-05-18 10:06:41.084
    SMON: following errors trapped and ignored:
    ORA-01157: cannot identify/lock data file 13 - see DBWR trace file
    ORA-01110: data file 13: '+STORE/evodb/datafile/store.256.719232707'
    Any suggestion about how to solve the problem?
    Thanks in advance!
    Samuel

    I didn't understand what do you mean with thread...
    But I think you found the problem
    Initialization files of both ASM instance are: SPFILE='/dev/spfileASM'
    that SPFILE is (common for both):
    +ASM2.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment
    +ASM2.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA'
    +ASM1.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA','STORE'#Manual Mount
    *.asm_diskstring='/dev/asm*'
    *.cluster_database=true
    *.diagnostic_dest='/u01/app/oracle'
    +ASM1.instance_number=1
    +ASM2.instance_number=2
    *.instance_type='asm'
    *.large_pool_size=12M
    +ASM1.local_listener='LISTENER_ASM'
    +AC
    Then I executed another query:
    From ASM1
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM1
    SQL> select name, state from v$asm_diskgroup;
    NAME STATE
    ARCHIVELOG MOUNTED
    DATA MOUNTED
    ONLINELOG MOUNTED
    STORE MOUNTED
    SQL>
    From ASM2
    SQL> select instance_name from v$instance;
    INSTANCE_NAME
    +ASM2
    SQL> select name, state from v$asm_diskgroup;
    NAME STATE
    ARCHIVELOG MOUNTED
    DATA MOUNTED
    ONLINELOG MOUNTED
    STORE DISMOUNTED
    SQL>
    Than the question is:
    how can I mount the disk group STORE also on ASM2?
    I think the problems is into the spfile lines:
    +ASM2.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA'
    +ASM1.asm_diskgroups='ONLINELOG','ARCHIVELOG','DATA','STORE'
    How can I change the +ASM2.asm_diskgroups value?
    Thanks

  • Failed to open the connection after changing the connection in CMC

    Hi
    Below are our environment details:
    BOXI 3.1 SP3
    Solaris Sparc 10
    Crystal Reports 2008 Sp3
    Weblogic 11g
    Our team is facing the problem as described below:
    We have created Crystal Reports using JDBC connection and it works fine
    in an environment(SIT).
    When we migrate these reports to the another environment(UAT) we get
    the error "Failed to open the connection"
    After migrating we indeed change the connection to Custom Database
    Login Information in CMC.
    So to troubleshoot we installed Crystal Reports in UAT environment and
    had to perform Set DataLocation after which
    the reports starting working fine.
    Now when we are migrating reports to Production we have the same issue.
    We cannot install Crystal Reports on Production this time and hence we
    are stuck.
    Please let us know if any known workaround or solution for the same.
    Thanks
    Kamal
    Edited by: Kamalaksha Shetty on Nov 15, 2011 4:18 AM

    Hi Meenal,
    I am not 100% sure I understood the workaround of having Crystal Designer on the server. Can you connect from UAT designer to production and perform the same operation?
    Check this KBA that describes this problem and a solution:
    https://service.sap.com/sap/support/notes/1445067
    Regards,
    Julian

  • "cannot find file" after formatting and moving!!

    Wanted to have iTunes library included in Time Capsule backup. So had to reformat external hardrives where all my songs are from Windows do OS. Copied everything on other HD, reformatted HD with OS, copied back all songs. HD still has same name "MUSIC", but iTunes cannot find files.
    Changed in iTunes preferences the location of files to ensure it searches in the right place AND also replaced with text editor in "iTunes Music Library.xml" file all links with new address of HD (now after reformatting to OS I found it to be slightly different despite still same name).
    But iTunes still cannot find the files. Everything is the same as before, HD name, directory structure, file names, etc. ONLY difference is it all is on "OS formatted" drive. Don't want to lose ratings and playlists of over 15,000 songs....is there still a solution?

    The moment I "drag out" the Tunes Library File, then there is nothing left there, and when I open iTunes it is empty.
    That's as expected. That file is the database iTunes uses that keeps track of everything, so when you then launch iTunes, it's starting from scratch.
    I can import the Playlists from the XML and they do appear, but still no songs, all is empty. If I try to reimport from the new location, then they "do not fit into the playlists", meaning ratings etc. are lost.
    Then you apparently didn't get the XML file edited properly; it's not easy to do.
    Why does the simple location function in iTunes Preferences not work?
    It does, when used as designed. The preference is where new additions (imports & purchases) will be stored. It does not change the location for existing files.
    Put the original library file back. Then launch iTunes, Get Info on a representative track, and look at the path to where it thinks the files should be and compare that to the actual path. Any difference at all will break things. If there are differences (drive name slightly different, any difference in folder names/structure, etc.; letter case counts), try correcting them in Finder and see if that gets things working again. If not, then you'll have to use the Add to Library command to get back your tracks which will lose all your ratings, etc.
    Where does iTunes save the links to the original files so it can simply be changed?
    In the iTunes Library file, which cannot be manually edited.

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DB

    I am deploying my application components on Oracle RAC database, when i install my app component i will run a script which creates a user and tablespace on bot rac-nodes(node1 and node2)
    as database is clustered, the user are created on 2 nodes and tablespace is stored in a shared location for two rac nodes
    i am able to successfully run my script on rac-node1 and and installed my component and when i started installing the app component on node2 getting error
    java.sql.SQLException: ORA-01157: cannot identify/lock data file 7 - see DBWR trace file
    ORA-01110: data file 7: '/db/db/db/ora10g/10.2.0/admin/dbadmin_01.dbf'
    ORA-06512: at "ADMIN.XL_SP_DBCHECK", line 48
    ORA-06512: at line 1
    "dbadmin_01.dbf is the custom tablespace which created by me"
    i a mgetting error while installing the app component on rac-node2

    You should not create database files outside of the ASM.
    I'm not sure you can move the datafile, I would export the data from the tablespace (if there is data you need there), delete the tablespace and recreate it in the ASM, then import the data back.
    If you want to move the datafile, you can try using RMAN (from node1).
    First connect to the database with sqlplus and execute:
    alter tablespace <tbs_name> offline;Then start RMAN: rman target /
    BACKUP AS COPY DATAFILE '<file>' FORMAT '+<ASM_DG>';Then in sqlplus, execute:
    alter tablespace <tbs_name> online;I'm not sure it will work, and I hope I got the commands right because I can't check it right now.
    Good luck
    Liron Amitzi
    Senior DBA consultant
    [www.dbsnaps.com]
    [www.orbiumsoftware.com]

  • Java.sql.SQLException: ORA-01157: cannot identify/lock data file : PLz Help

    My datafiles are in ASM file system, however the only one file ACIPEN_DATA is the one, which is not in ASM file system, and this the file which is in concern.
    We are getting the following exception in the lxkratgas1.lex1.lexmark.com when connecting to ACIPEN_DATA.
    This exception is coming up sometimes and the sometimes the file is getting processed successfully
    Caused by: java.sql.SQLException: ORA-01157: cannot identify/lock data file 9 - see DBWR trace file
    ORA-01110: data file 9: '/oracle/SE/product/10.2.0/db_1/dbs/ACIPEN_DATA'
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1169)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3285)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3368)
    at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:278)
    at atg.adapter.gsa.SQLStatement.executeUpdate(SQLStatement.java:725)
    at atg.adapter.gsa.Table.insert(Table.java:1378)
    at atg.adapter.gsa.GSAItemDescriptor.addItem(GSAItemDescriptor.java:6272)
    ... 61 more
    ====================================================================
    We have checked the datafile, it is absolutely online.
    Can some expert jump in and resolve this issue Please.

    01157, 00000, "cannot identify/lock data file %s - see DBWR trace file"
    // *Cause:  The background process was either unable to find one of the data
    //         files or failed to lock it because the file was already in use.
    //         The database will prohibit access to this file but other files will
    //         be unaffected. However the first instance to open the database will
    //         need to access all online data files. Accompanying error from the
    //         operating system describes why the file could not be identified.
    // *Action: Have operating system make file available to database. Then either
    //         open the database or do ALTER SYSTEM CHECK DATAFILES.is this a RAC database?

  • ORA-01157: cannot identify/lock data file error in standby database.

    Hi,
    i have a primary database and standby database (11.2.0.1.0) running in ASM with different diskgroup names. I applied an incremental backup on standby database to resolve archive log gap and generated a controlfile for standby in primary database and restored the controlfile in standby database.But when i started the MRP process its not starting and thows error in alert log ORA-01157: cannot identify/lock data file. When i queried the standby database file it shows the location on primary database datafiles names not the standby database.
    PRIMARY DATABASE
    SQL> select name from v$datafile;
    NAME
    +DATA/oradb/datafile/system.256.788911005
    +DATA/oradb/datafile/sysaux.257.788911005
    +DATA/oradb/datafile/undotbs1.258.788911005
    +DATA/oradb/datafile/users.259.788911005
    STANDBY DATABASE
    SQL> select name from v$datafile;
    NAME
    +STDBY/oradb/datafile/system.256.788911005
    +STDBY/oradb/datafile/sysaux.257.788911005
    +STDBY/oradb/datafile/undotbs1.258.788911005
    +STDBY/oradb/datafile/users.259.788911005
    The Actual physical location of standby database files in ASM in standby server is shown below
    ASMCMD> pwd
    +STDBY/11gdb/DATAFILE
    ASMCMD>
    ASMCMD> ls
    SYSAUX.259.805921967
    SYSTEM.258.805921881
    UNDOTBS1.260.805922023
    USERS.261.805922029
    ASMCMD>
    ASMCMD> pwd
    +STDBY/11gdb/DATAFILE
    i even tried to rename the datafiles in standby database but it throws error
    ERROR at line 1:
    ORA-01511: error in renaming log/data files
    ORA-01275: Operation RENAME is not allowed if standby file management is
    automatic.
    Regards,
    007

    Hi saurabh,
    I tried to rename the datafiles in standby database after restoring it throws the below error
    ERROR at line 1:
    ORA-01511: error in renaming log/data files
    ORA-01275: Operation RENAME is not allowed if standby file management is
    automatic.
    Also in my pfile i have mentioned the below parameters
    *.db_create_file_dest='+STDBY'
    *.db_domain=''
    *.db_file_name_convert='+DATA','+STDBY'
    *.db_name='ORADB'
    *.db_unique_name='11GDB'
    Regards,
    007

  • Can anyone help me with an iWeb problem? I cannot save the site after making changes. I receive this error: "website.sites2 could not be saved"

    Can anyone help me with an iWeb problem? I cannot save the site after making changes. I receive this error: "website.sites2 could not be saved"

    You could try duplicating the Domain.sites2 file and launch this in iWeb. Delete the last page you edited and try saving. If that doesn't work, undo and try deleting another and so on...
    If you can find the problem page you would only have to rebuild it rather than the whole site.
    The other possibility is to create a new site on the same domain file and drag each page in turn down to it from the top site and try to save each time.

Maybe you are looking for

  • Anyone else having duplication issues?

    every so often after having edge animate open for an undeterminate ammount of time I'd press ctrl+d to duplicate something. and in the undo history it says object is duplicated while there's nothing new in the elements tab. I'd have to save close edg

  • JSF DB Connection Best Practices

    During the life of a JavaServer Faces request, what are some best practices for storing a db connection? For the duration of the transaction, a single connection should be created before db updates, made available to (possibly) multiple model objects

  • Creating deployable proxy in NWDS 7.1 EHP1

    Hello all, As mentioned in the link http://help.sap.com/saphelp_nw70/helpdata/EN/2d/b9766df88f4a24967dae38cb672fe1/frameset.htm but in the link its for older version of NWDS How to create deployable proxy in NWDS 7.1 EHP1 Regards, Ronniee

  • Unwanted Duplicate Audio Track

    I've got a few video clips that keep giving me trouble in iMovie '13. When played back in iMovie, they have a second audio track that is a slow-mo version of the main audio. I recorded the clips at 1080p on a Nikon d3100. I converted them to 720p usi

  • Canonical data model  Question?

    How can XI support a canonical data model ?  We don't want point-to-point mappings....We always want to map to and from a central message/data model which will be based on canonical data model. regards, tony