Win a copy of Emmy in the Key of Code this week in the General Computing forum!

gajanan deshpande

Greenhorn
+ Follow
since Jun 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 gajanan deshpande

Hi All,

Could you please let me know the default time out on stateful session bean in iPlanet 6.5 application server.
If i set it to 0 (zero) in the ias-ejb-jar.xml then what does it mean.
e.g.
<session-timeout>0</session-timeout>

Thanks & Regards,
Gajanan.
13 years ago
Hi All,
I have 2 framesets in a window and onclick of a link on left frame the target is right frame ,but when in right frame if i add a new row using DOM insertRow() function the frame looses the original target and opens the link in new window. Please help me out.
Gajanan.
Hi all
I am running an applet in appletviewer it run fine but when i run it in Browser the event handling is not working.
Please suggest Solution
Regards
Gajanan
17 years ago
Hi All
I am having such problem during deployment .Why such problem occur while deploynent.
[Container factory] ERROR: Nested Field does not have a get method
[AutoDeployer] Auto deploy of file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/deploy/Main_cmp.jar
[J2EE Deployer Default] Deploy J2EE application: file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/deploy/Main_cmp.jar
[J2eeDeployer] Create application Main_cmp.jar
[J2eeDeployer] install EJB module Main_cmp.jar
[Container factory] Deploying:file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/tmp/deploy/Default/Main_cmp.jar
[Default] Deprecated container invoker. Change to org.jboss.ejb.plugins.jrmp.server.JRMPContainer
Invoker
[Default] Deprecated container invoker. Change to org.jboss.ejb.plugins.jrmp.server.JRMPContainer
Invoker
[Default] Deprecated container invoker. Change to org.jboss.ejb.plugins.jrmp.server.JRMPContainer
Invoker
[Default] Deprecated container invoker. Change to org.jboss.ejb.plugins.jrmp.server.JRMPContainer
Invoker
[Verifier] Verifying file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/tmp/deploy/Default/Main_
cmp.jar/ejb1003.jar
[Container factory] Deploying MAIN
[Container factory] ERROR : Nested Field does not have a get method
[ContainerManagement] Initializing
[ContainerManagement] Initialized
[ContainerManagement] Starting
[ContainerManagement] Started
[Container factory] Deployed application: file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/tmp/deploy/Default/Main_cmp.jar/
[J2EE Deployer Default] J2EE application: file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/deploy/Main_cmp.jar is deployed.

But Ejb is deployed. And when I call create method it gives such exception
The exception occur ============= java.rmi.ServerException: RemoteException occurred in server
read; nested exception is:
javax.transaction.TransactionRolledbackException: null
Embedded Exception
null; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
null
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
javax.transaction.TransactionRolledbackException: null
Embedded Exception
null; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
null
javax.transaction.TransactionRolledbackException: null
Embedded Exception
null; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
null
javax.ejb.EJBException: null
Embedded Exception
null
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:2
45)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invokeHome(Unknown Source)
at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invokeHome(HomeProxy.java:258)
at org.jboss.ejb.plugins.jrmp.interfaces.HomeProxy.invoke(HomeProxy.java:182)
at $Proxy0.create(Unknown Source)
at ClientMain.main(ClientMain.java:26)
java.lang.NullPointerException
<<no stack trace available>>

Please suggest me some solution and causes of such errors.
Regard
Gajanana
Hi all
I am having tomcat as webserver and Jboss as container
When I invoke jsp on browser and my ejbjar files are on ..\deploy\.*.jar
How to add these (i.e. ejbjar ) classfiles in tomcat-classpath ?
Please suggest me some solution
Regards
Gajanan
18 years ago
Hi All,
I am comming to contactdetails.jsp from two ways,either from add_party.jsp or Edit supplier.when i retrive the supplier list from Database(oracle) and want to display the details i am putting the object in session and getting it in contactdetails.jsp and showing it and i can't remove the value from the session as i may require the session value to edit another supplier.Untill this all works fine but when i use the contactdetails.jsp to adda new supplier and come to it the jsp it shows the last used session values and displays it on the screen which on the server dosen't show that it is executing the code where this session object is got from the session.
i am attaching the code of the contactdetails.jsp please suggest some solution to this as i have tried out many things for this.
<html>
<%@ page import = "users.SupplierList" %>
<%@ page import = "users.DAO" %>
<%@ page import = "users.Supplier" %>
<%@ page import = "java.util.*;"%>
<%@ page import = "users.Address"%>
<%@ page import = "users.ContactPerson"%>
<%@ page import = "users.AddressList"%>

