• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts spring hibernate example

 
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am trying below example

http://www.mkyong.com/struts/struts-spring-hibernate-integration-example/

When i do maven clean all is fine.
when i do maven install i am getting below error.

[INFO] Scanning for projects... [INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building StrutsExample Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[INFO] Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom (7 KB at 5.5 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.369 s
[INFO] Finished at: 2016-06-30T22:33:51-04:00
[INFO] Final Memory: 11M/164M
[INFO] ------------------------------------------------------------------------
Failed to execute goal on project StrutsSpringExample: Could not resolve dependencies for project com.mkyong.common:StrutsSpringExample:war:1.0-SNAPSHOT: Failure to find javax.transaction:jta:jar:1.0.1B in http://download.java.net/maven/2/ was cached in the local repository, resolution will not be reattempted until the update interval of Java.Net has elapsed or updates are forced -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException




please advise on how to fix this.
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can check with mvn install -X to see what error details you get
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
<repositories>         <repository>
             <id>Java.Net</id>
             <url>http://download.java.net/maven/2/</url>;
       </repository>
               
     <!--<repository>
           <id>JBoss repository</id>
           <url>http://repository.jboss.com/maven2/</url>;
     </repository>

 --></repositories>


i removed both. one is already commented. still error coming after removed both one uncommented otther commented.


even before removing itself pom giving below error

Missing artifact javax.transaction:jta:jar:1.0.1B


after removing those entries also above error there. please advise
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please advise
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please advise. Is it working for any one else out there?
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Run mvn clean install -X and show us the result. As the error indicates, it means, the dependency is not resolved, we can get the actual reason, if we use -X option.
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can i run in eclipse -X option. Let me try. By the way is this example runs for you lot of people in that link having problems?
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I have not tried that link, that is a 6 year old article. If you are learning Spring and Hibernate, i would recommend you to start from the recent release, for instance, the article you are referring is based on Spring 2.5.x, where as the spring latest release is 4.3.1 and so many things have changed from the 2.5.x release.
 
S Ry
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
try to build the application using maven command with -e flag. it will give you details of the root cause.
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

where as the spring latest release is 4.3.1 and so many things have changed from the 2.5.x release.


where can i get good examples on this?




how to do this in eclipse and outside eclipse. Can you please advise


Run mvn clean install -X


how to do this in eclipse and outside eclipse. Can you please advise
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope you are familiar with Hibernate and now you are trying to integrate Hibernate with Spring Framework. If so, check out the spring's official docs for Hibernate Integration http://docs.spring.io/spring/docs/current/spring-framework-reference/html/orm.html
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
cannot we run that old example. Since it is maven and pom file i should be simply able to import and run right? Not sure why it wont run. Any wy i can tweak my code t run that example?
Please advise
 
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic