Java.util.logging: write to one log file from many application (classes)
I have a menuapp to launch many applications, all running in same JVM and i want to add logging information to them, using java.util.logging.
Intention is to redirect the logginginfo to a specific file within the menuapp. Then i want all logging from all applications written in same file. Finally, if needed (but i don't think it is), i will include code to write logging to specific file per app (class). The latter is probably not neccessary because there are tools to analyse the logging-files and allow to select filters on specific classes only.
The applications are in their own packages/jars and contain following logging-code:
// Redirect error output
try {
myHandler = new FileHandler("myLogging.xml",1000000,2);
} catch (IOException e) {
System.out.println("Could not create file. Using the console handler");
myLogger.addHandler(myHandler);
myLogger.info("Our first logging message");
myLogger.severe("Something terrible happened");
...When i launch the menuapplication, it writes info to "myLogging.xml.0"
but when i launch an application, the app writes info to "myLogging.xml.0.1"
I already tried to leave out the creation of a new Filehandler (try/catch block in code above) but it doesn't help.
Is it possible to write loginfo to same specific file?
You should open/close it somehow at every write from different processes.
But I personally prefer different file names to your forced merging, though.
Similar Messages
-
Utility to extract ADS file from Planning application
Hi,
We had a Planning System 9.3 Classic application. We wanted to create a replica of the same as an EPMA application. We used a utility to extract ADS file from classic application. Post that the classic application has locked i.e we are not able to edit it. All dimensions are in view mode. Kindly let us know how to revert back in edit mode for classic application.
Thanks and Regards,
Meenal DhallHi,
I think you have come across the bug in the EPMA extractor, if I remember correctly it changes a value in a table which stops you editing in classic.
You can resolve this looking at your planning system database.
There is a table called HSPSYS_PROPERTIES.
The field property_id is the application id, you find what application it relates to by looking at HSPSYS_APPLICATION
Once you know the id for your application
In the table HSPSYS_PROPERTIES look for a row with EDIT_DIM_ENABLED and change the value in the next field from false to true
Restart planning and you should be able to edit again.
Cheers
John
http://john-goodwin.blogspot.com/ -
Waiting data file from another application
Hi,
I would appreciate your help with the following problem:
I am executing an application from within my java application as a process and waiting until it finishes. I need the results file from that application to be read from within mine. The problem is that this application creates other processes that dump the results files long after its main process has informed my application about its successfull execution. The question is, how can I be sure that the particular result files are already written to the end and closed by those hidden for me processes.
Thank you in advance!If I understood well, you're saying that :
1) you have to wait for the results before proceeding with your application, and you do not have control over the writing processes so that you cannot use some kind of async notification (e.g JMS),
2) Even when your app is informed of the success of the operation, at that exact time you are not getting the result files you need to proceed. So being informed of success and being able to proceed happen at different times ?
In that case, the one solution that comes to mind is 'polling' :
When you're being informed of success, spawn a separate thread (to prevent app freezing) that continuously polls the result files in a while loop.Or, if you don't want to waste CPU cycles, make the thread sleep for a while and try again at regular intervals.
Less than perfect solution, but I don't see any other alternative ..
You'll then have to figure out what to do with your app while you're trying to get the results...
Hope this helps a bit. -
File from the Application server
Hi gurus,
I am working on a scenario where I need to get a file from the application server and for this I need to ask user to enter the location and that too at the selection screen and then I need to read this location using open data set and read data set in my program , once I am done with this I need to do some other validations. so can you please help me out how to achieve this.
Thanks
Rajeev GuptaHi
Declare the selection screen with file as parameter so that the user enter the application server file..
the use the OPEND DATASET as mentioned in below code and process
Refer this:
http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm
ABAP code for uploading a TAB delimited file into an internal table. See code below for structures.
*& Report ZUPLOADTAB * &----
*& Example of Uploading tab delimited file *
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
DATA: ld_file LIKE rlgrap-filename.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 like pa0002-VORNA,
name2 like pa0002-name2,
age type i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Text version of data table
TYPES: begin of t_uploadtxt,
name1(10) type c,
name2(15) type c,
age(5) type c,
end of t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) type c.
constants: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*START-OF-SELECTION
START-OF-SELECTION.
ld_file = p_infile.
OPEN DATASET ld_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc NE 0.
ELSE.
DO.
CLEAR: wa_string, wa_uploadtxt.
READ DATASET ld_file INTO wa_string.
IF sy-subrc NE 0.
EXIT.
ELSE.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_upload.
APPEND wa_upload TO it_record.
ENDIF.
ENDDO.
CLOSE DATASET ld_file.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
loop at it_record into wa_record.
write:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
endloop.
Regards
Anji -
Upload tab-delimited file from the application server to an internal table
Hello SAPients.
I'm using OPEN DATASET..., READ DATASET..., CLOSE DATASET to upload a file from the application server (SunOS). I'm working with SAP 4.6C. I'm trying to upload a tab-delimited file to an internal table but when I try load it the fields are not correctly separated, in fact, they are all misplaced and the table shows '#' where supposedly there was a tab.
I tried to SPLIT the line using as separator a variable with reference to CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB but for some reason that class doesn't exist in my system.
Do you know what I'm doing wrong? or Do you know a better method to upload a tab-delimited file into an internal table?
Thank you in advance for your help.Try:
REPORT ztest MESSAGE-ID 00.
PARAMETER: p_file LIKE rlgrap-filename OBLIGATORY.
DATA: BEGIN OF data_tab OCCURS 0,
data(4096),
END OF data_tab.
DATA: BEGIN OF vendor_file_x OCCURS 0.
* LFA1 Data
DATA: mandt LIKE bgr00-mandt,
lifnr LIKE blf00-lifnr,
anred LIKE blfa1-anred,
bahns LIKE blfa1-bahns,
bbbnr LIKE blfa1-bbbnr,
bbsnr LIKE blfa1-bbsnr,
begru LIKE blfa1-begru,
brsch LIKE blfa1-brsch,
bubkz LIKE blfa1-bubkz,
datlt LIKE blfa1-datlt,
dtams LIKE blfa1-dtams,
dtaws LIKE blfa1-dtaws,
erdat LIKE lfa1-erdat,
ernam LIKE lfa1-ernam,
esrnr LIKE blfa1-esrnr,
konzs LIKE blfa1-konzs,
ktokk LIKE lfa1-ktokk,
kunnr LIKE blfa1-kunnr,
land1 LIKE blfa1-land1,
lnrza LIKE blfa1-lnrza,
loevm LIKE blfa1-loevm,
name1 LIKE blfa1-name1,
name2 LIKE blfa1-name2,
name3 LIKE blfa1-name3,
name4 LIKE blfa1-name4,
ort01 LIKE blfa1-ort01,
ort02 LIKE blfa1-ort02,
pfach LIKE blfa1-pfach,
pstl2 LIKE blfa1-pstl2,
pstlz LIKE blfa1-pstlz,
regio LIKE blfa1-regio,
sortl LIKE blfa1-sortl,
sperr LIKE blfa1-sperr,
sperm LIKE blfa1-sperm,
spras LIKE blfa1-spras,
stcd1 LIKE blfa1-stcd1,
stcd2 LIKE blfa1-stcd2,
stkza LIKE blfa1-stkza,
stkzu LIKE blfa1-stkzu,
stras LIKE blfa1-stras,
telbx LIKE blfa1-telbx,
telf1 LIKE blfa1-telf1,
telf2 LIKE blfa1-telf2,
telfx LIKE blfa1-telfx,
teltx LIKE blfa1-teltx,
telx1 LIKE blfa1-telx1,
xcpdk LIKE lfa1-xcpdk,
xzemp LIKE blfa1-xzemp,
vbund LIKE blfa1-vbund,
fiskn LIKE blfa1-fiskn,
stceg LIKE blfa1-stceg,
stkzn LIKE blfa1-stkzn,
sperq LIKE blfa1-sperq,
adrnr LIKE lfa1-adrnr,
mcod1 LIKE lfa1-mcod1,
mcod2 LIKE lfa1-mcod2,
mcod3 LIKE lfa1-mcod3,
gbort LIKE blfa1-gbort,
gbdat LIKE blfa1-gbdat,
sexkz LIKE blfa1-sexkz,
kraus LIKE blfa1-kraus,
revdb LIKE blfa1-revdb,
qssys LIKE blfa1-qssys,
ktock LIKE blfa1-ktock,
pfort LIKE blfa1-pfort,
werks LIKE blfa1-werks,
ltsna LIKE blfa1-ltsna,
werkr LIKE blfa1-werkr,
plkal LIKE lfa1-plkal,
duefl LIKE lfa1-duefl,
txjcd LIKE blfa1-txjcd,
sperz LIKE lfa1-sperz,
scacd LIKE blfa1-scacd,
sfrgr LIKE blfa1-sfrgr,
lzone LIKE blfa1-lzone,
xlfza LIKE lfa1-xlfza,
dlgrp LIKE blfa1-dlgrp,
fityp LIKE blfa1-fityp,
stcdt LIKE blfa1-stcdt,
regss LIKE blfa1-regss,
actss LIKE blfa1-actss,
stcd3 LIKE blfa1-stcd3,
stcd4 LIKE blfa1-stcd4,
ipisp LIKE blfa1-ipisp,
taxbs LIKE blfa1-taxbs,
profs LIKE blfa1-profs,
stgdl LIKE blfa1-stgdl,
emnfr LIKE blfa1-emnfr,
lfurl LIKE blfa1-lfurl,
j_1kfrepre LIKE blfa1-j_1kfrepre,
j_1kftbus LIKE blfa1-j_1kftbus,
j_1kftind LIKE blfa1-j_1kftind,
confs LIKE lfa1-confs,
updat LIKE lfa1-updat,
uptim LIKE lfa1-uptim,
nodel LIKE blfa1-nodel.
DATA: END OF vendor_file_x.
FIELD-SYMBOLS: <field>,
<field_1>.
DATA: delim TYPE x VALUE '09'.
DATA: fld_chk(4096),
last_char,
quote_1 TYPE i,
quote_2 TYPE i,
fld_lth TYPE i,
columns TYPE i,
field_end TYPE i,
outp_rec TYPE i,
extras(3) TYPE c VALUE '.,"',
mixed_no(14) TYPE c VALUE '1234567890-.,"'.
OPEN DATASET p_file FOR INPUT.
DO.
READ DATASET p_file INTO data_tab-data.
IF sy-subrc = 0.
APPEND data_tab.
ELSE.
EXIT.
ENDIF.
ENDDO.
* count columns in output structure
DO.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
columns = sy-index.
ENDDO.
* Assign elements of input file to internal table
CLEAR vendor_file_x.
IF columns > 0.
LOOP AT data_tab.
DO columns TIMES.
ASSIGN space TO <field>.
ASSIGN space TO <field_1>.
ASSIGN COMPONENT sy-index OF STRUCTURE vendor_file_x TO <field>.
SEARCH data_tab-data FOR delim.
IF sy-fdpos > 0.
field_end = sy-fdpos + 1.
ASSIGN data_tab-data(sy-fdpos) TO <field_1>.
* Check that numeric fields don't contain any embedded " or ,
IF <field_1> CO mixed_no AND
<field_1> CA extras.
TRANSLATE <field_1> USING '" , '.
CONDENSE <field_1> NO-GAPS.
ENDIF.
* If first and last characters are '"', remove both.
fld_chk = <field_1>.
IF NOT fld_chk IS INITIAL.
fld_lth = strlen( fld_chk ) - 1.
MOVE fld_chk+fld_lth(1) TO last_char.
IF fld_chk(1) = '"' AND
last_char = '"'.
MOVE space TO fld_chk+fld_lth(1).
SHIFT fld_chk.
MOVE fld_chk TO <field_1>.
ENDIF. " for if fld_chk(1)=" & last_char="
ENDIF. " for if not fld_chk is initial
* Replace "" with "
DO.
IF fld_chk CS '""'.
quote_1 = sy-fdpos.
quote_2 = sy-fdpos + 1.
MOVE fld_chk+quote_2 TO fld_chk+quote_1.
ELSE.
MOVE fld_chk TO <field_1>.
EXIT.
ENDIF.
ENDDO.
<field> = <field_1>.
ELSE.
field_end = 1.
ENDIF.
SHIFT data_tab-data LEFT BY field_end PLACES.
ENDDO.
APPEND vendor_file_x.
CLEAR vendor_file_x.
ENDLOOP.
ENDIF.
CLEAR data_tab.
REFRESH data_tab.
FREE data_tab.
Rob -
when i try downloading adobe pro i am getting an error message that is saying: The application could not be installed because the installer file is damaged. Try obtaining a new installer file from the application author.
Hi Kashmore,
Seems like the downloaded file was corrupt that could be because of either network restriction or the anti virus might have blocked it. My suggestion would be to try and download the product either by turning off the Antivirus or try a different network.
Cheers,
Kartikay Sharma -
Trying to download the free trial of Adobe Acrobat XL Pro. I keep getting the message "The application could not be installed because the installer file is damaged. Try obtaining a new installer file from the application author." I've repeatedly tried getting a new installer file, but get the same message every time.
K_don52 and Ande8135 please remove your current installation of the Adobe Download Assistant and reinstall. You can find more details in the known issues section of Troubleshoot Adobe Download Assistant.
-
Problem with java.util.logging - write to multiple log files
Hi guys,
I'm having trouble with logging to multiple files - i am using the constructor for creating multiple files with size limitation - FileHandler(String pattern, int limit, int count, boolean append).
The problem i encounter is that it writes to the next log file before exceeding the limit, can it be because of file lock or something? what can i do in order to fill log files in a given limit and then write to the next?I thought it is synchronized by definition - i'm just creating loggers that write to
the same file(s). When i used 1 file instead of using the limit and several
files - all went well.Just a small question: all these loggers do use the same FileHandler don't they?
I bet they do, just asking ...
The problem started when i wanted each file to reach a limit before start writing
to a new file. Should i synchronize the log somehow? That's what I suggested in my previous reply, but IMHO it shouldn't be necessary
given what I read from the sources ...
What could be the reason for not reaching the limit before opening a new file?Sorry I don't have an answer (yet), still thinking though ... it's a strange problem.
kind regards,
Jos (hrrmph ... stoopid problem ;-) -
"java.io.IOException: Write Channel Closed" starting AdminServer from WLST
Hi,
I am trying to start the admin server through WLST.
Per "Oracle® Fusion Middleware WebLogic Scripting Tool Command Reference 11g Release 1 (10.3.2)" I tried it both ways - online and offline.
When online
wls:/nm/ClassicDomain> startServer('AdminServer','ClassicDomain','t3://10.110.90.156:7002','weblogic','<password>','/u0/app/oracle/product/middleware/user_projects/domains')
I am getting
Starting server AdminServer ...
Traceback (innermost last):
File "<console>", line 1, in ?
File "<iostream>", line 412, in startServer
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEStarting server AdminServer ...
Traceback (innermost last):
File "<console>", line 1, in ?
File "<iostream>", line 412, in startServer
at com.certicom.tls.record.WriteHandler.write(Unknown Source)
at com.certicom.io.OutputSSLIOStreamWrapper.write(Unknown Source)
at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:202)
at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:272)
at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:276)
at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:122)
at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:212)
at java.io.BufferedWriter.flush(BufferedWriter.java:236)
at weblogic.nodemanager.common.DataFormat.writeCommand(DataFormat.java:243)
at weblogic.nodemanager.client.NMServerClient.sendCmd(NMServerClient.java:320)
at weblogic.nodemanager.client.NMServerClient.sendServer(NMServerClient.java:265)
at weblogic.nodemanager.client.NMServerClient.start(NMServerClient.java:94)
at weblogic.management.scripting.NodeManagerService.nmStart(NodeManagerService.java:368)
at weblogic.management.scripting.LifeCycleHandler.startSvr(LifeCycleHandler.java:887)
at weblogic.management.scripting.WLScriptContext.startSvr(WLScriptContext.java:384)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
java.io.IOException: java.io.IOException: Write Channel Closed
and the node manager log shows:
WARNING: Uncaught exception in server handlerjava.io.IOException: Bad properties data format
java.io.IOException: Bad properties data format
at weblogic.nodemanager.common.DataFormat.readProperties(DataFormat.java:44)
at weblogic.nodemanager.server.Handler.handleStart(Handler.java:537)
at weblogic.nodemanager.server.Handler.handleCommand(Handler.java:118)
at weblogic.nodemanager.server.Handler.run(Handler.java:70)
at java.lang.Thread.run(Thread.java:619)
And if I try it offline
wls:/offline> startServer('AdminServer','ClassicDomain','t3://10.110.90.156:7002','weblogic','<passwd>','/u0/app/oracle/product/middleware/user_projects/domains');
I am getting a big stack below. Can anybody through an idea?
Thank you
Anatoliy
Offline stack:
Starting weblogic server ...
WLST-WLS-1273604718586: <May 11, 2010 3:05:19 PM EDT> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with BEA JRockit(R) Version R27.6.5-32_o-121899-1.6.0_14-20091001-2113-linux-ia32 from BEA Systems, Inc.>
WLST-WLS-1273604718586: <May 11, 2010 3:05:20 PM EDT> <Info> <Management> <BEA-140013> </u0/app/oracle/product/middleware/user_projects/domains/config/config.xml not found>
WLST-WLS-1273604718586: <May 11, 2010 3:05:20 PM EDT> <Info> <Management> <BEA-141254> <Generating new domain directory in /u0/app/oracle/product/middleware/user_projects/domains>
...WLST-WLS-1273604718586: <May 11, 2010 3:05:27 PM EDT> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason:
WLST-WLS-1273604718586:
WLST-WLS-1273604718586: There are 1 nested errors:
WLST-WLS-1273604718586:
WLST-WLS-1273604718586: weblogic.management.ManagementException: Failure during domain creation
WLST-WLS-1273604718586: at weblogic.management.internal.DomainDirectoryService.generateDomain(DomainDirectoryService.java:229)
WLST-WLS-1273604718586: at weblogic.management.internal.DomainDirectoryService.ensureDomainExists(DomainDirectoryService.java:152)
WLST-WLS-1273604718586: at weblogic.management.internal.DomainDirectoryService.start(DomainDirectoryService.java:72)
WLST-WLS-1273604718586: at weblogic.t3.srvr.ServerServicesManager.startService(ServerServicesManager.java:461)
WLST-WLS-1273604718586: at weblogic.t3.srvr.ServerServicesManager.startInStandbyState(ServerServicesManager.java:166)
WLST-WLS-1273604718586: at weblogic.t3.srvr.T3Srvr.initializeStandby(T3Srvr.java:749)
WLST-WLS-1273604718586: at weblogic.t3.srvr.T3Srvr.startup(T3Srvr.java:488)
WLST-WLS-1273604718586: at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:446)
WLST-WLS-1273604718586: at weblogic.Server.main(Server.java:67)
WLST-WLS-1273604718586: Caused by: com.bea.plateng.domain.script.ScriptException: The domain location must have write permission.
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptExecutor.writeDomain(ScriptExecutor.java:723)
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptParserClassic$StateMachine.processWrite(ScriptParserClassic.java:575)
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptParserClassic$StateMachine.execute(ScriptParserClassic.java:431)
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptParserClassic.parseAndRun(ScriptParserClassic.java:150)
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptParserClassic.doExecute(ScriptParserClassic.java:112)
WLST-WLS-1273604718586: at com.bea.plateng.domain.script.ScriptParser.execute(ScriptParser.java:73)
WLST-WLS-1273604718586: at com.bea.plateng.domain.DomainInfoHelper.executeSilentScript(DomainInfoHelper.java:858)
WLST-WLS-1273604718586: at com.bea.plateng.domain.DomainInfoHelper.createDefaultDomain(DomainInfoHelper.java:1762)
WLST-WLS-1273604718586: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
WLST-WLS-1273604718586: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
WLST-WLS-1273604718586: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
WLST-WLS-1273604718586: at java.lang.reflect.Method.invoke(Method.java:597)
WLST-WLS-1273604718586: at weblogic.management.internal.DomainDirectoryService.generateDomain(DomainDirectoryService.java:224)
WLST-WLS-1273604718586: ... 8 more
WLST-WLS-1273604718586:
WLST-WLS-1273604718586: >
WLST-WLS-1273604718586: <May 11, 2010 3:05:27 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
WLST-WLS-1273604718586: <May 11, 2010 3:05:27 PM EDT> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
WLST-WLS-1273604718586: <May 11, 2010 3:05:27 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
WLST-WLS-1273604718586: Stopped draining WLST-WLS-1273604718586
WLST-WLS-1273604718586: Stopped draining WLST-WLS-1273604718586 .............................................Could not connect to the server to verify that it has started. The error returned is: javax.naming.CommunicationException [Root exception is java.net.ConnectException: t3://10.110.90.156:7002: Destination unreachable; nested exception is:
java.net.ConnectException: Connection refused; No available router to destination] Traceback (innermost last):
File "<console>", line 1, in ?
File "<iostream>", line 432, in startServer
File "<iostream>", line 618, in raiseWLSTException
WLSTException: Error occured while performing startServer : Could not start the server, the process might have timed out or there is an Error starting the server. Please refer to the log files for more details.Hi,
Thank you for the quick response.
I tried that, I can connect so wls:/offline> nmConnect('weblogic','password','10.110.90.156','5556','ClassicDomain','/u0/app/oracle/product/middleware/user_projects/domains/ClassicDomain');
Connecting to Node Manager ...
Successfully Connected to Node Manager.
wls:/nm/ClassicDomain>
but on
nmStart(serverName="AdminServer",domainDir="/u0/app/oracle/product/middleware/user_projects/domains/ClassicDomain")
Starting server AdminServer ...
Error Starting server AdminServer: weblogic.nodemanager.NMException: Exception while starting server 'AdminServer'
wls:/nm/ClassicDomain> nmStart(serverName="AdminServer",domainDir="/u0/app/oracle/product/middleware/user_projects/domains/ClassicDomain")
Starting server AdminServer ...
Error Starting server AdminServer: weblogic.nodemanager.NMException: Exception while starting server 'AdminServer'
wls:/nm/ClassicDomain>
And the AdminServer log shows security authentication error. Wondering why since I am not entering password when I do nmStart?
Do you have an idea?
Thank you
Anatoliy -
Utility to keep track of what files a selected application accesses?
Hi there!
I’m hoping to find a troubleshooting utility (or maybe set of command line instructions?) that I’ve not yet run across ...
Basically, it would allow me to +log or track what files a selected application accesses on disk+ (and perhaps when each access occurs (date/time), whether read/write, etc.).
Seems to me it could be very useful to have.
Has anyone run across anything like this?
Many thanks!Nevermind I found it. turns out I needed to add a "title" to that selectedCell
-
How to read from and write into the same file from multiple threads?
I need to read from and write into a same file multiple threads.
How can we do that without any data contamination.
Can u please provide coding for this type of task.
Thanks in advance.Assuming you are using RandomAccessFile, you can use the locking functionality in the Java NIO library to lock sections of a file that you are reading/writing from each thread (or process).
If you can't use NIO, and all your threads are in the same application, you can create your own in-process locking mechanism that each thread uses prior to accessing the file. That would take some development, and the OS already has the capability, so using NIO is the best way to go if you can use JDK 1.4 or higher.
- K
I need to read from and write into a same file
multiple threads.
How can we do that without any data contamination.
Can u please provide coding for this type of task.
Thanks in advance. -
How to call a function in one .js file from another .js file
Hello Techies,
I am trying to call a function in two.js file from one.js file.
Here is my code
one.js
<script>
document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
function one()
var a;
two(a);
}two.js
function two(a)
alert("two");
}But the function two() is not working.
How can I do this one??
regards,
KrishI think there is a syntax error in line
document.write("<script type='text/javascript' src='/htmls/js/two.js'> <\/script>");
end tag <\/script> is wrong. -
Need help compiling external jar files into my one jar file from cmd line
Here is my problem, let me see if I can explain it right:
I am making a jar file on my development computer that will run my java project. In this java project, it references a couple Java3D jar files. On my development computer, I create the jar file and it runs correctly, but when I move that jar file over to the test computer, the parts of the application needing those Java3D jars are not found in my jar I created. I isolated the problem and it is because those Java3D jar files I needed are not on my test machine. But that is the way I need it to be. I need it so that when I compile all my code on the development machine, I need it to also compile those two Java3D files into my one jar that I move to the test machine. You get what I'm saying? I must do all the compiling from the command line and have only one jar file to put on the test machine that contains all my compiled code and the two Java3D files needed to run some of the applications in the project.
Here a brief sample of what I'm doing:
To compile my java files in my project, I simply to this for all my files:
javac file.java
javac file2.java... and so on for all my java files.
Then I create my jar file:
jar -cfm MyJar.jar manifest.mf file.class
jar -fmu MyJar.jar manifest.mf file2.class... and so on for all my class files.
Also when compiling my jar file, I do this thinking that it would include the two Java3D jars into my one jar file:
jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
My manifest file looks something like this:
Manifest-Version: 1.0
Main-Class: Main
Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar
Do I have to have that Class-Path in there pointing to those jar files? Those jar files will not exist on my test machine because the directory structure will not be the same. I've tried a manifest without specifying my Class-Path to those jar files, but I get the same problem when I run my application on the part that needs the Java3D files.
The error I am getting is that there is a RasterTextLabel class inside one of those Java3D jar files that my application cannot access because those jar files are not on my test machine.
So basically what I really need to know is how I get those two Java3D jar files compiled into my one jar file that I move to a test machine and run with the following command:
java -jar MyJar.jar
Can anyone help me??
Thanks.Here what you need is to have all the files present in a single jar file, and the classpath is set properly to the required jar files.
Do the following in steps:
1)
Create a custom manifest file,say mymanifest.mf, with the following contenets, put it in current directory:
Manifest-Version: 1.0
Created-By: 1.4.0_01 (Sun Microsystems Inc.)
main-Class: Main
Class-Path: jars/j3d-org.jar jars/j3d-org-images.jar <press ENTER key>
2)
jar -cfm MyJar.jar manifest.mf file.class
jar -fmu MyJar.jar manifest.mf file2.class... and so on for all class files.
3)
jar -fmu MyJar.jar manifest.mf jars/j3d-org.jar
jar -fmu MyJar.jar manifest.mf jars/j3d-org-images.jar
(Make sure that j3d-org-images.jar and j3d-org.jar are present in a subdirectory called 'jars')
Now you would be able to run,
java -jar myjar.jar -
How to write and read Xml file from database if possible?
Hi all,
I need to read the .Xml file when receives from Source systems and write the data into the table as well as write in the.xml file thru reading the data from table as per the client needs. I am stranger to this area. Since, please provide some examples how to approach the same.
Thanks in advance !!
Regards.
Vissu.....The XML DB forum is better suited to your question.
It also has a FAQ which details how to read and shred XML into tables as well as other common XML based questions...
XML DB FAQ -
Simple AIR ajax question? One html file or many?
I am a new ajax air developer and was wondering if it's a better practice to use one html file in my app or many html files? So far I have been testing with many html files using javascript location.href to send the user to another html page when they click different navigation buttons. This works although there is a clear webpage "loading" feel to the app due to a temporary white screen displaying over the app as it loads the next page (maybe for a couple milliseconds). Not a huge deal but still feels somewhat unprofessional since regular desktop apps do not have this "flicker" occur when changing navigation. Now if I use a single html file (where I load html using javascript) this does not occur but the file feels very large and bloated. Anyone have any suggestions of how I can eliminate the flicker that occurs using many files (perhaps I am not loading the file the correct way into the native window) or am I stuck with a single file if I want there to be no flicker?
I'll say become a Flex/AIR developer
Maybe you are looking for
-
Error while updating I Phone OS
I tried to update the OS of my I-Phone 5 but it is giving error in downloading the software. It says- "Software update filed. An error occurred downloading iOS 7.1." I tried to download it by connecting it to Computer. I have iTunes 11.1.5.5. It g
-
Best way for building an application main frame
I'm about to program a desktop application. The main frame will have menus, toolbar, status bar etc. There will be a lot of interaction between the menus, toolbar buttons and other custom gui components (such as an editor). My question is which is th
-
HT1459 how to permanently fix white screen after resetting and restoring
How to permanently fix a 'White Screen" after resetting and restoring? 2nd generation ipod
-
Hi, recently my 1 year old MBP started to act strange. Randomly the machine locks up and all I can do is keep the power button pressed until it shuts down. The after shutdown at first startup it goes to the Apple Logo screen and then it reboots. At f
-
If I get Leopard, will I be able to open HD Photo (hdp) files in Mac OS X, like from Preview?