<head>
<title>Add Supplier</title>
</head>
<%!
//Supplier supp;
String add,add1,city,pin,country,phone1,area_cd,fax,phone2,name1,desig1,cnt_no1,dept1,ext1,em_add1;
String name2,name3,desig2,dept2,ext2,em_add2,desig3,cnt_no2,cnt_no3,dept3,ext3,em_add3;
String srt_name,supp_name,pro_cat,supp_cat,inet_site,em_addr;
String zone_code,ind_code,emp_code,accmgt_code;
String saveflag,nextflag,editcontactflag,addcontactflag;
//ContactPerson conPer;
//Address address;
int index,size,suppsize,counter,sizecon,max;
String[] name,dept,desig,cnt_no,ext,em_add;
//ArrayList conPerList;
//String[] conarray;
%>
<%
response.setHeader("Pragma","no-cache");
//response.setHeader("Cache-Control","no-cache");
response.setDateHeader("Expires",0);
%>
<body bgcolor="#CCCCFF" text="">
<form name="myform" method="post" action="">
<script language="javascript"><!--
function cleardata()
{
document.myform.reset();
}
function prevdata()
{
document.myform.action="SaveDetails.jsp?nextflag=\"N\"&prevflag=\"P\"";
document.myform.submit()
}
function nextdata()
{
if(document.myform.ADD.value=="")
{
alert("Please enter Address");
document.myform.ADD.focus();
return ;
}
if(document.myform.CITY.value=="")
{
alert("Please enter City");
document.myform.CITY.focus();
return ;
}
if(document.myform.PIN.value=="")
{
alert("Please enter Pin");
document.myform.PIN.focus();
return ;
}
if(document.myform.COUNTRY.value=="")
{
alert("Please enter Country");
document.myform.COUNTRY.focus();
return ;
}
document.myform.action="SaveDetails.jsp?nextflag=\"N\"";
document.myform.submit()
}
function savedata()
{
if(document.myform.ADD.value=="")
{
alert("Please enter Address");
document.myform.ADD.focus();
return ;
}
if(document.myform.CITY.value=="")
{
alert("Please enter City");
document.myform.CITY.focus();
return ;
}
if(document.myform.PIN.value=="")
{
alert("Please enter Pin");
document.myform.PIN.focus();
return ;
}
if(document.myform.COUNTRY.value=="")
{
alert("Please enter Country");
document.myform.COUNTRY.focus();
return ;
}
document.myform.action="SaveDetails.jsp?saveflag=\"S\"";
document.myform.submit()
}
function editcontact()
{
if(document.myform.ADD.value=="")
{
alert("Please enter Address");
document.myform.ADD.focus();
return ;
}
if(document.myform.CITY.value=="")
{
alert("Please enter City");
document.myform.CITY.focus();
return ;
}
if(document.myform.PIN.value=="")
{
alert("Please enter Pin");
document.myform.PIN.focus();
return ;
}
if(document.myform.COUNTRY.value=="")
{
alert("Please enter Country");
document.myform.COUNTRY.focus();
return ;
}
document.myform.action="SaveDetails.jsp?editcontactflag=\"C\"";
document.myform.submit()
}
function addcontact()
{
alert("calling addcontact");
document.myform.action="Addcontact.jsp?addcontactflag=\"A\"";
//window.open("http://gajanan:7001/jsp/Addcontact.jsp?addcontactflag=\"A\"&ADD=<%=add%>&ADD1=<%=add1%>&CITY=<%=city%>&PIN=<%=pin%>&COUNTRY=<%=country%> ;&AREA_CD=<%=area_cd%>&PHONE1=<%=phone1%>&PHONE2=<%=phone2%>&FAX=<%=fax%>&NAME1<%=name1%>&DESIG1=<%=desig1%>&CNT_NO1=<%=cnt_no1%>&DEPT1=&l t;%=dept1%>&EXT1=<%=ext1%>&EM_ADD1=<%=em_add1%>");
document.myform.submit();
//window.close();
}
function editcontactdetails()
{
alert("calling editcontact");
window.open("http://gajanan:7001/jsp/Addcontact.jsp?editcontactflag=\"EF\" ");
window.close();
}
function numeric(thisobj)
{
//version = checkver()
temp = thisobj.value
if (temp.length != 0 && isNaN(temp))
{ alert("This Field should be numeric");
//if (!version)
thisobj.select() }
}
function Alpha(thisobj)
{
//version = checkver()
temp = thisobj.value
if (temp.length != 0 && !(isNaN(temp)))
{ alert("This Field should be Alphabetic");
//if (!version)
thisobj.select() }
}
function CheckMail(thisobj)
{
//Val = thisobj.name;
// alert(Val);
var mail=thisobj.value
// alert(mail)
//var mail=document.myform.EM_ADD1.value
var goodEmail = mail.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
if(goodEmail)
{
}
else
{
alert("EMail Address is not Valid");
//document.myform.EM_ADD1.focus();
thisobj.focus();
return;
}
}//end of CheckMail
//-->
</script>

