On 30 October 2010 07:59, Jay <[email protected]> wrote:
> Hi, I've been using sisu-guice 3.0-SNAPSHOT (https://
> repository.sonatype.org/content/groups/forge/org/sonatype/sisu/sisu-
> guice/3.0-SNAPSHOT/) with my GWT app with GWTP, hibernate and tomcat
> 6.0 for about a month now. All was working well, and was quite easy to
> setup. While browsing the sonatype.org's repository, I found that
> another version of guice 3.0-SNAPSHOT is available (https://
> repository.sonatype.org/content/groups/forge/com/google/inject/guice/
> 3.0-SNAPSHOT/) and decided to make the switch over, just because of
> the better name format.
>
> Anyway, long story short, I now can not start my server and get an
> error that states that a null value was returned by binding at
> JpaPersistModule.java:63 because of a parameter of 1 in
> JpaPersistService.<init>() is not @Nullable while locating Properties
> annotated with @com.google.inject.persist.jpa.Jpa().
>
> I'm not sure what changed from these two versions...
>
there were some @Nullable changes going in over the last few days
so I think you were unlucky and somehow pulled down a snapshot of
guice-persist that didn't match the core snapshot.
the latest grid snapshot looks stable, so you might want to try again
using -U to force Maven to grab the latest snapshots from the grid.
> My persistence.xml file looks like this:
> <persistence-unit name="myUnit" transaction-type="RESOURCE_LOCAL">
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> .... stuff here for entities & db setting and
> cache ....
> </persistence-unit>
>
> My web.xml file defines a guiceFilter for the servlet:
> <filter>
> <filter-name>guiceFilter</filter-name>
> <filter-class>com.google.inject.servlet.GuiceFilter</filter-class>
> </filter>
>
> <filter-mapping>
> <filter-name>guiceFilter</filter-name>
> <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> My DispatchServletModule.java which extends ServletModule looks like
> this:
> public class DispatchServletModule extends ServletModule {
> @Override
> public void configureServlets() {
> install(new JpaPersistModule("myUnit"));
>
> filter("/*").through(PersistFilter.class);
>
>
> bindConstant().annotatedWith(SecurityCookie.class).to("JSESSIONID");
>
> filter("*").through(HttpSessionSecurityCookieFilter.class);
>
> serve("/" + ActionImpl.DEFAULT_SERVICE_NAME +
> "*").with(DispatchServiceImpl.class);
> }
> }
>
> Some of these settings are defined for GWTP. I've been scratching my
> brain to figure where this error is coming from and can make any
> headway and advice are most welcomed.
>
> Thank you. Jay
>
> --
> You received this message because you are subscribed to the Google Groups
> "google-guice" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-guice%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-guice?hl=en.
>
>
--
Cheers, Stuart
--
You received this message because you are subscribed to the Google Groups
"google-guice" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice?hl=en.