• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

EJB - Message error

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

Thanks for your help
Jorge
 
Jorge Chata
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic