Search:

Type: Posts; User: EdwardKing; Keyword(s):

Page 1 of 2 1 2

Search: Search took 0.08 seconds.

  1. Replies
    1
    Views
    194

    Mistake of "Type mismatch"

    I want to exercise AOP,so I use follwing example code:


    package com.apress.prospring3.ch6.staticpc;
    import java.lang.reflect.Method;
    import net.sf.cglib.proxy.MethodInterceptor;
    import...
  2. Replies
    0
    Views
    109

    compile error

    I use Spring Tool Suite 3.1.0 to create a spring project,and I put following jar into classpath
    org.springframework.asm_3.1.1.RELEASE.jar
    org.springframework.beans_3.1.1.RELEASE.jar...
  3. Where is wrong with Injecting Simple Values (Annotation)?

    I want to use Annotation to Injecting Simple Values,like follows:

    package com.apress.prospring3.ch4.annotation;

    import org.springframework.beans.factory.annotation.Value;
    import...
  4. Replies
    3
    Views
    545

    STS pom.xml error

    I am first to use Spring Tool Suite,Version: 3.1.0.RELEASE, File -> New -> Spring Template project,then it download some bytes from internet. But I find pom.xml file is marked by red sign. The error...
  5. I get above code from a book example which using...

    I get above code from a book example which using Spring2.5,and I want to try above code,so I download spring3.1,when I compile it with javac command,it raise above error. Why Spring 3.0 is ok and...
  6. Can't visit org.springframework.web.context.support.WebApplica tionObjectSupport

    I use springframework 3.1.0,when I compile following code,it raise compile error.

    package command;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;...
  7. getHibernateTemplate().executeWithNativeSession+SQ LQuery

    I use getHibernateTemplate().executeWithNativeSession+SQLQuery method to visit DB,like follows:


    List userList=getHibernateTemplate().executeWithNativeSession(
    new...
  8. Replies
    0
    Views
    1,258

    Could not resolve placeholder

    I use spring-framework-3.0.3,configure files are follows:

    applicationContext.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"...
  9. Replies
    1
    Views
    1,362

    this.getHibernateTemplate().find question

    I use spring with oracle,I know I can get record by following statement

    List info=this.getHibernateTemplate().find("from Test.Model");

    For exmple,I can get all record by execute above...
  10. this.getHibernateTemplate() need to release connection?

    I use spring,my class extends HibernateDaoSupport,then I execute following statement,like follows:

    public void save(TestModel um) throws DataAccessException,SQLException{
    ...
  11. Replies
    0
    Views
    925

    How to realize one-to-many mapping?

    I have two table,like follows:

    create table USERINFO
    (
    ID VARCHAR2(18) not null,
    NAME VARCHAR2(20) not null
    )

    create table ROLEINFO
    (
  12. Replies
    1
    Views
    1,008

    How to configure jasypt+c3p0 with spring?

    I have used c3p0 to configure spring database url and password in .properties file, now I want to use jasypt+c3p0 to configure spring, but I don't know how to do it, please help me. A detailed...
  13. Replies
    5
    Views
    734

    Sorry,my code is follows: List...

    Sorry,my code is follows:

    List testList=this.getHibernateTemplate().find(" select col1,col2 from
    mytable");
    request.setAttribute("testList",testList);
    return SUCCESS;

    Why above code return a...
  14. Replies
    5
    Views
    734

    Why this.getHibernateTemplate().find(" select...

    Why
    this.getHibernateTemplate().find(" select new mytable(col1,col2) from mytable"); return a list of Object[] not return 'mytable' objects'?

    How to make it return 'mytable' objects?
  15. Replies
    5
    Views
    734

    Why I can't get result?

    I have a table named mytable,it has two cols,col1 and col2,the data are


    col1 col2
    ---------------
    John 24
    Kate 18


    hibernate xml file is follows:
  16. How to use ! or in Spring data access

    I use getHibernateTemplate() to look up a record,like follows:

    this.getHibernateTemplate().find("from mytable where id='0001'");

    above code can run well,then I make another query,like follows:...
  17. How to load data from struts2+spring+hibernate by using JspTag

    I want to use JspTag to load data from struts2+spring+hibernate,usually I load data from struts2+spring+hibernate using following code:

    public class TestAction extends ActionSupport{
    ......
    ...
  18. How to mapping oracle date with format 'yyyy-mm-dd'

    I use oracle,it has a date column,so I mapping following code

    <hibernate-mapping>
    <class name="test.model" table="testTable">
    <property name="createDate" type="java.util.Date">
    ...
  19. Replies
    0
    Views
    880

    How to mapping oracle date field?

    I use Oracle9i,I have a date field,like follows

    logtime date,
    name varchar2(3)

    My question is how to write oracle date mapping in Hibernate hbm.xml?
    I use this.getHibernateTemple.find("from...
  20. How to process Transaction management using HibernateTemplate?

    I create a DAO,this DAO extends HibernateDaoSupport,now I want to add transaction management,such as commit and rollback,I don't know how to do it,my code is follows:
    ...
  21. Replies
    2
    Views
    6,263

    composite-id question

    I use composite-id,the composite-id is composed by id and uid,like follows:
    Test.hbm.xml

    <class name="Test.Model" table="Test" mutable="true" polymorphism="implicit" dynamic-update="false"...
  22. why this.getHibernateTemplate().find show error result

    I have two table,table A and table B,
    table A

    ID NAME
    ---------------
    test John
    tiger Kate


    table B
  23. how to use getHibernateTemplate().find method to query two table?

    I want to query two table by using getHibernateTemplate().find,like follows:
    getHibernateTemplate().find("from test.a a ,test.b b where a.id=b.id and a.c='abc'")

    My question is how to extract...
  24. Replies
    1
    Views
    1,224

    HibernateTemplate().update question

    I want to use following SQL by HibernateTemplate().update:

    update mytable1,mytable2 set mytable1.name='Jack',mytable2.salary='999' where mytable1.id='1' and mytable2.work='true' and...
  25. How to Transaction by using HibernateTemplate

    I use getHibernateTemplate() method to get HibernateTemplate Object,then I use delete(Object entity) method to delete some database record,like follows:
    getHibernateTemplate().delete(entity1); ...
Results 1 to 25 of 40
Page 1 of 2 1 2