You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Tommy Tynjä <to...@diabol.se> on 2014/02/06 14:02:47 UTC

Setting up TomEE in IntelliJ IDEA

Hi all.

I'm trying to setup the TomEE trunk in IntelliJ IDEA but I'm having a hard
time sorting out the dependencies. I can build the project successfully on
my command line but since IntelliJ does something on its own, it doesn't
seem to resolve the dependencies correctly. I've imported the root pom.xml
in the repository.

If I try to run a test case in org.apache.openejb.config.rules
(openejb-core) I get a compilation error in e.g.
org.apache.openejb.core.timer.TimerData, where the
org.apache.openejb.quartz imports can't be resolved.

Do anyone have any ideas on how to resolve this? It would be nice to get
the project to build and test properly from within the IDE.

I'm running IntelliJ IDEA Ultimate 12.1.6 Build #IU-129.1359 with JRE:
1.6.0_37

Best regards,
Tommy Tynjä

Aw: Re: Setting up TomEE in IntelliJ IDEA

Posted by Ingo Mahnke <in...@quvion.org>.
Is openJPA fast enough and usabe in a production environemnt?




> Gesendet: Donnerstag, 06. Februar 2014 um 14:41 Uhr
> Von: "Romain Manni-Bucau" <rm...@gmail.com>
> An: "dev@tomee.apache.org" <de...@tomee.apache.org>, andy.gumbrecht@orprovision.com
> Betreff: Re: Aw: Setting up TomEE in IntelliJ IDEA
>
> same here but I got at least one issue by hibernate release (broken
> compatibility with one database, broken impl, ...). I now use OpenJPA
> happily :)
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 
> 2014-02-06 Andy <an...@orprovision.com>:
> > I'd be interested to know what issues you had with Hibernate? I have used
> > this in production for many years with no serious issues.
> >
> > Andy.
> >
> 

Re: Aw: Setting up TomEE in IntelliJ IDEA

Posted by Romain Manni-Bucau <rm...@gmail.com>.
same here but I got at least one issue by hibernate release (broken
compatibility with one database, broken impl, ...). I now use OpenJPA
happily :)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-06 Andy <an...@orprovision.com>:
> I'd be interested to know what issues you had with Hibernate? I have used
> this in production for many years with no serious issues.
>
> Andy.
>

Re: Aw: Re: Setting up TomEE in IntelliJ IDEA

Posted by Tommy Tynjä <to...@diabol.se>.
Thank you for the quick and valuable feedback! I got it working by opening
the submodules independently and making sure to use the main profile only.

Best regards,
Tommy Tynjä


On Thu, Feb 6, 2014 at 3:31 PM, Andy <an...@orprovision.com> wrote:

> Ah OK, that's because 4.3.1.Final is JPA 2.1.
>
> Using 4.2.8.Final would resolve the issue.
>
> Andy.
>
>

Re: Aw: Re: Setting up TomEE in IntelliJ IDEA

Posted by Andy <an...@orprovision.com>.
Ah OK, that's because 4.3.1.Final is JPA 2.1.

Using 4.2.8.Final would resolve the issue.

Andy.


Aw: Re: Re: Setting up TomEE in IntelliJ IDEA

Posted by Ingo Mahnke <in...@quvion.org>.
Thanks!
I will check out this!! :)


> Gesendet: Donnerstag, 06. Februar 2014 um 14:52 Uhr
> Von: "Romain Manni-Bucau" <rm...@gmail.com>
> An: "dev@tomee.apache.org" <de...@tomee.apache.org>
> Betreff: Re: Re: Setting up TomEE in IntelliJ IDEA
>
> Hi
> 
> this is because tomee provides JPA 2.0 API and hibernate 2.3 uses JPA
> 2.1 API, replace tomee api or use a JPA 2.0 version of hibernate
> solves it
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
> 
> 
> 
> 2014-02-06 Ingo Mahnke <in...@quvion.org>:
> > I think trouble only within TomEE I suppose.
> >
> > We use "Hibernate 4.3.1.Final" during delpoyment on TomEE+ the following error occurs
> > "java.lang.NoSuchMethodError: javax.persistence.Table.indexes()"
> >
> > I googled about this error and their was a lot to find. But nothing solved my problem, so I try
> > eclipselink and it runs without any problem.
> >
> >
> > Ingo
> >
> >
> >
> >
> >
> >
> >
> >> Gesendet: Donnerstag, 06. Februar 2014 um 14:39 Uhr
> >> Von: Andy <an...@orprovision.com>
> >> An: dev@tomee.apache.org
> >> Betreff: Re: Aw: Setting up TomEE in IntelliJ IDEA
> >>
> >> I'd be interested to know what issues you had with Hibernate? I have
> >> used this in production for many years with no serious issues.
> >>
> >> Andy.
> >>
> >>
> 

Re: Re: Setting up TomEE in IntelliJ IDEA

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

