FileChannel.tryLock() prevent backup sotware to read the lock file
Hello,
In the startup code of my application I lock a file for the whole session to prevent the application to be restarted. This mechanism works fine, however when I try to zip the folder that contains the locked file and the application is still running, winzip fails saying "can read file".
Is there a way to create a lock such that the content of the file can be read?
I'm running with Java 1.4.2_03-b2 on win2000, FAT32
Thank you in advance.
Hello,
In the startup code of my application I lock a file
for the whole session to prevent the application to be
restarted..."Bad design alert"
I'm inclined to say designing the app this way is wonky, and to find a 'solution' to directly answer your question without redesigning it to not do this lock file, is to just put a band-aid on a festering wound.
Similar Messages
-
Hi All,
powershell script Method required to read a value from registry and then taking the backup of that values in some text file.
For example the hive is
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\Path
and under path i need to take back up of values in some text file and then put some value in the registry after back is taken in text file.
Also how to read the text file values so that we can again write to registry hive back from the back up text file.
Your help is much appreciated.
Umeed4uI think you need to read this first:
http://social.technet.microsoft.com/Forums/scriptcenter/en-US/a0def745-4831-4de0-a040-63b63e7be7ae/posting-guidelines?forum=ITCG
Don't retire TechNet! -
(Don't give up yet - 12,830+ strong and growing) -
Restore from OSB. RMAN-06024: no backup or copy of the control file found
I backed up controlfile for standby on production server to OSB media:
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:15:33 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: EMGC (DBID=1838014073)
connected to recovery catalog database
RMAN>
RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
BACKUP CURRENT CONTROLFILE FOR STANDBY tag 'stb_ctl';
RELEASE CHANNEL ch1;
CONFIGURE DEVICE TYPE 'SBT_TAPE' CLEAR;
new RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
new RMAN configuration parameters are successfully stored
starting full resync of recovery catalog
full resync complete
RMAN> 2> 3> 4> 5> 6>
allocated channel: ch1
channel ch1: sid=1085 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting backup at 25-JAN-11
channel ch1: starting compressed full datafile backupset
channel ch1: specifying datafile(s) in backupset
including standby control file in backupset
channel ch1: starting piece 1 at 25-JAN-11
channel ch1: finished piece 1 at 25-JAN-11
piece handle=1em30ngu_1_1 tag=STB_CTL comment=API Version 2.0,MMS Version 10.3.0.2
channel ch1: backup set complete, elapsed time: 00:00:27
Finished backup at 25-JAN-11
released channel: ch1
RMAN> list backup of controlfile;
old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 2 BACKUP TYPE TO COMPRESSED BACKUPSET;
RMAN configuration parameters are successfully reset to default value
starting full resync of recovery catalog
full resync complete
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN>
On standby server I try to restore this control file but there is some trouble with restore... By the way I can delete that backup piece...
-bash-3.00$ rman target / catalog rman/rman@emgc
Recovery Manager: Release 10.2.0.5.0 - Production on Tue Jan 25 15:34:32 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
connected to target database: emgc (not mounted)
connected to recovery catalog database
RMAN> set DBID=1838014073;
executing command: SET DBID
database name is "EMGC" and DBID is 1838014073
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
crosscheck backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Crosschecked 1 objects
released channel: ch1
RMAN> list backup of controlfile;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
1479 Full 512.00K SBT_TAPE 00:00:18 25-JAN-11
BP Key: 1480 Status: AVAILABLE Compressed: YES Tag: STB_CTL
Handle: 1em30ngu_1_1 Media: mf_rman-000003
Standby Control File Included: Ckp SCN: 33567224 Ckp time: 25-JAN-11
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
RESTORE CONTROLFILE FROM TAG 'STB_CTL';
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
Starting restore at 25-JAN-11
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2011 15:35:20
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
RMAN> RUN
ALLOCATE CHANNEL ch1 DEVICE TYPE 'SBT_TAPE';
delete noprompt backup of controlfile;
2> 3> 4> 5>
allocated channel: ch1
channel ch1: sid=1093 devtype=SBT_TAPE
channel ch1: Oracle Secure Backup
List of Backup Pieces
BP Key BS Key Pc# Cp# Status Device Type Piece Name
1480 1479 1 1 AVAILABLE SBT_TAPE 1em30ngu_1_1
deleted backup piece
backup piece handle=1em30ngu_1_1 recid=40 stamp=741367328
Deleted 1 objects
released channel: ch1
RMAN>You cannot specify a tag for a standby control file.
read here
http://download.oracle.com/docs/cd/B10501_01/server.920/a96566/rcmstand.htm#1002594
Edited by: Adigozalov Gurban on Jan 25, 2011 2:14 PM -
I have the latest downloadable version of LR5. It crashed while it was createing 1:1 previews during an import. After a Win7(64) restart, it shows a message that LR needs to quit because it can't read the preview files and it will try to fix it the next time is launches. I get the same message the next and every subsequent time it launches so I can't launch LR at all now.
I get that the preview file got corrupted somehow. Is there some way to fix this problem without building a new catalog?Use Windows Explorer to open the folder containing your catalog. You will see a folder with the extension .lrdata. You need to delete that folder and then start Lightroom again. Lightroom will generate a new previews folder.
-
Not able to read the wsdl file from server Premature EOF encounter
Hi All,
I am facing issue while accessing a web Service from server. Here is the clear view about it.
I created a simple SyncBpel process in a composite and deployed in to the server and it is working fine. Later i created a new Asyn bpel process in a composite and in the external reference i dragged a web Service and imported the wsdl url from server of the SyncBpel and wired the Asynbpel process to webserive .
Now here i am facing peculiar behavior which i am not able to trace it out.
1) For the first time when i import the url of syncBpel from the server i am not facing any error and it is working fine as expected but when i close the Jdeveloper and open it i am not able to user the web Service and it is saying as "Not able to read the wsdl file from server Premature EOF encounter"
2)When i close and open the Jdeveloper i can see the url of the wsdl which imported in webserver is changing from http://stcfmw03.satyam.com:8021/soa-infra/services/Tarak/synchronousBpel/bpelsync_client_ep?WSDL to http://stcfmw03.satyam.com:8021/soa-infra/services/Tarak/synchronousBpel/BPELsync.wsdl
3)when I open and see the url http://stcfmw03.satyam.com:8021/soa-infra/services/Tarak/synchronousBpel/bpelsync_client_ep?WSDL I can see the soap address as *<soap:address location="http://stcfmw03.satyam.com:8021/soa-infra/services/Tarak/synchronousBpel!1.0*soa_5cfb8416-c106-40a2-a53b-9054bbe04b9c/bpelsync_client_ep"/>*
I don’t understand why the soap end contains “*soa_5cfb8416-c106-40a2-a53b-9054bbe04b9c” and this kind of url for soap address is coming to all the bpel process which I am deploying in the server.
I checked the in Jdeveloper where webproxy is uncheck and the server is also up but still I am facing issue of reading the error.
Can someone please help in resolving the issue.
I am using SOA 11g 11.1.1.5 and Jdeveloper 11.1.1.5
Many thanks.
Tarak
Edited by: user11896572 on Jan 17, 2012 5:22 PMHi,
Setting default from the jdeveloper -
During composite deployment from Jdeveloper (wizard driven), you will be given an option to choose the version of the composite and there will also be an option for you to choose if the composite needs to be deployed as default.
Setting default from the em console -
After deploying a composite, login to the em console and click on the composite that you want to set as default, and you will find a tab - "Set as Default". please note that this tab will not be seen, if the composite is already set as default.
Refer -
http://docs.oracle.com/cd/E12839_01/integration.1111/e10226/soacompapp_mang.htm
8.2 Managing the State of Deployed SOA Composite Applications
Thanks -
In Vista, Applet isn�t able to read the property files
I�m working on internationalization; the Applet which I�m using wasn�t able to read the property files properly in windows Vista machine. But if I create a jar which contains all the classes and property files, Applet works fine.
This problem is only in Vista machine ,In XP the JVM is smart enough to read plain .property files and its works well without creating the jar
Is that related to any security enhancemence of vista over XP?
Below is a link about The Java Security Model break on Windows Vista
http://bugs.sun.com/view_bug.do?bug_id=6548078
I tried a simple ResourceBundle.getBundle() in my Applet in different ways but nothing work fine for me. It isn�t an issue related to path, I guess because I tried several ways like.
ResourceBundle labels = ResourceBundle.getBundle("LabelsBundle");
ResourceBundle labels = ResourceBundle.getBundle("LabelsBundle",currentLocale);
ResourceBundle labels = ResourceBundle.getBundle("com.test.LabelsBundle");
ResourceBundle labels = ResourceBundle.getBundle("com.test.LabelsBundle",currentLocale);The exception got in java console is
CONFIG: [2008-05-13 15:54:57.909]:(com.satm.insite.InsiteApplet$2@1696e4c):InisiteApplet: Exception: java.util.MissingResourceException: Can't find bundle for base name LabelsBundle, locale en
java.util.MissingResourceException: Can't find bundle for base name LabelsBundle, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
at java.util.ResourceBundle.getBundleImpl(Unknown Source)
at java.util.ResourceBundle.getBundle(Unknown Source)
at com.satm.insite.InsiteApplet.displayValue(InsiteApplet.java:261)
at com.satm.insite.InsiteApplet.callme(InsiteApplet.java:296)
at com.satm.insite.InsiteApplet.initialize(InsiteApplet.java:327)
at com.satm.insite.InsiteApplet$2.run(InsiteApplet.java:235)
at com.satm.tools.languageTools.ThreadPool$ExceptionCatchingThread.run(ThreadPool.java:226)Is there any way to make it work in Windows Vista machine�? This could be a great help for me.
Thanks
RobertCrossposted:
http://forum.java.sun.com/thread.jspa?threadID=5295743&messageID=10250558#10250558
http://forum.java.sun.com/thread.jspa?threadID=5295742&messageID=10250556#10250556 -
How can I read the bootstrap files of any HDS Live stream and extract the fragment-URLs and fragment-numbers in plain text?
Could it be that it is some kind of compressed format in the bootstrap? Can I uncompress it wirh f4fpackager.exe? Could not find any download for f4fpackager.exe. I would prefere less code to do so. Is there something in Java of JavaScript, that can extract the fragment-numbers?
Thank you!Doesn't sound too hard to me. Your class User (the convention says to capitalize class names) will have an ArrayList or Vector in it to represent the queue, and a method to store a Packet object into the List. An array or ArrayList or Vector will hold the 10 user objects. You will find the right user object from packet.user_id and call the method.
Please try to write some code yourself. You won't learn anything from having someone else write it for you. Look at sample code using ArrayList and Vector, there's plenty out there. Post in the forum again if your code turns out not to behave. -
"Error: Final Cut Pro was unable to read the movie file just captured"
Hello everyone!
We had a computer crash while we were working on Final Cut Pro and backing up some media to a hard drive.
Since then, whenever we "capture' video footage and hit the escape key to stop capturing - we get -
"Error: Final Cut Pro was unable to read the movie file just captured"
We reinstalled the Final Cut Pro software all over again thinking that maybe the software got corrupted and we also rectified any disk permissions for the hard drives.
Any ideas?
Thanks
Efrain
G 5 Mac OS X (10.4.8)We had a computer crash while we were working on Final Cut Pro and backing up some media to a hard drive.< </div>
You eventually want to figure out how that happened and make sure you fix it.
Since then, whenever we "capture' video footage and hit the escape key to stop capturing - we get -
"Error: Final Cut Pro was unable to read the movie file just captured"
<
You reformatted the external drive, yes? You might not have used the correct initialization setting. Should be Macintosh HFS, journalling is optional. Or you have a drive formatted for Winderz.
Aside from incorrect drive formatting, we have seen this error if the capture is incomplete or improperly terminated.
It's not an FCP issue, it's hardware.
bogiesan -
hi im having huge problems trying to install flash for my mac 10.5 imac, iv gone through the internet and tried all of the solutions, everytime i try to install flash it says cant read the download file, or it just wont install, anybody plz help!
iv unistalled flash, iv checked plug ins it just wont work,It would have been a great help to know precisely what Mac you have, so some of the following may not apply:
You can check here: http://www.adobe.com/products/flash/about/ to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version,10.3.183.23 or later, is for Intel Macs only running Tiger or Leopard, as Adobe no longer support the PPC platform. Version 11.4.402.265 or later is for Snow Leopard onwards.
(If you are running Mavericks: After years of fighting malware and exploits facilitated through Adobe's Flash Player, the company is taking advantage of Apple's new App Sandbox feature to restrict malicious code from running outside of Safari in OS X Mavericks.)
* Unhelpfully, if you want the last version for PPC (G4 or G5) Macs, you need to go here: http://kb2.adobe.com/cps/142/tn_14266.html and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here: http://kb2.adobe.com/cps/838/cpsid_83808.html
You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
http://kb2.adobe.com/cps/909/cpsid_90906.html
and also that you follow the instructions closely, such as closing ALL applications (including Safari) first before installing. You must also carry out a permission repair after installing anything from Adobe.
After installing, reboot your Mac and relaunch Safari, then in Safari Preferences/Security enable ‘Allow Plugins’. If you are running 10.6.8 or later:
When you have installed the latest version of Flash, relaunch Safari and test.
If you're getting a "blocked plug-in" error, then in System Preferences… ▹ Flash Player ▹ Advanced
click Check Now. Quit and relaunch your browser.
You can also try these illustrated instructions from C F McBlob to perform a full "clean install", which will resolve the "Blocked Plug-in" message when trying to update via the GUI updater from Adobe.
Use the FULL installer for 12.0.0.44: Flash Player 12 (Mac OS X)
And the instructons are here: Snow Leopard Clean Install.pdf
(If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, try the following solution which fools the site into thinking that you are running the version 11.5.502.55:)
Download this http://scriptogr.am/nordkril/post/adobe-flash-11.5-for-powerpc to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work. -
Is there any way to read the pdf file in java
Hai,
i need some advice from anyone that is there anyway to read the pdf file directly from java...
Without converting to other files(txt,html)
if it is possible please help me..
Thank youOr use the Adobe one (search the adobe site). Or search this forum, this is one of the Top Ten Qestions Asked here.
-
Please help me in reading the ascii file in encoded format
hi ,
iam trying to read the ascii file and i need to encode the text file, can u suggest me what arre the different methods are availble for me to encode the text file, please suggest me which is the effiecient method tto use?This question has been answered before, please search the forums in future.
You could do something like this, it probably not the most efficient though.
If you don't need to do it in code then the native2ascii does this conversion see: http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/native2ascii.html
public static void convert(String vsFile) throws IOException
File f = new File(vsFile);
FileReader fr = new FileReader(f);
char[] buf;
int bytesRead = 0;
int startAt = 0;
String content = "";
do
buf = new char[512];
bytesRead = fr.read(buf, 0, 512);
startAt += bytesRead;
String tmp = new String(buf);
content += tmp;
while (bytesRead == 512);
FileOutputStream fout = new FileOutputStream(f);
OutputStreamWriter out = new OutputStreamWriter(fout, "UTF-8");
out.write(content.trim());
out.flush();
out.close();
} -
Problem in reading the excel file path in WINDOWs machine from UNIX environ
Hello friends,
My requirement is to read each row of the excel sheet and sent that row to the database. I have implemented it by using jxl and apache poi framework. locally in my WINDOWS machine it is working fine..
But when i deploy the code in UNIX machine. My application runs on a Unix server , trying to read the excel file in WINDOWS environment. I am not able to retrieve the file path. for ex : C:\Documents and Settings\sabbanik\My Documents\KARUNAKAR\excel.xls
I am getting error in this line
workbook = Workbook.getWorkbook(filepath)
Error message : input file not found.
Thanks in advance..You said: I am getting error in this line workbook = Workbook.getWorkbook(filepath) >
Based on this, I will assume you are trying to use OLE to access information about the Excel file. As mentioned by Andreas, your code will be executing on the server (Unix) and since Excel isn't on the server (and cannot be) an error will result. OLE can only be used in Windows environments (client or server). To access client side OLE calls and content, you need a java bean and Excel installed on the client machine. Oracle provides WebUtil as an option to writing your own Java Bean. To use this, you will need to be running Forms 10.1.2 or newer. Details can be found here along with a demo:
http://www.oracle.com/technetwork/developer-tools/forms/webutil-090641.htm -
Reading the xml file in customized table.
Hi Experts ,
I have a requirement to read the xml file in one "z" table . Can anyone let me know the exact steps .
Thank you
AshutoshHi Ashutosh,
1. First read the file in BINARY MODE into an XSTRING.
2. Then use the method create_istream_xstring to create the input stream
3. Then you need to create the document tree and the parser
4. Once your Document tree and your parser are created now can use the document tree to access individual elements.
Some Class interfaces that maybe helpful to you are as follows: if_ixml_node, if_ixml_node_iterator, if_ixml_element....etc
DATA:o_ixml TYPE REF TO if_ixml,
o_streamfactory TYPE REF TO if_ixml_stream_factory,
o_istream TYPE REF TO if_ixml_istream.
o_parser TYPE REF TO if_ixml_parser
o_document TYPE REF TO if_ixml_document
o_ixml = cl_ixml=>create( ).
o_istream = o_streamfactory->create_istream_xstring( string = <give the xstring name here>).
o_document = o_ixml->create_document( ).
o_parser = o_ixml->create_parser( stream_factory = o_streamfactory
istream = o_istream
document = o_document ).
You can make the final code as dynamic as possible to read into an internal table.
Regards
-Joe -
Hi
Hope someone can help me with this one, have a new computer with windows 7 as the operating system, have installed elements 7 and have now purchased the 50d, as i shoot in raw have tried to open the file but elements is unable to read the raw file, have looked on various threads and have downloaded the new version of raw, this version is saved in my download file directory, have copied across these files to the elements folder but i still cannot read my raw file for the 50d, is there something i have missed.
collisaplease have a look at the folllowing link about the isntallation of the camera raw plugin.
http://kb2.adobe.com/cps/407/kb407344.html
be sure not to have the older version of camera raw plugin in the same folder as that of new one. dont even rename it. Remove it and store it in some other location in case you need to revert back the changes. The camera raw plugin is called : Camera Raw
thanks -
Can I read the dd file without the device
Hello,
Is it possible to read the DD file in Configurator 3.1 without connecting to the device?
The short version of the story...... I have only used the configurator a few times and was walked through the process. Now I need to figure out how to control a positioner (DVC6000f), I just need to stroke a valve open, closed and position it somewhere between the two. I am not able to connect to a positioner right now, so I would like to load the DD file into the configurator and look around to see if I can figure out how to give it a position command signal. Once I am able to stroke the valve I will need to write a simple LabView program to make it easier than the configurator program.
What is the best way to figure out which block I need to position the valve? I am hoping when I actually connect to the positioner it will be obvious, but life is usually not that easy.
BryanHello Josiane,
Thank you for the information, I was able to load the DD and look around the configuration blocks. Initially engineering only asked about simple control of the valve, today things have changed. I found out that there are to be many tests performed on the valve including sine wave response, step testing, Hysterisis, linearity, dead band, and some others.
So my question now is how well can I control the positioner by writing a Vi in LabView? I can perform the above tests on a positioner with a 4-20mA output signal from my DAQ. Would it be possible to write the 4-20mA output signal into an input block (instead of an analog output channel) and control the valve in real time? I could just change the mA signal into whatever units the positioner wants. Or what would be the best approach to control the valve for testing?
Is there a number I can reach for support? It might be easier than email.
Bryan
Maybe you are looking for
-
Update 3.1.3 to 4.2.1 not working
When i try to update my Ipod 3.1.3 to 4.2.1, the backup thing won't load!! PLEASE HELP ME!!!
-
Simulating SOAP Header in Testsuite
Hi all, I'm using an BPEL Process with a custom soap header. Can anybody tell me how I can create a testcase, that fills in the custom soap header with testdata? Thanks in advance. Regards Markus
-
2.1 Update did not fix SMS tone issue
I have been having the text tone issue as many others have. That problem being that when a text is recieved the phone will only vibrate. The 2.1 update did not fix the issue...imagine that.
-
What is going on down there?
Lattely the browser stack, does not respond, and / or freeze the computer for a few seconds, what is going on down there, you may check it out or many users will stop to use your browser?
-
I am having problems installing an oem copy of windows 8 pro on my 2012 mbp.
I used boot camp to create a windows partition. Once i started the windows install process and format the drive, the installer says that windows cannot use the partition because it is not a gpt partition. I have followed and reviewed the boot camp ma