How to trap No_Data_Found error?
I know how to trap this error in a back-end script:
BEGIN
select empno
into v_empno
where empno = 9999999; --no such employee
EXCEPTION
WHEN NO_DATA_FOUND THEN
However when I use this approach within a trigger in Form 10g, it fails me. I've experimented with DBMS_ERROR_CODE, but so far got nowhere. Can same approach be used in Forms as I'm using above? If not, how should I approach it?
Thanks a lot!
You should write something like this......
declare
v_empno emp.empno%type;
begin
begin
select empno into v_empno
from emp
where empno=99999;
exception
when no_data_found
then
message('no employee found');
end;
<any other code >
end;Greetings...
Sim
Similar Messages
-
How to trap 1843 error. .nOT Valid month..
This is in my cursor for loop
mstart_issue := TO_CHAR(to_date(mstart_issue,'YY-MON'),'Mon.YYYY') ;
mend_issue := to_char(to_date(mend_issue,'YY-MON'),'Mon.YYYY');
But it throws 1843 error..
i Have execptions for finding value error like
when value_error then
warn('value error'||moldmembership);
But i need something to trap the following error ie ..The moment not a valid month error occurs. .It should trap that error
Like warn('not validm onth'||membershpnumber)
What shall be the exeption to catch . .the 1843 error...
Like we got exceptions like when too many rows to catch duplicate records..
And this is how my end_issue data looks like .. . 10-jul
12-Aug date in yy-mon format..
But seems there is error..
Kindly help..
Thankssusf wrote:
Hi Thanks i am implementing both part of code.. Thanks ..
But ..When i use nls_date_language= 'AMERICAN' I see the output of date in some other language in sql
The output is like this..
Loka .2010
Loka .2010
Loka .2010
Loka .2010
Loka .2010
Loka .2010
Loka .2010
Marras.2010
Marras.2010
Marras.2010which line below generates the output above?
Here is the part of my code
declare
msno sub.sno%type;
e;
mSTART_ISSUE sub.start_issue%type;
MEND_ISSUE SUB.END_ISSUE%TYPE;
MCOMMENTS SUB.COMMENTS%TYPE;
MPCODE SUB.POSTCODE%TYPE;
mpay_mode sub.pay_mode%type;
mrmember sub.rmember%type;
mflag varchar2(1);
cursor c1 is select * from htmldb_collections where collection_name = 'CSV_DATA' and c001 != 'SNO';
invalid_month exception;
pragma exception_init( invalid_month, -1843 );
begin
mflag := 'N';
FOR XXX IN C1
LOOP
begin
mrmember := xxx.c023;
mstart_issue := xxx.c019;
mend_issue := xxx.c020;
BEGIN
IF SUBSTR ( UPPER (mstart_issue)
, -3
) IN ( 'JAN', 'FEB', 'MAR'
, 'APR', 'MAY', 'JUN'
, 'JUL', 'AUG', 'SEP'
, 'OCT', 'NOV', 'DEC'
THEN
MSTART_ISSUE := TO_CHAR(to_date(mstart_issue,'YY-MON','NLS_DATE_LANGUAGE=AMERICAN'),'Mon.YYYY') ;
mflag := 'Y';
ELSE
warn('not valid month startissue ' || moldmembership);
mflag := 'N';
END IF;
IF SUBSTR ( UPPER (mend_issue)
, -3
) IN ( 'JAN', 'FEB', 'MAR'
, 'APR', 'MAY', 'JUN'
, 'JUL', 'AUG', 'SEP'
, 'OCT', 'NOV', 'DEC'
THEN
mend_issue := to_char(to_date(mend_issue,'YY-MON','NLS_DATE_LANGUAGE=AMERICAN'),'Mon.YYYY');
mflag := 'Y';
ELSE
warn('not valid month endissue ' || moldmembership);
mflag := 'N';
END IF;
exception
when invalid_month then
warn('EXCEPTIONnot valid month xx ' || moldmembership);
END;
IF mflag = 'Y' then
insert into sub (sno,rno,designation,old,start_issue,end_issue,comments,pay_mode,rmember)
values
(msno,mrno,mdesignation,moldmem e,maddressedas,madd1,
madd2,mcounty,mcity,mstate,mcountry,mph_no,memail,mpostcode,mstart_issue,mend_issue,mco );
end if;
exception
when value_error then
warn('value error'||moldmembership);
end;
END LOOP;
END; -
How to trap sql errors in a script
Hi,
I have a SQL script where I need to call 5 other SQL scripts. Every of those 5 scripts contain the following code for trapping an sql error:
WHENEVER SQLERROR EXIT sql.sqlcode
whenever oserror exit os.oscode
SET SERVEROUTPUT ON
In the first script that calls the others I put the same code at the begining.
Is it enough for the first script to trap the errors from the others and to show them at runtime?
ThanksYes but test it as we do not necessarily know what you want to script to do when an error occurs.
-
Trapping ora- errors in alert.log
hello everyone,
A classical question that I think every DBA has encountered.
We have about 40 oracle database servers, some with 9i, others with 10g, still others with both. Some on Linux, others on Solaris.
My question is, how to trap ora- errors in the alert.log of these database and having them being sent as an email.
It's not an easy question to answer, I know. But I'd like to get ideas from your experiences in implementing the same thing in your environments.
Many thnx.
HiruyaHi,
this let you look for errors :
utl_file.get_line(vInHandle, vNewLine);
IF vNewLine like ('%ORA-%') then
Then this let you to mail the errors :
utl_smtp.mail
Here is my complete script :
SET SERVEROUT ON
DECLARE
c utl_smtp.connection;
vInHandle utl_file.file_type;
vNewLine VARCHAR2(250);
vMessage VARCHAR2(250);
I pls_integer := 0;
LC$Fic_in Varchar2(128) := 'db1ALRT.LOG'; -- a adapter sur votre configuration
LC$Dir_in Varchar(30) := 'C:\oracle\admin\db1\bdump';
PROCEDURE send_header(name VARCHAR2, header VARCHAR2) AS
BEGIN
utl_smtp.write_data(c,name ||':'|| header || UTL_TCP.CRLF);
END;
BEGIN
vInHandle := utl_file.fopen(LC$Dir_in, LC$Fic_in, 'R');
LOOP
BEGIN
utl_file.get_line(vInHandle, vNewLine);
IF vNewLine like ('%ORA-%') then
vMessage:=vMessage||chr(10)||vNewLine;
END IF;
EXCEPTION
WHEN OTHERS THEN
EXIT;
END;
END LOOP;
utl_file.fclose(vInHandle);
-----------------------SEND A MAIL---------------------------
c := utl_smtp.open_connection(‘smtpserver’,25);
utl_smtp.helo(c, ‘something.com');
utl_smtp.mail(c, [email protected]');
utl_smtp.rcpt(c, ‘[email protected]');
utl_smtp.open_data(c);
send_header('From', '"someone" <[email protected]>');
send_header('To', '"Recipient" < [email protected] >');
send_header('Subject', 'DB1 ERREUR ALERT LOG');
utl_smtp.write_data(c, UTL_TCP.CRLF ||vMessage);
utl_smtp.close_data(c);
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error OR utl_smtp.permanent_error THEN
BEGIN
utl_smtp.quit(c);
EXCEPTION
WHEN utl_smtp.transient_error
OR utl_smtp.permanent_error THEN
NULL;
END;
raise_application_error(-20000, SQLERRM);
END fopen;
/ -
I am using Developer Suite 9i with Oracle 9i as the backend. I have a doubt with trapping Oracle error 'ORA-00054'. For trapping a 'frm' error, say 40401, i write this code:-
DECLARE
lv_errtype VARCHAR2(3) := ERROR_TYPE;
lv_errcod NUMBER := ERROR_CODE;
lv_errtxt VARCHAR2(80) := ERROR_TEXT;
BEGIN
IF lv_errcod = 40401 THEN
null;
END IF;
END;
But, how to trap this error, say ORA-00054 or any other ORA error. In the back-end, we declare a exception using 'init_pragma(name,error_code)' and handle it.
In the forms front-end application, Developer Suite 9i, how do i handle that.
I hope, my question is clear. Please help in solving the doubt as it is urgent.
Regards.thanks for ur update, i was simulating a 'no data found' intentionally, and had written a ON-ERROR trigger at the form level using:-
DECLARE
lv_errtype VARCHAR2(3) := ERROR_TYPE;
lv_errcod NUMBER := ERROR_CODE;
lv_errtxt VARCHAR2(80) := ERROR_TEXT;
BEGIN
IF lv_errcod = 01403 THEN
message('no data found');
END IF;
message(lv_errtype);
END;
But, the message 'no data found' is not being raised, 'if' condition is not getting satisfied. In 'ERROR_TYPE', it is showing 'FRM', whereas, i am trying to simulate a database error. -
How to show custom error message in WebADI Excel template?
Hi,
I've created a custom Web ADI integrator and associated it with a 'Procedure' based custom interface.
WebADI Interface API Returns is set to "Error Message".
I'm using raise_application_error(-20001, "Actual Error Message") for invalid rows,but custom error message from PL/SQL is not populated on the excel template.
Instead it is showing "SQL exception occurred during PL/SQL upload".
Am I missing anything? How to show custom error message from Pl/SQL procedure to WebADI Excel template?
TIA
NarasimhaThe custom API errors are visible in the BNE log but not on the Excel.
BNE Log=>
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR BnePLSQLUpload.doUpload: Exception while uploading to PL/SQL API. Error Code: 20001, Message: ORA-20001: -Please enter CONTAINER_ID - Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
12/10/13 2:52 PM Web ADI Upload Job 13008 ERROR BnePLSQLUpload.doUpload: Stack trace: java.sql.SQLException: ORA-20001: -Please enter CONTAINER_ID - Enter PO_NO -
ORA-06512: at "APPS.XXPO_COSTFACTS_WEBADI_PKG", line 264
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:202)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1005)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3449)
at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3550)
at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4710)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1374)
at oracle.apps.bne.integrator.upload.BnePLSQLUpload.doUpload(BnePLSQLUpload.java:284)
at oracle.apps.bne.integrator.upload.BneSAXUploader.processDeepestLevel(BneSAXUploader.java:2346)
at oracle.apps.bne.integrator.upload.BneSAXUploader.startElement(BneSAXUploader.java:1182)
at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:234)
at oracle.apps.bne.integrator.upload.BneUploader.processUpload(BneUploader.java:301)
at oracle.apps.bne.integrator.upload.BneAbstractUploader.processUpload(BneAbstractUploader.java:114)
at oracle.apps.bne.integrator.upload.async.BneAsyncUploadThread.run(BneAsyncUploadThread.java:140)
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 WARNING BneOracleWebAppsContext.getTimeZone CLIENT_TIMEZONE_ID has not been set
12/10/13 2:52 PM AJPRequestHandler-HTTPThreadGroup-5 ERROR BneOracleWebAppsContext.getExtraJDBCConnection recieved the same connection as the base connection. There may be transaction problems.
How to show the same error in the excel template?
Here is the package:
CREATE OR REPLACE PACKAGE BODY APPS.XXPO_COSTFACTS_WEBADI_PKG
AS
PROCEDURE upload_data (
P_CONTAINER_ID IN VARCHAR2
, P_SAIL_DATE IN DATE
, P_PO_NO IN VARCHAR2
) IS
--declare
lv_err_msg VARCHAR2(240);
lf_err_flag NUMBER := 0;
ln_temp NUMBER;
BEGIN
--------------------- checking for mandatory parameters---------------------------
IF (P_CONTAINER_ID IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg||'-'||'Please enter CONTAINER_ID - ';
END IF;
-------------Validation for Sail Date Format----------------------
IF (P_SAIL_DATE IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'Enter Sail Date - ';
ELSE
BEGIN
SELECT 1
INTO ln_temp
FROM DUAL
WHERE P_SAIL_DATE = TO_DATE (TO_CHAR (P_SAIL_DATE, 'DD-MON-YYYY'), 'DD-MM-YYYY');
EXCEPTION
WHEN NO_DATA_FOUND THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format';
WHEN OTHERS THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Enter Sail date in DD-MON-YYYY Format'|| SQLERRM;
END;
END IF;
-------------Validation for PO_Number----------------------
IF (P_PO_NO IS NULL) THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'Enter PO_NO - ';
ELSE
BEGIN
SELECT count(1)
INTO ln_temp
FROM PO_HEADERS
WHERE Attribute4 = P_PO_NO;
EXCEPTION
WHEN NO_DATA_FOUND THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' No Oracle PO for Biceps PO#'||P_PO_NO;
WHEN OTHERS THEN
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' Error getting the Oracle PO for Bicpes PO#'||P_PO_NO||' Error-' || SQLERRM;
END;
END IF;
-----------------------Insert Record----------------------------
IF lv_err_msg is NULL THEN
BEGIN
INSERT
INTO XXP2P_HW_COST_FACTORS_STG
CONTAINER_ID
,SAIL_DATE
,PO_NO
, ERROR_FLAG
, ERROR_MSG
,CREATED_BY
,CREATION_DATE
,LAST_UPDATED_BY
,LAST_UPDATE_DATE
,LAST_UPDATE_LOGIN
VALUES
P_CONTAINER_ID
,P_SAIL_DATE
,P_PO_NO
,lf_err_flag
,lv_err_msg
,FND_GLOBAL.USER_ID
, trunc (sysdate)
,FND_GLOBAL.USER_ID
, trunc (sysdate)
,FND_GLOBAL.LOGIN_ID
-- commit;
DBMS_OUTPUT.put_line
'-' || 'After ap_invoices_interface'
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
lf_err_flag := 1;
lv_err_msg := lv_err_msg || ' ' || 'error loading CONTAINER_ID-' || P_CONTAINER_ID || SQLERRM;
raise_application_error(-20001, lv_err_msg);
END;
ELSE
raise_application_error(-20001, lv_err_msg);
END IF;
END upload_data;
END XXPO_COSTFACTS_WEBADI_PKG; -
How to trap the exception in cursors
Hi
How to trap the exception NO DATA FOUND/other exceptions with the cursor
DECLARE
CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
BEGIN
FOR i IN c1 LOOP
DBMS_OUTPUT.PUT_LINE(i.ename);
END LOOP;
END;so 1234 is not in my table, how to trap this.could some one help me please
Edited by: user4587979 on Sep 27, 2010 3:46 AMuser4587979 wrote:
Hi
How to trap the exception NO DATA FOUND/other exceptions with the cursor
DECLARE
CURSOR c1 IS SELECT * FROM EMP WHERE empno = 1234;
BEGIN
FOR i IN c1 LOOP
DBMS_OUTPUT.PUT_LINE(i.ename);
END LOOP;
END;so 1234 is not in my table, how to trap this.could some one help me please
Edited by: user4587979 on Sep 27, 2010 3:46 AMYou don't trap NO_DATA_FOUND in a cursor loop, as for others ... you trap and handle the ones you expect.
NO_DATA_FOUND isn't a condition associated with the processing of a cursor loop.
You have other options though, for example ...
declare
l_processed_something boolean default false;
begin
for x in cursor
loop
l_processed_something := true;
<more processing>
end loop;
end;
/ -
Trap update error for insert!
Hi, I have a table approx 2 million records which is updated daily from a staging table that is loaded from file. It's taking approx 7 hours as it searches for a record and if it exists, otherwise it inserts.
I was thinking that a faster method would be to bulk collect and update, then trap the error if the record to be updated doesn't exist, and insert the record.
I'm on Oracle 8i.
Question: Would this be the most efficient way to perform the task?
If so would anyone out there have some sample code to do it?
Your help would be very much appreciated.Hi,
There's only one constraint on the target:
CREATE UNIQUE INDEX XPKGMENT_V ON GMENT_V
(DATE_START, DATE_END, ORI, FNUMBER,
CLASS_CD, DOW)
CURSOR cur IS
SELECT BEG_DATE,
END_DATE,
FNUMBER,
ORIG,
CLASS_CD,
DATA_TYPE_CD,
DOW,
TTC,
PSEUDO,
PRORATE
FROM stage_gment_v;
rec cur%rowtype;
rowcount number(7);
row_exists number(1);
BEGIN
OPEN cur;
rowcount := 0;
row_exists := 0;
LOOP
FETCH cur INTO rec;
EXIT WHEN cur%NOTFOUND;
rowcount := rowcount + 1;
row_exists := 0;
BEGIN
SELECT 1 INTO row_exists
FROM gment_v r
WHERE r.date_start = rec.beg_date
AND r.orig = rec.orig
AND r.class_cd = rec.class_cd
AND ( r.dow = rec.dow
OR ( rec.dow IS NULL AND r.dow IS NULL) )
AND ( r.fnumber = rec.fnumber
OR ( rec.fnumber IS NULL AND r.fnumber IS NULL));
EXCEPTION
WHEN NO_DATA_FOUND THEN
row_exists := 0;
END;
-- update if a row already exists
IF ( row_exists = 1 ) THEN
UPDATE gment_v r
SET TTC = rec.ttc,
PSEUDO = rec.pseudo,
PRORATE = rec.prorate
WHERE r.date_start = rec.beg_date
AND r.orig = rec.orig
AND r.class_cd = rec.class_cd
AND ( r.dow = rec.dow
OR ( rec.dow IS NULL AND r.dow IS NULL) )
AND ( r.fnumber = rec.fnumber
OR ( rec.fnumber IS NULL AND r.fnumber IS NULL));
updates := updates +1;
ELSE
-- create if does not exist already
INSERT INTO gment_v(
DATE_START,
DATE_END,
FNUMBER,
ORIG,
CLASS_CD,
DATA_TYPE_CD,
DOW,
TTC,
PSEUDO,
PRORATE)
VALUES ( rec.beg_date,
rec.end_date,
rec.fnumber,
rec.orig,
rec.class_cd,
rec.data_type_cd,
rec.dow,
rec.ttc,
rec.pseudo,
rec.prorate) ;
END IF;
END LOOP; -
How to trap ORA-12520: TNS:listener could not find available handler in OEM
Hi,
We are using 11G in Linux. We are often receiving "ORA-12520: TNS:listener could not find available handler for requested type of server" error though listener is working properly. My client would like to trap this error through OEM. Can any one please advise me how to implement this one.
We are using 11GR1 OEM in our system.
Thanks in-advance.
Regards
DBA.Hello,
You may see system parameters used to start the database via the interface:
home->administration->about database->parameters
you may want to modify the PROCESSES parameter to a higher value.
This parameter also modifies the derived SESSIONS parameter, who specifies the maximum number of sessions possible.
These parameters are static, so you need to restart the db after changing.
You can as well see the limit reached by some values querying
select * from v$resource_limit;
These parameters are described in detail in the Reference manual.
HTH,
Andrea -
Trap syntax error in trap-schedule.dat alert; possibly SMC related
Receiving many ID xxxxxx daemon.alert events every hour. The message is:
[ID xxxxxx daemon.alert] syslog Nov 10 14:00:10 trap syntax error in trap-schedule.dat(200) at token '???'
followed immediately (same timestamp) with:
[ID yyyyyy daemon.alert] syslog Nov 10 14:00:10 trap *** aborting execution ***
I coudn't find anything on the web specifically for this message but several hits that looked similar seemed to indicate that this might be a problem in SMC. If it is not I apologize in advance.
System is an ldom:
Solaris 10;
SunOS clsol8 5.10 Generic_127127-11 sun4v sparc SUNW,T5140
Current situation is:
# /opt/SUNWsymon/sbin/es-validate
This script will help you in validation of Sun (TM) Management Center.
Validation Tool Version : 4.0
Host name : clsol8
Number of CPUs : 24
Platform : SUNW,T5140
Operating System : SunOS 5.10
Memory size : 2048 Megabytes
Swap space : 595480k used, 3727296k available
JAVA VERSION : "1.5.0_14"
Sun Management Center Production Environment Installation.
Following layers are installed : SERVER, AGENT, CONSOLE
Installation location : /opt/SUNWsymon
Sun Management Center installation status:
PRODUCT : Production Environment
INSTALLATION STATUS : Setup.
DATABASE SETUP : Setup.
COMPLETELY INSTALLED PACKAGES : SUNWescom,SUNWesbui,SUNWesbuh,SUNWenesi,
: SUNWesdb,SUNWesagt,SUNWessrv,SUNWessa,
: SUNWesjp,SUNWesaxp,SUNWesse,SUNWesclt,
: SUNWesjrm,SUNWmeta,SUNWenesf,SUNWesmdr,
: SUNWesgui,SUNWesweb,SUNWessvc,SUNWesasc,
: SUNWescix,SUNWsuagt,SUNWsusrv,SUNWesval,
: SUNWesmc,SUNWessms,SUNWessdv,SUNWescdv,
: SUNWlgsmc,SUNWeslac,SUNWesodbc,SUNWesmib,
: SUNWesken,SUNWesmod,SUNWesae,SUNWesaem,
: SUNWesmcp,SUNWesafm,SUNWescon,SUNWsucon,
: SUNWescli,SUNWesclb
<NOTE: I had to cut out a bunch of installed components to hit character limit>
Sun Management Center Add-Ons and Versions:
PRODUCT VERSION
Production Environment 4.0
Advanced System Monitoring 4.0_Build15
Sun Fire Entry-Level Midrange S 3.5-v6
Service Availability Manager 4.0_Build15
Performance Reporting Manager 4.0_Build15
Solaris Container Manager 4.0_Build15
Sun Fire Midrange Systems Platf 3.5-v6
System Reliability Manager 4.0_Build15
Sun Management Center Integrati 4.0_Build15
Workgroup Server 3.6
Generic X86/X64 Config Reader 4.0_Build15
Sun Management Center Patch installation details:
No Sun Management Center patch is installed.
Sun Management Center disk-space consumption:
PRODUCT APPROXIMATE DISK SPACE CONSUMED
Production Environment : 54452 kB
Advanced System Monitoring : 2391 kB
Sun Fire Entry-Level Midrange S : 1738 kB
Service Availability Manager : 1838 kB
Performance Reporting Manager : 3371 kB
Solaris Container Manager : 3688 kB
Sun Fire Midrange Systems Platf : 3270 kB
System Reliability Manager : 970 kB
Sun Management Center Integrati : 540 kB
Workgroup Server : 3707 kB
Generic X86/X64 Config Reader : 608 kB
TOTAL : 76573 kB
Database is located at : /var/opt/SUNWsymon/db/data/SunMC
Free space available on this partition is : 6493142 kB
Following locales are installed :
Information about upgrade from old versions is not available.
Sun Management Center Ports:
SUNMC COMPONENT PORT_ID
agent service 1161
trap service 162
event service 163
topology service 164
cfgserver service 165
cstservice service 167
metadata service 168
platform service 166
grouping service 5600
rmi service 2099
webserver_HTTP service 8080
webserver_HTTPS service 8443
You are currently running SNMPDX.
Sun Management Center Server Hosts definitions in domain-config.x:
SUNMC COMPONENT SERVER_HOST
agent service clsol8
trap service clsol8
event service clsol8
topology service clsol8
cfgserver service clsol8
cstservice service clsol8
metadata service clsol8
platform service clsol8
Sun Management Center Processes:
SUNMC SERVICE STATUS
Java Server Running.
Database services Not Running.
Grouping service Running.
Event-handler service Running.
Topology service Not Running.
Trap-handler service Not Running.
Configuration service Running.
CST service Not Running.
Metadata Services Running.
Hardware service Not Running.
Web server Running.
Sun Management Center Agent Running.
Platform Agent Not Running.
Privilege level for Sun Management Center users :
CATEGORY USERS
esadm : smcadmin
esdomadm : smcadmin
esops :
ALL USERS : smcadmin
server is local host
Web server package is installed correctly.
Web Server is up and responding.
Web Server servlet engine is up and responding.
I have also read that patching SMC has caused problems for some people so I don't really want to try that until I get some feedback.Hi Mike,
Tried your suggestion to rename the .dat and let SMC recreate it but I can't get the SMC database service to launch. So it looks like I am having trouble with the database. Any suggestions?
To back up, you nailed it with the loss of power - we lost both power supplies on a Sunday night with no warning and nothing in /var/adm/messages (since we send them to a loghost.) It was determined that chips within each power supply in the T5140 failed. So we replaced both power supplies and fired the server up. That is when we started getting the trap errors and only those two errors on clsol8.
I did check http://sun.com/msg/SMF-8000-KS but am not sure how that helps.
What I tried:
On clsol8 as root:
# cd /opt/SUNWsymon/sbin
# ls
{db-memconfig.sh es-details es-imagetool es-setup
db-start es-device es-inst es-start
db-stop es-dt es-keys.sh es-stop
es-apps es-gui-imagetool es-lic es-tool
es-backup es-guiinst es-load-default es-trapdest
es-chelp es-guisetup es-makeagent es-uninst
es-cli es-guistart es-platform es-validate
es-common.sh es-guistop es-restore esmultiip
es-config es-guiuninst es-run ports.config}
# ./es-stop -A
{Stopping metadata component
Stopping cfgserver component
Stopping topology component
Stopping event component
Stopping grouping service
Stopping trap component
Stopping java server
Stopping webserver
Stopping agent component
Stopping platform component}
<attempting Mike's solution suggestion>
# cd /var/opt/SUNWsymon/cfg
# ls
trap-schedule.dat
# mv trap-schedule.dat trap-schedule.dat.maybeCorrupted
# /opt/SUNWsymon/sbin/es-start -Ac
{Some of the SunMC services are in maintenace state.
Please check the corresponding SMF service log in /var/svc/log directory.
Please disable the services in maintenance state and re-start the services again.}
# svcs -vx
svc:/application/management/sunmcdatabase:default (SunMC database service)
State: maintenance since November 6, 2009 3:50:51 PM CST
Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
See: http://sun.com/msg/SMF-8000-KS
See: /var/svc/log/application-management-sunmcdatabase:default.log
Impact: This service is not running.
svc:/application/management/sunmcwebserver:default (SunMC webserver service)
State: maintenance since November 12, 2009 2:45:50 PM CST
Reason: Start method failed repeatedly, last exited with status 103.
See: http://sun.com/msg/SMF-8000-KS
See: /var/svc/log/application-management-sunmcwebserver:default.log
Impact: This service is not running.}
# svcadm disable sunmcdatabase
# svcadm disable sunmcwebserver
# svcs -vx
# svcadm enable sunmcdatabase
# svcadm enable sunmcwebserver
# /opt/SUNWsymon/sbin/es-start -Ac
{Failed to successfully perform Database Startup.}
# svcs -vx
svc:/application/management/sunmcdatabase:default (SunMC database service)
State: maintenance since November 12, 2009 2:49:50 PM CST
Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
See: http://sun.com/msg/SMF-8000-KS
See: /var/svc/log/application-management-sunmcdatabase:default.log
Impact: This service is not running.}
# cd /
# svcadm disable sunmcdatabase
# shutdown -y -g0 -i6
(after reboot, I logged into clsol8 and su'd to root)
# svcs -xv
svc:/application/management/sunmcdatabase:default (SunMC database service)
State: disabled since November 12, 2009 3:02:11 PM CST
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
Impact: 1 dependent service is not running:
svc:/application/management/sunmctopology:default}
# svcadm enable sunmcdatabase
# svcadm disable sunmcdatabase
# svcadm clear sunmcdatabase
svcadm: Instance "svc:/application/management/sunmcdatabase:default" is not in a maintenance or degraded state.
# svcadm refresh sunmcdatabase
# svcadm enable sunmcdatabase
# svcs -xv
svc:/application/management/sunmcdatabase:default (SunMC database service)
State: offline since November 12, 2009 3:09:25 PM CST
Reason: Start method is running.
See: http://sun.com/msg/SMF-8000-C4
See: /var/svc/log/application-management-sunmcdatabase:default.log
Impact: 1 dependent service is not running:
svc:/application/management/sunmctopology:default
# svcs -xv
svc:/application/management/sunmcdatabase:default (SunMC database service)
State: maintenance since November 12, 2009 3:10:30 PM CST
Reason: Start method exited with $SMF_EXIT_ERR_FATAL.
See: http://sun.com/msg/SMF-8000-KS
See: /var/svc/log/application-management-sunmcdatabase:default.log
Impact: 1 dependent service is not running:
svc:/application/management/sunmctopology:default
[ Nov 12 15:08:37 Leaving maintenance because disable requested. ]
[ Nov 12 15:08:37 Disabled. ]
[ Nov 12 15:09:07 Rereading configuration. ]
[ Nov 12 15:09:25 Enabled. ]
[ Nov 12 15:09:25 Executing start method ("/lib/svc/method/es-svc.sh start datab
ase") ]
execution of verifyDatabaseUp failed
exiting........................
[ Nov 12 15:10:30 Method "start" exited with status 95 ] -
Does anyone know how to fix an error in cc photoshop on Win8 that says puppet warp could not complete request due to program error?
Questions on using a specific program should go in that program forum
This forum is about the Cloud as a delivery process, not about using individual programs
If you start at the Forums Index https://forums.adobe.com/welcome
You will be able to select a forum for the specific Adobe product(s) you use
Click the "down arrow" symbol on the right (where it says All communities) to open the drop down list and scroll -
How to prevent an error of [WIP work order ... is locked-]
Hello experts
Can someone tell me how to prevent an error which [The WIP work order associated with this transaction is currently locked and being updated by another user. Please wait for a few seconds and try again.Transaction processor error].
How can you prevent that error?
P.S.
Oracle support told me [When you make data of mtl_transaction_interface, give same transaction_header_id to all data. Then, you kick worker with appointed transaction_header_id. Or, you set up being uncompatible with workers].
I cannot allow that making with same transaction_header_id and being uncompatible with worker on my system.Hi santosh,
You can implement badi BBP_DOC_CHECK to check vendor email and issue error message.
Kind regards,
Yann -
How to customize the error messages in web analysis reports
Does anyone know how to customize the error messages that web analysis shows ,
I want to customize the below error message with a custom error message
"Document does not exist or no authorization to open document.Error occurred while loading document"
Does anyone know how to do this ?Rajesh,
you may want to check these links
How to the Change the Application Stopped Message
How to Change the Dispatcher Running, No Server Connected Message
http://help.sap.com/saphelp_nw70/helpdata/en/65/18fc3f9ec4e669e10000000a155106/frameset.htm
Thanks
Bala Duvvuri -
JNI - How to use the error reporting mechanism?
I've developed a C++ DLL which is loaded from a commercial Win32 application (not written by me) as a plug-in for external calculations. On its initialization the C++ DLL launches the Java VM via the JNI invocation interface. When the DLL functions are called by the application, they forward the calls to Java objects inside the Java VM, again via JNI invocation interface.
This works well, but I have encountered a weird error.
From Java I open a JFrame containing a JTextArea as small console for debug output messages. If I turn output to this debug console off (my printToConsole routine checks whether a boolean flag is set), the string concatenation operator may lead to a crash of the Java VM.
For example, if in one of the Java functions called from the
DLL via JNI invocation interface the following is the first statement,
it leads to a crash of the Java VM and the application that loaded the C++ proxy DLL.
String test=""+Math.random(); // String test not used later
Interestingly, if I comment this statement out, the Java code works fine WITHOUT any crash. I've already thought about potential races and synchronization issues in my code, but I don't see where this is the case. And the string concatenation error fails as well, if I insert sleep() statements in front of it and at other places in the code. However, if I turn on log messages printed to my JFrame debug console (containing a JTextArea), the String concatenation works without problems.
So maybe the JNI interface has a bug and affects the Java VM; I don't see where my JNI code is wrong.
One problem is that I do not get any stdout output, as the C++ proxy DLL is loaded by the Windows application, even if I start the Windows application from the DOS command line (under Windows).
Does anyone know how to use the error reporting mechanism?
http://java.sun.com/j2se/1.4.2/docs/guide/vm/error-handling.html
Is it possible that the JVM, when it crashes, writes debug information about the crash into a file instead of stdout/stderr?
My C++ proxy DLL was compiled in debug mode, but the commercial application (which loaded the DLL) is very likely not.
I do not know hot to find the reason why the String concatenation fails inside the Java function called from the C++ DLL via JNI.Yes, I've initially thought about errors in the C++ code too. But the C++ code is actually very simple and short. It doesn't allocate anything on the C++ side. It allocates a couple of ByteBuffers inside the Java VM however via JNI invocation interface calls of env->NewDirectByteBuffer(). The native memory regions accessed via the ByteBuffers are allocated not by my own C++ code, but by the program that calls my DLL (the program is Metastock).
The interesting thing is that everything works fine if output to my debug console is enabled, which means that in the Java print routine getConsoleLoggingState() returns true and text is appended to the jTextArea.
static synchronized void print(String str)
{ MetaStockMonitor mMon=getInstance();
if ( mMon.getFileLoggingState() && mMon.logFileWriter!=null) {
mMon.logFileWriter.print(str);
mMon.logFileWriter.flush();
if ( mMon.getConsoleLoggingState() ) {
mMon.jTextArea1.append(str);
Only if output to the JTextArea is turned off (ie. getConsoleLoggingState()==false), the crash happens when the FIRST statement in the Java routine called via JNI invocation interface is a (useless) String concatenation operation, as described above.
String test=""+Math.random(); // String test not used later
Moreover, the crash happens BEFORE the allocated ByteBuffer objects are accessed in the Java code. But again, if console output is turned on, it works stable. If console output is turned off, it works when the (useless) String concatenation operation is removed in the Java routine called from C++.
I've already thought about potential races (regarding multiple threads), but this can be ruled out in my case. It almost appears as if the JVM can have problems when called by the invocation interface (I tested it with Java 1.4.2 b28).
All the calls between C++ and Java go ALWAYS in the direction from C++ code to Java. Unfortunately, there is no special JRE version with extensive logging capabilities to facilitate debugging. And the problem is not easily reproducible either.
JNIEnv* JNI_GetEnv()
JNIEnv *env;
cached_jvm->AttachCurrentThread((void**)&env,NULL);
fprintf(logfile,"env=%i\n",env);
fflush(logfile);
return env;
// function called by Metastock's MSX plug-in interface
BOOL __stdcall createIndEngine (const MSXDataRec *a_psDataRec,
const MSXDataInfoRecArgsArray *a_psDataInfoArgs,
const MSXNumericArgsArray *a_psNumericArgs,
const MSXStringArgsArray *a_psStringArgs,
const MSXCustomArgsArray *a_psCustomArgs,
MSXResultRec *a_psResultRec)
a_psResultRec->psResultArray->iFirstValid=0;
a_psResultRec->psResultArray->iLastValid=-1;
jthrowable ex;
jmethodID mid;
JNIEnv* env=JNI_GetEnv();
jobject chart=getChart(env, a_psDataRec);
if ( chart==NULL) {
return MSX_ERROR;
jobject getChart (JNIEnv* env, const MSXDataRec *a_psDataRec)
jthrowable ex;
jmethodID mid;
int closeFirstValid, closeLastValid;
closeFirstValid=a_psDataRec->sClose.iFirstValid;
closeLastValid=a_psDataRec->sClose.iLastValid;
long firstDate, firstTime;
if (closeFirstValid>=1 && closeFirstValid<=closeLastValid) {
firstDate = a_psDataRec->psDate[closeFirstValid].lDate;
firstTime = a_psDataRec->psDate[closeFirstValid].lTime;
} else {
firstDate=0;
firstTime=0;
jclass chartFactoryClass = env->FindClass("wschwendt/metastock/msx/ChartFactory");
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot find class ChartFactory\n");
printSBufViaJava(sbuf);
return NULL;
mid = env->GetStaticMethodID(chartFactoryClass, "getInstance", "()Lwschwendt/metastock/msx/ChartFactory;");
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getInstance()\n");
printSBufViaJava(sbuf);
return NULL;
jobject chartFactory=env->CallStaticObjectMethod(chartFactoryClass, mid);
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Exception while calling ChartFactory.getInstance()");
printSBufViaJava(sbuf);
return NULL;
mid = env->GetMethodID(chartFactoryClass, "getChartID", "(Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;Ljava/nio/ByteBuffer;IIIIIII)F");
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot find method ID for ChartFactory.getChartID()\n");
printSBufViaJava(sbuf);
return NULL;
jobject symbolBuf=env->NewDirectByteBuffer(a_psDataRec->pszSymbol, strlen(a_psDataRec->pszSymbol) );
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot allocate symbolBuf\n");
printSBufViaJava(sbuf);
return NULL;
jobject securityNameBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityName, strlen(a_psDataRec->pszSecurityName) );
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot allocate securityNameBuf\n");
printSBufViaJava(sbuf);
return NULL;
jobject securityPathBuf=env->NewDirectByteBuffer(a_psDataRec->pszSecurityPath, strlen(a_psDataRec->pszSecurityPath) );
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot allocate securityPathBuf\n");
printSBufViaJava(sbuf);
return NULL;
jobject securityOnlineSourceBuf=env->NewDirectByteBuffer(a_psDataRec->pszOnlineSource, strlen(a_psDataRec->pszOnlineSource) );
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Cannot allocate onlineSourceBuf\n");
printSBufViaJava(sbuf);
return NULL;
// Java Function call leads to crash, if console output is turned off and
// the first statement in the Java routine is a (useless) string concatenation.
// Otherwise it works stable.
jfloat chartID=env->CallFloatMethod(chartFactory, mid, securityNameBuf, symbolBuf,
securityPathBuf, securityOnlineSourceBuf, (jint)(a_psDataRec->iPeriod),
(jint)(a_psDataRec->iInterval), (jint)(a_psDataRec->iStartTime),
(jint)(a_psDataRec->iEndTime), (jint)(a_psDataRec->iSymbolType),
(jint)firstDate, (jint)firstTime );
if (ex= env->ExceptionOccurred() ) {
env->ExceptionDescribe();
env->ExceptionClear();
sprintf(sbuf, "DLL: Exception while calling ChartFactory.getChartID()");
printSBufViaJava(sbuf);
return NULL; -
How to resolve attribute errors
Hi,
When I am trying to click on an lov item I am getting the following error
Attribute TransactionTypeId in CreateArInvoiceAM.CljReceivableSlipsEOVO1 is required
I would get the TransactionTypeId only when I select an item from the lov but before selecting the lov itself I am getting this error.Can anyone tell me how to resolve this error.
Thanks for your help in advance.Do you have any open method invocation in the processFromRequest? Just start the debugger and see how is the code progressing. Seems some method is getting invoked unintentionally.
Maybe you are looking for
-
Satellite Pro A200 (PSAE4): DVD drive permanently blinking
Hello, I have been using a Satellite Pro A200 (PSAE4) laptop for some time now without any major issues. My dvd drive (tsst crop TS-L632H) is no longer working for a few days now... More precisely, its LED is permanently orange blinking. Drivers are
-
Switching between the firewire connection and USB 2.0 Connection
Is it possible to switch between the firewire connection and USB 2.0 Connection on a portable external hard drive? I've tried unsuccessfully to use the firewire connection on my external hard drive after using the 2.0 connection. No machine will read
-
Where do I find my library on my mac
I am trying to copy my Thunderbird email profile from my pc to my mac - can't seem to find the Thunderbird library on my mac (even though TB is working) Any ideas?
-
Create Currency Decimal Places
Hi Experts, Is it possible to create our own currency decimal places? In my configuration(OY04) only available standard decimal places 1, 3,4 & 5. now I need decimal place 2. e.g. I want to show amount as 101.26 Regards VS Rao
-
Can imacs be left on all the time
I was told that I should be leaving my imac on at all times, i wanted to check this out before doing so?