You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Sreejith S <sr...@gmail.com> on 2011/11/17 10:58:06 UTC

Include external dependency when creating java file from a .thrift file

Hi ,

This is my sample.thrift file
namespace java com.test.generated

service Extract {
  MultiMap extract(1: string text),
}
The return type of extract function is MultiMap,which is from
apache.commons.collections

when i run thrift --gen java sample.thrift,
since thrift is not ware of MultiMap type and saying Type "MultiMap" has
not been defined.

How can i make this MultiMap from apache.commons.collection make aware to
thrift.

-- 


*Sreejith.S*
http://srijiths.wordpress.com/
* *http://sreejiths.emurse.com/

tweet2sree@twitter <http://tweet2Sree>

Re: Include external dependency when creating java file from a .thrift file

Posted by Sreejith S <sr...@gmail.com>.
Thank you bryan..

On Fri, Nov 18, 2011 at 2:18 AM, Bryan Duxbury <br...@rapleaf.com> wrote:

> Thrift does not support referencing arbitrary types from languages and
> libraries. It only supports primitives, Maps, Lists, and Sets.
>
> On Thu, Nov 17, 2011 at 1:58 AM, Sreejith S <sr...@gmail.com> wrote:
>
> > Hi ,
> >
> > This is my sample.thrift file
> > namespace java com.test.generated
> >
> > service Extract {
> >  MultiMap extract(1: string text),
> > }
> > The return type of extract function is MultiMap,which is from
> > apache.commons.collections
> >
> > when i run thrift --gen java sample.thrift,
> > since thrift is not ware of MultiMap type and saying Type "MultiMap" has
> > not been defined.
> >
> > How can i make this MultiMap from apache.commons.collection make aware to
> > thrift.
> >
> > --
> >
> >
> > *Sreejith.S*
> > http://srijiths.wordpress.com/
> > * *http://sreejiths.emurse.com/
> >
> > tweet2sree@twitter <http://tweet2Sree>
> >
>



-- 


*Sreejith.S*
http://srijiths.wordpress.com/
* *http://sreejiths.emurse.com/

tweet2sree@twitter <http://tweet2Sree>

Re: Include external dependency when creating java file from a .thrift file

Posted by Bryan Duxbury <br...@rapleaf.com>.
Thrift does not support referencing arbitrary types from languages and
libraries. It only supports primitives, Maps, Lists, and Sets.

On Thu, Nov 17, 2011 at 1:58 AM, Sreejith S <sr...@gmail.com> wrote:

> Hi ,
>
> This is my sample.thrift file
> namespace java com.test.generated
>
> service Extract {
>  MultiMap extract(1: string text),
> }
> The return type of extract function is MultiMap,which is from
> apache.commons.collections
>
> when i run thrift --gen java sample.thrift,
> since thrift is not ware of MultiMap type and saying Type "MultiMap" has
> not been defined.
>
> How can i make this MultiMap from apache.commons.collection make aware to
> thrift.
>
> --
>
>
> *Sreejith.S*
> http://srijiths.wordpress.com/
> * *http://sreejiths.emurse.com/
>
> tweet2sree@twitter <http://tweet2Sree>
>