i am trying to evaluate dbforms, it looks promissing, but i am stuck with exception from subject. i tried "bookstore" example and it worked, so i guess my app should work too.
i used devgui to create config file, it generated all tables elements and connection looks like this
OK, it was data types problem. sql server data types are not supported by dbforms, so config file could no be parsed. i used "Write standard type names for unknown field types" and it converted problematic ntext to cahr with enormous size. it still didn't help, so i had to manualy convert "decimal" to "double" and "bit" to "int" (bool or boolean didn't work).
now when i run it, it allmost work, but still complains about unsupported data types. i wasn't able to find any data types reference in the docs, so i don't know what to do next. how can i translate bit,nchar,datetime,money in the conifg file?
tahnk you!
dario
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That are all non standard sql types.
dbforms only support standard sql types.
A list of alll supported types are in the FieldTypes classes:
/** DOCUMENT ME! */
public static final int INTEGER = java.sql.Types.INTEGER;
/** DOCUMENT ME! */
public static final int CHAR = java.sql.Types.CHAR;
/** DOCUMENT ME! */
public static final int DATE = java.sql.Types.DATE;
/** DOCUMENT ME! */
public static final int TIMESTAMP = java.sql.Types.TIMESTAMP;
/** DOCUMENT ME! */
public static final int TIME = java.sql.Types.TIME;
/** DOCUMENT ME! */
public static final int DOUBLE = java.sql.Types.DOUBLE;
/** DOCUMENT ME! */
public static final int FLOAT = java.sql.Types.FLOAT;
/** DOCUMENT ME! */
public static final int BLOB = java.sql.Types.BLOB;
/** DOCUMENT ME! */
public static final int DISKBLOB = 4200;
/** DOCUMENT ME! */
public static final int NUMERIC = java.sql.Types.NUMERIC;
regards,
Henner
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2004-03-23
I map
datetime <-> timestamp
money <-> real
I am not sure how to map ntext, but nchar _should_ map to nvarchar just fine (nvarchar is mapped to char itself iirc, but that is another story).
Talking about bit, I have built rudimentary bit support into my dbforms 1.1.3 so I can use checkboxes to represent these fields. It is more of a hack, really. It should be in the archive around 2003-08-14, otherwise drop me a line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i am trying to evaluate dbforms, it looks promissing, but i am stuck with exception from subject. i tried "bookstore" example and it worked, so i guess my app should work too.
i used devgui to create config file, it generated all tables elements and connection looks like this
<dbconnection
name = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=northwind"
isJndi = "false"
conClass = "com.microsoft.jdbc.sqlserver.SQLServerDriver"
username = "sa"
password = "sa"
/>
i also generated menu page and some jsp's to try.
when i try to access menu.jsp i get
IllegalArgumentException: No DbConnection object configured with name 'null'
and when i try some other *_list or *_single page i get
NullPointerException
at DbFormTag.setTableName(DbFormTag.java:300)
web.xml is copied from working bookstore sample
is there anything i could do to track down the problem?
Are you shure that your config file is readed and parsed?
Seems that you have the problem that the config file is not found.
regards,
Henner
I solved the problem by moving the dbconnection tag to the top of dbforms-config.xml file.
Don't ask me how this works...
OK, it was data types problem. sql server data types are not supported by dbforms, so config file could no be parsed. i used "Write standard type names for unknown field types" and it converted problematic ntext to cahr with enormous size. it still didn't help, so i had to manualy convert "decimal" to "double" and "bit" to "int" (bool or boolean didn't work).
now when i run it, it allmost work, but still complains about unsupported data types. i wasn't able to find any data types reference in the docs, so i don't know what to do next. how can i translate bit,nchar,datetime,money in the conifg file?
tahnk you!
dario
That are all non standard sql types.
dbforms only support standard sql types.
A list of alll supported types are in the FieldTypes classes:
/** DOCUMENT ME! */
public static final int INTEGER = java.sql.Types.INTEGER;
/** DOCUMENT ME! */
public static final int CHAR = java.sql.Types.CHAR;
/** DOCUMENT ME! */
public static final int DATE = java.sql.Types.DATE;
/** DOCUMENT ME! */
public static final int TIMESTAMP = java.sql.Types.TIMESTAMP;
/** DOCUMENT ME! */
public static final int TIME = java.sql.Types.TIME;
/** DOCUMENT ME! */
public static final int DOUBLE = java.sql.Types.DOUBLE;
/** DOCUMENT ME! */
public static final int FLOAT = java.sql.Types.FLOAT;
/** DOCUMENT ME! */
public static final int BLOB = java.sql.Types.BLOB;
/** DOCUMENT ME! */
public static final int DISKBLOB = 4200;
/** DOCUMENT ME! */
public static final int NUMERIC = java.sql.Types.NUMERIC;
regards,
Henner
I map
datetime <-> timestamp
money <-> real
I am not sure how to map ntext, but nchar _should_ map to nvarchar just fine (nvarchar is mapped to char itself iirc, but that is another story).
Talking about bit, I have built rudimentary bit support into my dbforms 1.1.3 so I can use checkboxes to represent these fields. It is more of a hack, really. It should be in the archive around 2003-08-14, otherwise drop me a line.