You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Miłosz Tylenda <mt...@o2.pl> on 2010/05/21 21:22:31 UTC

openjpa-examples compilation error

Hello All!

After some break I am trying to do a build from trunk. The ZIP packages are created but the build fails while compiling examples. It looks like the compiler can't see JPA packages:

[INFO] Compiling 10 source files to /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24] package javax.persistence does not exist

and 95 other similar errors. I am using maven 2.0.10. Did I forget about something?

Greetings,
Milosz


Re: openjpa-examples compilation error

Posted by Michael Dick <mi...@gmail.com>.
Hi Milosz,

I just tried building openjpa-examples. It worked for me with this mvn
--version :

java full version "1.6.0_18-b07"
Apache Maven 2.2.1 (r801777; 2009-08-06 14:16:01-0500)
Java version: 1.6.0_18
Java home: /home/mikedd/programs/java/sun/jdk6_18/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.31-21-generic" arch: "i386" Family: "unix"

It's maven 2.2.1, I suppose you could try moving up.

It might also be worth checking
${user.home}/.m2/repository/org/apache/openjpa/ to make sure there are
2.1.0-SNAPSHOT directories and that the pom.xml files there are up to date
(this is a bit of a shot in the dark).

Sorry, I know 'works for me' isn't the most helpful answer.

-mike

On Fri, May 21, 2010 at 2:22 PM, Miłosz Tylenda <mt...@o2.pl> wrote:

> Hello All!
>
> After some break I am trying to do a build from trunk. The ZIP packages are
> created but the build fails while compiling examples. It looks like the
> compiler can't see JPA packages:
>
> [INFO] Compiling 10 source files to
> /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR :
> [INFO] -------------------------------------------------------------
> [ERROR]
> /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24]
> package javax.persistence does not exist
>
> and 95 other similar errors. I am using maven 2.0.10. Did I forget about
> something?
>
> Greetings,
> Milosz
>
>

Re: openjpa-examples compilation error

Posted by Donald Woods <dw...@apache.org>.
OK, sounds like we also need to upgrade the level enforced in the parent
pom, which I did as r948570.

-Donald


On 5/26/10 1:52 PM, Michael Dick wrote:
> I agree. Heath Thomann mentioned similar issues and upgrading to 2.2.x
> solved them for him. I've gone ahead and updated the wiki.
> 
> Thanks for following up, Milosz.
> 
> -mike
> 
> On Wed, May 26, 2010 at 8:44 AM, Miłosz Tylenda <mt...@o2.pl> wrote:
> 
>> Hi!
>>
>> I have upgraded maven to version 2.2.1 and now the build executes fine.
>>
>> I think I should update our "Building" wiki-page to say we require maven
>> 2.2.1.
>>
>> Regards,
>> Milosz
>>
>>> Hi Mike & Donald,
>>>
>>> Thanks for your answers. I noticed that the examples are built correctly
>> when I execute "mvn install" from openjpa-examples directory. The
>> compilation fails when I do "mvn clean" and "mvn install" from the main
>> directory.
>>>
>>> I will upgrade my maven and see what happens.
>>>
>>> Donald, I am using Eclipse but not the tasks you have mentioned. I am
>> doing the build from command line, so I assume these Eclipse-related tasks
>> should not matter here. Am I missing something?
>>>
>>> Cheers,
>>> Milosz
>>>
>>>
>>>> Since you're using Eclipse, are you using "mvn eclipse:clean" and "mvn
>>>> eclipse:eclipse" to update the Eclipse files?  Trunk is now
>>>> 2.1.0-SNAPSHOT and we've upgraded to commons-lang-2.4 and
>>>> geronimo-jpa_2.0_spec-1.1 levels of jars.....
>>>>
>>>>
>>>> -Donald
>>>>
>>>>
>>>> On 5/21/10 3:22 PM, Miłosz Tylenda wrote:
>>>>> Hello All!
>>>>>
>>>>> After some break I am trying to do a build from trunk. The ZIP
>> packages are created but the build fails while compiling examples. It looks
>> like the compiler can't see JPA packages:
>>>>>
>>>>> [INFO] Compiling 10 source files to
>> /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
>>>>> [INFO] -------------------------------------------------------------
>>>>> [ERROR] COMPILATION ERROR :
>>>>> [INFO] -------------------------------------------------------------
>>>>> [ERROR]
>> /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24]
>> package javax.persistence does not exist
>>>>>
>>>>> and 95 other similar errors. I am using maven 2.0.10. Did I forget
>> about something?
>>>>>
>>>>> Greetings,
>>>>> Milosz
>>>>>
>>>>>
>>>>
>>>
>>
> 

