Problems with classpath using BIRT

494 views
Skip to first unread message

Johann Schweigl

unread,
Dec 19, 2011, 8:15:18 AM12/19/11
to Neo4j
I'm trying to create a BIRT report (using POJO-wrapped nodes via a
scripted data source) in Eclipse Report Designer, but I'm failing at
the basics:

Script engine error: Wrapped java.lang.IllegalArgumentException: No
index provider 'lucene' found. Maybe the intended provider (or one
more of its dependencies) aren't on the classpath or it failed to
load.

I put all of the Neo jars (Community 1.6 M1) I'm using in the Java
project which creates the data in the BIRT classpath (Window/
Preferences/Report Design/Classpath), so the lucene index provider
should be there. Some googling brought me to the assumption that this
could have something to do with OSGi, but as I never ever touched this
OSGi beast, I'm pretty clueless on this.

Has anyone tried something similar with success?

BTW: The Java API only works against an embedded database, right? I'm
asking, because I also downloaded the Neo4j JDBC driver, which I'd
massively prefer over that scripted datasource mess in BIRT, but the
JDBC driver apparently works exclusively against a Neo server, not an
embedded database. Which means I'd have to scrap everything I did on
the Java API up to now, and this is not an option.

Best regards
Johann

Peter Neubauer

unread,
Dec 19, 2011, 8:22:05 AM12/19/11
to ne...@googlegroups.com
Johann,
I think you are right, there might be OSGi issues involved. If you
build and try the superbundle from https://github.com/neo4j/neo4j-osgi
and try that, is that working?

Also, a very cool thought would be to build an embedded JDBC driver
variant that accesses Cypher results direcetly, not via REST JSON
parsing. Something for tinkering over XMas with? ;)

Cheers,

/peter neubauer

Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      @peterneubauer

brew install neo4j && neo4j start
heroku addons:add neo4j

Michael Hunger

unread,
Dec 19, 2011, 8:27:08 AM12/19/11
to ne...@googlegroups.com
is the lucene-core-*.jar also in your classpath?

Not just the neo4j-lucene-index.jar

Michael

Johann Schweigl

unread,
Dec 19, 2011, 11:23:02 AM12/19/11
to Neo4j
Yes, it is. I'm currently cloning the source for the superbundle and
will then try and figure out what to do with it :-)

On Dec 19, 2:27 pm, Michael Hunger <michael.hun...@neotechnology.com>
wrote:


> is the lucene-core-*.jar also in your classpath?
>
> Not just the neo4j-lucene-index.jar
>
> Michael
>
> Am 19.12.2011 um 14:22 schrieb Peter Neubauer:
>
>
>
>
>
>
>
> > Johann,
> > I think you are right, there might be OSGi issues involved. If you

> > build and try the superbundle fromhttps://github.com/neo4j/neo4j-osgi

Johann Schweigl

unread,
Dec 19, 2011, 1:57:41 PM12/19/11
to Neo4j
Any hints on how to get anything done following the instructions on
https://github.com/neo4j/neo4j-osgi ? I'm running git 1.7.8.msysgit.0
on Win2K8 Server R2. I have to confess that I avoided git at all cost
(and find myself confident that this was a Good Thing) up to now,
using just Eclipse & SVN, no maven, so experience is zilch.

I changed the "git co g...@github.com:neo4j/community.git" to "git
clone git://github.com/neo4j/community.git", otherwise nothing would
happen in the first place. Then I did a "git branch -t bundle-friendly-
classloader origin/bundle-friendly-classloader" which looked good.

"mvn clean install" ends up in
Results :

Failed tests: canGetKernelRevision(org.neo4j.kernel.TestVersion):
Kernel revision not specified

