Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » can't add java persistence to java project
can't add java persistence to java project [message #434577] Thu, 06 September 2007 14:57 Go to next message
Tim is currently offline Tim
Messages: 18
Registered: July 2009
Junior Member
Hello

I installed Eclipse 3.3.0, JRE 1.5, Java Persistence API
(toplink-essentials.jar) and JBoss v.4.2 runtime server. Connection to my
sql database works and I can create new JPA projects and create entities
from database.

My problem is that I can't create entities from database in my Java
project. I added toplink-essentials.jar to classpath but I still can't
create entities. If I right click on java project, there isn't JPA tools >
Generate entities or anything that I can use for adding entities. Is it
possible to add JPA support to java project and how?

Sometimes When I start Eclipse and I'm using JPA perspective, I get error
"Initializing JPA model... reason: An error occurred while traversing
resources.org.eclipse.jdt.core.dom.QualifiedName cannot be cast to
org.eclipse.jdt.core.dom.ArrayInitializer". Something wrong in my
configuration?
Re: can't add java persistence to java project [message #434578 is a reply to message #434577] Fri, 07 September 2007 17:48 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Tim,

Currently it is not possible to add the JPA functionality to an existing
Java Project. This enhancement is planned for our 2.0 release and is
captured in bug 179054. Starting with a JPA project can accomplish the
same goal of working with Java and JPA, but it would be nice to add JPA to
an existing Java project.

As for the other problem you are seeing, it is a known issue (bug 198934)
that has been fixed for our 1.0.1 maintenance release, scheduled for the
end of September and available now via I-Builds. Once you start using the
new code this problem should be gone.

Neil

Tim wrote:

> Hello

> I installed Eclipse 3.3.0, JRE 1.5, Java Persistence API
> (toplink-essentials.jar) and JBoss v.4.2 runtime server. Connection to my
> sql database works and I can create new JPA projects and create entities
> from database.

> My problem is that I can't create entities from database in my Java
> project. I added toplink-essentials.jar to classpath but I still can't
> create entities. If I right click on java project, there isn't JPA tools >
> Generate entities or anything that I can use for adding entities. Is it
> possible to add JPA support to java project and how?

> Sometimes When I start Eclipse and I'm using JPA perspective, I get error
> "Initializing JPA model... reason: An error occurred while traversing
> resources.org.eclipse.jdt.core.dom.QualifiedName cannot be cast to
> org.eclipse.jdt.core.dom.ArrayInitializer". Something wrong in my
> configuration?
Re: can't add java persistence to java project [message #605518 is a reply to message #434577] Fri, 07 September 2007 17:48 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Tim,

Currently it is not possible to add the JPA functionality to an existing
Java Project. This enhancement is planned for our 2.0 release and is
captured in bug 179054. Starting with a JPA project can accomplish the
same goal of working with Java and JPA, but it would be nice to add JPA to
an existing Java project.

As for the other problem you are seeing, it is a known issue (bug 198934)
that has been fixed for our 1.0.1 maintenance release, scheduled for the
end of September and available now via I-Builds. Once you start using the
new code this problem should be gone.

Neil

Tim wrote:

> Hello

> I installed Eclipse 3.3.0, JRE 1.5, Java Persistence API
> (toplink-essentials.jar) and JBoss v.4.2 runtime server. Connection to my
> sql database works and I can create new JPA projects and create entities
> from database.

> My problem is that I can't create entities from database in my Java
> project. I added toplink-essentials.jar to classpath but I still can't
> create entities. If I right click on java project, there isn't JPA tools >
> Generate entities or anything that I can use for adding entities. Is it
> possible to add JPA support to java project and how?

> Sometimes When I start Eclipse and I'm using JPA perspective, I get error
> "Initializing JPA model... reason: An error occurred while traversing
> resources.org.eclipse.jdt.core.dom.QualifiedName cannot be cast to
> org.eclipse.jdt.core.dom.ArrayInitializer". Something wrong in my
> configuration?
Previous Topic:can't add java persistence to java project
Next Topic:It works, but does not compile (only half a joke!)
Goto Forum:
  


Current Time: Fri Oct 24 10:23:54 GMT 2014

Powered by FUDForum. Page generated in 0.08499 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software