Re: openjpa-examples compilation error

Posted by Michael Dick <mi...@gmail.com>.
I agree. Heath Thomann mentioned similar issues and upgrading to 2.2.x
solved them for him. I've gone ahead and updated the wiki.

Thanks for following up, Milosz.

-mike

On Wed, May 26, 2010 at 8:44 AM, Miłosz Tylenda <mt...@o2.pl> wrote:

> Hi!
>
> I have upgraded maven to version 2.2.1 and now the build executes fine.
>
> I think I should update our "Building" wiki-page to say we require maven
> 2.2.1.
>
> Regards,
> Milosz
>
> > Hi Mike & Donald,
> >
> > Thanks for your answers. I noticed that the examples are built correctly
> when I execute "mvn install" from openjpa-examples directory. The
> compilation fails when I do "mvn clean" and "mvn install" from the main
> directory.
> >
> > I will upgrade my maven and see what happens.
> >
> > Donald, I am using Eclipse but not the tasks you have mentioned. I am
> doing the build from command line, so I assume these Eclipse-related tasks
> should not matter here. Am I missing something?
> >
> > Cheers,
> > Milosz
> >
> >
> > > Since you're using Eclipse, are you using "mvn eclipse:clean" and "mvn
> > > eclipse:eclipse" to update the Eclipse files?  Trunk is now
> > > 2.1.0-SNAPSHOT and we've upgraded to commons-lang-2.4 and
> > > geronimo-jpa_2.0_spec-1.1 levels of jars.....
> > >
> > >
> > > -Donald
> > >
> > >
> > > On 5/21/10 3:22 PM, Miłosz Tylenda wrote:
> > > > Hello All!
> > > >
> > > > After some break I am trying to do a build from trunk. The ZIP
> packages are created but the build fails while compiling examples. It looks
> like the compiler can't see JPA packages:
> > > >
> > > > [INFO] Compiling 10 source files to
> /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
> > > > [INFO] -------------------------------------------------------------
> > > > [ERROR] COMPILATION ERROR :
> > > > [INFO] -------------------------------------------------------------
> > > > [ERROR]
> /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24]
> package javax.persistence does not exist
> > > >
> > > > and 95 other similar errors. I am using maven 2.0.10. Did I forget
> about something?
> > > >
> > > > Greetings,
> > > > Milosz
> > > >
> > > >
> > >
> >
>

Re: openjpa-examples compilation error

Posted by Miłosz Tylenda <mt...@o2.pl>.
Hi!

I have upgraded maven to version 2.2.1 and now the build executes fine.

I think I should update our "Building" wiki-page to say we require maven 2.2.1.

Regards,
Milosz