Tests run: 466, Failures: 1, Errors: 0, Skipped: 9

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j - Graph Database Kernel ..................... FAILURE
[40.633s]
[INFO] Neo4j - JMX support ............................... SKIPPED
[INFO] Neo4j - Usage Data Collection ..................... SKIPPED
[INFO] Neo4j - Lucene Index .............................. SKIPPED
[INFO] Neo4j - Graph Algorithms .......................... SKIPPED
[INFO] Neo4j - Graph Matching ............................ SKIPPED
[INFO] Neo4j - Graphviz generation ....................... SKIPPED
[INFO] Neo4j - Cypher .................................... SKIPPED
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j - Generic shell ............................. SKIPPED
[INFO] Neo4j Examples .................................... SKIPPED
[INFO] Neo4j Server API .................................. SKIPPED
[INFO] Neo4j Server ...................................... SKIPPED
[INFO] Neo4j Server Examples ............................. SKIPPED
[INFO] Neo4j Community Build ............................. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 41.082s
[INFO] Finished at: Mon Dec 19 19:20:20 CET 2011
[INFO] Final Memory: 21M/78M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.9:test (default-test) on project neo4j-kernel: There are test
failures.
[ERROR]
[ERROR] Please refer to C:\Users\sag\git\community\kernel\target
\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

The same for "git co git://github.com/neo4j/neo4j-osgi.git" - changed
to "git clone ...", and the following mvn clean install results in

Results :

Failed tests:
neo4jStartupTest(org.neo4j.examples.osgi.OSGiTest)
bundleFelixTest(org.neo4j.examples.osgi.OSGiTest)

Tests run: 3, Failures: 2, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j OSGi default bundle ......................... SUCCESS
[5.517s]
[INFO] test-bundle ....................................... SUCCESS
[9.367s]
[INFO] Neo4j OSGi examples ............................... FAILURE
[25.060s]
[INFO] Neo4j OSGi Build .................................. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 40.432s
[INFO] Finished at: Mon Dec 19 19:22:57 CET 2011
[INFO] Final Memory: 25M/154M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-
plugin:2.6:test (default-test) on project neo4j-osgi-examples: There
are test failures.
[ERROR]
[ERROR] Please refer to C:\Users\sag\git\neo4j-osgi\examples\target
\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with
the command
[ERROR] mvn <goals> -rf :neo4j-osgi-examples

Maven version is
$ mvn --version
Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)
Maven home: c:\javalibs\apache-maven-3.0.3
Java version: 1.6.0_26, vendor: Sun Microsystems Inc.
Java home: c:\Program Files (x86)\Java\jdk1.6.0_26\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows server 2008 r2", version: "6.1", arch: "x86",
family: "windows"

Sorry if this all doesn't make sense.

Regards
Johann


On Dec 19, 2:22 pm, Peter Neubauer <peter.neuba...@neotechnology.com>
wrote:


> Johann,
> I think you are right, there might be OSGi issues involved. If you

> build and try the superbundle fromhttps://github.com/neo4j/neo4j-osgi

Peter Neubauer

unread,
Dec 19, 2011, 7:33:47 PM12/19/11
to ne...@googlegroups.com
Cool.
The bundle should then be in bundle/target/....jar

Cheers,

/peter neubauer

Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      @peterneubauer

brew install neo4j && neo4j start
heroku addons:add neo4j

Johann Schweigl

unread,
Dec 21, 2011, 1:27:26 AM12/21/11
to Neo4j
Sorry for still sticking to this issue, but I still can't build the
OSGi friendly classloader stuff:

