error on query.create("...
I am getting a NullPointerException when the execution reaches the line: query.create("select users from users in "+FlUserBO.class.getName()+" where users.identification = $1"); in the code above. Some one can tell me what's wrong? Thanks. Implementation impl = OJB.getInstance(); Database db = impl.newDatabase(); db.open("default", Database.OPEN_READ_WRITE); try{ Transaction tx = impl.newTransaction(); tx.begin(); OQLQuery query = impl.newOQLQuery(); query.create("select users from users in "+FlUserBO.class.getName()+" where users.identification = $1"); //query.bind(_identification); //DList results = (DList) query.execute(); //FlUserBO user = (FlUserBO)results.iterator().next(); tx.commit(); db.close(); return null; //user; -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Persisting Date and Time
I got in a value object a property named recDate of java.util.Date. It's mapped in resource.xml as jdbc-type="DATE" and mapped in the ddl as rec_date TIMESTAMP. I persist the object with the current Date using something like: "setRecDate(new Date()) and then I persist it using ODMG. Everything goes fine but in the table keeps registered only the date (not date and time) like this: 2004-01-06 00:00:00 What can I do to register the date and the time too? Thanks. -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Getting the Id in insertion time.
I'm using auto-increment fields. The OJB defines the new ID for this fields when I insert a new record. I would like to know how can I know those new ID's values after the insert task using ODMG. There's a function that record the object in the database and return the ID value? Otherwise, what can I do? -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
OutOfMemoryError
I'm getting this "java.lang.OutOfMemoryError" when i try to run any ojb task. Have you any idea of how can i solve it? Thanks. -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Ojb samples
Please, Can anyone send to me some resource.xml source code fragment where is declared the jdbc-connection-descriptor for a postgresql jdbc? I am a newbie and my bigest problems is to start to use it on my Web application. I couldnt find any samples how to use it on Web Applications. Some codes of config files and servlets using the ojb framework for inserts or queries would be fine. Thanks. -- Fabiano F. Souza Tecnologia da Informação Estudar Soluções em Treinamento Corporativo. (31) 32849294 - [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]