I have found one eclipse plugin (DB Importer) for Hibernate, which helps to generate annotation based Java Entity classes direct from data base. So that we no need to write any annotation configuration for hibernate Entities.It works very fine.
The tool is available here
I would like to know
Is this tool is really used in industries?
Is there any disadvantages by using this tool?
I am asking these questions because, i did not find much information regarding this tool.
Please correct me if i am asking wrong.
If you simply want to generate entities from an existing database, I think you are much better off using the hibernate tools which are created and maintained by the Hibernate team (see the reverse engineering tool).
It's been a while since I've used it but from memory you can invoke the reverse engineering from ant/maven/gradle or you can install the jboss tools eclipse plugin and invoke from eclipse. I'm sure you can allso invoke from the command line.
I just got a book from Apress (Spring Recipes), and I started to learn the Spring framework and now I have a problem. I followed the steps in the book to add the Spring .jar-s to the build path. Everything seems to work fine, but the code I have just doesn't work.
My question is that: do you know about a good tutorial for integrating Spring with Eclipse? I googled for a while and I only found old tutorials (from 2007-2009) which just doesn't work with Eclipse 3.6.
use STS - Spring Tool Suite. It is built-upon Eclipse IDE. http://www.springsource.com/developer/sts
STS helps hugely (you can get it from the Eclipse Marketplace for free). The features of it I particularly like? Here's a few:
As a user of XML-based configuration I love having the bean graph visualized – it's great for reports – but the content assist when filling out bean properties is invaluable, both for names and for values (i.e., it makes writing that much XML not suck too much). I imagine that if you're heavily using autowiring or Java configuration it's less useful.
Refactoring support is also good (these days; it used to have bad bugs so you want to be patched up to date) and I've found that the pointcut search to be the only way to write a complex aspect without lots of round-trip testing.
But not all of STS is perfect. In particular, some of the content assist modes don't (seem to) help (me) that much, and it really only works well if you have your properties defined using public setters. Still, it helps a lot…
Apart from using STS as suggested, you can use spring and eclipse without any integration. There isn't that much an IDE integration can offer anyway (apart from autocompletion in the xml, and linking the xml to classes (inclding aop))
I am trying to created a new java project. I have tried various examples available on the web but my project works sometimes and doesn't rest of the time. It seems that there happens some error which is not thrown when hibernate is doing a secondPassCompile() after creating factory.Can someone tell me a good resource to follow or give me some pointers on where I might be going wrong?
Is there any particular reason for using Tomcat? If you are trying to learn Eclipse with Hibernate as the JPA implementation, I would suggest you use JBoss as the app server. That way you can learn EJBs along the way if you prefer. If you want to learn just Eclipse and JPA there is no need to use any server - JPA can be practised just in JavaSE.
EDIT: Recently I had to create a simple JPA project. This is what I did: Create a new Java Project in eclipse. Download Hibernate 3.6.1 from http://www.hibernate.org/downloads. From the download directory take the Hibernate.jar and from the jpa directory take the one jar there. Take all the jars from lib\required. Add the above to your buildpath. Add logback jars - classic and core jars. For the database I used HSQLDB. Just one jar hsqldb.jar. Thats it! Enjoy JPA from here onwards.
I have found the slides at http://www.coreservlets.com/ very useful when trying to get up to date with EJB3/Hibernate and JSF. Complete and yet simple enough that you do not get ovewelmed by pages and pages of sample code. I wish they had something like that for MFC.
They have materials about Hibernate, I would definitely look at them.
About the JBoss issue, it is interesting if you plan to go into EJB3 later. It is not difficult to have a basic configuration working and, on top of that, it is based in Tomcat.
That said, if you are new to Hibernate, I would definitely test it first in JavaSE and then later go with it in a server (Tomcat or whatever).
I am looking for plugins which make developer's life easy while using technologies like Struts/ Spring/ Hibernate. For instance, here is a requirement:
If I were to change an Struts Action, I should be able to list out all the Struts Actions for my webapp, right click and add a method/ do some changes.
So, basically, I need to know what plugins will make eclipse more 'technology/framework friendly'.
Appreciate your help!
I've heard good things about Spring IDE. It has support for the Spring basics plus a few associated libraries, and is available as an Eclipse plugin download from http://springide.org/updatesite/. Once installed, you apply a Spring nature to the project in order to use it.
Hibernate also has Hibernate Tools available, but I've never checked that out to see how it works. From the description, it apparently offers some functions to make creating and editing mapping files easier.
As far as I can tell, Struts doesn't have anything up-to-date as far as IDE plugins go. MyEclipse may have something like that.
Side note: for some reason, I've never stuck with the plugins for these libraries. I gave the Spring one a try once, but eventually got used to editing the Spring configs manually and haven't touched it in a while. I don't know how much of a benefit they would be for increasing config file creation... although they probably would help in visualizing dependencies in a big set of Spring configs.
Spring tools suite is great for this. You might also look into Fast Code Eclipse Plugin
If you don't mind paying the price ($31.75 for standard, $63.55 for pro), you could check out MyEclipse. This is a nice and powerful "extension" of Eclipse that has many nice features, including Spring Tools, Struts (and Struts 2), Hibernate and many more.
I'm aware of the built in code generation and refactoring one can do with the "Source" and "Refactor" menu items in Eclipse.
I also use the Commonclipse plugin to easily make use of the Apache Commons classes that build hashCode, toString, equals methods.
What other plugins or tools should I be aware of for generating Java source easily under the Eclipse IDE?
Telosys ( https://www.telosys.org/ ) is a simple and efficient tool for Java code generation.
This code generator is available as an Eclipse Plugin (https://marketplace.eclipse.org/content/telosys-tools) and also as a Command Line Interface (https://doc.telosys.org/telosys-cli).
The model defining all the entities can be created from scratch or from an existing database.
The templates are based on Velocity (https://velocity.apache.org/) and can be downloaded from GitHub. All the templates are customizable and new templates can be created from scratch if necessary.
Existing templates can generate code forJPA, Spring MVC, Database documentation, REST API, etc.
You can look at http://fast-code.sourceforge.net/ for spring based applications. You can create FooService and FooServiceImpl and the configurations just by typing foo. It has nice way to create unit tests as well. One can see all the templates here : http://fast-code.sourceforge.net/templates-config.xml
Project Lombok enables you to effectively code in shorthand. For example, you can declare a class, add a lombok annotation, and it will automatically generate getters, setters, equals, hashCode, toString, and constructors.
Eclipse Xtend is a very powerful code generator that, among other things, supports closures and data classes - automatic getters/setters/hashCode/equals.
If your are interested in going a bit further with code generation and getting into model driven software development you should have a look at openArchitectureWare.
If you work through the Getting Started tutorial you should get up to speed pretty quickly.
Here are three java code generators that you may find interesting :
picocog : A tiny code generation library (< 8 KB) written in Java, useful for any purpose, but ideal for JSR-269. There are tutorials available at dev.to and dzone.com.
The JmrTeam generator : Jet Model Robotization available for Eclipse (coming soon for IDEA), useful for managing and generating code in any kind of project(Maven, Gradle, Java, Python, Php etc.), any kind of framework(springboot/spring/springMVC, React/ Vue/Angular, hibernate, mybatis, struts, JPA etc.).
javapoet : A Java API for generating .java source files.
jhipster :An open Source application platform for creating Spring Boot + Angular/React/Vue projects. The generator source code is available here
It really depends on what you want to do? J2EE, web services, Swing ...
I do a lot of web service development and rely heavily on:
Web Services Explorer
For Axis2 development:
Code Generator Wizard Guide for Eclipse Plug-in
Service Archive Generator Wizard Guide for Eclipse Plug-in
There's a good tutorial on Axis2 plugins called Developing Web Services Using Apache Axis2 Eclipse Plugins - Part 1
I don't think that this is really what you're asking about, but for model driven development, I think Borland's Together is still the best eclipse based tool out there.
I just released my personal Java code generator: JCG. You can find it at
https://github.com/makkax/JavaCodeGenerator
It's a generator written in Java where you directly code all Java types, fields, methods & annotations without the need of templates.
With JCG you can easily generate any number of Java types with complex interdependencies.
I don't know if you're a big UML fan but IBM Rational suite is extremly powerful.
I used it to move from UML to generated mock objects but that's only a slight part of what it can do
If you want to generate code independent of technology, Zontroy is a good choice. So you don't need to think about whether your project is a JavaEE project or not. You can generate any file in any technology from your database.
jsoncafe.com online code generator for the model class for JAVA, Android Gson, Swift Class, Swift Codable, c# etc.