Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!

Suhel Sayyed

+ Follow
since Nov 03, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suhel Sayyed

Hello everyone,

I am facing a strange error while deploying and starting an EJB application which has message driven beans configured. I am using XL Deploy (Deploy IT) to deploy it to Websphere Application Server 8.

Everything goes well, till we reach to the stage where application is to be started.

There are multiple message-driven ids configured in ejb-jar.xml (which is quite obvious) and <activation-config> is specified for each message-driven id. Now what happens is that <activation-config> is read and activated for first 4 message-driven ids. Then for the fifth message-driven id it waits and waits and finally starts giving following exception -

WSVR0605W: Thread "WMQJCAResourceAdapter : 8" (0000002e) has been active for 686641 milliseconds and may be hung. There is/are 1 thread(s) in total in the server that may be hung.

I know that WAS must be waiting for response and thus it goes into hung state.

Now this is interesting. The code which I am deploying, is there for long and has not changed. It is working in production region quite well. Recently there was some MQ port change in test region (where I am deploying).

My questions are as following -

1. What configuration change could help in getting rid of this issue?

2. Do you think, changing configuration in code will serve any purpose.

3. Is it possible that if there are a large number of messages in queue, EAR start can go for a toss?

Any help would be highly appreciated.


Ulf Dittmer wrote:My first question would be: if you have used a reporting tool so far, why do you want to migrate to something much lower-level (meaning, developing the reports yourself) now? A tool like JasperReport can save a lot of work that way.

I agree with your point but the problem with Elixir tool is that reports are very cumbersome and inferior in look and feel as compared to what iText would provide. Moreover since Elixir is a paid tool, client wants to migrate reports to some open source tool.

Is Jasper an open source tool? If yes, can you please share some useful links related to it?
8 years ago
Hello all,

In our existing application we have over 100 different types of reports, which are generated through the combination of Elixir reporting tool & core Java. This tool was purchased by our client way back in 2004. Upgrading Elixir reporting tool to latest version will need lot of code change.

What we are planning is to migrate all reports to iText PDF reports and get rid of Elixir reporting tool. Though I have generated couple of reports in iText, I have never designed application for large number of reports.

Could you please suggest how should I proceed with the design, what should my framework look like with respect to interfaces, abstract classes etc. Any help would be appreciated.
8 years ago

I would like to know if its possible to print a table in PDF using Java code, where in number of rows or columns may vary. I mean there can be different number of columns or rows everytime a report is generated.

My application reads columns and rows from mainframe database in form of an XML structure. Suppose if XML tells me x,x then there should be x columns in table and x rows printed under them. XML parsing logic I already have written, which is working good.

If someone could please tell me if this is possible in PDF. Had been using Elixir tool for reporting, but was not able to find any way to do this is Elixir. Now lookig forward to do it via PDF.

Thanks in advance.

Suhel Sayyed.
I have also verified the PDF kept on remote server, they are good.
10 years ago

I have a JAVA code that reads a PDF file from remote server. It then merges it with an existing PDF file and print the resultant. However, sometimes I observe that the PDF printed contains gibbersih data. It doesn't happen always. Is it some issue with the fonts used in PDF? Or some inherent issue of Java, while printing PDF files.

I use a print job object to print PDF file. Logic for printing the PDF file is as following

private boolean printDocument(String fileName){
System.out.println("printComplianceDocument : Begin");
boolean result = false;
PDDocument document = null;
PDPage page = new PDPage();

try {
document = PDDocument.load(fileName);
PrinterJob pjob = PrinterJob.getPrinterJob();

PrintRequestAttributeSet attr_set = new HashPrintRequestAttributeSet();
PrintService[] services = PrintServiceLookup.lookupPrintServices(null, attr_set);
for(PrintService service : services){
if (service.getName().equalsIgnoreCase(SystemProp.getInstance().getWorkStation().getDfltRptPrinter().getAddress().trim())){
System.out.println("Printing Document to printer: " + service.getName());
result = true;

//Try printing to Default Printer if appropriate Print Service is not found
PrintService defaultPrintService = PrintServiceLookup.lookupDefaultPrintService();
System.out.println("Printing Document to Default Printer: " + defaultPrintService.getName());
result = true;

} catch (IOException e) {
// Exception
} catch (PrinterException e) {
// Exception
System.out.println("printDocument : End");
return result;

Please share your ideas and suggest solutions if you could. Thanks
10 years ago
Hi Bill and Paul,

Thanks a ton for you inputs.

My application uses DOM parser. Scenario is like, MF will send me an XML request which shall contain say some 'n' number of records. My code will parse these records and populate local database (MS SQL 2005). Suppose if there are 5000 records, MF will send them in batches of 1000 each. After processing one batch I have to send a request to MF to send the next batch and so on.

Problem with this is, entire process should be seamless to the user and has to be done in one transaction. I cannot use pagination in this feature since that would not serve the purpose for my business.


I need to make an enhancement in my existing Java application. Its a core java based application, which has two buttons "local" and "central" for search. In the existing application when the user click on "central", a request is sent to mainframe for data. Mainframe returns an XML response which is parsed and local database is populated.

The problem with the existing application is that if mainframe returns many records say 4000-5000 application might die due to out of memory exceptions. What I need to do is to fix this issue by reading response from mainframe in batches, instead of getting at one go.

Can any one please suggest what could be the best optimal design for this?

I need to add a buffered image to JPanel. Can anyone please help me out. I am using the following method for this :-

public void paintComponent(Graphics g) {
// This is TEST Code
PdfDecoder decode_pdf = new PdfDecoder();
BufferedImage img = new BufferedImage(50, 50, BufferedImage.TYPE_INT_ARGB);
try {
img = decode_pdf.getPageAsImage(1);
} catch(PdfException e){
AppParam.getLog().error("PDFException while adding image in PDF");
Graphics2D gph = (Graphics2D) (img.getGraphics());
g.drawImage(img, 0, 0, null);

This method will be invoked as following :-

Graphics g = null;

I am encountering a null pointer exception. Any inputs please?
10 years ago