> Hi Mike & Donald,
> 
> Thanks for your answers. I noticed that the examples are built correctly when I execute "mvn install" from openjpa-examples directory. The compilation fails when I do "mvn clean" and "mvn install" from the main directory.
> 
> I will upgrade my maven and see what happens.
> 
> Donald, I am using Eclipse but not the tasks you have mentioned. I am doing the build from command line, so I assume these Eclipse-related tasks should not matter here. Am I missing something?
> 
> Cheers,
> Milosz
> 
> 
> > Since you're using Eclipse, are you using "mvn eclipse:clean" and "mvn
> > eclipse:eclipse" to update the Eclipse files?  Trunk is now
> > 2.1.0-SNAPSHOT and we've upgraded to commons-lang-2.4 and
> > geronimo-jpa_2.0_spec-1.1 levels of jars.....
> > 
> > 
> > -Donald
> > 
> > 
> > On 5/21/10 3:22 PM, Miłosz Tylenda wrote:
> > > Hello All!
> > > 
> > > After some break I am trying to do a build from trunk. The ZIP packages are created but the build fails while compiling examples. It looks like the compiler can't see JPA packages:
> > > 
> > > [INFO] Compiling 10 source files to /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
> > > [INFO] -------------------------------------------------------------
> > > [ERROR] COMPILATION ERROR : 
> > > [INFO] -------------------------------------------------------------
> > > [ERROR] /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24] package javax.persistence does not exist
> > > 
> > > and 95 other similar errors. I am using maven 2.0.10. Did I forget about something?
> > > 
> > > Greetings,
> > > Milosz
> > > 
> > > 
> > 
> 

Re: openjpa-examples compilation error

Posted by Miłosz Tylenda <mt...@o2.pl>.
Hi Mike & Donald,

Thanks for your answers. I noticed that the examples are built correctly when I execute "mvn install" from openjpa-examples directory. The compilation fails when I do "mvn clean" and "mvn install" from the main directory.

I will upgrade my maven and see what happens.

Donald, I am using Eclipse but not the tasks you have mentioned. I am doing the build from command line, so I assume these Eclipse-related tasks should not matter here. Am I missing something?

Cheers,
Milosz


> Since you're using Eclipse, are you using "mvn eclipse:clean" and "mvn
> eclipse:eclipse" to update the Eclipse files?  Trunk is now
> 2.1.0-SNAPSHOT and we've upgraded to commons-lang-2.4 and
> geronimo-jpa_2.0_spec-1.1 levels of jars.....
> 
> 
> -Donald
> 
> 
> On 5/21/10 3:22 PM, Miłosz Tylenda wrote:
> > Hello All!
> > 
> > After some break I am trying to do a build from trunk. The ZIP packages are created but the build fails while compiling examples. It looks like the compiler can't see JPA packages:
> > 
> > [INFO] Compiling 10 source files to /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
> > [INFO] -------------------------------------------------------------
> > [ERROR] COMPILATION ERROR : 
> > [INFO] -------------------------------------------------------------
> > [ERROR] /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24] package javax.persistence does not exist
> > 
> > and 95 other similar errors. I am using maven 2.0.10. Did I forget about something?
> > 
> > Greetings,
> > Milosz
> > 
> > 
> 

Re: openjpa-examples compilation error

Posted by Donald Woods <dw...@apache.org>.
Since you're using Eclipse, are you using "mvn eclipse:clean" and "mvn
eclipse:eclipse" to update the Eclipse files?  Trunk is now
2.1.0-SNAPSHOT and we've upgraded to commons-lang-2.4 and
geronimo-jpa_2.0_spec-1.1 levels of jars.....


-Donald


On 5/21/10 3:22 PM, Miłosz Tylenda wrote:
> Hello All!
> 
> After some break I am trying to do a build from trunk. The ZIP packages are created but the build fails while compiling examples. It looks like the compiler can't see JPA packages:
> 
> [INFO] Compiling 10 source files to /alt/eclipse322/workspace/open-jpa/openjpa-examples/target/classes
> [INFO] -------------------------------------------------------------
> [ERROR] COMPILATION ERROR : 
> [INFO] -------------------------------------------------------------
> [ERROR] /alt/eclipse322/workspace/open-jpa/openjpa-examples/src/main/java/embeddables/User.java:[24,24] package javax.persistence does not exist
> 
> and 95 other similar errors. I am using maven 2.0.10. Did I forget about something?
> 
> Greetings,
> Milosz
> 
>