Ravi Verma

Ranch Hand
+ Follow
since Aug 30, 2001
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 Ravi Verma

Hi folks,
I am using the db2 net driver to access the database but i when i run the program it hangs and never comes back with a connection. I am using DB2 7 version. I put the db2java.zip in classpath but no exception nothing it simply hangs.
Any suggestions?
source:
String url = "jdbc b2://10.35.6.69:6789/EMPDB";
DriverManager.registerDriver(new COM.ibm.db2.jdbc.net.DB2Driver());
System.out.println("getting the connection");
Connection con = DriverManager.getConnection(url,"admin", "admin");
System.out.println("got the connection");
Its never prints the "got the connection" debug statement.
Thanks in Advance
In the bean am loading is a XML SCHEMA(MODEL.XSD) file and i bundled it in the root of jar.
So what i am trying to do is read this schema file in the bean and do some xml work.. but as u know i am getting the exception of file not found. I am not sure the properties will work for this.
Any alternative?
Thanks
Hi,
Here it is...
File file = new File( filename );
Reader rdr = new FileReader( file );
long sz = file.length();
// can only read in things of MAXINT length
char[] ch = new char[(int)sz];
rdr.read(ch);
rdr.close();
String s = new String(ch);

Thanks
Hi Folks,
I have Ejb application(not war and ear) which deployed into weblogic 7.0. I acces a properties file in the Bean class and i packaged it in the ejb jar file but when i run it complains the properties file not found.
All the ejb-jar.xml,weblogic-ejb-jar.xml are fine.
Any suggestions why the file is not found by Bean?
Thanks in advance
Hi Folks,
I have Ejb application(not war and ear) which deployed into weblogic 7.0. I acces a properties file in the Bean class and i packaged it in the ejb jar file but when i run it complains the properties file not found.
All the ejb-jar.xml,weblogic-ejb-jar.xml are fine.
Any suggestions why the file is not found by Bean?
Thanks in advance
18 years ago
thanks bill, But what happens is i have a app deployed into weblogic and i am using one client program to invoke the app,in the client program i used the sax parser with xml document. So when i invoke this client program to hit the application in Weblogic it is throwing this java.lang.NoClassDefFoundError: org/apache/xerces/parsers/SAXParser exception.
What i am trying to say is the error thrown before hiting the weblogic server and i have all the jars including xalan,xerces in the classpath from where i am invoking this program.
Thanks in advance
Hi,
I am using the sax parser to load the xml document in the weblogic application server, but i am getting this exception java.lang.NoClassDefFoundError: org/apache/xerces/parsers/SAXParser.
I put all the jars in the classpath including the xerces.jar,xalan.jar.
Any suggestion why this error comes up?
Thanks in advance
Hi,
I am facing this INCONSISTENT_STATE exception from jsp any idea why this error will come in the JSP page
Thanks in advance
Verma
[ March 20, 2003: Message edited by: Ravi Verma ]
18 years ago
JSP
Hi All!!
I am running Ant with the Build.xml for testcases which are developed in the Junit. I wanted to see the Report generated after executing the Testcases preferably in html.
I am looking for how to write Ant Task for this
Any suggestions will be grately helpful
Thanks in Advance
-Ravi
18 years ago
Oh this is cool!! I got it now. Thanks for your info but to write testcase using junit.framework.TestCase i should use normal Junit Framework rather than Cactus.
18 years ago
Hi Vinay,
I completely agree what you said, basically i tried writing testcase with AbstractTest as it is extensiontion to junit.framework.TestCase and i implemented runTest() method also but the behaviour is weird for this. Its like each Testcase is executed 'n' times for 'n' number number of times. Actually each testcase(testXXX()) should execute only once. But its happening for me for that reason i posted the query here.
Here is the sample java file
**************************************************
import junit.framework.*;
import org.apache.cactus.AbstractTestCase;
public class TestHBean extends AbstractTestCase
{
HBean _hcb;
public static void main(String args[]) {
junit.textui.TestRunner.run( suite() );
}
// loading the class
public static Test suite() {
return new TestSuite( TestHCFSBean.class );
}
public TestHBean(String name){
super(name);
}
public void runTest(){
try{
_hcb = new HBean();
testgetOrderNumber();
testgetFulfillmetSetNumber();
testgetEquipmentAreaName();
}catch(Exception e){e.printStackTrace();}

}
public void testgetOrderNumber(){
_hcb.setOrderNumber(2000006);
assertEquals(2000006,_hcb.getOrderNumber());
}
public void testgetFulfillmetSetNumber(){
_hcb.setFulfillmetSetNumber(200);
assertEquals(200,_hcb.getfulfillmentSetNumber());
}
public void testgetEquipmentAreaName(){
_hcb.setEquipmentAreaName("AREAName");
assertEquals("AREAName",_hcb.getEquipmentAreaName());
}
}
*************************************************
Pls help me in this regard
-Ravi
[ January 14, 2003: Message edited by: Ravi Kumar ]
18 years ago
Hi Vinay,
I appreciate for your response. You know now i am able to write testcases for Servlets,JSP with Cactus framework but i cannot write testcases properly for normal java classes(other than jsp,servlets,ejb). I used AbstractTestcase to develop the testcases for normal java classes. But it is working in wierd manner rest of the testcases are working fine. If u had chance to having good experience on this pls write reply back to me.
-Ravi
18 years ago
Hi All,
I actually wanted to know how to write TestCases for Normal Java Classes(not servlets,jsp,ejb) using jakarta Cactus Framework. Thanks in advance. Your response is grately appreciated.
18 years ago
Hi All,
I actually wanted to know how to write TestCases for Normal Java Classes(not servlets,jsp,ejb) using jakarta Cactus Framework. Thanks in advance.
Your response is grately appreciated.
18 years ago
FYI!
Junit - only For Standalone Java classes,Beans
Cactus - For Server objects(EJB,Servlets,JSP) + Junit
Cactus is the Extension to JUnit
Hope This help you
---
[ January 08, 2003: Message edited by: Ravi ]