<%
//these are the changes made by Poonam.............
/*DAO dao = new DAO();
Vector addConVec = dao.getAddressContactList("S001");
ArrayList addList = (ArrayList) v.get(0);
Vector conVect = (Vector) v.get(1);
for( int i = 0 ; i < addList.size() ; i++)
{
System.out.println( String.valueOf( addList.get(i) ) );
ContactPersonList conList = (ContactPersonList)conVect.get(i);
for ( int j = 0 ; j < conList.size() ; j++ )
{
System.out.println( String.valueOf( conList.get(j) ) );
}
}
*/
%>
<%
if(request.getParameter("counter") != null)
counter=Integer.parseInt(request.getParameter("counter"));
System.out.println("Counter is "+counter);
if(request.getParameter("count") != null)
max=Integer.parseInt(request.getParameter("count"));
System.out.println("Max is "+max);
//this is saveflag, only name is saveconflag..
if(request.getParameter("saveflag") != null)
saveflag=request.getParameter("saveflag");
System.out.println("saveflag is "+saveflag);
if(request.getParameter("nextflag") != null)
nextflag=request.getParameter("nextflag");
System.out.println("nextflag is "+nextflag);
if(request.getParameter("INDEX") != null)
index=Integer.parseInt(request.getParameter("INDEX").trim());
System.out.println("Index is "+index);
if(request.getParameter("editcontactflag") != null)
editcontactflag= request.getParameter("editcontactflag");
System.out.println("Flag to edit contact details is "+editcontactflag);
if(request.getParameter("addcontactflag") != null)
addcontactflag= request.getParameter("addcontactflag");
System.out.println("Flag to add contact details is "+addcontactflag);

