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

gaurav kumar

Greenhorn
+ Follow
since Apr 20, 2006
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by gaurav kumar

Thanks Mark for the tip.
However the problem looked to be with managed Server not starting properly.
So I copied 'startManagedWeblogic.cmd' to 'common\bin' folder of the root directory and ran this command along with the main server start-up. This time it worked fine and I was also able to deploy applications on it.

Gaurav
14 years ago
Hi,
I m getting the following error while starting my server on Weblogic.

weblogic.nodemanager.NodeManagerException: [The request to start the server EBTApps1 of domain ebtdomain failed because the node manager did not hear from the managed server in the configured timeout period. Despite this, if the managed server has not failed, it will come up and the node manager will start monitoring it. To adjust this timeout so that the task does not fail prematurely, please refer to the node manager property ScavangerDelaySeconds (Default value : 180 seconds. Current value : 180 seconds).]
at weblogic.nodemanager.client.CommandInvoker.execute(CommandInvoker.java:233)
at weblogic.nodemanager.client.CommandInvoker.invoke(CommandInvoker.java:91)
at weblogic.nodemanager.client.NodeManagerClient.executeCommand(NodeManagerClient.java:161)
at weblogic.nodemanager.client.NodeManagerExecuteRequest.execute(NodeManagerRuntime.java:1641)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
No Exception Messages

Cud anyone please help me on that.

Gaurav
14 years ago
Some more info on this.

I searched for this type of probs and found that in WAS 5 the Data Source type was 'Oracle JDBC thin Driver(XA)' and in WAS 6 its 'Oracle JDBC Driver(XA)'. The 'thin' version of the driver is not there in WAS6. May be this is the cause of problem.
15 years ago
hi all,
I am migrating my application from WAS 5 to WAS 6.
While doing the settings for Data Source, I am facing the following error as I run a test connection on it.

Test connection failed for data source BatchDS on server server1 at node gurpcfmqnf1sNode01 with the following exception: java.sql.SQLException: java.lang.IncompatibleClassChangeError: class oracle.net.nt.TcpNTAdapter does not implement interface oracle.net.nt.NTAdapter.

The jdbc driver type is Oracle JDBC driver(XA).
Could anyone give me any help on this.

Thanks in advance.
15 years ago
Hi roshni...
thank you very much for help you provided. Meanwhile i searched a solution in relation to the following error:

EJB threw an unexpected (non-declared) exception during invocation of method "remove" on bean "BeanId(CE-Ear#CE-Services.jar#EJB_CommonEntitiesService, null)". Exception data: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.websphere.csi.CSITransactionRolledbackException:
com.ibm.websphere.csi.CSITransactionRolledbackException:

I came to know that there is a patch provided in the subsequent releases of WAS6. I tried my application setup on an instance of WAS6.0.0.2(previously i was trying on WAS 6.0.0.1) and it worked fine. I guess i would have to upgrade my server.
Many many thanks for the help.
gaurav
15 years ago
many thanks roshni.....but i cant implement this solution. I have many applications deployed on the same server(in the form of EARs). the application which is showing error, i don't own it.....in other words i can't do any change in it.
Moreover the application was working fine till few days back.....its only after i introduced some new MQ Connection Factory variables that i started experiencing problems. Could it be because of these changes any how??
thank you
15 years ago
Hi all,
i have an application which has been running on WAS5.0. Now we are migrating it to WAS6.0, but it is throwing datasource rollback exception.
All the properties are same as they are on WAS5.0.
Could there be any property which might have forgotten to set??
The concerned log is as under:


[9/6/06 19:41:09:625 IST] 00000072 WSRdbDataSour I DSRA8203I: Database product name : Oracle
[9/6/06 19:41:09:641 IST] 00000072 WSRdbDataSour I DSRA8204I: Database product version : Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.6.0 - Production
[9/6/06 19:41:09:641 IST] 00000072 WSRdbDataSour I DSRA8205I: JDBC driver name : Oracle JDBC driver
[9/6/06 19:41:09:688 IST] 00000072 WSRdbDataSour I DSRA8206I: JDBC driver version : 9.2.0.5.0
[9/6/06 19:41:09:688 IST] 00000072 WSRdbDataSour I DSRA8208I: JDBC driver type : ""
[9/6/06 19:41:09:734 IST] 00000072 SystemOut O >> createProductLanguageHashMap
[9/6/06 19:41:09:734 IST] 00000072 LocalTranCoor W WLTC0033W: Resource jdbc/CommonEntitiesDS rolled back in cleanup of LocalTransactionContainment.
[9/6/06 19:41:09:750 IST] 00000072 LocalTranCoor W WLTC0032W: One or more local transaction resources were rolled back during the cleanup of a LocalTransactionContainment.
[9/6/06 19:41:09:969 IST] 00000072 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "remove" on bean "BeanId(CE-Ear#CE-Services.jar#EJB_CommonEntitiesService, null)". Exception data: javax.ejb.TransactionRolledbackLocalException: ; nested exception is: com.ibm.websphere.csi.CSITransactionRolledbackException:
com.ibm.websphere.csi.CSITransactionRolledbackException:
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:702)
15 years ago
thanx a ton!!! it solved my problem.
15 years ago
i just want to append the current timestamp value to file name. For that i m using the 'toString' method of the timestamp but it doesn't seems to be working.
15 years ago
Hi
i m trying to rename a text file with the current timestamp appended to its previous name. But the 'toRename' method which i m using is failing to do so. Though the same file is being renamed with some other String value.
The code i m using is as under:

File file = new File("D:\\project\\vision\\files");
String [] flName = file.list();
//for each order file in the directory
for(int i=0;i<flName.length;i++)
{
System.out.println("****filename****"+flName[i]);
File file1 = new File("D:\\project\\vision\\files"+"\\"+flName[i]);
Timestamp tmstamp = new Timestamp(System.currentTimeMillis());

boolean bool = file1.renameTo(new File("D:\\project\\vision\\files"+"\\"+tmstamp.toString));
System.out.println("****"+bool);
}
15 years ago
hi
the files are reports which get generated periodically. The requirements are in a way that require these many files to be present in a single directory at a time(300,000 is the maximum limit...no of files can also less than this).
Also the piece of code which is giving problem is as below:

File file = new File("D:\\project\\ftp\\Example test invoiced");
String[] filelst = file.list();

thanx in advance
15 years ago
Hi all,
i have to search for a particular PDF file among a collection of more than 3 hundred thousand files. I m first making a file object and then taking all the file names into a String array for further processing. But on running this, my server is getting hanged. Is this could be because of very large number of file names in the string array? Could there be some other data structure which can give better performance
thanx
15 years ago
thanx for the replies...
got the issue resolved by taking help from a FileOutputStream object and then writing the data onto it.
Probably there was some problem with reading of the data through InputStream object.
16 years ago
Hi,
i m trying a transfer a pdf file from one server from another.
I m able to get the file through inputstream and got to write it through FileOutputStream at the desired place. the pdf file is getting created but when i try to open it , it shows me a message that this file has been corrupted. Also the size of the copied file is very large(98Kb) as compared to the original(28kb).
Could any one give a clue to the solution. Below is the code i have written.
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;

import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTP;
//import org.apache.tools.ant.taskdefs.optional.net.FTP


public class CpyFile
{

public static final String FTP_APPEND_SUCCESS = "FTP_APPEND_SUCCESS";
public static final String FTP_APPEND_DATA_TRUNCATED = "FTP_APPEND_DATA_TRUNCATED";



public static void main(String[] args)
{
FTPClient client = null;
boolean boolLogin = false;
client = new FTPClient();

try
{



int maxTries = 3 ;
int tryCount = 0;
while (!boolLogin && tryCount++ < maxTries) {
client.connect("172.19.54.55");
boolLogin = client.login("upload", "upload");
}

if (!boolLogin) {

String ipaddress = "172.19.54.55";
String userid = "upload";
String password = "upload";
System.out.println(
"Unable to Connect to FTP Server IP Asdress: " + ipaddress + " user id: " + userid + " password: " + password);


}
else
{
System.out.println("****CONNECTED********");
System.out.println(client.getReplyString());


System.out.println("@@@@"+client.printWorkingDirectory());
FTPFile files[] = client.listFiles();
int i = files.length;
int j =0;
while( j < i)
{
System.out.println("+++"+files[j].getName());
j++;
}
ystem.out.println("!!!"+client.getDataConnectionMode());
client.enterLocalPassiveMode();
System.out.println("&&&&"+client.getDataConnectionMode()+"******");
boolean bool = client.changeWorkingDirectory("\\upload");
System.out.println(client.printWorkingDirectory());
int l = 0;
FTPFile files1[] = client.listFiles();
int k = files1.length;
while( l < k)
{
System.out.println("+++"+files1[l].getName());
l++;
}
FileOutputStream fStream = new FileOutputStream ("C:\\ftproot\\3996_GD_1144406443921.pdf");
OutputStream outstream = null ;
InputStream instream = null;
client.setFileType(FTP.BINARY_FILE_TYPE,FTP.BINARY_FILE_TYPE);
client.setFileTransferMode(FTP.BINARY_FILE_TYPE);

instream = client.retrieveFileStream("\\3996_GD_1144406443921.pdf");
byte[] data = new byte[99999];
int m =0, n=0;
m = instream.read(data);
System.out.println("@@"+data[0]);
System.out.println("@@"+m);
fStream.write(data);
fStream.close();
}
}


catch (java.io.IOException e)
{
e.printStackTrace();
}
finally
{
try
{
System.out.println("#######"+client.getDataConnectionMode()+"####"+client.getSystemName());
client.disconnect();


}
catch(Exception e)
{
e.printStackTrace();
}
}
}
}
16 years ago