manjiri chunekar

Greenhorn
+ Follow
since Apr 08, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by manjiri chunekar

Integration of struts and spring jdbc


Not getting output...

help me....

i can retieve data through text box but not through table


Employee.java(BEAN)





EmployeeAction




success.jsp






help me....


[JB: added code tags]
12 years ago
hi
I have same problem as Ram(i.e first errir he posted)
I read whole conversation, but my error is not solved


Help me

index.jsp
<html:form action="UserAction.do">
<table>
<tr>
<td>
<bean:write name="UserForm" property="message"/>
</td>
</tr>
<tr>
<td>
<html:submit property="method"><bean:message key="Test.sum"/></html:submit>

<!--<html:link page="/CustomerAction.do?parameter=view">view</html:link>-->
</td>
</tr>
<tr>
<td>
<html:submit property="method"><bean:message key="UserForm.update"/></html:submit>

<!--<html:link page="/CustomerAction.do?parameter=create">create</html:link>-->
</td>
</tr>
<tr>
<td>
<html:submit property="method"><bean:message key="UserForm.delete"/></html:submit>

<!--<html:link page="/CustomerAction.do?parameter=delete">delete</html:link>-->
</td>
</tr>
</table>
</html:form>

UserForm
public class UserForm extends ActionForm{

private static final long serialVersionUID = 1L;
private String message;

public UserForm(){
super();
}

public String getMessage() {
return message;
}

public void setMessage(String message) {
this.message = message;
}
}


ApplicationResource

UserForm.add = Add
UserForm.update = Update
UserForm.delete = Delete


I mentioned in struts-config.xml

Error:
javax.servlet.ServletException: Missing message for key "UserForm.add" in bundle "(default bundle)" for locale en_US

12 years ago
thaks for giving me links..
yet I am not succeed..
please help me
its giving still same error

whats wrong in my syntax???

javax.servlet.ServletException: StatementCallback; bad SQL grammar [INSERT INTO Cust (Cust_Id, Cust_Fname, Cust_Lname) VALUES (?,?,?)]; nested exception is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect

db in ms access
12 years ago
sorry Swastik

I am new on CODERANCH..

i give different name to my new post...
So... you dont get code...

my subject is spring jdbc and action class....
12 years ago
sorry Swastik

I am new on CODERANCH..

i give different name to my new post...
So... you dont get code...

my subject is spring jdbc and action class....
12 years ago
Error is

javax.servlet.ServletException: StatementCallback; bad SQL grammar [INSERT INTO Cust (Cust_Id, Cust_Fname, Cust_Lname) VALUES (?,?,?)]; nested exception is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect

db in ms access
12 years ago
i am not getting what is problem with query??
whats wrong in it...

12 years ago
Thanks for guiding me...
I saw that links...
but my problem is not solved yet...

I changed crete funcn



thugh it gives same error...
what to do...
i do seperate assignment for 1 query i.e select...
it runs, shows data....
12 years ago
CustomerAction






CustomerDAO





index.jsp



Customer





12 years ago
exception

javax.servlet.ServletException: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [INSERT INTO Cust (Cust_Id, Cust_Fname, Cust_Lname) VALUES (?, ?, ?)]; nested exception is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [INSERT INTO Cust (Cust_Id, Cust_Fname, Cust_Lname) VALUES (?, ?, ?)]; nested exception is java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.translate(SQLStateSQLExceptionTranslator.java:111)
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:322)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:497)
com.CustomerDAO.Add(CustomerDAO.java:29)
com.CustomerAction.create(CustomerAction.java:86)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]COUNT field incorrect
sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)
org.springframework.jdbc.core.JdbcTemplate$1QueryStatementCallback.doInStatement(JdbcTemplate.java:443)
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:396)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:458)
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:466)
org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:497)
com.CustomerDAO.Add(CustomerDAO.java:29)
com.CustomerAction.create(CustomerAction.java:86)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:269)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:170)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)



My db is in ms-access
DSN is myDSN

Help me....

12 years ago
thanks.....
ok... i wont duplicate post again..
will take care of that....
i done small assignments on struts, spring.... like struts-dispatch,bean etc. AND spring injection,little bit on spring MVC, spring jdbc...
So, i m trying this.....
12 years ago


i m doing assignments on struts and spring...
i created db in ms access and DSN id myDSN...
created 3 buttons delete,create, update
created 3 text box: cust_id, cust_fname, cust_lname...
applicationConfig.xml
struts-config.xml
Cust is form bean
CustomerDAo
CustomerAction

what can i do... i m trying.... but not success yet... HELP ME..
12 years ago