//this block will execute only if saveflag comes null..
if(!(saveflag!=null))
{
if (!(counter==0))
{
if(request.getParameter("NAME1") != null)
name1= request.getParameter("NAME1");
if(request.getParameter("DEPT1") != null)
dept1= request.getParameter("DEPT1");
if(request.getParameter("DESIG1") != null)
desig1= request.getParameter("DESIG1");
if(request.getParameter("CNT_NO1") != null)
cnt_no1= request.getParameter("CNT_NO1");
if(request.getParameter("EXT1") != null)
ext1= request.getParameter("EXT1");
if(request.getParameter("EM_ADD1") != null)
em_add1= request.getParameter("EM_ADD1");
System.out.println("Contact Name is "+name1);
System.out.println("EMail id is "+em_add1);

/*this value is got for adding contact person while editing
contact details and value comes from addcontact jsp..*/
//conPer =(ContactPerson)session.getValue("contactperson");
//System.out.println("Contact list is "+conPer);
ContactPerson conPer = new ContactPerson(name1,dept1,desig1,cnt_no1,ext1,em_add1);
System.out.println("After conPer" +conPer);
//this value is reqd for adding in address value..
Address address = (Address)session.getValue("address");
address.addContactPerson(conPer);
System.out.println("After address");
//this is trial
//session.removeValue("address");
size = address.contactPersonListsize();
System.out.println("size of contact persons is"+size);
System.out.println("Contact person list is "+conPer);
name = new String[size];
dept = new String[size];
desig = new String[size];
cnt_no = new String[size];
ext = new String[size];
em_add = new String[size];
System.out.println("Designation is "+desig);
System.out.println("Size of desig is "+desig.length);
for(int i = 0; i<size; i++)
{
conPer = address.getContactPersonAt(i);
name[i]=conPer.getName();
System.out.println("In for loop for size1"+name[i]);
dept[i]=conPer.getDepartment();
System.out.println("In for loop for size2"+dept[i]);
desig[i]=conPer.getDesignation();
System.out.println("In for loop for size3"+desig[i]);
cnt_no[i]=conPer.getPhone();
System.out.println("In for loop for size4"+cnt_no[i]);
ext[i]=conPer.getPhoneExt();
em_add[i]=conPer.getEmail();
}//end of for loop for size..
//this is a trial..
session.putValue("address",address);
counter = 0;
}//end of if for counter...
if (addcontactflag!=null)
{
if(request.getParameter("NAME1") != null)
name1= request.getParameter("NAME1");
if(request.getParameter("DEPT1") != null)
dept1= request.getParameter("DEPT1");
if(request.getParameter("DESIG1") != null)
desig1= request.getParameter("DESIG1");
if(request.getParameter("CNT_NO1") != null)
cnt_no1= request.getParameter("CNT_NO1");
if(request.getParameter("EXT1") != null)
ext1= request.getParameter("EXT1");
if(request.getParameter("EM_ADD1") != null)
em_add1= request.getParameter("EM_ADD1");
System.out.println("Contact Name1 is "+name1);
System.out.println("EMail id1 is "+em_add1);
if(request.getParameter("ADD") != null)
add=request.getParameter("ADD");
System.out.println("Address1 is "+add);
if(request.getParameter("ADD1") != null)
add1=request.getParameter("ADD1");
if(request.getParameter("CITY") != null)
city=request.getParameter("CITY");
if(request.getParameter("COUNTRY") != null)
country=request.getParameter("COUNTRY");
if(request.getParameter("PIN") != null)
pin=request.getParameter("PIN");

if(request.getParameter("PHONE1") != null)
phone1=request.getParameter("PHONE1");
if(request.getParameter("PHONE2") != null)
phone2=request.getParameter("PHONE2");
if(request.getParameter("AREA_CD") != null)
area_cd=request.getParameter("AREA_CD");
if(request.getParameter("FAX") != null)
fax=request.getParameter("FAX");
ContactPerson conPer = new ContactPerson(name1,dept1,desig1,cnt_no1,ext1,em_add1);
System.out.println("After conPer" +conPer);
//address = new Address();
//conPer = (ContactPerson)session.getValue("contact");
Address address = (Address)session.getValue("addr");
address.addContactPerson(conPer);
System.out.println("After conPer Added" +conPer);
size = address.contactPersonListsize();
System.out.println("size of contact persons is"+size);
name = new String[size];
dept = new String[size];
desig = new String[size];
cnt_no = new String[size];
ext = new String[size];
em_add = new String[size];
System.out.println("Designation is "+desig);
System.out.println("Size of desig is "+desig.length);
for(int i = 0; i<size; i++)
{
conPer = address.getContactPersonAt(i);
System.out.println("After conPerson");
name[i]=conPer.getName();
System.out.println("In for loop for size1"+name[i]);
dept[i]=conPer.getDepartment();
System.out.println("In for loop for size2"+dept[i]);
desig[i]=conPer.getDesignation();
System.out.println("In for loop for size3"+desig[i]);
cnt_no[i]=conPer.getPhone();
System.out.println("In for loop for size4"+cnt_no[i]);
ext[i]=conPer.getPhoneExt();
em_add[i]=conPer.getEmail();
}//end of for loop..
//this value will be put only if there is any value in address wanted in session to add new address
if(size!=0)
{
session.putValue("addr",address);
}
addcontactflag=null;
}//end of if block for addcontactflag..
if (editcontactflag!=null)
{
/*this value is got to get supplier values to display for editing wanted in session..*/
Supplier supp =(Supplier) session.getValue("supp");
suppsize = supp.addressListSize();
System.out.println("Size of supplier list is"+suppsize);
System.out.println("Supplier list is "+supp);
Address address = new Address();
if(!(suppsize == 0))
{
System.out.println("In suppsize ");
if (nextflag!=null)
{
address = (Address)session.getValue("addfornext");
System.out.println("Address list1 is "+address);
}
else
{
//this address is got for a specific supplier wanted in session not to remove..
address = (Address)session.getValue("address");
System.out.println("Address list2 is "+address);
}
add = address.getAddress1();
add1= address.getAddress2();
city= address.getCity();
pin= address.getPin();
country=address.getCountry();
phone1=address.getPh1();
area_cd=address.getPhAreaCode();
fax=address.getFax();
phone2=address.getPh2();
}

size = address.contactPersonListsize();
System.out.println("size of contact persons is"+size);

if(!(size == 0))
{
System.out.println("In size ");
name = new String[size];
dept = new String[size];
desig = new String[size];
cnt_no = new String[size];
ext = new String[size];
em_add = new String[size];
System.out.println("Designation is "+desig);
System.out.println("Size of desig is "+desig.length);
for(int i = 0; i<size; i++)
{
ContactPerson conPer = address.getContactPersonAt(i);
name[i]=conPer.getName();
System.out.println("In for loop for size1"+name[i]);
dept[i]=conPer.getDepartment();
System.out.println("In for loop for size2"+dept[i]);
desig[i]=conPer.getDesignation();
System.out.println("In for loop for size3"+desig[i]);
cnt_no[i]=conPer.getPhone();
System.out.println("In for loop for size4"+cnt_no[i]);
ext[i]=conPer.getPhoneExt();
em_add[i]=conPer.getEmail();
}//enf of for loop for size...
}//end of if loop for size..
System.out.println("After size ");
/*add = address.getAddress1();
add1= address.getAddress2();
city= address.getCity();
pin= address.getPin();
country=address.getCountry();
phone1=address.getPh1();
area_cd=address.getPhAreaCode();
fax=address.getFax();
phone2=address.getPh2();
name1=conPer.getName();
dept1=conPer.getDepartment();
desig1=conPer.getDesignation();
cnt_no1=conPer.getPhone();
ext1=conPer.getPhoneExt();
em_add1=conPer.getEmail();
System.out.println("Country is"+country);
System.out.println("Pin code is" +pin);
System.out.println("Address of contact person is "+add);
*/
if(request.getParameter("SRT_NAME") != null)
srt_name= request.getParameter("SRT_NAME");
if(request.getParameter("SUPP_NAME") != null)
supp_name= request.getParameter("SUPP_NAME");
if(request.getParameter("PRO_CAT") != null)
pro_cat= request.getParameter("PRO_CAT");
if(request.getParameter("SUPP_CAT") != null)
supp_cat= request.getParameter("SUPP_CAT");
if(request.getParameter("EM_ADD") != null)
em_addr= request.getParameter("EM_ADD");
if(request.getParameter("INET_SITE") != null)
inet_site= request.getParameter("INET_SITE");
System.out.println("Short name is "+srt_name);
System.out.println("URL id is "+inet_site);
}//end of if for editcontactflag...
}//end of if block for save flag..
%>
<p><center><font face="Book Antiqua" size="5" color=""><em><u><strong>Address/Contact Persons Details</strong></u></em></font></center></p>
<table border=1 width="80%" align="center" bgcolor="">
<tr>
<td align="center" colspan="">
<tr>
<td colspan="1" width="130"><font color="#ff0000">Address</font>
<td colspan="1" width="186">
<input type="text" maxlength=50 name="ADD" value="<%=add%>" size="25">
</td>
<td colspan="1" width="20"> </td>
<td colspan="1" width="20">
<input type="text" maxlength=50 name="ADD1" value="<%=add1%>" size="20">
</td>
<td colspan="1" width="15"> </td>
<td colspan="1" width=""> </td>
</tr>
<tr>
<td colspan="1" height="" bgcolor=""><font color="#ff0000">City</font></td>
<td><input type="text" maxlength=15 name="CITY" value="<%=city%>" size="25" onBlur="Alpha(this);"></td>
<td colspan="1" height="40" bgcolor=""><font color="#ff0000">Pin</font></td>
<td><input type="text" maxlength=15 name="PIN" value="<%=pin%>" size="20" onBlur="numeric(this);"></td>
<td colspan="1" height="" bgcolor=""><font color="#ff0000">Country</font></td>
<td><input type="text" maxlength=15 name="COUNTRY" value="<%=country%>" size="20" onBlur="Alpha(this);"></td>
</tr>
<tr>
<td colspan="1" width="15"> </td>
<td colspan="1" width="15" align="center">Area Code</td>
<td colspan="1" width="20" align="center">Phone 1</td>
<td colspan="1" width="20" align="center">Phone 2</td>
<td colspan="1" width="20" align="center">Fax</td>
</tr>
<tr>
<td colspan="1" height="" bgcolor=""><font color="">Phone</font></td>
<td><input type="text" maxlength=6 name="AREA_CD" value="<%=area_cd%>" size="25" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=8 name="PHONE1" value="<%=phone1%>" size="10" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=8 name="PHONE2" value="<%=phone2%>" size="10" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=8 name="FAX" value="<%=fax%>" size="10" onBlur="numeric(this);"></td>

