[Persistence, JBoss/CMP, Hibernate, Database] - Re: Insert into Orace TimesTen In Memory DataBase
by grdzeli_kaci
sorry when i was wrote
insert into PAATA.STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)
i get an error
anonymous wrote :
| java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table PAATA.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
| at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
| at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
| at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
| at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
| at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
| at com.timesten.jdbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:360)
| at untitled3.Untitled1.main(Untitled1.java:26)
|
and if i remove shemaname PAATA from insert
insert into STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)
i get an error like this :
| java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table ADMINISTRATOR.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
| at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
| at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
| at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
| at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
| at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
| at com.timesten.jdbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:360)
| at untitled3.Untitled1.main(Untitled1.java:26)
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957624#3957624
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957624
19 years, 9 months
[Persistence, JBoss/CMP, Hibernate, Database] - Insert into Orace TimesTen In Memory DataBase
by grdzeli_kaci
i have created table in oracle timesten
[
| CREATE TABLE "PAATA"."STUDENT" (
| "ID" INTEGER NOT NULL,
| "NAME" VARCHAR(200),
| "SURNAME" VARCHAR(200),
| "AGE" INTEGER,
| "GROUPID" INTEGER
| ) ;
| /code]
|
| then i tried to insert from java
|
|
| | import java.sql.DriverManager;
| | import java.sql.Connection;
| | import java.sql.*;
| |
| | public class TestTimesTen {
| | public static void main(String[] args) {
| | try {
| | Class.forName("com.timesten.jdbc.TimesTenDriver");
| | String URL = "jdbc:timesten:DSName";
| | Connection _Connection = DriverManager.getConnection(URL);
| | Statement stmt = _Connection.createStatement();
| | int res1 = stmt.executeUpdate("insert into PAATA.STUDENT (ID,NAME,SURNAME,AGE,GROUPID) values (1,'asdasd','asdasdasd',22,2)");
| |
| | System.out.println("asdasdasdasd");
| | }
| | catch (SQLException ex) {
| | ex.printStackTrace();
| | }
| | catch (ClassNotFoundException ex) {
| | ex.printStackTrace();
| | }
| | }
| | }
| |
| |
|
|
| but i get an error :( i don't know why :(
|
|
| | java.sql.SQLException: [TimesTen][TimesTen 6.0.2 ODBC Driver][TimesTen]TT2206: Table ADMINISTRATOR.STUDENT not found -- file "comp.c", lineno 2031, procedure "sbCompCacheTbl()"
| | at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6327)
| | at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6460)
| | at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6425)
| | at com.timesten.jdbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3934)
| | at com.timesten.jdbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:420)
| | at com.timesten.jdbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:328)
| | at untitled3.Untitled1.main(Untitled1.java:16)
| |
| |
|
| can anybody help me ?
| thanks....
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957622#3957622
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957622
19 years, 9 months
[JBoss AOP] - Re: Interceptors not fired on methods called from within bea
by jnorris10
A few more questions related to this:
1) I have this interceptor deployed as a separate .aop artifact, separate from my application ear. Is it possible to somehow deploy this inside the ear (and therefore have my new aspect domain scoped inside it)?
2) I have called my aop descriptor "jboss-aop.xml". Since this inherits a domain from the main ejb3 interceptor stack, would this be better named "test-ejb3-interceptors-aop.xml" like the "aspectdomain" unit test, or does this name mean something else? What are the best practices for naming this? (btw, I could only get the .aop to deploy by calling it "jboss-aop.xml")
3) I have created a reusable transaction retry handler that ties into the jboss EJB3 interceptor stack (like the example above). Would this be a useful in the jboss aop aspect library as a reusable component? If so, what are the best practices for packaging this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957620#3957620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957620
19 years, 9 months
[JBoss Seam] - Is this the correct way to go about this?
by joff
We are developing a Seam application using JBoss Seam current CVS, Sun JSF 1.2, and Facelets.
We currently have this type of model:
Our EJB3 entities are:
CompanyCustomerUser
Company has many customers, who in turn have many users.
We have developed what we are calling "DAOs" or Data Access Objects, so that we can pull out (for example) a List of all Company objects (this is outside of any form context so no EJB3 is currently involved).
For example, our CompanyDAO implementation looks like this:
@Name("dao_company")
| public class CompanyDAOImpl implements Serializable, CompanyDAO {
|
| private static final long serialVersionUID = 1L;
|
| @In(create=true)
| private transient EntityManager entityManager;
|
| @SuppressWarnings("unchecked")
| @WebRemote
| public List<Company> getCompanies() {
| Query query = entityManager.createQuery("FROM Company company");
| return (List<Company>) query.getResultList();
| }
| }
We would like to add a getCompanyByID() method to this class. However, because this method needs to be called from the JSF layer, we have to pass in the parameter as a field annotated with @RequestParameter. When we do this, the getCompanies() method (which does not use the annotated parameter) can no longer be called unless this field is filled in.
We have two questions:
Is this the correct way to be doing this type of "pull" data access? We have looked at the "Blog" example, but it does not seem as complex as what we are trying to do.
Is it possible to have multiple @RequestParameter fields on a JavaBean like the one above, which do not all have to be populated when any given method (which may or may not use them) is called?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957618#3957618
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957618
19 years, 9 months