this is because tomee provides JPA 2.0 API and hibernate 2.3 uses JPA
2.1 API, replace tomee api or use a JPA 2.0 version of hibernate
solves it
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-06 Ingo Mahnke <in...@quvion.org>:
> I think trouble only within TomEE I suppose.
>
> We use "Hibernate 4.3.1.Final" during delpoyment on TomEE+ the following error occurs
> "java.lang.NoSuchMethodError: javax.persistence.Table.indexes()"
>
> I googled about this error and their was a lot to find. But nothing solved my problem, so I try
> eclipselink and it runs without any problem.
>
>
> Ingo
>
>
>
>
>
>
>
>> Gesendet: Donnerstag, 06. Februar 2014 um 14:39 Uhr
>> Von: Andy <an...@orprovision.com>
>> An: dev@tomee.apache.org
>> Betreff: Re: Aw: Setting up TomEE in IntelliJ IDEA
>>
>> I'd be interested to know what issues you had with Hibernate? I have
>> used this in production for many years with no serious issues.
>>
>> Andy.
>>
>>

Aw: Re: Setting up TomEE in IntelliJ IDEA

Posted by Ingo Mahnke <in...@quvion.org>.
I think trouble only within TomEE I suppose.

We use "Hibernate 4.3.1.Final" during delpoyment on TomEE+ the following error occurs 
"java.lang.NoSuchMethodError: javax.persistence.Table.indexes()"

I googled about this error and their was a lot to find. But nothing solved my problem, so I try
eclipselink and it runs without any problem.


Ingo







> Gesendet: Donnerstag, 06. Februar 2014 um 14:39 Uhr
> Von: Andy <an...@orprovision.com>
> An: dev@tomee.apache.org
> Betreff: Re: Aw: Setting up TomEE in IntelliJ IDEA
>
> I'd be interested to know what issues you had with Hibernate? I have 
> used this in production for many years with no serious issues.
> 
> Andy.
> 
> 

Re: Aw: Setting up TomEE in IntelliJ IDEA

Posted by Andy <an...@orprovision.com>.
I'd be interested to know what issues you had with Hibernate? I have 
used this in production for many years with no serious issues.

Andy.


Aw: Setting up TomEE in IntelliJ IDEA

Posted by Ingo Mahnke <in...@quvion.org>.
Hallo Tommy,
we now using TomEE+ with IntelliJ IDEA 12.x and JDK 1.7.
Yesterday we moved our EJB-Project from Glassfish to TomEE and it 
works within Intellij without errors :)

1. We do not use the TomEE-Trunk
2. We use TomEE+ 
3. We use jdk 1.7
4. We had troube with Hibernate as jpa-Provider and now use eclipselink 

Are you able to write and deploy simple EJBs within Intellij to TomEE? Or will nothing work?
Currently I had not test the exmaples you describe. Sorry.

Best Regrads
Ingo

   



> Gesendet: Donnerstag, 06. Februar 2014 um 14:02 Uhr
> Von: "Tommy Tynjä" <to...@diabol.se>
> An: dev@tomee.apache.org
> Betreff: Setting up TomEE in IntelliJ IDEA
>
> Hi all.
> 
> I'm trying to setup the TomEE trunk in IntelliJ IDEA but I'm having a hard
> time sorting out the dependencies. I can build the project successfully on
> my command line but since IntelliJ does something on its own, it doesn't
> seem to resolve the dependencies correctly. I've imported the root pom.xml
> in the repository.
> 
> If I try to run a test case in org.apache.openejb.config.rules
> (openejb-core) I get a compilation error in e.g.
> org.apache.openejb.core.timer.TimerData, where the
> org.apache.openejb.quartz imports can't be resolved.
> 
> Do anyone have any ideas on how to resolve this? It would be nice to get
> the project to build and test properly from within the IDE.
> 
> I'm running IntelliJ IDEA Ultimate 12.1.6 Build #IU-129.1359 with JRE:
> 1.6.0_37
> 
> Best regards,
> Tommy Tynjä
>

Re: Setting up TomEE in IntelliJ IDEA

Posted by Andy <an...@orprovision.com>.
If all else fails then checkout and build (mvn install):

http://svn.apache.org/repos/asf/tomee/deps/trunk/quartz-openejb-shade

Andy.


Re: Setting up TomEE in IntelliJ IDEA

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

that's because in deps we shade quartz and idea doesn't see it, I dont
think we have ATM a profile to fix it but can be added. Personally i
open submodule in idea ie container and tomee, never the root project
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau



2014-02-06 Tommy Tynjä <to...@diabol.se>:
> Hi all.
>
> I'm trying to setup the TomEE trunk in IntelliJ IDEA but I'm having a hard
> time sorting out the dependencies. I can build the project successfully on
> my command line but since IntelliJ does something on its own, it doesn't
> seem to resolve the dependencies correctly. I've imported the root pom.xml
> in the repository.
>
> If I try to run a test case in org.apache.openejb.config.rules
> (openejb-core) I get a compilation error in e.g.
> org.apache.openejb.core.timer.TimerData, where the
> org.apache.openejb.quartz imports can't be resolved.
>
> Do anyone have any ideas on how to resolve this? It would be nice to get
> the project to build and test properly from within the IDE.
>
> I'm running IntelliJ IDEA Ultimate 12.1.6 Build #IU-129.1359 with JRE:
> 1.6.0_37
>
> Best regards,
> Tommy Tynjä

Re: Setting up TomEE in IntelliJ IDEA

Posted by Andy <an...@orprovision.com>.
Open the TomEE root pom.xml.

This will create the .idea project directory and .iml files.

In the maven projects view make sure that the 'main' profile is enabled 
- Sometimes this is not the default in Intellij and can lead to this 
issue.

This should pull in the shaded quartz automatically.

Andy.