</tr>
</table>
<p><center><font face="Book Antiqua" size="3" color=""><em><u><strong>Contact Persons:</strong></u></em></font></center></p>
<table border=1 width="80%" align="center" bgcolor="">
<tr>
<td colspan="1" width="20" align="center">Name</td>
<td colspan="1" width="20" align="center">Department</td>
<td colspan="1" width="20" align="center">Designation</td>
<td colspan="1" width="20" align="center">Phone</td>
<td colspan="1" width="20" align="center">Ext</td>
<td colspan="1" width="20" align="center">E Mail Address</td>
</tr>
<%
if(!(size == 0))
{
System.out.println("In if block"+size);
for(int i = 0;i<size ;i++)
{
System.out.println("In for block"+size);
%>
<tr>
<td><input type="text" maxlength=20 name="NAME<%=i%>" value="<%=name[i]%>" size="20" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="DEPT<%=i%>" value="<%=dept[i]%>" size="10"></td>
<td><input type="text" maxlength=20 name="DESIG<%=i%>" value="<%=desig[i]%>" size="15" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="CNT_NO<%=i%>" value="<%=cnt_no[i]%>" size="10" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EXT<%=i%>" value="<%=ext[i]%>" size="7" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EM_ADD<%=i%>" value="<%=em_add[i]%>" size="20" onChange="CheckMail(this);"></td>
</tr>
<input type=hidden name=NAME<%=i%> value="<%=name[i]%>">
<input type=hidden name=DEPT<%=i%> value="<%=dept[i]%>">
<input type=hidden name=DESIG<%=i%> value="<%=desig[i]%>">
<input type=hidden name=CNT_NO<%=i%> value="<%=cnt_no[i]%>">
<input type=hidden name=EXT<%=i%> value="<%=ext[i]%>">
<input type=hidden name=EM_ADD<%=i%> value="<%=em_add[i]%>">
<%
}
}else{
System.out.println("In else block of size");
%>
<!-- <tr>
<td><input type="text" maxlength=20 name="NAME1" value="<%=name1%>" size="20" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="DEPT1" value="<%=dept1%>" size="10"></td>
<td><input type="text" maxlength=20 name="DESIG1" value="<%=desig1%>" size="15" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="CNT_NO1" value="<%=cnt_no1%>" size="10" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EXT1" value="<%=ext1%>" size="7" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EM_ADD1" value="<%=em_add1%>" size="20" onChange="CheckMail(this);"></td>
</tr>
-->
<%

}//end of else if size is zero...
/*this block is integrated with size block,this sizecon is not reqd..*/
/*if(!(sizecon == 0))
{
System.out.println("In if loop of sizecon");
for(int i = 0;i<sizecon ;i++)
{
// System.out.println("In For loop");
%>
<tr>
<td><input type="text" maxlength=20 name="NAME<%=i%>" value="<%=name[i]%>" size="20" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="DEPT<%=i%>" value="<%=dept[i]%>" size="10"></td>
<td><input type="text" maxlength=20 name="DESIG<%=i%>" value="<%=desig[i]%>" size="15" onBlur="Alpha(this);"></td>
<td><input type="text" maxlength=20 name="CNT_NO<%=i%>" value="<%=cnt_no[i]%>" size="10" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EXT<%=i%>" value="<%=ext[i]%>" size="7" onBlur="numeric(this);"></td>
<td><input type="text" maxlength=20 name="EM_ADD<%=i%>" value="<%=em_add[i]%>" size="20" onChange="CheckMail(this);"></td>
</tr>
<%
}//end of for loop for sizecon
}//end of if loop for sizecon
*/
%>
</table>
<br>
<input type=hidden name=INDEX value="<%=index%>">
<input type=hidden name=SRT_NAME value="<%=srt_name%>">
<input type=hidden name=SUPP_NAME value="<%=supp_name%>">
<input type=hidden name=PRO_CAT value="<%=pro_cat%>">
<input type=hidden name=SUPP_CAT value="<%=supp_cat%>">
<input type=hidden name=EM_ADD value="<%=em_addr%>">
<input type=hidden name=INET_SITE value="<%=inet_site%>">
<input type=hidden name=ADD value="<%=add%>">
<input type=hidden name=ADD1 value="<%=add1%>">
<input type=hidden name=CITY value="<%=city%>">
<input type=hidden name=PIN value="<%=pin%>">
<input type=hidden name=COUNTRY value="<%=country%>">
<input type=hidden name=AREA_CD value="<%=area_cd%>">
<input type=hidden name=PHONE1 value="<%=phone1%>">
<input type=hidden name=PHONE2 value="<%=phone2%>">
<input type=hidden name=FAX value="<%=fax%>">
<input type=hidden name=NAME1 value="<%=name1%>">
<input type=hidden name=DESIG1 value="<%=desig1%>">
<input type=hidden name=DEPT1 value="<%=dept1%>">
<input type=hidden name=CNT_NO1 value="<%=cnt_no1%>">
<input type=hidden name=EXT1 value="<%=ext1%>">
<input type=hidden name=EM_ADD1 value="<%=em_add1%>">
<input type=hidden name=count value="<%=max%>">
<table align="center">
<tr>
<%
if (editcontactflag!=null)
{
%>
<td><input type="Button" name="Next" value="Next" onClick="javascript:nextdata()"> </td>
<td><input type="Button" name="Previous" value="Previous" onClick="javascript revdata()"> </td>
<td><input type="Button" name="Save" value="Save" onClick="javascript:editcontact()"> </td>
<td><input type="Button" name="Cancel" value="Cancel" onClick="javascript:cleardata()"> </td>
<td><input type="Button" name="Add Contact" value="Add Contact" onClick="javascript:editcontactdetails()"></td>
<%
}else{
%>

<td><input type="Button" name="Save" value="Save" onClick="javascript:savedata()"> </td>
<td><input type="Button" name="Cancel" value="Cancel" onClick="javascript:cleardata()"> </td>
<td><input type="Button" name="Add Contact" value="Add Contact" onClick="javascript:addcontact()"></td>
<%
}
editcontactflag=null;
%>
</tr>
</table>
</body>
</html>
18 years ago
Hi all,
I am trying to use Composite primary key in CMP Beans With JBoss And Tomcat .When I call create method it gives me the following exception............
Kindly suggest the reasons and solutions.
server output.........
[PIDETAIL] TRANSACTION ROLLBACK EXCEPTION:null
Embedded Exception
null; nested exception is:
javax.ejb.EJBException: null
Embedded Exception
null
[PIDETAIL] java.lang.NullPointerException
[PIDETAIL] at org.jboss.ejb.plugins.jaws.jdbc.JDBCCreateEntityCommand.execute(JDBCCreateEn
tityCommand.java:111)
[PIDETAIL] at org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.createEntity(JAWSPersisten
ceManager.java:128)
[PIDETAIL] at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManag
er.java:231)
[PIDETAIL] at org.jboss.ejb.EntityContainer.createHome(EntityContainer.java:616)
[PIDETAIL] at java.lang.reflect.Method.invoke(Native Method)
[PIDETAIL] at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContaine
r.java:843)
[PIDETAIL] at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySync
hronizationInterceptor.java:231)
[PIDETAIL] at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInt
erceptor.java:154)
[PIDETAIL] at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor
.java:108)
[PIDETAIL] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:135)
[PIDETAIL] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:307)
[PIDETAIL] at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:86)
[PIDETAIL] at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.jav
a:103)
[PIDETAIL] at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:106)
[PIDETAIL] at org.jboss.ejb.EntityContainer.invokeHome(EntityContainer.java:420)
[PIDETAIL] at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invokeHome(JRMPContai
nerInvoker.java:370)
[PIDETAIL] at java.lang.reflect.Method.invoke(Native Method)
[PIDETAIL] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
[PIDETAIL] at sun.rmi.transport.Transport$1.run(Transport.java:142)
[PIDETAIL] at java.security.AccessController.doPrivileged(Native Method)
[PIDETAIL] at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
[PIDETAIL] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
[PIDETAIL] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:6
43)
[PIDETAIL] at java.lang.Thread.run(Thread.java:484)

