• Post Reply Bookmark Topic Watch Topic
  • New Topic

About EJBs

 
Jorge Chata
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I'm trying to execute my servlet using entity beans.
Part of my code servlet :
javax.naming.InitialContext initialContext = new javax.naming.InitialContext();
Object objHome = initialContext.lookup("shop/Books");
BooksHome bookshome = (BooksHome) javax.rmi.PortableRemoteObject.narrow(objHome,BooksHome.class);
out.println("Here OK !");
bookshome.create(11,"Libro de java20","Anonimo",12,1);
out.println("don't appears");
Books libro1 = bookshome.findByPrimaryKey(new BooksKey(10));
out.println("Books 10 "+libro1.getTitle());
When I executed my servlet appears this message error :
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: com.ibm.ejs.persistence.EJSPersistenceException: getPStmt failed; nested exception is: java.sql.SQLException: ORA-00922: missing or invalid option com.ibm.ejs.persistence.EJSPersistenceException: getPStmt failed; nested exception is: java.sql.SQLException: ORA-00922: missing or invalid option java.sql.SQLException: ORA-00922: missing or invalid option
Where I can find this type of message errors ? About EJB message errors ?
Thanks for your helps
Jorge
 
Tim Holloway
Bartender
Posts: 18412
58
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ORA-00922: missing or invalid option
That's an Oracle error message. Your EJB's unhappy because you made an invalid request to the DBMS.
 
Jorge Chata
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my case I have two CMP entity beans (Books and Music) . This
message error also appears when i executed the EJB Test Client
in Visual Age 3.5. For other side, the CMP entity beans doesn't
need the SQL sentences to create instances of entity beans.
I relationed the entity beans with Oracle 7.2.3. tables . Anybody knows if this Oracle version have troubles with
EJBs ?
This is Database schema that was generated by Visual Age 3.5.
Connected to:
Oracle7 Server Release 7.2.3.0.0 - Production Release
With the distributed, replication and parallel query options
PL/SQL Release 2.2.3.0.0 - Production
SQL> desc books
Name Null? Type
------------------------------- -------- ----
DISCOUNT NUMBER(10)
CODE NOT NULL NUMBER(10)
PRICE FLOAT(126)
TITLE VARCHAR2(30)
AUTHORS VARCHAR2(30)
Message Error :
java.rmi.ServerException: Remote Exception occurred in server thread; nested exception is :
com.ibm.ejs.persistence.EJSPersistenceException: getPStmt failed; nested exception is:
java.sql.SQLException:ORA-00922: missing or invalid option
CMP Entity Bean :
public class BooksBean implements EntityBean {
public String authors;
public int code;
public int discount;
private javax.ejb.EntityContext entityContext = null;
public double price;
final static long serialVersionUID = 3206093459760846163L;
public String title;
}
Thanks for yours help.
Jorge
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!