Rohit Ahuja

Ranch Hand
+ Follow
since Oct 04, 2001
Merit badge: grant badges
For More
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 Rohit Ahuja

Hi guys,

I am creating a photobook.
I have a main frame and a photo list. The photo list is nothing but a line of photo thumbnails.
I can drag and drop the thumbnails to the main frame where they become proper full sized pictures.
1 photobook can contain as many as 20 pictures. The 20 pictures are predefined/set pictures.

I am just wondering how this can be implemented.
a. Do I get all the images at one shot when my page gets loaded ?
1. In that case where can I keep/store the images?
2. Will getting those 20 pictures at once affect performance ?

b. Do I get the thumbnails and when the button is clicked, I get the actual image from the server using Ajax ?

One more thing...
How can I send these images from server to client using JSON object ?


We have a sender and a receiver in a P2P communication model.
In case the sender is trying to send some data to the receiver, and the netork fails.

1. Will the sender be notified that the data packet is not received by the receiver.
2. Will the sender get an error saying that connection with the receiver failed.
3. How will sender check whether receiver is up or not ? Any particular method that will be used.

Hi Girraj,

1. I cannot use a database.
2. You saying put all three attributes in the response, means the response method will need to be altered, right ?

Listening to different queue.
As for the java types, the datatypes could be interger, character etc.
Dear friends,

I have a simple question regarding JMS.
I have a system where in I send a request to the server and will get a response maybe 2-3 days later.
The request is like METH_REQ with parameters A,B and C.
The response is like METH_RES with parameters D,E and F.

When I get the response I need the values of the request(A,B and C) also for reference. How can I go about this?

Thanks in advance.
Hi All,

Has anyone ever used SwiftMQ server for JMS ?
The SwiftMQ site claims that it is much faster than other servers. Is it better than IBM server?

Can someone who has practically worked on it give some kind of feedback about it?

Dear mates,

I am working on something and need a solution urgently...

This is what i want...
I have a html page which has 3 fields, A, B and C.
When user enters these three fields and clicks on a button called create,

1. A word document has to be created using these three fields.
The word document has to have A as right aligned, B on the next line as center aligned and C on the third line as left aligned in bold and italics.

2. An excel needs to be opened and the data written into it. A,B and C should be written into the three cells in it.

I was trying to have the code for point 1 as follows:

However, am struggling to get the alignment of the text in the document right.

what is the error message??
Which procedure within the package is causing the problem ???

Which lines of code have u added last for the compilation error to occur ?
17 years ago
Hi guys,
am having a deployment problem on oc4j for a simple application.

The error message that i am getting is :

Error instantiating application at file:/C:/oc4j/orion/application: Unable to find/read assembly info for C:\oc4j\orion/application (IO error: unable
to find application)

server.xml :

<?xml version="1.0"?>
<!DOCTYPE application-server PUBLIC "Orion Application Server Config" "">

<application name="VUA01" path="../application" />

<rmi-config path="./rmi.xml" />
<!-- JMS-server config link, uncomment to activate the JMS service -->
<!-- <jms-config path="./jms.xml" /> -->
<file path="../log/server.log" />

<global-application name="default" path="application.xml" />

<global-web-app-config path="global-web-application.xml" />
<web-site path="./default-web-site.xml" />

<!-- Compiler, activate this to specify an alternative compiler such
as jikes for EJB/JSP compiling. -->
<!-- <compiler executable="jikes" classpath="/myjdkdir/jre/lib/rt.jar" /> -->

application.xml :

<?xml version="1.0"?>
<!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "">

<!-- The global application config that is the parent of all the other
applications in this server. -->
<web-module id="defaultWebApp" path="../default-web-app" />
<persistence path="../persistence" />
<!-- Path to the libraries that are installed on this server.
These will accesible for the servlets, EJBs etc -->
<library path="../lib" />

<principals path="./principals.xml" />

<file path="../log/global-application.log" />

<data-sources path="data-sources.xml" />

<namespace-resource root="">
<group name="administrators" />
<namespace-resource root="">
<group name="administrators" />

inside the ear :
application.xml :
<?xml version="1.0"?>
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "">



Am i missing something ???

thanks in advance...
17 years ago
I am having the following error and have been struggling with it for the last couple of days...
java.lang.VerifyError: class loading constraint violated (class: org/apache/xerces/jaxp/SAXParserImpl method: getXMLReader()Lorg/xml/sax/XMLReader at pc: 0
I use a Digester class in one of my java files and hence when i am building it, it fails...

It is an Ant related problem and the build works fine on eclipse and fails on WSAD. Am i missing some setting ?
Has anyone faced this earlier or can someone tell me the direction to take??
18 years ago
I have a bounced mail when i send it to an invalid e-mail id.
The bounced mail then has an eml attachment which is nothing but a copy of my text in my mail when i sent it the first time.
I need to get the name of this eml attachment, is it possible in javamail?

i need a quick solution to this...

18 years ago
I was just wondering whether i can get the name of an attached File.If yes, how do i go about it ?
18 years ago
Hi guys,
I am having a problem trying to receive mails from a mail server.

I am pasting the code and the error message.

import java.util.Properties;
import javax.mail.*;
import javax.mail.internet.*;

public class Fetch {
public static void main (String args[]) throws Exception {
String host = "";

// Get properties
Properties props = System.getProperties();

//props.put("", host);

// Get session
Session session = Session.getDefaultInstance(props, null);

// Get the store
//Store store = session.getStore("imap");
Store store = session.getStore("pop3");
// Get folder
Folder folder = store.getFolder("INBOX");;
// Get directory
Message message[] = folder.getMessages();
for (int i=0, n=message.length; i<n; i++) {

System.out.println(i + ": "+ message[i].getFrom()[0]+ "\t" + message[i].getSubject());

String content = message[i].getContent().toString();

if (content.length() > 200) {
content = content.substring(0, 200);

// Close connection

DEBUG: not loading system providers in <java.home>/lib
DEBUG: not loading optional custom providers file: /META-INF/javamail.providers
DEBUG: successfully loaded default providers

DEBUG: Tables of loaded providers
DEBUG: Providers Listed By Class Name: {com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.
smtp.SMTPTransport,Sun Microsystems, Inc], com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.
IMAPStore,Sun Microsystems, Inc]}
DEBUG: Providers Listed By Protocol: {imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems,
Inc], smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]}
DEBUG: not loading optional address map file: /META-INF/
Exception in thread "main" javax.mail.NoSuchProviderException: No provider for pop3
at javax.mail.Session.getProvider(
at javax.mail.Session.getStore(
at javax.mail.Session.getStore(
at Fetch.main(

The problem seems to be occuring on the line
Store store = session.getStore("pop3");

I have included the pop3.jar in the classpath. Can someone tell me where am i going wrong ?

Thnks in advance,
[ October 11, 2005: Message edited by: Deepak A ]
18 years ago
Hello everyone,
I need the java source code implementing CRC16-CCITT encoding.The source i found were all in C or C++. Just wondering whether anyone cud help me in this regard...
18 years ago
Can someone please tell me how do i write a PreparedStatement onto a log file??? i want to display the record which failed to insert into the DB for some reason in the log file...