Sachidananda Pattnaik

Greenhorn
+ Follow
since Nov 02, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Sachidananda Pattnaik

Here is my code so far ... I have written a method to write user input data into a file




The problem is after getting the two user input values. The second value is only getting written inside the file.
Also how to write this two inputs with a space separated.



Thanks
Sachin
11 years ago
Hi All,

I need to write a small application by which I can store Book Titles and its Author name into a text file.
Then it can have a search functionality to search for Book Title and Author name

The command line argument should be like below..

Enter 1 for Storing & Enter 2 for Retrieving : 1

Enter Author name: <Author1>
Enter Book name : <Book1>
Entry recorded...

Want to store more value (Y/N) ?: Y

Enter Author name: <Author2>
Enter Book name : <Book2>
Entry recorded...

Want to store more value (Y/N) ?: N

Exit

now my Book.txt file should contains value like

Author1 Book1
Author2 Book2


Enter 1 for Storing & Enter 2 for Retriving : 2

Search Author Name : <Author1>
Result: <Book1>


Please suggest me how to start with this. Pseudo code will also helpful.



Thanks
Sachin

11 years ago
###### txClient_iPlanet6.txt #########

#!/bin/ksh
IPLIB=/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/lib
IPCLASS=/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/classes

CLASSPATH=$CLASSPATH:$IPLIB/xerces-1_4_4.jar
CLASSPATH=$CLASSPATH:$IPLIB/soap-2_2.jar
CLASSPATH=$CLASSPATH:$IPLIB/mail.jar
CLASSPATH=$CLASSPATH:$IPLIB/TxShared.jar
CLASSPATH=$CLASSPATH:$IPLIB/TxServer.jar
CLASSPATH=$CLASSPATH:$IPLIB/activation.jar
CLASSPATH=$CLASSPATH:/$IPCLASS
CLASSPATH=$CLASSPATH:.
export CLASSPATH


echo ""
echo $CLASSPATH
echo ""

JAVA=/usr/iplanet/servers/bin/https/jre/bin/java

$JAVA -version
$JAVA com.reuters.espresso.webserviceclient.TxClient



###### txClient_iPlanet7.txt #########

#!/bin/ksh
IPLIB=/opt/oracle/webserver7/docs/web-apps/SOAP/WEB-INF/lib
IPCLASS=/opt/oracle/webserver7/docs/web-apps/SOAP/WEB-INF/classes

CLASSPATH=$CLASSPATH:$IPLIB/xerces-1_4_4.jar
CLASSPATH=$CLASSPATH:$IPLIB/soap-2_2.jar
CLASSPATH=$CLASSPATH:$IPLIB/mail.jar
CLASSPATH=$CLASSPATH:$IPLIB/TxShared.jar
CLASSPATH=$CLASSPATH:$IPLIB/TxServer.jar
CLASSPATH=$CLASSPATH:$IPLIB/activation.jar
CLASSPATH=$CLASSPATH:/$IPCLASS
CLASSPATH=$CLASSPATH:.
export CLASSPATH


echo ""
echo $CLASSPATH
echo ""

JAVA=/opt/oracle/webserver7/jdk/bin/java

$JAVA -version
$JAVA com.reuters.espresso.webserviceclient.TxClient

12 years ago
Our application was working fine with Oracle iPlanet 6.0 version.Now as we have upgraded our application to new Oracle iPlanet Web server 7.0.9, almost all the application are working except for one functionality which does a password reset. This piece of functionality is using JNI in java code. The password reset functionality is using native library file.

When the webapp is deployed on Oracle iPlanet Web Server 7.0.9, running on Solaris 10 in a 64bit environment, one element of the webapp is not working.
we were using libNSServletPlugin.so file in magnus.conf@iplanet 6.0 to call Netscape API for our application.Where as in new magnus.conf@iplanet 7.0 has the library libJ2eePlugin.so.
So we are currently facing problem while invoking Netscape API from our application.

After some debugging we have narrowed down our application problem to a simple client application.


We have made some debugging and analysis and found some observation which I want to put into your notice


#### Steps of Analysis ####

1) We stopped both iPlanet 6.0/7.0 version and the Netscape server
2) We are not using any webservice calls from the iPlanet
3) We have made one sample Test Java application which directly calls to Transact API made in C++ through JNI
4) We have noticed that the Test Java application is working with reference to JRE ( usr/iplanet/servers/bin/https/jre)

5) Below is the output(success) while running the test application with JRE ( usr/iplanet/servers/bin/https/jre) i.e JRE 1.2.2 version

ksh txclient.sh_iplanet6

/usr/java/lib/classes.zip:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/lib/TxShared.jar:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/lib/TxServer.jar:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/classes:.

java version "1.2.2"
Solaris VM (build Solaris_JDK_1.2.2_10, native threads, sunwjit)
IsAlive.txIsAlive: Entered CTxCommand base class constructor
Leaving CTxCommand base class constructor

Error Code: 0
Error Message: Transact is alive
Retryable: false


IsAlive[TxIsAliveResponse]: Error Code: 0
Error Message: Transact is alive
Retryable: false


