2013年9月3日星期二

Ibatis to execute a simple query methods are always being given Noresult defined for action com.yp.action.ZtckeywordsActi


solve ah walk Action always error Dispatcher - Could not find action or result
No result defined for action com.yp.action.ZtckeywordsAction and result error I used to debug inside look into the DAO method returns null do not know why Great God seeking answers
------ Solution ------------------------------------- -------

  
in when you can write SQL paging Yeah,   
For example you can use rownum oracle   
mysql can limit  

------ Solution ------------------------------------ --------
check before you calculate startnum and endnum, and then through the parameters passed in ,
------ For reference only ------------ ---------------------------
my own roof inside my Sturts.XML Action and result all right , but also into the return value of the method in the air at the wrong Dispatcher - Could not find action or result
No result defined for action com.yp.action.ZtckeywordsAction and result error
------ For reference only ----------- ----------------------------
first : your ibatis files referenced in sqlmap yet ?
Second: define your return is wrong, it should be resultMap = " your class ."
instead resultClass right ?
------ For reference only -------------------------------------- -
it did not seem to execute the code seems to have ztckeywords = getSqlMapClientTemplate (). queryForList ("ZtckeywordsInfo.selectZtckeywords");
------ For reference only ------ ---------------------------------
I quoted , I
is my class
Say
This resultClass write resultMap are OK
------ For reference only ------------------ ---------------------

I quoted , I
is my class
Say
This resultClass write resultMap are OK
------ For reference only ------------------ ---------------------
other queries you can run it ?
And you check the database you are currently connected if there is data ,
------ For reference only ------------------- --------------------

my other query tables can not work alone on this database has data I found the data in the database
------ For reference only ------------------------------ ---------

I write about these things too at a wrong
------ For reference only --------------- ------------------------
you try to the action, try to see if your dao reported what the error is an error.
Your mistake is shown above struts error that is mostly performed dao abnormal , and
So dao implementation will depend on the specific error .
------ For reference only -------------------------------------- -

/ **
* in accordance with the input keyword queries
* parameter keywords
*
* reutrn List
* /
@ SuppressWarnings ("unchecked")
public List selectZtckeywords (String keywords) {

List list = getSqlMapClientTemplate (). queryForList ("ZtcwordsInfo.selectZtckeywords", keywords);

return list;
} This is the DAO like to make is that queries all the bad in the
------ For reference only ----------- ----------------------------
I just read what I wrote , and you can now write the basic no difference.
exception that you did not catch up ?
------ For reference only -------------------------------------- -
catch the same or Dispatcher - Could not find action or result
No result defined for action com.yp.action.ZtckeywordsAction and result error
------ For reference only ---------- -----------------------------

Struts result error what reason how wrong it is to be able to return to return list
------ For reference only --------------------- ------------------
how you feel this like struts wrong,
Your struts the result map is not defined "selectwords".
paste your struts.xml look
------ For reference only -------------------------- -------------

------ For reference only ----- ----------------------------------
action methods try catch you out , Exception log printouts is
Could not find action or resultNo result defined for action com.yp.action.ZtckeywordsAction and result error of this ? ?

------ For reference only ---------------------------------- -----
Logically speaking, the above error message should be on the page ,
I understand it should be so, you dao error , leading to action returns another value ,
depend on action in the catch exception message is.
catch where you add a log.
------ For reference only -------------------------------------- -

Well you plug it out the data but still error page also displays an error Dispatcher - Could not find action or result No result defined for action com.yp.action.ZtckeywordsAction and result error reason is it too much data ? I very much data in the database seems to have 200,000
------ For reference only -------------------------- -------------
there may be too much data , enough memory . Your data query a 10 look .
------ For reference only -------------------------------------- -
I find the reason I watch too much data to back up my built another table with the same name will be able to save a little data found out thanks Haha
------ For reference only ------------------------------------- -
is too much data thanks
------ For reference only ---------------------- -----------------
can select * do I also ibatis beginner
------ For reference only --- ------------------------------------

Oh , I suggest not all check out , you can use the next query.




can use select *.
------ For reference only -------------------------------------- -
is to use sql statement query did not understand what you mean select * from table name
My problem is too large because the amount of data being given a
------ For reference only ----------------- ----------------------

can use select *.  
Well I'm not lazy paged result of this tragedy troubled me dead
------ For reference only -------- -------------------------------

------ For reference only ---- -----------------------------------

------ For reference only ---------------------------------- -----

in when you can write SQL paging Yeah,     
For example you can use rownum oracle     
mysql can limit    
  
  
Oh thank the Kazakh Karma search  

------ For reference only ---------------------------------- -----


  
can use select *.  

can, but best not to use it. On the one hand the performance slightly worse ( need to parse * ) , on the other sql readability becomes poor .

没有评论:

发表评论