Hello,
I'm trying to see if Ignite's CacheJdbc{Blob/Pojo}Store works with PostgreSQL
through PostgreSQL JDBC driver. To that end, I'd like to use the Ignite's test
suite included in the source distribution, because I expect the test suite
tests the feature well (and I don't have apps for enough testing.) I'm using
Ignite 1.7.0.
However, the test suite failed as follows. As you see on the first line, some
tests succeeded.
$ cd <ignite_srcdist_dir>
$ mvn clean test
...
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.019 sec - in
org.apache.ignite.startup.cmdline.GridCommandLineTransformerSelfTest
Running org.apache.ignite.startup.cmdline.GridCommandLineLoaderTest
[15:38:16,239][INFO ][main][root] >>> Starting test class:
GridCommandLineLoaderTest <<<
[15:38:16,241][INFO ][main][root] >>> Starting test:
GridCommandLineLoaderTest#testLoader <<<
[15:38:16,242][INFO
][test-runner-#1244%cmdline.GridCommandLineLoaderTest%][root] Loading Grid from
configuration file:
/file1/tuna/tmp/apache-ignite-1.7.0-src/modules/core/src/test/config/loaders/grid-cfg.xml
class org.apache.ignite.IgniteException: Failed to create Ignite component
(consider adding ignite-spring module to classpath) [component=SPRING,
cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
at
org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:908)
at org.apache.ignite.Ignition.start(Ignition.java:350)
at
org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:302)
at
org.apache.ignite.startup.cmdline.GridCommandLineLoaderTest.testLoader(GridCommandLineLoaderTest.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at junit.framework.TestCase.runTest(TestCase.java:176)
at
org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:1760)
at
org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:118)
at
org.apache.ignite.testframework.junits.GridAbstractTest$4.run(GridAbstractTest.java:1698)
at java.lang.Thread.run(Thread.java:745)
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to create
Ignite component (consider adding ignite-spring module to classpath)
[component=SPRING,
cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
at
org.apache.ignite.internal.IgniteComponentType.componentException(IgniteComponentType.java:313)
at
org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:289)
at
org.apache.ignite.internal.IgniteComponentType.create(IgniteComponentType.java:200)
at
org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:637)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:840)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:749)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:619)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:589)
at org.apache.ignite.Ignition.start(Ignition.java:347)
... 11 more
Caused by: java.lang.ClassNotFoundException:
org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at
org.apache.maven.surefire.booter.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:97)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at
org.apache.ignite.internal.IgniteComponentType.create0(IgniteComponentType.java:275)
... 18 more
Failed to start grid: Failed to create Ignite component (consider adding
ignite-spring module to classpath) [component=SPRING,
cls=org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl]
Note! You may use 'USER_LIBS' environment variable to specify your classpath.
I followed the advice on the last line and set the environment variable as
follows, but nothing changed.
$ export
USER_LIBS=<ignite_bindist_dir>/libs/ignite-spring/ignite-spring-1.7.0.jar
$ mvn clean test
After that, I tried to run just the core tests, but failed with the following
message.
$ cd modules/core
$ mvn clean test
...
[WARNING] The POM for org.apache.ignite:ignite-apache-license-gen:jar:1.7.0 is
missing, no dependency information available
...
[ERROR] Failed to execute goal on project ignite-core: Could not resolve
dependencies for project org.apache.ignite:ignite-core:jar:1.7.0: Failure to
find org.apache.ignite:ignite-apache-license-gen:jar:1.7.0 in
file:///file1/tuna/tmp/apache-ignite-1.7.0-src/modules/core/src/test/binaries/repo
was cached in the local repository, resolution will not be reattempted until
the update interval of ignite-binaries-test-repo has elapsed or updates are
forced -> [Help 1]
...
How can I run the CacheJdbcStore test suite with PostgreSQL most easily? I
wouldn't be surprised to know that I have to change the URL in various source
files in modules/core/src/test/... from "jdbc:h2:" to "jdbc:postgresql:...".
But I failed to run the test suite even with the default H2 database.
Regards
Takayuki Tsunakawa