Thanks - Yes, I’ve taken the approach of repackaging with a newer version of guava as you recommend.
Thanks for the quick response - John On Aug 25, 2014, at 3:20 PM, John May <[email protected]> wrote: > Hi John, > > Is the issue the packaging or the guava version? Either way - I will make > sure that is resolved that for next release but I’m not familiar with > glassfish/weld. > > Are you using anything for the dependency management? The CDK jar with > decencies is a no thrills "drop this on your class path and go” distribution. > For large projects you’re better off only including what you need. In your > case if you’re doing some simple molfile handling you probably only need > ‘cdk-io’ and ‘cdk-data’ (or ‘cdk-silent’). > > For example, using maven you could specify these modules with a custom > version of guava. > >> <dependency> >> <groupId>org.openscience.cdk</groupId> >> <artifactId>cdk-io</artifactId> >> <version>1.5.7</version> >> </dependency> >> <dependency> >> <groupId>org.openscience.cdk</groupId> >> <artifactId>cdk-data</artifactId> >> <version>1.5.7</version> >> </dependency> > >> <dependency> >> <groupId>com.google.guava</groupId> >> <artifactId>guava</artifactId> >> <version>17.0</version> >> </dependency> > > > Maven will then pull in the CDK modules and required dependencies but will > use a newer version of guava you’ve request. More info in the README for the > maven repos. > > You can also build with a new guava version as follows. > >> git clone … etc >> cd cdk/ >> mvn versions:set -DartifactId=guava -DnewVersion=17.0 >> mvn clean install -DskipTests > > The bundled jar is located > >> bundle/target/cdk-1.5.8-SNAPSHOT.jar > > > Hope that helps, > J > > On Aug 25, 2014, at 2:58 PM, John K Sterling <[email protected]> wrote: > >> Hi All - >> >> I've been integrating with CDK for some basic mol file analysis. My >> application runs in glassfish, and using targeted jars I haven't had >> any issues. I've been extending the usage and am now importing the >> entire cdk jar - which raises a well known issue with the version of >> guava that is imported: >> >> WELD-001408 Unsatisfied dependencies for type [Set<Service>] with >> qualifiers [@Default] at injection point [[BackedAnnotatedParameter] >> Parameter 1 of [BackedAnnotatedConstructor] @Inject >> com.google.common.util.concurrent.ServiceManager(Set<Service>)] >> >> >> The situation is described here: https://java.net/jira/browse/GLASSFISH-20579 >> >> I assume others have run into this? Given you have embedded guava I >> can't really resolve it without crippling CDI (which I'd prefer not to >> do) or repackaging cdk with a newer version of guava. >> >> Anyone else have better recommendations? >> >> >> jks >> >> ------------------------------------------------------------------------------ >> Slashdot TV. >> Video for Nerds. Stuff that matters. >> http://tv.slashdot.org/ >> _______________________________________________ >> Cdk-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/cdk-user > ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

