Looking at the DatabaseURL class from the appengine-api-stubs jar in folder
org.hsql, this class has a method:
*public static org.hsqldb.persist.HsqlProperties parseURL(java.lang.String,
boolean);*
While the DatabaseURL class from org.hsql:2.3.2 dependency has a method:
*public static HsqlProperties parseURL(String url, boolean hasPrefix,
boolean noPath) *
My test is looking for : parseURL(Ljava/lang/String;ZZ)
ZZ-meaning 2 booleans so looking for the DatabaseURL.parseURL in the
org.hsql dependency. However, it finds the one that comes with
appengine-api-stubs.
How could I force it to use the right one? Thanks!
On Tuesday, 25 July 2017 17:50:32 UTC+3, Roxana Ioana Roman wrote:
>
> In order to do some unit tests for a method that uses the TaskQueue, I
> have included the following dependencies in my pom:
>
> <dependency>
>
> <groupId>com.google.appengine</groupId>
>
> <artifactId>appengine-testing</artifactId>
>
> <version>${appengine.target.version}</version>
>
> <scope>test</scope>
>
> </dependency>
>
> <dependency>
>
> <groupId>com.google.appengine</groupId>
>
> <artifactId>appengine-api-stubs</artifactId>
>
> <version>${appengine.target.version}</version>
>
> <scope>test</scope>
>
> </dependency>
> where the ${appengine.target.version is 1.9.42. My test works fine.
> However, as soon as the appengine-api-stubs dependency wass added to my pom
> other tests started failing. It seems to interfere with the org.hsql
> dependency because the tests fail with this error:
>
> java.lang.NoSuchMethodError:
> org.hsqldb.DatabaseURL.parseURL(Ljava/lang/String;ZZ)Lorg/hsqldb/persist/HsqlProperties;
>
> I checked the appengine-api-stubs and it uses a class:
> *org.quartz.impl.jdbcjobstore.HSQLDBDelegate.class,
> *which I thought might be the problem. I added an <exclusion> of the
> org.quartz.scheduler, but the error remained the same.
>
> *mvn dependency:tree -Dverbose -Dincludes=org.hsqldb:hsqldb* does not
> show other transitive dependencies or versions of hsqldb except the 2.3.2 I
> have declared in the pom. Tried to add newer versions of hsql dependency,
> nothing changed.
> Tried to add also (as specified here:
> https://cloud.google.com/appengine/docs/standard/java/tools/localunittesting
> )
> appengine-api
> appengine-api-labs
> appengine-tools-api
> dependencies to my pom, same error.
>
> As soon as I remove the appengine-api-stubs dependency and comment my test
> with the local task queue, all tests pass.
>
> Any ideas about this?
>
>
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/31a8aa46-3dd9-4b6b-b03e-519867421063%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.