Announcement Announcement Module
Collapse
No announcement yet.
@Transactional Issue Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Transactional Issue

    Hi, and frist my apologies if this is not the correct section in forum to ask this.

    Im trying to create an MVC Spring Report app using:
    STS 3.1
    Hibernate3 (and already try it with Hibernate4)
    MySql 5(DB)

    1.- I use the spring template comes with the STS.
    2.- I use hibernate to create models from DB.
    3.- I wanna create a service to works with DB geting this Kram's Tutorial http://krams915.blogspot.com.es/2010...e-3-using.html

    4.- When i create the service class "PersonService", i can't get @Transactional annotation reconigzed be the STS.
    "import org.springframework.transaction.annotation.Transac tional;" Not Work's
    import only get "org.springframework.transaction.annotation.*; " and don't reconigze the @Transactional.

    I try it with Hibernate3 and Hibernate4, Spring Framework 3.1.3 and 3.2, and try to found some one with the same problem on a few forums and doc's for more time i like to accept, without a clue of how to resolve that issue.

    Some one more experienced can give me a clue or link to tutorial really works with Spring 3.1 MVC and Hibernate3/4.

    Thank's for your time, any help be appreciated.

  • #2
    Add the correct jar to your pom.xml file... You are probably missing the dependency for the transaction jar or your dependencies aren't resolved correctly...

    Comment


    • #3
      Originally posted by Marten Deinum View Post
      Add the correct jar to your pom.xml file... You are probably missing the dependency for the transaction jar or your dependencies aren't resolved correctly...
      Thank's, that's solves the issue.

      To be exact i missing in pom.xml this:

      <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-orm</artifactId>
      <version>${org.springframework-version}</version>
      <type>jar</type>
      <scope>compile</scope>
      </dependency>

      P.D.: It's really so hard to find a basic "step to step for dummies" spring mvc and maven tutorial.

      Comment


      • #4
        P.D.: It's really so hard to find a basic "step to step for dummies" spring mvc and maven tutorial.
        Why should the combination matter? Master Maven then Master Spring MVC combine the knowledge... It is impossible to create tutorials for each and every combination out there. (For our book we choose the use Gradle instead of Maven).

        Comment


        • #5
          Originally posted by Marten Deinum View Post
          Why should the combination matter? Master Maven then Master Spring MVC combine the knowledge... It is impossible to create tutorials for each and every combination out there. (For our book we choose the use Gradle instead of Maven).
          I'm not english speaker, may be i express me incorrectly. I was trying to say a "Maven basic Tutorial" and/or "Spring MVC basic Tutorial" not a mix of maven and spring. (maven comes in spring template in STS).

          If you start whit http://blog.springsource.com/2011/01...th-spring-mvc/, from 0 spring experience you gonna be confused on "how to do the things" in STS(i was confused), may be its only my appreciation, or i get the wrong way to start to lear this technology.

          Im a junior developer, and come from c# Asp.Net MVC, i feel comfortable with java code, but i getting loss without an standarized packages, folders, resources, and all project organization. (check Kram's, Mykong's, and 3 pages of Googling tutorials)

          Please don't see this like a bad critic, that is not my intention.

          If you try to develop with netbeans or STS, you can see diferences with spring's templates, and if you add that to the custom personalization of the project structure from each tutorial writer, the partials project's on source code zip's, it's consumes a lot of time to learn. I didn't know the existence of Gradle till i read your reply, may be my fault i don't read all the doc's of spring.

          I can suggest a new section for forum? "Spring Basics and Tip's for Dummies".

          Another time, thank's for your time and your fast response.

          Comment

          Working...
          X