JVM :: Java Print API Shows Different Job Name On Printer Than In Spooling Queue
Sep 20, 2013
I am using Java print API (javax.print package) to send a bunch of documents for printing. Below is the code section that I am using to print documents through java program. When the document is sent for printing, I see the Job name is created properly in the print spooling queue on windows machine. But, when i go to the actual printer, the job name is different on the printer than what i saw in spooling. Since I am printing 100s of documents in batch, it gets very difficult to identify which document did not print, in case of issues. I also used the java.awt.print package . The java.awt. print. PrinterJob has a method setJobName(String). When i used this package, I got the name appear properly in both places. But I wish to use javax.print with the document name appear on printer queue.
public void printDocument(File pDoc, PrintService pService, DocFlavor pFlavor)
throws Exception { logMessage(true, "Printing Doc::" + pDoc.getAbsolutePath());
FileInputStream is = new FileInputStream(pDoc);
// Create the print job DocPrintJob job = pService.createPrintJob();
//Set print request attributes with file name as job
[code].....
I want to print a report to the printer directly. The main issue is that I don't want the user to save the report to prevent reprint of legal Order. Below is my code to produce 'PDF' format.
I am using HP laserjet 1020 plus printer with windows xp sp2 and reports builder 6.0.8.8.3. Problem is that printer does not print the reports generated by d2k i suppose printer command is not sent to printer. My another printer HP laserjet 1160 can print the same reports without any trouble.
In Sales Order Form there is a print receipt button. In current situation On Clicking the 'Print Receipt Button' it submits a XML Publisher report(PDF output) to the concurrent manager. Currently to print that report i need to go view--> requests--> view output and then print. According to my new Requirement i need to print that report directly to local printer on one simple Print receipt button click in form.
I am trying to call the printers on server using custom.pll. The report is running successfully but it is not printing output to the local printer. I need to print the report to the local printers based on responsibility. Local printers are available on apps server.
Is it possible to print the document using custom.pll? Is there any other alternative to print the report on simple button click in form.
I searched many forums but i found customizations on form level. I am trying to customize the form using custom.pll. I found many examples like URL..... but i don't think i can use these practices in custom.pll. ADD_PARAMETER & RUN_PRODUCT dont work in custom.pll. I need to complete this requirement immediately.
Environment: Apps 11.5.10.2, Forms 6i
Here is the code that i am using in my custom.pll.
if (v_form_name = 'OEXOETEL' --and v_block_name = 'LINES_SUMMARY' and name_in('parameter.ACTIONS') = 'PAYMENT_RECEIPT' )THEN l_organization_id := Name_In('PARAMETER.OE_ORGANIZATION_ID'); l_order_header_id := Name_In('ORDER.header_id'); select to_number(oe_sys_parameters.value ('SET_OF_BOOKS_ID')) into l_sob_id from dual; xml_layout := FND_REQUEST.ADD_LAYOUT('XXAFP','XXAFPOEXPMTRCRTF','en','US','PDF'); [code]....
I am trying to propagate messages between two queues that are in the same database.I did exactly as it says here: URL.....
The message is propagated successfully.The problem is that it doesn't to dequeue the message with the default subscriber of the destination queue.
The only difference between what I did and what is in the example above is that I didn't create a database link. I don't think I need to because the queues are in the same database, and the problem is not the propagation because as I said the message has moved to the destination queue.
We have a Oracle 10g database with RAC and Dataguard. When we look at the AWR report, the wait time shown by Oracle for this database is very high.
Service Time : 15.36% Wait Time : 84.64%
This would imply Oracle is waiting for resources 85% of the time and only processing SQL queries during 15% of its non-idle time. However when we check the OS (RHEL), the iowait is only about 10% and the CPU is 80% idle. This means that that processing horsepower is available.
As such, the results between the OS and Oracle database (AWR report) seems contradictory. OS says we have CPU/IO capacity, however Oracle says we don't.
I am using Oracle 10g and I have XML stored in column XMLTYPE of my table. I want the XML in a flat file and process it to C exe. My XML Structure is like this
I am researching a performance problem on an Oracle Preprd DB in a RAC cluster using AQ. The queue table has 88 records, is about 900Meg in size, takes 90+ seconds to do a select count(*). In Prod the same table is about 44 records, 80 Meg in size, and takes about 9 seconds to query the table. The DB is at 10.2.0.4 running on a LINUX/Sun host. In the USER_DATA column I am seeing an entry in the STR_VALUE that displays 'Unable to successfully deliver a message after "MaxDeliveryCnt" attempts. Please verify that the onMessage() method of the MDB does not throw a RuntimeException' for each record in the table. I don't have direct access to the PROD DB so I can not verify this message in that environment. My question, is this table holding onto records that should be cleared out and should this table be dropped and rebuilt to reduce its size. I have seen this technique improve performance for other non-queueing tables. But I don't know if this is possible with a queue table.
I am trying to drop a user but i get the following error
* ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables
A couple of questions on this error:
- I did a search on the forum and the thread [URL] appears to have a solution to it by using
DBMS_AQADM.DROP_QUEUE_TABLE(queue_table => 'DEF$_AQCALL', force =>TRUE);
What i am not sure of is which queue will the above statement drop if run as sys and there are multiple schemas with different schema names but with the same queue name?
- We recently rebuilt the database server and prior to the rebuild i have always managed to drop a user without the above error. Is it likely that some setting somewhere is changed?
I need to Modify the column(MSGID) data type from RAW to BLOB for a Queue Table, I'm getting the following error.
BANNER --------------- Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production PL/SQL Release 11.2.0.2.0 - Production CORE11.2.0.2.0Production
YUV >
YUV > DESC PDA_REPORT_MESSAGE_QTAB Name Null?Type ----------------------------------------------------- -------- ------------------------------------ Q_NAME VARCHAR2(30) MSGID NOT NULL RAW(16)
YUV > YUV > YUV > ALTER TABLE PDA_REPORT_MESSAGE_QTAB MODIFY (MSGID BLOB); ALTER TABLE PDA_REPORT_MESSAGE_QTAB MODIFY (MSGID BLOB) * ERROR at line 1: ORA-22858: invalid alteration of datatype
YUV > YUV > YUV > YUV > YUV > ALTER TABLE PDA_REPORT_MESSAGE_QTAB ADD (MSGID_NEW BLOB); ALTER TABLE PDA_REPORT_MESSAGE_QTAB ADD (MSGID_NEW BLOB) * ERROR at line 1: ORA-24005: Inappropriate utilities used to perform DDL on AQ table PDADBA.PDA_REPORT_MESSAGE_QTAB YUV >
I need to create a program wherein it will create an excel files through spool command for every 25 records only. So if my select statement will return 100 records, it will create 4 excel files, 25 records for each excel file. i have these sample codes,it should be the logic, but then i'm having syntax error.
set serveroutput on size 1000000 SET PAGESIZE 0 SET LINESIZE 299
I have been trying to spool a table into a .lst. The table is spooled correctly, but there is a column which has xmlType data into. The problem is it does not write the xml into a single row. Every time it find a xml node, the spooling gets indented.
My code is as follows:
-- Establece opciones de formato. set echo off; set feedback off; set heading off; set recsep off; set verify off; set embedded off; set long 1000000; set pagesize 0; SET LINESIZE unlimited; set trimout off; set trimspool on; set serveroutput on size unlimited; set term on;
-- Definicion de variables del script prompt Introducir Creador de la tabla prompt Creador de la tabla: &&1 prompt Introducir Nombre de la tabla prompt Nombre de la tabla: &&2 prompt Introducir Directorio del fichero prompt Directorio del fichero: &&3 prompt Introducir Nombre del fichero prompt Nombre del fichero: &&4 prompt Introducir Caracter separador de campos prompt Caracter separador de campos: &&5 prompt Campo fecha: &&6
I want to send an email notification using oracle aq for events like when a message goes to error queue. Similarly,Can I send an email notification when I create a queue or drop a queue?
Due to firewall restriction, i have to configure the streams in queue forwarding. Intermediate database will hold two different ip's (one from source and another to target) and will not talk each other.
I am calling a report from a parameter form - the report is launched using a run report button, that all works great. What I want to do now is to add a 'Cancel Report' button to the form so that the end user can cancel the report and remove it from the reports queue.
,I am trying to set up Streams on a 11.2.0.3 on a Windows 2008R2 server. Due to an error in running propagation, i a, trying to delete both Capture and Apply queues. I have deleted the Apply queues but unable to drop the Catpure,
SQL>EXEC DBMS_APPLY_ADM.STOP_APPLY(apply_name =>'LAO_NLPG73_BLPU_APPLY'); SQL> select * from dba_apply; LAO_NLPG73_BLPU_APPLY NLPG73_BLPU_APPLY_Q STRMADMIN YES RULESET$_732 STRMADMIN STRMADMIN 301355 ABORTED 09/10/2013 17:34:21 1013 ORA-01013: user requested cancel of current operation CAPTURED STREAMS APPLY SQL> select * from dba_queues; STRMADMIN NLPG73_BLPU_APPLY_Q
1) I am able to view the oracle report in PDF format in my Web Application, but when I tried to print this PDF on Line matrix printer, the characters are not printing rightly.
2) Can I take report output as a text file and and print it through DOS mode printing.
i have a requirement..i have a script which retrieves data from different table and my requirement is using spool, i need the data from each table to be spooled into different sheets in the same excel sheet.
CODEspool d:\spool\spool1.xls select * from tab1; select * from tab2; select * from tab3; spool off
in the above code, data from tab1 should be spooled into sheet1 and data from should be spooled into sheet2 and so on.. in the same excel.
I am an IT auditor who has been using Oracle 10g Express to test some audit scripts we have created. I write the output of each query in the script to a separate file because it makes it easier for us to go through. However, I cannot get SQLPlus to spool the output files at all. I do not get any errors from running the script, and I can see the results in the SQLPlus window, but I cannot find where the files are actually spooling to, if they are spooling at all.
I didn't specify a network path for any of the spool files because the scripts need to be as generic as possible so they can run on any Windows or UNIX box. An example of my code is below:
spool Audit_Ver
SELECT * FROM V$VERSION;
spool off
But if I search my harddrive for "Audit_Ver" no such file can be found anywhere.
I am trying to Spool the data in pipe delimitted csv file but some of the records going on another line from the same records. Currently some of the data going to next line as below oulined in the 2nd and 3rd line (in bold - |Home & Family) . I have following sql setting in my spool file:
set linesize 4000 pagesize 0 trimspool on feedback off verify off echo off set define off spool Stk_hold_Sec_Tsk.csv
I tried increase linesize to 5000 but its not working. Ex.
PSS:Production Manager|ZS:PsS:PP:PROD_TCODES|P2S: PP - Production Transactions|House & street PSS:Production Manager|ZC:BW:PsS_RPT_MGR|BW PsS Reports Manager [b]|House & street[/b]
PsS:Production Manager|ZC:BW:PsS_RPT_USER|BW PsS Reports User [b]|House & street[/b]
PsS:Master Data (PDMs)|ZS:GEN:GENERAL_USER|GEN: General User|House & street
Data should be like into the file:
PSS:Production Manager|ZS:PsS:PP:PROD_TCODES|P2S: PP - Production Transactions|House & street PSS:Production Manager|ZC:BW:PsS_RPT_MGR|BW PsS Reports Manager|House & street PsS:Production Manager|ZC:BW:PsS_RPT_USER|BW PsS Reports User|House & street PsS:Master Data (PDMs)|ZS:GEN:GENERAL_USER|GEN: General User|House & street
I think it should be something with linesize or pagesize but not sure
I need to spool data from a remote server using putty(sqlplus) to a local machine. There are credentials i need to give before accessing the remote databases and i am able to do it..i tired with the below query but the spool file(csv or txt) is not able to create on local machine.
set colsep , set pagesize 120 set trimspool on set headsep off set linesize 1000 set numw
spool D: estmyfile.csv select table_name, tablespace_name from all_tables; spool off
Is it possible to ignore the sql command prompt and the command entered while spooling. I tried the to set echo off,term off and some more options but it did not work.
Example:
SQL> spool c: est.log SQL> Prompt "This is a test" "This is a test" SQL> spool off;
The spool file has the following
SQL> Prompt "This is a test" "This is a test" SQL> spool off;
Is it possible to set some options so that the spool file only contains output.