And I am having such xml descriptors as follows
This is my ejb-jar xml.......
-----------------------------------ejb-jar.xml--------------------------------------------
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>PIDETAIL</ejb-name>
<home>examples.trial.detail.PIDetailHome</home>
<remote>examples.trial.detail.PIDetail</remote>
<ejb-class>examples.trial.detail.PIDetailBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>examples.trial.detail.PIDetailPK</prim-key-class>
<reentrant>False</reentrant>
...................
...................
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>PIDETAIL</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
-------------------------------------------- --------------------------------------------
And my jaws.xml file as follows...................
--------------------------------------------jaws.xml------------------------------------------
<jaws>
<datasource>java:/OraclePool</datasource>
<enterprise-beans>
<entity>
<ejb-name>PIDETAIL</ejb-name>
<table-name>PU_PO_DETAIL</table-name>
<create-table>true</create-table>
<cmp-field>
<field-name>poNo</field-name>
<column-name>PONO</column-name>
</cmp-field>
<cmp-field>
<field-name>po_Srno</field-name>
<column-name>PO_SRNO</column-name>
</cmp-field>
<cmp-field>
<field-name>revision_No</field-name>
<column-name>REVISION_NO</column-name>
</cmp-field>
...................
...................
<primkey-field>poNo</primkey-field>
<primkey-field>po_Srno</primkey-field>
<primkey-field>revision_No</primkey-field>
</entity>
</enterprise-beans>
</jaws>
-----------------------------------------------------
Thease are my composite key.
PoNo, po_Srno, revision_No.
---------------------------PK class ---------------
package examples.trial.detail;
import java.io.*;
public class PIDetailPK implements Serializable
{
public String poNo;//fk
public int po_Srno; //pk
public int revision_No;//fk
public PIDetailPK()
{
}
public PIDetailPK(String poNo,int po_Srno,int revision_No)
{
this.poNo = poNo;
this.po_Srno = po_Srno;
this.revision_No = revision_No;
}
public boolean equals(Object ThisKey)
{
if( ThisKey == null | | !(ThisKey instanceof PIDetailPK) )
return false ;
PIDetailPK pk = (PIDetailPK)ThisKey ;
if( (this.poNo.equals(pk.poNo)) && (this.revision_No == pk.revision_No) && (this.po_Srno == pk.po_Srno))
return true ;
return false ;
}
public int hashCode()
{
return ((this.toString()).hashCode()) ;
}
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append(poNo);
sb.append(revision_No);
sb.append(po_Srno);
return (sb.toString());
}
}
*************************************** **************

