diagramTypeProvider must not be null - eclipse

I am creating a spring mvc using maven and Hibernate as its database, I have a problem on JPA diagram editor I am using Eclipse mars.
After I enable the JPA in the project facets and added an entity in the persistence.xml, every time I click on the Open diagram it shows an error
diagramTypeProvider must not be null

Sadly, you have discovered a bug in Mars: https://bugs.eclipse.org/bugs/show_bug.cgi?id=472835
Follow the instructions there for a workaround.

Install Graphiti 0.11.4.v20150701-1432 from http://download.eclipse.org/graphiti/updates/0.11.4

Related

Spring boot jpa tool is not available in STS(Spring Tool Suite) for converting tables to entities

Here i am working in Spring boot in Spring tool Suite.I want to convert an Oracle databse tables to JPA Class Entites. But i did not get any JPA tools in project_folder ->jpa tools. What i have to do can you please suggest a better solution. Thanks
Create a JPA project like so
File -> New -> JPA Project(Go to Others if JPA projects is not here)
After you have created your JPA project you can right click the project in the Project Explorer
Project Explorer -> Right-Click -> JPA Tools -> Generate Entities from Tables
Hope this helps.
Update 1
If you are not getting options of creating a JPA project in your eclipse you might not be having the required tools for JPA support. Check this.
You can go to "Install New Software", select the Eclipse Oxygen Update
Site, and then search for the JPA tooling - and install it from there.
This brings back the JPA tooling.
In order to Install New Software, go to Help\Install New Software..., select the Eclipse Oxygen Update Site: https://download.eclipse.org/releases/oxygen/, and then search for the JPA tooling.
Eclipse Projects created as 'Spring Boot - Spring Starter Project' are not-faceted projects per default. Therefore there don't have the JPA-facet which offers the Wizzard to generate JPA entities from tables.
You need to add the JPA-Project Facet to your project.
Project > Properties > Project Facets > JPA
If your project is not configured to use project facets, you'll get a message asking if you want to convert it to a faceted project.
Help -> Install New Software -> work with https://download/eclispe.org/releases/2019-03 -> filter 'JPA' ->
Uncheck 'Contact all update sites during install to find required software'
Try installing Jboss toll from marketplace, I had same issue and it is fixed now.

Configure STS with JPA 2.0 using PostgreSQL 9.3

I have an old Spring MVC project which I used to run with Eclipse on JBoss and using JPA 2.0 with (I believe) a PostgreSQL 9.1 DB. Also using Maven as dependencies resolver.
I managed to get the project back from an HDD crash but I couldn't get it to run properly using Eclipse/Tomcat so I thought I might use the opportunity to start using STS (Spring Tool Suite) and get a clean project and just re-insert the code where it belongs.
Sadly, I'm stuck at the very beginning... I created a Spring MVC project with Maven support, but can't set up the JPA 2.0 part.
I went to Project > Properties > Project Facets, checked JPA and clicked on the freshly appeared link "Further configuration required...".
This brought me to the JPA Facet configuration panel where I can choose from two platforms "Generic 2.1" and "EclipseLink 2.5.x". I could only find some noSQL and Oracle support for EclipseLink so I thought I would go for Generic 2.1 (does that mean it's JPA 2.1 ?).
Now I can choose a JPA implementation "User Library" or "Disable Library Configuration".
I tried importing the .jar defined by this maven dependency:
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
But it just tells me "The class 'javax.persistence.Convert' is required to be in the selected libraries".
Maybe Hibernate's version of JPA isn't "Generic 2.1" compliant ?
I've seen a few times "you need to download Hibernate tools" but that didn't change anything.
Also, when I try to create a connection using PostgreSQL, I don't have any driver to choose from and if I want to add one, the only one I'm allowed to add is a jdbc-postgres-8.x driver.
After clicking the "Further configuration required..." link, click the download icon
to the right of the (probably empty) list. That will give you a set of libraries that
you can select and download and then choose from afterwards, such as an EclipseLink library.
See the screenshot

Eclipse "Project does not have a recognized JPA platform: hiberate2_0"

Move an EE project from Eclipse Indigo to Juno and get this error. Have anyone seen this? Where should I start looking?
If you need more info, just let me know.
ANSWER: Just want to put in the exact solution based on the suggested by Brian Vosburgh.
The problem in my case is that the JPA facet does not have a JBoss runtime associated with it. So I go to the Project Facets setup and select JPA and select the desired Runtime.
This likely because your Indigo workspace built a JPA project for the Hibernate platform using the JBoss Tools extension of Dali (which is the Eclipse plug-in that provides JPA mapping support). You need to use the Juno version of JBoss Tools.

How to specify Library Provided at Runtime for Hibernate - Eclipse Dali JPA integration

I am trying to add Eclipse Dali JPA integration and to specify Hibernate as the JPA implementation. I have gathered different instructions but am struggling with specifying the user library when configuring the project facet. The page here (http://docs.redhat.com/docs/en-US/JBoss_Developer_Studio/4.0/html/Hibernate_Tools_Reference_Guide/dali_integration.html) shows an option that says Library Provided by Target Runtime but I don't have this option. I have User Library and Disable Library Configuration. I'd rather not download the hibernate jars and store them separately for eclipse configuration when I already have them specified in the project with maven. And the disable option leaves the configuration in error.
Anyone have any tips for getting that option or another suggested Hibernate/JPA configuration within Eclipse?
Thanks all.
If you are already doing library management with Maven and m2e, you should select Disable Library Configuration option. Yours is exactly the scenario that option was intended for. If you specify the errors you get when you follow this approach, someone may be able to help find the complete solution.
Alternatively, follow the User Library option and create a user library using the Hibernate jars you already have locally. There is no need to re-download them.

Where to find the "user library" for the Eclipse JPA Facet with for GlassFish 3.1.2?

I have Eclipse (Indigo) and GlassFish 3.1.2
The "New JPA Project" wizard has the error "At least one user library must be selected." But there's nothing in the list.
Is there already a JPA implementation in the GlassFish directory, and I should create a User Library that points to it? Or should I use the download option and get the latest version of Eclipse Link from the web?
Just wondering what is the 'right' way to make the error go away.
Thanks,
Rob
The following worked for me:
Click on the 'arrow down with the disk' icon on the right side, and download the latest EclipseLink.
Select OK on the screen and you are ready!
You need to have a lot of jars for JSF2.0 Project.
You can use two sort of library to implement JSF2.0:
1) Mojarra
2) MyFaces
Read this excelent tutorial :
http://help.eclipse.org/helios/index.jsp?topic=%2Forg.eclipse.jst.jsf.doc.user%2Fhtml%2Fgettingstarted%2Ftutorial%2FJSFTools_tutorial_JSF20.html
In this tutorial you will understand why you need a user librabry with JSF specific library.
Good reading.
Glassfish does contain required JPA implementation files. Adding following files to a user library should solve the problem.
glassfish_dir/glassfish/modules/javax.persistence.jar
glassfish_dir/glassfish/modules/org.eclipse.persistence.core.jar
glassfish_dir/glassfish/modules/org.eclipse.persistence.jpa.jar