[INFO] Parent project loaded from repository: org.sonatype.oss:oss-
parent:pom:7
[INFO] Relativizing decoration links with respect to project URL:
http://components.neo4j.org/neo4j/1.6-SNAPSHOT
[INFO] Rendering site with org.neo4j.maven.skins:default-skin:jar:4
skin.
[INFO] Skipped "About" report, file "index.html" already exists for
the English version.
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j - Graph Database Kernel ..................... SUCCESS
[12.256s]
[INFO] Neo4j - JMX support ............................... SUCCESS
[3.248s]
[INFO] Neo4j - Usage Data Collection ..................... SUCCESS
[8.814s]
[INFO] Neo4j - Lucene Index .............................. SUCCESS
[4.054s]
[INFO] Neo4j - Graph Algorithms .......................... SUCCESS
[3.305s]
[INFO] Neo4j - Graph Matching ............................ SUCCESS
[2.768s]
[INFO] Neo4j - Graphviz generation ....................... SUCCESS
[4.851s]
[INFO] Neo4j - Cypher .................................... SUCCESS
[4.900s]
[INFO] Neo4j Community ................................... FAILURE
[0.090s]
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j - Generic shell ............................. SKIPPED
[INFO] Neo4j Examples .................................... SKIPPED
[INFO] Neo4j Server API .................................. SKIPPED
[INFO] Neo4j Server ...................................... SKIPPED
[INFO] Neo4j Server Examples ............................. SKIPPED
[INFO] Neo4j Community Build ............................. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 44.735s
[INFO] Finished at: Tue Dec 20 20:55:10 CET 2011
[INFO] Final Memory: 31M/79M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-
plugin:3.0:site (default-site) on project neo4j: Error during page
generation: Error parsing 'C:\git\community\neo4j\src\site\apt
\index.apt': line [12] Unable to execute macro in the APT document:
Illegally formatted URI (file parameter). No such file: "target/extra-
resources/pom.xml" -> [Help 1]

Any hints?

Peter Neubauer

unread,
Dec 21, 2011, 10:34:00 AM12/21/11
to ne...@googlegroups.com
I Johann,
just updated the projects with better poms, could you please try again to build?

Cheers,

/peter neubauer

Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      @peterneubauer

brew install neo4j && neo4j start
heroku addons:add neo4j

Johann Schweigl

unread,
Dec 21, 2011, 5:23:10 PM12/21/11
to Neo4j
Peter,

just to be sure I started out with a fresh git install, created a user
at github, forked the neo4j/community project, copied it to a local
repo and checked out the bundle-friendly-classloader branch. Did I say
that I'm learning a lot about git these days? Never hurts ;-)

However, this all went a bit different from the build instructions at
https://github.com/neo4j/neo4j-osgi:

git co g...@github.com:neo4j/community.git
cd community
git branch -t bundle-friendly-classloader origin/bundle-friendly-
classloader

instead I did

git clone g...@github.com:jschweigl/community.git (from my fork, which
I believe was unneccesary to do)
git remote add upstream git://github.com/neo4j/community.git
git fetch upstream
cd community
git branch -t bundle-friendly-classloader origin/bundle-friendly-
classloader
git checkout bundle-friendly-classloader

Still being a noob, I just followed what I believed to understand from
various sources, but it felt somehow right.

"mvn clean install" again failed in a test case:

-------------------------------------------------------------------------------
Test set: org.neo4j.kernel.TestVersion
-------------------------------------------------------------------------------
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.002
sec <<< FAILURE!
canGetKernelRevision(org.neo4j.kernel.TestVersion) Time elapsed:
0.001 sec <<< FAILURE!
java.lang.AssertionError: Kernel revision not specified
at org.junit.Assert.fail(Assert.java:93)
at org.junit.Assert.assertTrue(Assert.java:43)
at org.junit.Assert.assertFalse(Assert.java:68)
at org.neo4j.kernel.TestVersion.canGetKernelRevision(TestVersion.java:
31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod
$1.runReflectiveCall(FrameworkMethod.java:44)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:
15)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:
41)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:
20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
69)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:
48)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:292)
at
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:
53)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:
123)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:
104)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:
164)
at org.apache.maven.surefire.booter.ProviderFactory
$ProviderProxy.invoke(ProviderFactory.java:110)
at
org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:
172)
at
org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:
104)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:
70)



So I decided to go through the maven stuff step by step:

mvn validate: all was fine