[This message has been edited by gajanan deshpande (edited October 04, 2001).]
Hi all ,
I am having such Warning when deploying the jar file.I am not using the static field but it gives such warning.
Please suggest me.
[Verifier]
Bean : PIDETAIL
Section: 9.4.7.2
Warning: At least one field in the primary key class must be non-static.
[Container factory] Deploying PIDETAIL
[JAWS] Table 'PU_PO_DETAIL' already exists
[ContainerManagement] Initializing
[ContainerManagement] Initialized
[ContainerManagement] Starting
[ContainerManagement] Started
[Container factory] Deployed application: file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/t
mp/deploy/Default/PIDetail.jar/
[J2EE Deployer Default] J2EE application: file:/D:/JBossTomcat/JBoss-2.4.1_Tomcat-3.2.3/jboss/d
eploy/PIDetail.jar is deployed.

*************************************** PK class ***************
package examples.trial.detail;
import java.io.*;
public class PIDetailPK implements Serializable
{
private String poNo;//fk
private int po_Srno; //pk
private int revision_No;//fk
public PIDetailPK()
{
}
public PIDetailPK(String poNo,int po_Srno,int revision_No)
{
this.poNo = poNo;
this.po_Srno = po_Srno;
this.revision_No = revision_No;
}
public boolean equals(Object ThisKey)
{
if( ThisKey == null | | !(ThisKey instanceof PIDetailPK) )
return false ;
PIDetailPKpk = (PIDetailPK)ThisKey ;
if((this.poNo.equals(pk.poNo))&& (this.revision_No == pk.revision_No)&& (this.po_Srno == pk.po_Srno))
return true ;
return false ;
}
public int hashCode()
{
return ((this.toString()).hashCode()) ;
}
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append(poNo);
sb.append(revision_No);
sb.append(po_Srno);
return (sb.toString());
}
}
*************************************** **************
Hi All,
I am trying to use composite Primary Key in CMP Jboss Container with tomcat server .Can anyone having ideas
About how to use Composite PK in CMP.
Also suggest me how to define primarykey-field tag in xml.
If so please suggest me. Also send me URL where these topics material are to be found.
Hi all
I am trying to achieve explict transaction in ejb So Please
Suggest me how to accomplish it with example.
Regards
Gajanan
Hi all
I am trying to write CMP for a table which contain a composite Key(comprising three field) in Jboss+Tomcat
So how can write deployment descreptor for that ie jaws.xml.ejb-jar.xml and jboss.xml.Also how should be my Pk class?
So please suggest me With examples.
Thanks.
Gajanan
Hi,
I have a specific requirement for developing and deploying Ejb,I have to develop all the ejb's,jsp on NT and want to deploy them on Linux server(red hat 6.2)and Oracle 8i as bachend.How should i proceed in this matter please guide?
regards
Gajanan.
Hi,
I am a sun certified programmer for java and have a solid experience of 15 months in java,EJB,jsp in J2EE architecture.Am i eligible for the jobs you have?I am interested to relocate to Ireland.Please let me know,i am located in India at present and working with a company in Pune.
Thanking you in advance.
Gajanan Deshpande
18 years ago
Hi,
The problem is solved and we have written a new bean code for it as the suggestions you have mentioned were tried by us before,but could not get a solution to it.After writing a new bean for it we could solve the problem.
Thanks for all your help.
Gajanan.
Hi,
I am putting all class files in a jar file hence the jar file contains all the class files required,still then it is giving the same exception.
please suggest as we have checked all these small points such as classpath,etc...