Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext, GWT and Guice(Guice library used by Xtext is missing some classes)
Xtext, GWT and Guice [message #553662] Wed, 18 August 2010 12:11 Go to next message
Silvestru  is currently offline Silvestru Friend
Messages: 4
Registered: September 2009
Junior Member
Hello,

I'm trying to use GWT as GUI for a model based on Xtext. The problem is that the GWT servlet needs some classes that don't exists in the guice library used by Xtext. Of course, with the standard guice library I cannot parse the Xtext model anymore.

From what I saw, guice library used by Xtext does not contain com.google.inject.internal.Sets class. Any clue why this class is missing ?

Can anyone guide me to a possible solution ?

Thanks in advance,
Silvestru
Re: Xtext, GWT and Guice [message #553671 is a reply to message #553662] Wed, 18 August 2010 12:47 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

i think the class recently moved to google collections com.google.common.collect.Sets

~Christian


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Xtext, GWT and Guice [message #553679 is a reply to message #553662] Wed, 18 August 2010 12:31 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Silvestru,

Sets.java is missing due to IP issues. It should be possible to create a
plug-in fragment for com.google.inject and add this class.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 18.08.10 14:11, schrieb Silvestru:
> Hello,
>
> I'm trying to use GWT as GUI for a model based on Xtext. The problem is
> that the GWT servlet needs some classes that don't exists in the guice
> library used by Xtext. Of course, with the standard guice library I
> cannot parse the Xtext model anymore.
>
> From what I saw, guice library used by Xtext does not contain
> com.google.inject.internal.Sets class. Any clue why this class is missing ?
>
> Can anyone guide me to a possible solution ?
>
> Thanks in advance,
> Silvestru
Re: Xtext, GWT and Guice [message #553708 is a reply to message #553671] Wed, 18 August 2010 14:32 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Christian,

guice uses an own inlined subset of the google collections. Same applies
for other google projects as well. It has not been moved.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 18.08.10 14:47, schrieb Christian Dietrich:
> Hi,
>
> i think the class recently moved to google collections
> com.google.common.collect.Sets
>
> ~Christian
Re: Xtext, GWT and Guice [message #553731 is a reply to message #553679] Wed, 18 August 2010 15:50 Go to previous messageGo to next message
Silvestru  is currently offline Silvestru Friend
Messages: 4
Registered: September 2009
Junior Member
Hi,

Thank you all for your reply.
I'll try the solution suggested by Sebastian. Hope it will work Smile.
Re: Xtext, GWT and Guice [message #554973 is a reply to message #553731] Wed, 25 August 2010 02:51 Go to previous messageGo to next message
Silvestru  is currently offline Silvestru Friend
Messages: 4
Registered: September 2009
Junior Member
Hi,

The solution suggested by Sebastian did not worked for me (I forgot to mention I need it to work outside eclipse environment also).
As an alternative I try to add Sets class to com.google.guice plugin and rebuild it. In order to do this I've checked out Xtext project set from CVS and ran a releng build but it did not rebuilt guice. Also the com.google.guice plugin sources checked out from CVS does not contain any build related files except build.properties.

Can you guide me on how to rebuild the com.google.guice plugin ?

Thanks,
Silvestru
Re: Xtext, GWT and Guice [message #554999 is a reply to message #554973] Wed, 25 August 2010 06:49 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Am 8/25/10 4:51 AM, schrieb Silvestru:
> Hi,
>
> The solution suggested by Sebastian did not worked for me (I forgot to
> mention I need it to work outside eclipse environment also).

If you put the fragment jar on your classpath in a standard java
environment it should also be visible.

> As an alternative I try to add Sets class to com.google.guice plugin and
> rebuild it. In order to do this I've checked out Xtext project set from
> CVS and ran a releng build but it did not rebuilt guice. Also the
> com.google.guice plugin sources checked out from CVS does not contain
> any build related files except build.properties.
>
> Can you guide me on how to rebuild the com.google.guice plugin ?

Just taking the standard jar from guice and put the Manifest from our
com.google.inject bundle in should work.

Sven


--
--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Xtext, GWT and Guice [message #555016 is a reply to message #554999] Wed, 25 August 2010 08:05 Go to previous messageGo to next message
Silvestru  is currently offline Silvestru Friend
Messages: 4
Registered: September 2009
Junior Member
Hi,

If I try to build guice from sources and replace generated Manifest with the one from com.google.inject bundle I obtain the following error:
java.lang.IllegalAccessError: tried to access class com.google.inject.servlet.ManagedServletPipeline from class $com.google.inject.servlet.ManagedServletPipeline$$FastClass ByGuice$$c910e7a6

If I use the standard guice jar and just replace the Manifest as you said I obtain another error:
java.lang.SecurityException: class " org.eclipse.xtext.validation.AbstractInjectableValidator$$Fa stClassByGuice$$2999770a_2 "'s signer information does not match signer information of other classes in the same package

Any clue about what I'm doing wrong ?

Thanks,
Silvestru
Re: Xtext, GWT and Guice [message #555022 is a reply to message #555016] Wed, 25 August 2010 08:21 Go to previous message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Silvestru,

Guice creates proxy classes by means of byte code creation on the fly.
They try to put these classes into the same package as the original
classes which is prohibited by the security manager. You may want to
disable byte code generation for guice or try to put the fragment with
the Sets class explicitly on the classpath for your outside-eclipse env.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 25.08.10 10:05, schrieb Silvestru:
> Hi,
>
> If I try to build guice from sources and replace generated Manifest with
> the one from com.google.inject bundle I obtain the following error:
> java.lang.IllegalAccessError: tried to access class
> com.google.inject.servlet.ManagedServletPipeline from class
> $com.google.inject.servlet.ManagedServletPipeline$$FastClass
> ByGuice$$c910e7a6
>
> If I use the standard guice jar and just replace the Manifest as you
> said I obtain another error:
> java.lang.SecurityException: class "
> org.eclipse.xtext.validation.AbstractInjectableValidator$$Fa
> stClassByGuice$$2999770a_2 "'s signer information does not match signer
> information of other classes in the same package
>
> Any clue about what I'm doing wrong ?
>
> Thanks,
> Silvestru
Previous Topic:Want to directly call generated parser
Next Topic:Code completion using templates
Goto Forum:
  


Current Time: Thu Apr 25 21:12:45 GMT 2024

Powered by FUDForum. Page generated in 0.03217 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top