You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by oscontrib oscontrib <os...@gmail.com> on 2011/02/01 04:40:30 UTC
Re: How to Build and Run Roller in Eclipse
I was also trying to build roller trunk by running mvn install and deploying
the war that gets created under weblogger-webapp/target into tomcat and was
getting the same error (JPA types werent enhanced ..)
After a bit of digging around I found that the tomcat system property
activates the openjpa profile which does the enhancement , so the following
did the trick.
mvn -Dtomcat=true package
(the build-tomcat-release.sh uses this, but since this wasnt in any docs ,
well , as far as I read, I had to read through the pom.xml files but it was
fun).
Once I did this, created my mysql database and configured the database
properties in the roller-custom.properties, everything worked like a charm.
Thanks Dave, this is a cool project. I started playing around with the trunk
just so I could use it on my private blog site, but unlike many other
projects, this code is readable and sounds like fun .. I am gonna dig in and
see if there is some way I can also chip in.
-- shiva jayaraman
On Sat, Jan 29, 2011 at 10:56 AM, Dave <sn...@gmail.com> wrote:
> Hi Bala,
>
> The error that you got:
> java.lang.RuntimeException: <openjpa-2.0.0-r422266:935683 nonfatal
> user error> org.apache.openjpa.persistence.ArgumentException: This
> configuration disallows runtime optimization, but the following listed
> types were not enhanced at build time or at class load time with a
> javaagent: "<|org.apache.roller.weblogger.pojos.TaskLock
>
> Indicates that the JPA bytecode enhancement was not run as part of the
> build process -- this is problem that I (believe that I) fixed a week
> or two ago.
>
> Please verify that you have the latest version of the code from Roller
> trunk.
>
> Also, if you run Roller via the goal "jetty:run" then Roller will be
> at http://localhost:8080/roller not 7777.
>
> Hope that helps...
>
> - Dave
>
>
> On Sat, Jan 29, 2011 at 1:33 PM, bala ajanthan <ba...@gmail.com>
> wrote:
> > Hi Dave,
> > I am new to Roller.
> > As you mentioned above i built the source in eclipse ide.But when i
> navigate
> > to http://localhost:7777/roller i got SERVICE_UNAVAILABLE error.i
> attached
> > the log file bellow.help me.
> > thanks.
> > aja.
> >
> > On Sat, Jan 29, 2011 at 11:04 PM, Dave <sn...@gmail.com> wrote:
> >>
> >> I put together some screenshots that show How to Build and Run Roller
> >> in Eclipse:
> >> https://cwiki.apache.org/confluence/x/9IWAAQ
> >>
> >> - Dave
> >
> >
>
Re: How to Build and Run Roller in Eclipse
Posted by oscontrib oscontrib <os...@gmail.com>.
> How long ago did you fetch the code? I tried to fix things so that the
> Tomcat setup (with JPA bytecode enhancement) is the default setting
> for all modules except those that assemble the WAR (i.e.
> weblogger-war-assembly) and package the release bundle (i.e.
> weblogger-assembly).
>
> Either way, I think we need a "How to run on Tomcat" section for that
> build guide.
>
>
>
Oh it was about a week ago if I remember right. I will update and try
again. Thanks. I think it makes sense to use the Tomcat setup as default.
Ah I also had to do the same pom.xml changes (for the mysql connector and
java mail related jars), but didnt mention it since it was part of the
documentation. I didnt want to copy them over , so I also changed my pom.xml
and got maven to download it for me .
I will document my attempt on the latest trunk and mebbe it can be the 'How
to run on tomcat' section for the build guide.
-- shiva j
Re: How to Build and Run Roller in Eclipse
Posted by Dave <sn...@gmail.com>.
On Mon, Jan 31, 2011 at 10:40 PM, oscontrib oscontrib
<os...@gmail.com> wrote:
> I was also trying to build roller trunk by running mvn install and deploying
> the war that gets created under weblogger-webapp/target into tomcat and was
> getting the same error (JPA types werent enhanced ..)
>
> After a bit of digging around I found that the tomcat system property
> activates the openjpa profile which does the enhancement , so the following
> did the trick.
>
> mvn -Dtomcat=true package
>
> (the build-tomcat-release.sh uses this, but since this wasnt in any docs ,
> well , as far as I read, I had to read through the pom.xml files but it was
> fun).
How long ago did you fetch the code? I tried to fix things so that the
Tomcat setup (with JPA bytecode enhancement) is the default setting
for all modules except those that assemble the WAR (i.e.
weblogger-war-assembly) and package the release bundle (i.e.
weblogger-assembly).
Either way, I think we need a "How to run on Tomcat" section for that
build guide.
> Once I did this, created my mysql database and configured the database
> properties in the roller-custom.properties, everything worked like a charm.
> Thanks Dave, this is a cool project. I started playing around with the trunk
> just so I could use it on my private blog site, but unlike many other
> projects, this code is readable and sounds like fun .. I am gonna dig in and
> see if there is some way I can also chip in.
Thanks! We're always in need of new committers/PMC members.
- Dave
> On Sat, Jan 29, 2011 at 10:56 AM, Dave <sn...@gmail.com> wrote:
>
>> Hi Bala,
>>
>> The error that you got:
>> java.lang.RuntimeException: <openjpa-2.0.0-r422266:935683 nonfatal
>> user error> org.apache.openjpa.persistence.ArgumentException: This
>> configuration disallows runtime optimization, but the following listed
>> types were not enhanced at build time or at class load time with a
>> javaagent: "<|org.apache.roller.weblogger.pojos.TaskLock
>>
>> Indicates that the JPA bytecode enhancement was not run as part of the
>> build process -- this is problem that I (believe that I) fixed a week
>> or two ago.
>>
>> Please verify that you have the latest version of the code from Roller
>> trunk.
>>
>> Also, if you run Roller via the goal "jetty:run" then Roller will be
>> at http://localhost:8080/roller not 7777.
>>
>> Hope that helps...
>>
>> - Dave
>>
>>
>> On Sat, Jan 29, 2011 at 1:33 PM, bala ajanthan <ba...@gmail.com>
>> wrote:
>> > Hi Dave,
>> > I am new to Roller.
>> > As you mentioned above i built the source in eclipse ide.But when i
>> navigate
>> > to http://localhost:7777/roller i got SERVICE_UNAVAILABLE error.i
>> attached
>> > the log file bellow.help me.
>> > thanks.
>> > aja.
>> >
>> > On Sat, Jan 29, 2011 at 11:04 PM, Dave <sn...@gmail.com> wrote:
>> >>
>> >> I put together some screenshots that show How to Build and Run Roller
>> >> in Eclipse:
>> >> https://cwiki.apache.org/confluence/x/9IWAAQ
>> >>
>> >> - Dave
>> >
>> >
>>
>
RE: How to Build and Run Roller in Eclipse
Posted by Nicolas Muller <n....@nouvellemarque.com>.
Hi,
For running Roller with Tomcat/mysql, I had to add into pom.xml the
following lines
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<configuration>
<url>http://localhost:8080</url>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.14</version>
</dependency>
<dependency>
<groupId>javamail</groupId>
<artifactId>javamail</artifactId>
<version>1.3.3</version>
</dependency>
<dependency>
<groupId>activation</groupId>
<artifactId>activation</artifactId>
<version>1.0.2</version>
</dependency>
</dependencies>
</plugin>
It is good for me but was it mandatory or not ? Else I hope they could help
!
Without them, the embedded tomcat by maven dont know mysql driver and
javamail.
Best regards
Nicolas,
-----Message d'origine-----
De : oscontrib oscontrib [mailto:oscontrib@gmail.com]
Envoyé : mardi 1 février 2011 04:41
À : dev@roller.apache.org
Objet : Re: How to Build and Run Roller in Eclipse
I was also trying to build roller trunk by running mvn install and deploying
the war that gets created under weblogger-webapp/target into tomcat and was
getting the same error (JPA types werent enhanced ..)
After a bit of digging around I found that the tomcat system property
activates the openjpa profile which does the enhancement , so the following
did the trick.
mvn -Dtomcat=true package
(the build-tomcat-release.sh uses this, but since this wasnt in any docs ,
well , as far as I read, I had to read through the pom.xml files but it was
fun).
Once I did this, created my mysql database and configured the database
properties in the roller-custom.properties, everything worked like a charm.
Thanks Dave, this is a cool project. I started playing around with the trunk
just so I could use it on my private blog site, but unlike many other
projects, this code is readable and sounds like fun .. I am gonna dig in and
see if there is some way I can also chip in.
-- shiva jayaraman
On Sat, Jan 29, 2011 at 10:56 AM, Dave <sn...@gmail.com> wrote:
> Hi Bala,
>
> The error that you got:
> java.lang.RuntimeException: <openjpa-2.0.0-r422266:935683 nonfatal
> user error> org.apache.openjpa.persistence.ArgumentException: This
> configuration disallows runtime optimization, but the following listed
> types were not enhanced at build time or at class load time with a
> javaagent: "<|org.apache.roller.weblogger.pojos.TaskLock
>
> Indicates that the JPA bytecode enhancement was not run as part of the
> build process -- this is problem that I (believe that I) fixed a week
> or two ago.
>
> Please verify that you have the latest version of the code from Roller
> trunk.
>
> Also, if you run Roller via the goal "jetty:run" then Roller will be
> at http://localhost:8080/roller not 7777.
>
> Hope that helps...
>
> - Dave
>
>
> On Sat, Jan 29, 2011 at 1:33 PM, bala ajanthan <ba...@gmail.com>
> wrote:
> > Hi Dave,
> > I am new to Roller.
> > As you mentioned above i built the source in eclipse ide.But when i
> navigate
> > to http://localhost:7777/roller i got SERVICE_UNAVAILABLE error.i
> attached
> > the log file bellow.help me.
> > thanks.
> > aja.
> >
> > On Sat, Jan 29, 2011 at 11:04 PM, Dave <sn...@gmail.com> wrote:
> >>
> >> I put together some screenshots that show How to Build and Run Roller
> >> in Eclipse:
> >> https://cwiki.apache.org/confluence/x/9IWAAQ
> >>
> >> - Dave
> >
> >
>
Re: How to Build and Run Roller in Eclipse
Posted by Dave <sn...@gmail.com>.
On Tue, Feb 1, 2011 at 3:40 AM, Nicolas Muller
<n....@nouvellemarque.com> wrote:
> For running Roller with Tomcat/mysql, I had to add into pom.xml the
> following lines
>
> <plugin>
> <groupId>org.codehaus.mojo</groupId>
> <artifactId>tomcat-maven-plugin</artifactId>
> <configuration>
> <url>http://localhost:8080</url>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>mysql</groupId>
> <artifactId>mysql-connector-java</artifactId>
> <version>5.1.14</version>
> </dependency>
> <dependency>
> <groupId>javamail</groupId>
> <artifactId>javamail</artifactId>
> <version>1.3.3</version>
> </dependency>
> <dependency>
> <groupId>activation</groupId>
> <artifactId>activation</artifactId>
> <version>1.0.2</version>
> </dependency>
> </dependencies>
> </plugin>
>
> It is good for me but was it mandatory or not ? Else I hope they could help!
> Without them, the embedded tomcat by maven don’t know mysql driver and
> javamail.
That's awesome!
I was just saying that we need to add a "How to run in Tomcat" section
to that Eclipse build guide. This will make that very easy to do.
Thanks,
Dave