Questions on BMP Entity Bean
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   John_Smith
Posted On:   Monday, January 13, 2003 05:45 PM

Hello Everyone, When I run my client I received the following errors. "Java Rmi Server Exception: nested exception is : SQL exception: at least one parameter to the current statement is not initialized." I am baffled by this. The coding is taken out from the book Professional EJB by Wrox at page133. Could anyone help? I really appreciated. John ========================== A snippet of the EJB coding, public interface Tax extends EJBObject { //this is my component interface public void setTaxRate(float taxRate) throws exception.. } public ejbCreate(String stateCode, float taxRate) throws exception { // thi   More>>


Hello Everyone,
When I run my client I received the following errors.
"Java Rmi Server Exception: nested exception is : SQL exception: at least one parameter to the current statement is not initialized." I am baffled by this.
The coding is taken out from the book Professional EJB by Wrox at page133.
Could anyone help? I really appreciated.

John


==========================

A snippet of the EJB coding,

public interface Tax extends EJBObject

{

//this is my component interface

public void setTaxRate(float taxRate) throws exception..

}


public ejbCreate(String stateCode, float taxRate) throws exception

{

// this is the implementation class

String sqlStmt = "INSERT INTO taxTable...

....

....

return stateCode;

}


public void ejbLoad()

{

here i have setEntityContext, unsetEntityContext, ejbActivate, and ejbPassivate

}

================

following is the Client program.

after the JNDI lookup and narrow(),

Tax tax = null;


tax = home.create("IL, 5.00f);

It is at this statement I received the exception.

   <<Less

Re: Questions on BMP Entity Bean

Posted By:   Nick_Maiorano  
Posted On:   Tuesday, January 14, 2003 05:13 AM

John,



Seems like your INSERT statement is missing one or more fields of its table. Are you sure you created the database table correctly? Do you have all fields in the insert statement?

About | Sitemap | Contact