6) Now here is the output(failure) while running the same Test application with JRE ( /opt/oracle/webserver7/jdk ) i.e JRE 1.6.0_20


ksh txclient.sh_iplanet6


/usr/java/lib/classes.zip:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/lib/TxShared.jar:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/lib/TxServer.jar:
/usr/iplanet/servers/docs/web-apps/SOAP/WEB-INF/classes:.

java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Server VM (build 16.3-b01, mixed mode)
IsAlive.txIsAlive: Entered CTxCommand base class constructor
Leaving CTxCommand base class constructor
Run-time exception error; current exception: RWSockErr
No handler for exception.
txclient.sh_iplanet6[34]: 16858 Abort(coredump)
12 years ago
Hi All,

I was running my servlet code in iPlanet 6.0 version and it was working fine. I upgraded my web server to new Sun One server (Oracle-iPlanet-Web-Server-7.0.9). With the new web server almost 90% of my application works fine, but there is a features in my application to download an Excel sheet by clicking a button. This feature is failing in new Sun One web server.


Below are my piece of code and the error log I m getting. Can anyone tell me how I can fix this error, I mean is there any web server specific change or configuration parameter need to be set.

Please ask for any information regarding my server configuration settings if needed for finding a solution for this


Code:

byte abyte0[] = new byte[1024];
BufferedInputStream bufferedinputstream=null;
BufferedOutputStream bufferedoutputstream=null;

java.io.InputStream inputstream = httpurlconnection.getInputStream();
bufferedinputstream = new BufferedInputStream(inputstream);
bufferedoutputstream = new BufferedOutputStream(httpservletresponse.getOutputStream());

int j;
long byteCount=0;

while((j = bufferedinputstream.read(abyte0, 0, 1024)) != -1)
{
byteCount=byteCount+j;
if(logger != null && logger.traceOn())
{
logger.log("total"+byteCount);
logger.log("Read bytes:"+j);
}
bufferedoutputstream.write(abyte0, 0, j);
if(logger != null && logger.traceOn())
logger.log("Wrote bytes:"+j);

bufferedoutputstream.flush(); // <<<<<< ERROR POINT >>>>>>
}


Error Log :

ClientAbortException: java.io.IOException: WEB8004: Error flushing the output stream
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:343)
at org.apache.coyote.tomcat5.OutputBuffer.flush(OutputBuffer.java:313)
at org.apache.coyote.tomcat5.CoyoteOutputStream.flush(CoyoteOutputStream.java:147)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:124)
at com.reuters.bdec.as.ASRequestHandler.processResponse(ASRequestHandler.java:285)
at com.reuters.bdec.as.ASRequestHandler.initiateGetRequest(ASRequestHandler.java:89)
at com.reuters.bdec.as.ASRequestHandler.proceedToDestination(ASRequestHandler.java:220)
at com.reuters.bdec.as.ASExtension.authorisationCheck(ASExtension.java:84)
at com.reuters.bdec.as.ASExtension.doGet(ASExtension.java:114)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:794)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:915)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
Caused by: java.io.IOException: WEB8004: Error flushing the output stream
at com.sun.webserver.connector.nsapi.NSAPIProcessor.action(NSAPIProcessor.java:243)
at org.apache.coyote.Response.action(Response.java:197)
at org.apache.coyote.tomcat5.OutputBuffer.doFlush(OutputBuffer.java:339)
... 20 more
12 years ago
Thanks for some prompt replies.
I do understand that the benifits of OOP is to reuse with extending the superclass and work on your own subclass.
This is a just a question came up from a casual discussion with my friends.
Now I just want to know if by any means can we found out what are the subclasses which are extending a certain superclass.
Is there any command or process by which I can find all the subcalss reference.

for e.g
>>I have a base class XYZ.java and many subclass are extending this class.
>>Now if I delete this class then on recompiling it will throw errors on those class which are extending it.
>>The challenge here is I have to find out the impact of the class in the entire application before deleting the XYZ.java.


12 years ago
Hi All,

I have an application with many packages with various classes. How I can find which are the child classes in my entire application which extends a perticular class.

e.g I have my base class say 'Example.java'
How I can find which are the child classes which extends the base class 'Example'

is there any command to find out ??

Thanks
Sachin
12 years ago
Hi All,

I want to upgrade my application's current web server which is iPlanet Web Server 6.0 to Oracle iPlanet Web Server 7.0.
I want to keep the current web server as backup to rollback in future. Please suggest how I can use the latest iPlanet 7.0 with keeping the old 6.0 version as backup and how to make a quick rollback ???

The iPlanet web server is currently installed in Solaris machine.
Current version : iPlanet Web Server 6.0
New version : Sun One (Oracle iPlanet 7.0 )


Thanks

Sachin
12 years ago
Hi All,
I am working on an application where Java Servlets are deployed in iplanet web server. Whenever the call hits the server it prints the log messages in the console as written inside the log method in the Servlet classes. The task is to increase the log level which can have a details description of the message.

Please suggest me the approach to do this. Please note I am not allowed to use any kind of logging mechanism like log4J etc..
13 years ago