Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » JPA Activation
JPA Activation [message #434369] Tue, 03 April 2007 12:14 Go to next message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hello,

I added an Entity annotation to a class, which is accepted after
including the toplink-essentials.jar, but the Dali views remain empty.
Also I don't get the expected "Entity does not have an Id".

I read the tutorial, but I didn't found that "Add Java Persistence" in
the Package Explorer context menu.
I recognized the "New JPA Project" in the file menu but I want to use
JPA in an *existing* project. How can I activate JPA in an arbitrary
project?

Thanks,
Gereon
Re: JPA Activation [message #434370 is a reply to message #434369] Wed, 04 April 2007 01:12 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi,

It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
there is a "New JPA Project" menu item. The tutorial was made for Dali
0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
in the functionality.

Currently we do not have a way to add the Java Persistence functionality
to an existing Java project. This is a result of our move to providing
JPA functionality as a project Facet, which is a Web Tools concept. It
allows a user to configure a project with an array of functionality
together in the same project. One current limitation in our tooling is
converting an existing Java project to a faceted JPA project. Once we can
do this, we can add back this functionality from 0.5.

So, for now, the only way to get JPA tooling functionality in 1.0 is to
create a new JPA project, or add the JPA facet to an applicable Java EE or
Web project.

Neil

Gereon Fassbender wrote:

> Hello,

> I added an Entity annotation to a class, which is accepted after
> including the toplink-essentials.jar, but the Dali views remain empty.
> Also I don't get the expected "Entity does not have an Id".

> I read the tutorial, but I didn't found that "Add Java Persistence" in
> the Package Explorer context menu.
> I recognized the "New JPA Project" in the file menu but I want to use
> JPA in an *existing* project. How can I activate JPA in an arbitrary
> project?

> Thanks,
> Gereon
Re: JPA Activation [message #434371 is a reply to message #434370] Wed, 04 April 2007 07:57 Go to previous messageGo to next message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

ok I see. I think it's a flaw of the Eclipse platform that there is no
smart way to activate/deactivate plugins for a project. Ideally there
should be only one "New Project" menu item and you should be able to
easily mix arbitrary plugins as you like - and as your project grows -
and as your mind/requirements/... changes.
You can only create a project once.
I don't see JPA associated with Java EE or Web applications, it is
independent.

But I am very happy about the existence of Dali. I guess I will create a
new project to try it out...

Gereon


Neil Hauge wrote:
> Hi,
>
> It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
> there is a "New JPA Project" menu item. The tutorial was made for Dali
> 0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
> in the functionality.
> Currently we do not have a way to add the Java Persistence functionality
> to an existing Java project. This is a result of our move to providing
> JPA functionality as a project Facet, which is a Web Tools concept. It
> allows a user to configure a project with an array of functionality
> together in the same project. One current limitation in our tooling is
> converting an existing Java project to a faceted JPA project. Once we
> can do this, we can add back this functionality from 0.5.
>
> So, for now, the only way to get JPA tooling functionality in 1.0 is to
> create a new JPA project, or add the JPA facet to an applicable Java EE
> or Web project.
> Neil
>
> Gereon Fassbender wrote:
>
>> Hello,
>
>> I added an Entity annotation to a class, which is accepted after
>> including the toplink-essentials.jar, but the Dali views remain empty.
>> Also I don't get the expected "Entity does not have an Id".
>
>> I read the tutorial, but I didn't found that "Add Java Persistence" in
>> the Package Explorer context menu.
>> I recognized the "New JPA Project" in the file menu but I want to use
>> JPA in an *existing* project. How can I activate JPA in an arbitrary
>> project?
>
>> Thanks,
>> Gereon
>
>
Re: JPA Activation [message #434372 is a reply to message #434371] Wed, 04 April 2007 13:49 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Gereon,

There are actually a couple of different concepts here that can confuse
the issue. Eclipse does allow you to activate/deactivate plugins for your
workspace, but this is different for actual project types as you suggest.
To understand project types, you have to look at the Project Nature
concept. It is possible to combine different natures, but only where the
plugin creator has chosen to allow it, and there is no way to manage these
once they are added.

A newer concept for Natures is a Facet, which is currently being used
throughout the WTP Project. It provides a mechanism that allows for
multiple types of functionality to exist in a project in a more cohesive
manner. That is to say that the Facets can more intelligently coexist.
This concept may move down the Eclipse stack in the future, but for now
only exists in WTP. I think this is the functionality you are wishing was
at the platform level. It allows functionality on a project to be
activated or deactivated per the user's request.

> I don't see JPA associated with Java EE or Web applications, it is
> independent.

If you create a J2EE->Application Client Project, Utility Project,
Web->Dynamic Web Project, on the Project Facet configuration page you will
see the check-box to add the JPA Facet, thus adding JPA functionality to
the project.

Neil

Gereon Fassbender wrote:

> Hi Neil,

> ok I see. I think it's a flaw of the Eclipse platform that there is no
> smart way to activate/deactivate plugins for a project. Ideally there
> should be only one "New Project" menu item and you should be able to
> easily mix arbitrary plugins as you like - and as your project grows -
> and as your mind/requirements/... changes.
> You can only create a project once.
> I don't see JPA associated with Java EE or Web applications, it is
> independent.

> But I am very happy about the existence of Dali. I guess I will create a
> new project to try it out...

> Gereon


> Neil Hauge wrote:
>> Hi,
>>
>> It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
>> there is a "New JPA Project" menu item. The tutorial was made for Dali
>> 0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
>> in the functionality.
>> Currently we do not have a way to add the Java Persistence functionality
>> to an existing Java project. This is a result of our move to providing
>> JPA functionality as a project Facet, which is a Web Tools concept. It
>> allows a user to configure a project with an array of functionality
>> together in the same project. One current limitation in our tooling is
>> converting an existing Java project to a faceted JPA project. Once we
>> can do this, we can add back this functionality from 0.5.
>>
>> So, for now, the only way to get JPA tooling functionality in 1.0 is to
>> create a new JPA project, or add the JPA facet to an applicable Java EE
>> or Web project.
>> Neil
>>
>> Gereon Fassbender wrote:
>>
>>> Hello,
>>
>>> I added an Entity annotation to a class, which is accepted after
>>> including the toplink-essentials.jar, but the Dali views remain empty.
>>> Also I don't get the expected "Entity does not have an Id".
>>
>>> I read the tutorial, but I didn't found that "Add Java Persistence" in
>>> the Package Explorer context menu.
>>> I recognized the "New JPA Project" in the file menu but I want to use
>>> JPA in an *existing* project. How can I activate JPA in an arbitrary
>>> project?
>>
>>> Thanks,
>>> Gereon
>>
>>
Re: JPA Activation [message #434373 is a reply to message #434372] Thu, 05 April 2007 07:58 Go to previous messageGo to next message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

I know the concept of Natures but not Facets. What would be cool if you
for example get a list of all installed plugins in the project
properties and could activate/deactivate them as you like. And then the
numerous "New XY-Project" would be obsolete. Maybe Facets would be a
good solution because they have such a list.
Another problem of the "New XY-Project" items is that many plugin
tutorials require to use them.


>> I don't see JPA associated with Java EE or Web applications, it is
>> independent.
>
> If you create a J2EE->Application Client Project, Utility Project,
> Web->Dynamic Web Project, on the Project Facet configuration page you
> will see the check-box to add the JPA Facet, thus adding JPA
> functionality to the project.

Ohh sorry this was a misunderstanding. My English is bad (I'm German :)
I think database connection functionality is not only needed in JEE or
Web applications, it is independent. And JPA is designed to be
independent of JEE. That's a good thing. So ideally your plugin will be
independent too. The possibility in the future to activate it in any
project (not just JPA, JEE, Web) will be sufficient.

I myself created a new JPA-Project now. The perspective and views are
there, but maybe the plugin is still not working correctly. For example
I still don't get a error message when I have no ID defined (as told in
the tutorial) or when I don't make my entity class Serializable, I get
no messages in the Problem View at all.

Is there a legend for the JPA Structure View icons somewhere? (Tooltips
would be cool)

At least I managed to get my entity persisted in my database by
extending the persistence.xml and using the Glassfish/Toplink API.

Gereon
Re: JPA Activation [message #434374 is a reply to message #434373] Thu, 05 April 2007 14:00 Go to previous messageGo to next message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Luckily your English is much better than my German. :)

> I myself created a new JPA-Project now. The perspective and views are
> there, but maybe the plugin is still not working correctly. For example
> I still don't get a error message when I have no ID defined (as told in
> the tutorial) or when I don't make my entity class Serializable, I get
> no messages in the Problem View at all.

> Is there a legend for the JPA Structure View icons somewhere? (Tooltips
> would be cool)

Okay...I am guessing you are using 1.0 M5? We didn't have all of the
validation re-implemented for M5, but we have most of it (including the ID
validation) in M6, which should be available tomorrow.

We don't have a legend for the icons yet, but they will be in the new 1.0
docs that are being developed now. And yes, we should get some tool tips
in there as well.

Give M6 a try when you can and be sure to post some feedback to the forum
to let us know how things are going.

Thanks for the feedback,
Neil
Re: JPA Activation [message #434375 is a reply to message #434374] Thu, 05 April 2007 17:56 Go to previous message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

yes I'm using wtp-jpa-sdk-S-2.0M5-200702230758.zip which should be Dali
1.0M5
ok great, I will try out M6.

Gereon


Neil Hauge wrote:
> Luckily your English is much better than my German. :)
>
>> I myself created a new JPA-Project now. The perspective and views are
>> there, but maybe the plugin is still not working correctly. For
>> example I still don't get a error message when I have no ID defined
>> (as told in the tutorial) or when I don't make my entity class
>> Serializable, I get no messages in the Problem View at all.
>
>> Is there a legend for the JPA Structure View icons somewhere?
>> (Tooltips would be cool)
>
> Okay...I am guessing you are using 1.0 M5? We didn't have all of the
> validation re-implemented for M5, but we have most of it (including the
> ID validation) in M6, which should be available tomorrow.
>
> We don't have a legend for the icons yet, but they will be in the new
> 1.0 docs that are being developed now. And yes, we should get some tool
> tips in there as well.
>
> Give M6 a try when you can and be sure to post some feedback to the
> forum to let us know how things are going.
> Thanks for the feedback,
> Neil
>
Re: JPA Activation [message #593434 is a reply to message #434369] Wed, 04 April 2007 01:12 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi,

It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
there is a "New JPA Project" menu item. The tutorial was made for Dali
0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
in the functionality.

Currently we do not have a way to add the Java Persistence functionality
to an existing Java project. This is a result of our move to providing
JPA functionality as a project Facet, which is a Web Tools concept. It
allows a user to configure a project with an array of functionality
together in the same project. One current limitation in our tooling is
converting an existing Java project to a faceted JPA project. Once we can
do this, we can add back this functionality from 0.5.

So, for now, the only way to get JPA tooling functionality in 1.0 is to
create a new JPA project, or add the JPA facet to an applicable Java EE or
Web project.

Neil

Gereon Fassbender wrote:

> Hello,

> I added an Entity annotation to a class, which is accepted after
> including the toplink-essentials.jar, but the Dali views remain empty.
> Also I don't get the expected "Entity does not have an Id".

> I read the tutorial, but I didn't found that "Add Java Persistence" in
> the Package Explorer context menu.
> I recognized the "New JPA Project" in the file menu but I want to use
> JPA in an *existing* project. How can I activate JPA in an arbitrary
> project?

> Thanks,
> Gereon
Re: JPA Activation [message #593451 is a reply to message #434370] Wed, 04 April 2007 07:57 Go to previous message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

ok I see. I think it's a flaw of the Eclipse platform that there is no
smart way to activate/deactivate plugins for a project. Ideally there
should be only one "New Project" menu item and you should be able to
easily mix arbitrary plugins as you like - and as your project grows -
and as your mind/requirements/... changes.
You can only create a project once.
I don't see JPA associated with Java EE or Web applications, it is
independent.

But I am very happy about the existence of Dali. I guess I will create a
new project to try it out...

Gereon


Neil Hauge wrote:
> Hi,
>
> It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
> there is a "New JPA Project" menu item. The tutorial was made for Dali
> 0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
> in the functionality.
> Currently we do not have a way to add the Java Persistence functionality
> to an existing Java project. This is a result of our move to providing
> JPA functionality as a project Facet, which is a Web Tools concept. It
> allows a user to configure a project with an array of functionality
> together in the same project. One current limitation in our tooling is
> converting an existing Java project to a faceted JPA project. Once we
> can do this, we can add back this functionality from 0.5.
>
> So, for now, the only way to get JPA tooling functionality in 1.0 is to
> create a new JPA project, or add the JPA facet to an applicable Java EE
> or Web project.
> Neil
>
> Gereon Fassbender wrote:
>
>> Hello,
>
>> I added an Entity annotation to a class, which is accepted after
>> including the toplink-essentials.jar, but the Dali views remain empty.
>> Also I don't get the expected "Entity does not have an Id".
>
>> I read the tutorial, but I didn't found that "Add Java Persistence" in
>> the Package Explorer context menu.
>> I recognized the "New JPA Project" in the file menu but I want to use
>> JPA in an *existing* project. How can I activate JPA in an arbitrary
>> project?
>
>> Thanks,
>> Gereon
>
>
Re: JPA Activation [message #593457 is a reply to message #434371] Wed, 04 April 2007 13:49 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Hi Gereon,

There are actually a couple of different concepts here that can confuse
the issue. Eclipse does allow you to activate/deactivate plugins for your
workspace, but this is different for actual project types as you suggest.
To understand project types, you have to look at the Project Nature
concept. It is possible to combine different natures, but only where the
plugin creator has chosen to allow it, and there is no way to manage these
once they are added.

A newer concept for Natures is a Facet, which is currently being used
throughout the WTP Project. It provides a mechanism that allows for
multiple types of functionality to exist in a project in a more cohesive
manner. That is to say that the Facets can more intelligently coexist.
This concept may move down the Eclipse stack in the future, but for now
only exists in WTP. I think this is the functionality you are wishing was
at the platform level. It allows functionality on a project to be
activated or deactivated per the user's request.

> I don't see JPA associated with Java EE or Web applications, it is
> independent.

If you create a J2EE->Application Client Project, Utility Project,
Web->Dynamic Web Project, on the Project Facet configuration page you will
see the check-box to add the JPA Facet, thus adding JPA functionality to
the project.

Neil

Gereon Fassbender wrote:

> Hi Neil,

> ok I see. I think it's a flaw of the Eclipse platform that there is no
> smart way to activate/deactivate plugins for a project. Ideally there
> should be only one "New Project" menu item and you should be able to
> easily mix arbitrary plugins as you like - and as your project grows -
> and as your mind/requirements/... changes.
> You can only create a project once.
> I don't see JPA associated with Java EE or Web applications, it is
> independent.

> But I am very happy about the existence of Dali. I guess I will create a
> new project to try it out...

> Gereon


> Neil Hauge wrote:
>> Hi,
>>
>> It would appear that you are using the 1.0 (WTP 2.0) Dali Tools since
>> there is a "New JPA Project" menu item. The tutorial was made for Dali
>> 0.5 and hasn't yet been updated for 1.0, so there may be inconsistencies
>> in the functionality.
>> Currently we do not have a way to add the Java Persistence functionality
>> to an existing Java project. This is a result of our move to providing
>> JPA functionality as a project Facet, which is a Web Tools concept. It
>> allows a user to configure a project with an array of functionality
>> together in the same project. One current limitation in our tooling is
>> converting an existing Java project to a faceted JPA project. Once we
>> can do this, we can add back this functionality from 0.5.
>>
>> So, for now, the only way to get JPA tooling functionality in 1.0 is to
>> create a new JPA project, or add the JPA facet to an applicable Java EE
>> or Web project.
>> Neil
>>
>> Gereon Fassbender wrote:
>>
>>> Hello,
>>
>>> I added an Entity annotation to a class, which is accepted after
>>> including the toplink-essentials.jar, but the Dali views remain empty.
>>> Also I don't get the expected "Entity does not have an Id".
>>
>>> I read the tutorial, but I didn't found that "Add Java Persistence" in
>>> the Package Explorer context menu.
>>> I recognized the "New JPA Project" in the file menu but I want to use
>>> JPA in an *existing* project. How can I activate JPA in an arbitrary
>>> project?
>>
>>> Thanks,
>>> Gereon
>>
>>
Re: JPA Activation [message #593470 is a reply to message #434372] Thu, 05 April 2007 07:58 Go to previous message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

I know the concept of Natures but not Facets. What would be cool if you
for example get a list of all installed plugins in the project
properties and could activate/deactivate them as you like. And then the
numerous "New XY-Project" would be obsolete. Maybe Facets would be a
good solution because they have such a list.
Another problem of the "New XY-Project" items is that many plugin
tutorials require to use them.


>> I don't see JPA associated with Java EE or Web applications, it is
>> independent.
>
> If you create a J2EE->Application Client Project, Utility Project,
> Web->Dynamic Web Project, on the Project Facet configuration page you
> will see the check-box to add the JPA Facet, thus adding JPA
> functionality to the project.

Ohh sorry this was a misunderstanding. My English is bad (I'm German :)
I think database connection functionality is not only needed in JEE or
Web applications, it is independent. And JPA is designed to be
independent of JEE. That's a good thing. So ideally your plugin will be
independent too. The possibility in the future to activate it in any
project (not just JPA, JEE, Web) will be sufficient.

I myself created a new JPA-Project now. The perspective and views are
there, but maybe the plugin is still not working correctly. For example
I still don't get a error message when I have no ID defined (as told in
the tutorial) or when I don't make my entity class Serializable, I get
no messages in the Problem View at all.

Is there a legend for the JPA Structure View icons somewhere? (Tooltips
would be cool)

At least I managed to get my entity persisted in my database by
extending the persistence.xml and using the Glassfish/Toplink API.

Gereon
Re: JPA Activation [message #593483 is a reply to message #434373] Thu, 05 April 2007 14:00 Go to previous message
Neil Hauge is currently offline Neil HaugeFriend
Messages: 475
Registered: July 2009
Senior Member
Luckily your English is much better than my German. :)

> I myself created a new JPA-Project now. The perspective and views are
> there, but maybe the plugin is still not working correctly. For example
> I still don't get a error message when I have no ID defined (as told in
> the tutorial) or when I don't make my entity class Serializable, I get
> no messages in the Problem View at all.

> Is there a legend for the JPA Structure View icons somewhere? (Tooltips
> would be cool)

Okay...I am guessing you are using 1.0 M5? We didn't have all of the
validation re-implemented for M5, but we have most of it (including the ID
validation) in M6, which should be available tomorrow.

We don't have a legend for the icons yet, but they will be in the new 1.0
docs that are being developed now. And yes, we should get some tool tips
in there as well.

Give M6 a try when you can and be sure to post some feedback to the forum
to let us know how things are going.

Thanks for the feedback,
Neil
Re: JPA Activation [message #593496 is a reply to message #434374] Thu, 05 April 2007 17:56 Go to previous message
Gereon Fassbender is currently offline Gereon FassbenderFriend
Messages: 16
Registered: July 2009
Junior Member
Hi Neil,

yes I'm using wtp-jpa-sdk-S-2.0M5-200702230758.zip which should be Dali
1.0M5
ok great, I will try out M6.

Gereon


Neil Hauge wrote:
> Luckily your English is much better than my German. :)
>
>> I myself created a new JPA-Project now. The perspective and views are
>> there, but maybe the plugin is still not working correctly. For
>> example I still don't get a error message when I have no ID defined
>> (as told in the tutorial) or when I don't make my entity class
>> Serializable, I get no messages in the Problem View at all.
>
>> Is there a legend for the JPA Structure View icons somewhere?
>> (Tooltips would be cool)
>
> Okay...I am guessing you are using 1.0 M5? We didn't have all of the
> validation re-implemented for M5, but we have most of it (including the
> ID validation) in M6, which should be available tomorrow.
>
> We don't have a legend for the icons yet, but they will be in the new
> 1.0 docs that are being developed now. And yes, we should get some tool
> tips in there as well.
>
> Give M6 a try when you can and be sure to post some feedback to the
> forum to let us know how things are going.
> Thanks for the feedback,
> Neil
>
Previous Topic:Dali Webinar Apr. 18
Next Topic:WTP 2.0 M6 has been declared
Goto Forum:
  


Current Time: Fri Apr 19 23:46:04 GMT 2024

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

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

Back to the top