[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j - Graph Database Kernel ..................... SUCCESS
[0.329s]
[INFO] Neo4j - JMX support ............................... SUCCESS
[0.039s]
[INFO] Neo4j - Usage Data Collection ..................... SUCCESS
[0.043s]
[INFO] Neo4j - Lucene Index .............................. SUCCESS
[0.021s]
[INFO] Neo4j - Graph Algorithms .......................... SUCCESS
[0.017s]
[INFO] Neo4j - Graph Matching ............................ SUCCESS
[0.014s]
[INFO] Neo4j - Graphviz generation ....................... SUCCESS
[0.026s]
[INFO] Neo4j - Cypher .................................... SUCCESS
[0.042s]
[INFO] Neo4j Community ................................... SUCCESS
[0.196s]
[INFO] Neo4j Community ................................... SUCCESS
[0.025s]
[INFO] Neo4j - Generic shell ............................. SUCCESS
[0.021s]
[INFO] Neo4j Examples .................................... SUCCESS
[0.039s]
[INFO] Neo4j Server API .................................. SUCCESS
[0.030s]
[INFO] Neo4j Server ...................................... SUCCESS
[0.330s]
[INFO] Neo4j Server Examples ............................. SUCCESS
[0.017s]
[INFO] Neo4j Community Build ............................. SUCCESS
[0.006s]
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1.595s
[INFO] Finished at: Wed Dec 21 23:23:43 CET 2011
[INFO] Final Memory: 12M/30M
[INFO]
------------------------------------------------------------------------

mvn compile: failed.

[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Neo4j - Graph Database Kernel ..................... SUCCESS
[1.643s]
[INFO] Neo4j - JMX support ............................... SUCCESS
[0.275s]
[INFO] Neo4j - Usage Data Collection ..................... SUCCESS
[0.080s]
[INFO] Neo4j - Lucene Index .............................. SUCCESS
[0.298s]
[INFO] Neo4j - Graph Algorithms .......................... SUCCESS
[0.347s]
[INFO] Neo4j - Graph Matching ............................ SUCCESS
[0.235s]
[INFO] Neo4j - Graphviz generation ....................... SUCCESS
[0.055s]
[INFO] Neo4j - Cypher .................................... SUCCESS
[0.703s]
[INFO] Neo4j Community ................................... FAILURE
[0.331s]
[INFO] Neo4j Community ................................... SKIPPED
[INFO] Neo4j - Generic shell ............................. SKIPPED
[INFO] Neo4j Examples .................................... SKIPPED
[INFO] Neo4j Server API .................................. SKIPPED
[INFO] Neo4j Server ...................................... SKIPPED
[INFO] Neo4j Server Examples ............................. SKIPPED
[INFO] Neo4j Community Build ............................. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 4.366s
[INFO] Finished at: Wed Dec 21 23:13:45 CET 2011
[INFO] Final Memory: 30M/73M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-
dependency-plugin:2.1:unpack-dependencies (get-sources) on project
neo4j: Error unpacking file: C:\Users\sag\community\cypher\target
\classes to: C:\Users\sag\community\neo4j\target\sources

[ERROR] org.codehaus.plexus.archiver.ArchiverException: The source
must not be a directory.
[ERROR] -> [Help 1]

I feel awful about it, but I don't see if I am doing something wrong
or if I'm just hitting by a bug somewhere.

BTW, I think it's high time to say how much I appreciate the time you
guys spend here in the forum. I've rarely seen this level of
dedication. Thanks a lot!

Regards
Johann


Peter Neubauer

unread,
Dec 22, 2011, 5:54:55 AM12/22/11
to ne...@googlegroups.com
Johann,
that class is generated rom calling out to GIT on the command line.
Could we meet up in Skype to sort out if there is setup problems? Then
we can modify the assertion message to give more hints on potential
problems ...

Cheers,

/peter neubauer

Google:neubauer.peter
Skype:peter.neubauer
Phone: +46 704 106975
LinkedIn   http://www.linkedin.com/in/neubauer
Twitter      @peterneubauer

brew install neo4j && neo4j start
heroku addons:add neo4j

Reply all
Reply to author
Forward
0 new messages