Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

View: New views
11 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Pascal DeMilly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am trying to use Hibernate annotation in a groovy script but I am getting
anerror

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed, crs/business/cashreg/CashRegTill.groovy: 8: unexpected token: class @
line 8, column 1.
   class CashRegTill {

The groovy file is:
package crs.business.cashreg;

import javax.persistence.Entity
import javax.persistence.Table

@Entity
@Table(name="CashRegTills")
class CashRegTill {
}

I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from yesterday.

What am I missing?

TIA

Pascal


On Sunday 21 January 2007 18:10, Alexandru Popescu wrote:

> On 1/22/07, Alexandru Popescu <the.mindstorm.mailinglist@...> wrote:
> > I have committed the support for array type attributes (except
> > annotation arrays). I think by now most of the cases are covered.
>
> Attached you can find a set of annotations and scripts I have used for
> testing.
>
> ./alex
> --
> .w( the_mindstorm )p.
> _____________________________________
>   Alexandru Popescu, OSS Evangelist
> TestNG/Groovy/AspectJ/WebWork/more...
>   Information Queue ~ www.InfoQ.com
>
> > ./alex
> > --
> > .w( the_mindstorm )p.
> > _____________________________________
> >   Alexandru Popescu, OSS Evangelist
> > TestNG/Groovy/AspectJ/WebWork/more...
> >   Information Queue ~ www.InfoQ.com
> >
> > On 1/22/07, Alexandru Popescu <the.mindstorm.mailinglist@...> wrote:
> > > Hi all!
> > >
> > > Initial support for annotations has been committed to the SVN trunk.
> > > Here is a short list of what is done and what should be done in the
> > > future:
> > >
> > > What it does:
> > >
> > > 1/  It doesn't break anything existing (hopefully)
> > > 2/ Performs checks on annotation usage so this is correct (retention
> > > policy, targets, attribute types, etc.)
> > >
> > > What it doesn't do:
> > > 1/ doesn't support annotation array attributes
> > > 2/ doesn't support annotation annotation attributes
> > > 3/ doesn't support annotations on parameters, local variables,
> > > annotations 4/ doesn't implement support for defining annotations
> > >
> > > Last but not least, there are not test committed in the trunk, as we
> > > need to figure out how we can add test to be run only if a JVM >= 1.5
> > > is available at build time.
> > >
> > > However I have attached here what I am using for testing the code (a
> > > set of annotations and scripts).
> > >
> > > Please give it a try a let me know.
> > >
> > > ./alex
> > > --
> > > .w( the_mindstorm )p.
> > > _____________________________________
> > >   Alexandru Popescu, OSS Evangelist
> > > TestNG/Groovy/AspectJ/WebWork/more...
> > >   Information Queue ~ www.InfoQ.com


attachment0 (196 bytes) Download Attachment

Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Jochen Theodorou :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Pascal DeMilly schrieb:

> I am trying to use Hibernate annotation in a groovy script but I am getting
> anerror
>
> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> failed, crs/business/cashreg/CashRegTill.groovy: 8: unexpected token: class @
> line 8, column 1.
>    class CashRegTill {
>
> The groovy file is:
> package crs.business.cashreg;
>
> import javax.persistence.Entity
> import javax.persistence.Table
>
> @Entity
> @Table(name="CashRegTills")
> class CashRegTill {
> }
>
> I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from yesterday.
>
> What am I missing?

are you absolutly sure? The parser walks through here. please update
again, clean the build, rebuild and try again

bye blackdag

--
Jochen "blackdrag" Theodorou
Groovy Tech Lead (http://groovy.codehaus.org)
http://blackdragsview.blogspot.com/

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Pascal DeMilly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Jochen,

I tried again downloading groovy from SVN repo, rebuilding it and I get the
same error mentionned before when testing Annotations. Note that I am trying
the dynamic compilation of groovy class file. groovyc does work.

Also surprisingly groovyc gives me version:
groovy compiler version 1.0-rc1
Copyright 2003-2004 The Codehaus. http://groovy.codehaus.org/

while groovy version is:
Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03

Might just be an oversight.

Thanks

Pascal

On Tuesday 23 January 2007 10:23, Jochen Theodorou wrote:

> Pascal DeMilly schrieb:
> > I am trying to use Hibernate annotation in a groovy script but I am
> > getting anerror
> >
> > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> > failed, crs/business/cashreg/CashRegTill.groovy: 8: unexpected token:
> > class @ line 8, column 1.
> >    class CashRegTill {
> >
> > The groovy file is:
> > package crs.business.cashreg;
> >
> > import javax.persistence.Entity
> > import javax.persistence.Table
> >
> > @Entity
> > @Table(name="CashRegTills")
> > class CashRegTill {
> > }
> >
> > I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from
> > yesterday.
> >
> > What am I missing?
>
> are you absolutly sure? The parser walks through here. please update
> again, clean the build, rebuild and try again
>
> bye blackdag


attachment0 (196 bytes) Download Attachment

Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Alexandru Popescu ☀ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:

> Jochen,
>
> I tried again downloading groovy from SVN repo, rebuilding it and I get the
> same error mentionned before when testing Annotations. Note that I am trying
> the dynamic compilation of groovy class file. groovyc does work.
>
> Also surprisingly groovyc gives me version:
> groovy compiler version 1.0-rc1
> Copyright 2003-2004 The Codehaus. http://groovy.codehaus.org/
>
> while groovy version is:
> Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03
>
> Might just be an oversight.
>

Hi Pascal!

Have you tried your build against the scripts in the attached jar to
this thread? It is my test script together with a couple of
annotations. It passes with both groovy and groovyc, so I am
interested to see if on your build it does the same.

In the first place I suspect there is an older groovy jar in your classpath.

./alex
--
.w( the_mindstorm )p.
_____________________________________
  Alexandru Popescu, OSS Evangelist
TestNG/Groovy/AspectJ/WebWork/more...
  Information Queue ~ www.InfoQ.com

> Thanks
>
> Pascal
>
> On Tuesday 23 January 2007 10:23, Jochen Theodorou wrote:
> > Pascal DeMilly schrieb:
> > > I am trying to use Hibernate annotation in a groovy script but I am
> > > getting anerror
> > >
> > > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
> > > failed, crs/business/cashreg/CashRegTill.groovy: 8: unexpected token:
> > > class @ line 8, column 1.
> > >    class CashRegTill {
> > >
> > > The groovy file is:
> > > package crs.business.cashreg;
> > >
> > > import javax.persistence.Entity
> > > import javax.persistence.Table
> > >
> > > @Entity
> > > @Table(name="CashRegTills")
> > > class CashRegTill {
> > > }
> > >
> > > I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from
> > > yesterday.
> > >
> > > What am I missing?
> >
> > are you absolutly sure? The parser walks through here. please update
> > again, clean the build, rebuild and try again
> >
> > bye blackdag
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Pascal DeMilly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My bad! You're right. found that in my classpath I was still referring to the
1.0 groovy-all like you suspected.

Thanks it works now. This is great. Now we just need some GAOP :-)

Pascal


On Tuesday 23 January 2007 17:40, Alexandru Popescu wrote:

> On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:
> > Jochen,
> >
> > I tried again downloading groovy from SVN repo, rebuilding it and I get
> > the same error mentionned before when testing Annotations. Note that I am
> > trying the dynamic compilation of groovy class file. groovyc does work.
> >
> > Also surprisingly groovyc gives me version:
> > groovy compiler version 1.0-rc1
> > Copyright 2003-2004 The Codehaus. http://groovy.codehaus.org/
> >
> > while groovy version is:
> > Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03
> >
> > Might just be an oversight.
>
> Hi Pascal!
>
> Have you tried your build against the scripts in the attached jar to
> this thread? It is my test script together with a couple of
> annotations. It passes with both groovy and groovyc, so I am
> interested to see if on your build it does the same.
>
> In the first place I suspect there is an older groovy jar in your
> classpath.
>
> ./alex
> --
> .w( the_mindstorm )p.
> _____________________________________
>   Alexandru Popescu, OSS Evangelist
> TestNG/Groovy/AspectJ/WebWork/more...
>   Information Queue ~ www.InfoQ.com
>
> > Thanks
> >
> > Pascal
> >
> > On Tuesday 23 January 2007 10:23, Jochen Theodorou wrote:
> > > Pascal DeMilly schrieb:
> > > > I am trying to use Hibernate annotation in a groovy script but I am
> > > > getting anerror
> > > >
> > > > org.codehaus.groovy.control.MultipleCompilationErrorsException:
> > > > startup failed, crs/business/cashreg/CashRegTill.groovy: 8:
> > > > unexpected token: class @ line 8, column 1.
> > > >    class CashRegTill {
> > > >
> > > > The groovy file is:
> > > > package crs.business.cashreg;
> > > >
> > > > import javax.persistence.Entity
> > > > import javax.persistence.Table
> > > >
> > > > @Entity
> > > > @Table(name="CashRegTills")
> > > > class CashRegTill {
> > > > }
> > > >
> > > > I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from
> > > > yesterday.
> > > >
> > > > What am I missing?
> > >
> > > are you absolutly sure? The parser walks through here. please update
> > > again, clean the build, rebuild and try again
> > >
> > > bye blackdag
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Pascal,

I hope I'm not too demanding but...
Would it be possible that you write a mini-tutorial and set up some a
small code sample showing how to develop an EJB3 with Groovy? I must
confess I haven't used EJB3 so far, and I think we could make a nice
little article on that topic :-)


On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:

> My bad! You're right. found that in my classpath I was still referring to the
> 1.0 groovy-all like you suspected.
>
> Thanks it works now. This is great. Now we just need some GAOP :-)
>
> Pascal
>
>
> On Tuesday 23 January 2007 17:40, Alexandru Popescu wrote:
> > On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:
> > > Jochen,
> > >
> > > I tried again downloading groovy from SVN repo, rebuilding it and I get
> > > the same error mentionned before when testing Annotations. Note that I am
> > > trying the dynamic compilation of groovy class file. groovyc does work.
> > >
> > > Also surprisingly groovyc gives me version:
> > > groovy compiler version 1.0-rc1
> > > Copyright 2003-2004 The Codehaus. http://groovy.codehaus.org/
> > >
> > > while groovy version is:
> > > Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03
> > >
> > > Might just be an oversight.
> >
> > Hi Pascal!
> >
> > Have you tried your build against the scripts in the attached jar to
> > this thread? It is my test script together with a couple of
> > annotations. It passes with both groovy and groovyc, so I am
> > interested to see if on your build it does the same.
> >
> > In the first place I suspect there is an older groovy jar in your
> > classpath.
> >
> > ./alex
> > --
> > .w( the_mindstorm )p.
> > _____________________________________
> >   Alexandru Popescu, OSS Evangelist
> > TestNG/Groovy/AspectJ/WebWork/more...
> >   Information Queue ~ www.InfoQ.com
> >
> > > Thanks
> > >
> > > Pascal
> > >
> > > On Tuesday 23 January 2007 10:23, Jochen Theodorou wrote:
> > > > Pascal DeMilly schrieb:
> > > > > I am trying to use Hibernate annotation in a groovy script but I am
> > > > > getting anerror
> > > > >
> > > > > org.codehaus.groovy.control.MultipleCompilationErrorsException:
> > > > > startup failed, crs/business/cashreg/CashRegTill.groovy: 8:
> > > > > unexpected token: class @ line 8, column 1.
> > > > >    class CashRegTill {
> > > > >
> > > > > The groovy file is:
> > > > > package crs.business.cashreg;
> > > > >
> > > > > import javax.persistence.Entity
> > > > > import javax.persistence.Table
> > > > >
> > > > > @Entity
> > > > > @Table(name="CashRegTills")
> > > > > class CashRegTill {
> > > > > }
> > > > >
> > > > > I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from
> > > > > yesterday.
> > > > >
> > > > > What am I missing?
> > > >
> > > > are you absolutly sure? The parser walks through here. please update
> > > > again, clean the build, rebuild and try again
> > > >
> > > > bye blackdag
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Alexandru Popescu ☀ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/24/07, Guillaume Laforge <glaforge@...> wrote:
> Hi Pascal,
>
> I hope I'm not too demanding but...
> Would it be possible that you write a mini-tutorial and set up some a
> small code sample showing how to develop an EJB3 with Groovy? I must
> confess I haven't used EJB3 so far, and I think we could make a nice
> little article on that topic :-)
>

Here it is sir: http://www.infoq.com/articles/grails-ejb-tutorial.

HTH,

./alex
--
.w( the_mindstorm )p.
_____________________________________
  Alexandru Popescu, OSS Evangelist
TestNG/Groovy/AspectJ/WebWork/more...
  Information Queue ~ www.InfoQ.com

>
> On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:
> > My bad! You're right. found that in my classpath I was still referring to the
> > 1.0 groovy-all like you suspected.
> >
> > Thanks it works now. This is great. Now we just need some GAOP :-)
> >
> > Pascal
> >
> >
> > On Tuesday 23 January 2007 17:40, Alexandru Popescu wrote:
> > > On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:
> > > > Jochen,
> > > >
> > > > I tried again downloading groovy from SVN repo, rebuilding it and I get
> > > > the same error mentionned before when testing Annotations. Note that I am
> > > > trying the dynamic compilation of groovy class file. groovyc does work.
> > > >
> > > > Also surprisingly groovyc gives me version:
> > > > groovy compiler version 1.0-rc1
> > > > Copyright 2003-2004 The Codehaus. http://groovy.codehaus.org/
> > > >
> > > > while groovy version is:
> > > > Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03
> > > >
> > > > Might just be an oversight.
> > >
> > > Hi Pascal!
> > >
> > > Have you tried your build against the scripts in the attached jar to
> > > this thread? It is my test script together with a couple of
> > > annotations. It passes with both groovy and groovyc, so I am
> > > interested to see if on your build it does the same.
> > >
> > > In the first place I suspect there is an older groovy jar in your
> > > classpath.
> > >
> > > ./alex
> > > --
> > > .w( the_mindstorm )p.
> > > _____________________________________
> > >   Alexandru Popescu, OSS Evangelist
> > > TestNG/Groovy/AspectJ/WebWork/more...
> > >   Information Queue ~ www.InfoQ.com
> > >
> > > > Thanks
> > > >
> > > > Pascal
> > > >
> > > > On Tuesday 23 January 2007 10:23, Jochen Theodorou wrote:
> > > > > Pascal DeMilly schrieb:
> > > > > > I am trying to use Hibernate annotation in a groovy script but I am
> > > > > > getting anerror
> > > > > >
> > > > > > org.codehaus.groovy.control.MultipleCompilationErrorsException:
> > > > > > startup failed, crs/business/cashreg/CashRegTill.groovy: 8:
> > > > > > unexpected token: class @ line 8, column 1.
> > > > > >    class CashRegTill {
> > > > > >
> > > > > > The groovy file is:
> > > > > > package crs.business.cashreg;
> > > > > >
> > > > > > import javax.persistence.Entity
> > > > > > import javax.persistence.Table
> > > > > >
> > > > > > @Entity
> > > > > > @Table(name="CashRegTills")
> > > > > > class CashRegTill {
> > > > > > }
> > > > > >
> > > > > > I am using Groovy Version: 1.0.1-SNAPSHOT JVM: 1.5.0_08-b03 from
> > > > > > yesterday.
> > > > > >
> > > > > > What am I missing?
> > > > >
> > > > > are you absolutly sure? The parser walks through here. please update
> > > > > again, clean the build, rebuild and try again
> > > > >
> > > > > bye blackdag
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe from this list please visit:
> > >
> > >     http://xircles.codehaus.org/manage_email
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list please visit:
> >
> >     http://xircles.codehaus.org/manage_email
> >
> >
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> http://glaforge.free.fr/blog/groovy
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 1/24/07, Alexandru Popescu <the.mindstorm.mailinglist@...> wrote:
> [...]
> Here it is sir: http://www.infoq.com/articles/grails-ejb-tutorial.

That's not exactly what I had in mind :-)

I'd just like the smallest example of an EJB 3 hello world-like
application where we would replace the Java entity with a Groovy
annotated one.

--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by Pascal DeMilly-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Salut Guillaume,

I am not much of a writer but I will try to write something that shows
how to use Groovy instead of Java for an EJB3 application.

Pascal

On Wednesday 24 January 2007 01:39, Guillaume Laforge wrote:
> On 1/24/07, Alexandru Popescu <the.mindstorm.mailinglist@...>
wrote:
> > [...]
> > Here it is sir:
> > http://www.infoq.com/articles/grails-ejb-tutorial.
>
> That's not exactly what I had in mind :-)
>
> I'd just like the smallest example of an EJB 3 hello world-like
> application where we would replace the Java entity with a Groovy
> annotated one.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Wonderful!
Thank you so much!

On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:

> Salut Guillaume,
>
> I am not much of a writer but I will try to write something that shows
> how to use Groovy instead of Java for an EJB3 application.
>
> Pascal
>
> On Wednesday 24 January 2007 01:39, Guillaume Laforge wrote:
> > On 1/24/07, Alexandru Popescu <the.mindstorm.mailinglist@...>
> wrote:
> > > [...]
> > > Here it is sir:
> > > http://www.infoq.com/articles/grails-ejb-tutorial.
> >
> > That's not exactly what I had in mind :-)
> >
> > I'd just like the smallest example of an EJB 3 hello world-like
> > application where we would replace the Java entity with a Groovy
> > annotated one.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Re: Re: [groovy-dev] Re: Initial annotation support is in SVN trunk

by glaforge :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Salut Pascal,

How is it progressing? :-)
Do you need any help or are you facing some issues?

On 1/24/07, Pascal DeMilly <list.groovy@...> wrote:

> Salut Guillaume,
>
> I am not much of a writer but I will try to write something that shows
> how to use Groovy instead of Java for an EJB3 application.
>
> Pascal
>
> On Wednesday 24 January 2007 01:39, Guillaume Laforge wrote:
> > On 1/24/07, Alexandru Popescu <the.mindstorm.mailinglist@...>
> wrote:
> > > [...]
> > > Here it is sir:
> > > http://www.infoq.com/articles/grails-ejb-tutorial.
> >
> > That's not exactly what I had in mind :-)
> >
> > I'd just like the smallest example of an EJB 3 hello world-like
> > application where we would replace the Java entity with a Groovy
> > annotated one.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


--
Guillaume Laforge
Groovy Project Manager
http://glaforge.free.fr/blog/groovy

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email