Hi Jorge,<br><br>I've tried again and I can't fix it. Maybe I'm wrong with something else. :'(<br>Thanks a lot anyway,<br>Luca<br><br><div class="gmail_quote">2010/8/4 Jorge Piera Llodrá <span dir="ltr"><<a href="mailto:jpiera@prodevelop.es">jpiera@prodevelop.es</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div text="#000000" bgcolor="#ffffff">
Hello Luca.<br>
<br>
You also have to add the dependency for the org.gvsig.metadata library.
But if you adds this dependency and you tries to compile, you will get
a new error because DAL needs more dependences in run time. Joaquin
send you a link with an example of a pom that shows the dependences of
DAL in run time of a concrete project. Just add some of them (you don't
need org.gvsig.fmap.dal.file) and try again.<br>
<br>
Regards,<br><font color="#888888">
Jorge.<br></font><div><div></div><div class="h5">
<br>
<pre>[1]<a href="https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer/pom.xml?root=gvsig-fortuneco&view=markup" target="_blank">https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer/pom.xml?root=gvsig-fortuneco&view=markup</a>
</pre>
<pre><a href="https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer/pom.xml?root=gvsig-fortuneco&view=markup" target="_blank"></a>
</pre>
<br>
<blockquote type="cite">Hi both, <br>
<br>
sorry again.<br>
I've added such dependency but apparently I can't make it working.<br>
<br>
In order to understand the origin of my problem I've gone through two
different steps. <br>
I describe them as far as probably for you it's a trivial problem and
if I describe the approach more precisely maybe you can understand
where I'm wrong:<br>
<div style="margin-left: 40px;"><br>
</div>
- I've created the simplest plugin with the plugin creation wizard from
the last bin of gvSig 2.0 .<br>
The structure is like that:<br>
* org.gvsig.sqliteext <br>
+ lib.api<br>
+ lib.impl<br>
* org.gvsig.sqliteext.app.extension<br>
- I've added a maven project called org.gvsig.sqliteext.sqlite.prov to
the first project (ie org.gvsig.sqliteext)<br>
Now I've a structure like this one: <br>
* org.gvsig.sqliteext <br>
+ lib.api<br>
+ lib.impl<br>
+ sqlite.prov (it containes within src/main just a class in its
package called as maven default App.java)<br>
* org.gvsig.sqliteext.app.extension<br>
<br>
- I've added just a class variable (DataManager manager;) to App.js,
referred to org.gvsig.fmap.dal, into sqlite.prov and I've added the
proper (?) dependency [1] into sqlite.prov pom.xml and everything
compiles apparently alright. <br>
<br>
BUT :<br>
<br>
- I've added the same variable into the SqliteExtDefaultImplLibrary.js
within the lib.impl project and I've got an error [2] because I have
not included the dependency for org.gvsig.fmap.dal.<br>
<br>
IF:<br>
<br>
- I've added the same dependency [1] working for the class described
above but I've got an error [3] during the test phase.<br>
<br>
So, what I guess it is, as Joaquin has suggested before, maybe I'm
missing something for the dependencies during the test phase.<br>
In that case could anyone help me in understanding that point ?<br>
I mean: what kind of dependency I should add for making my sample code
working ?<br>
<br>
I've seen many of them are described in documentation [4] but I still
can't understand how they work.<br>
<br>
Best regards and thanks in advance for your precious help,<br>
Luca<br>
<br>
<br>
[1] <dependency><br>
<groupId>org.gvsig</groupId><br>
<artifactId>org.gvsig.fmap.dal</artifactId><br>
<version>2.0-SNAPSHOT</version><br>
</dependency><br>
<br>
<br>
<br>
[2] [INFO]
------------------------------------------------------------------------<br>
<div style="margin-left: 40px;">[ERROR] BUILD FAILURE<br>
[INFO]
------------------------------------------------------------------------<br>
[INFO] Compilation failure<br>
<br>
/home/luca/workspace2/org.gvsig.sqliteext/org.gvsig.sqliteext.lib/org.gvsig.sqliteext.lib.impl/src/main/java/org/gvsig/sqliteext/impl/SqliteExtDefaultImplLibrary.java:[24,25]
package org.gvsig.fmap.dal does not exist<br>
<br>
/home/luca/workspace2/org.gvsig.sqliteext/org.gvsig.sqliteext.lib/org.gvsig.sqliteext.lib.impl/src/main/java/org/gvsig/sqliteext/impl/SqliteExtDefaultImplLibrary.java:[37,1]
cannot find symbol<br>
symbol : class DataManager<br>
location: class org.gvsig.sqliteext.impl.SqliteExtDefaultImplLibrary<br>
<br>
</div>
<br>
[3] HERE ONE OF SURFIRE REPORTS:<br>
<br>
<div style="margin-left: 40px;">-------------------------------------------------------------------------------<br>
Test set: org.gvsig.sqliteext.impl.DefaultSqliteExtServiceTest<br>
-------------------------------------------------------------------------------<br>
Tests run: 3, Failures: 0, Errors: 3, Skipped: 0, Time elapsed: 0.116
sec <<< FAILURE!<br>
testSqliteExtServiceMessage(org.gvsig.sqliteext.impl.DefaultSqliteExtServiceTest)
Time elapsed: 0.009 sec <<< ERROR!<br>
java.lang.NullPointerException<br>
at
org.gvsig.fmap.dal.DALLibrary.registerDataStoreMetadataDefinition(DALLibrary.java:131)<br>
at
org.gvsig.fmap.dal.DALLibrary.doPostInitialize(DALLibrary.java:81)<br>
at
org.gvsig.tools.library.AbstractLibrary.postInitialize(AbstractLibrary.java:143)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.initializeLibraries(AbstractLibrariesInitializer.java:132)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:94)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:84)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.fullInitialize(AbstractLibrariesInitializer.java:100)<br>
at
org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase.setUp(AbstractLibraryAutoInitTestCase.java:55)<br>
at junit.framework.TestCase.runBare(TestCase.java:125)<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br>
at junit.framework.TestCase.run(TestCase.java:118)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>
at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)<br>
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)<br>
<br>
testSqliteExtServiceDate(org.gvsig.sqliteext.impl.DefaultSqliteExtServiceTest)
Time elapsed: 0.019 sec <<< ERROR!<br>
java.lang.NullPointerException<br>
at
org.gvsig.fmap.dal.DALLibrary.registerDataStoreMetadataDefinition(DALLibrary.java:131)<br>
at
org.gvsig.fmap.dal.DALLibrary.doPostInitialize(DALLibrary.java:81)<br>
at
org.gvsig.tools.library.AbstractLibrary.postInitialize(AbstractLibrary.java:143)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.initializeLibraries(AbstractLibrariesInitializer.java:132)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:94)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:84)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.fullInitialize(AbstractLibrariesInitializer.java:100)<br>
at
org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase.setUp(AbstractLibraryAutoInitTestCase.java:55)<br>
at junit.framework.TestCase.runBare(TestCase.java:125)<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br>
at junit.framework.TestCase.run(TestCase.java:118)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>
at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)<br>
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)<br>
<br>
testSqliteExtServiceManager(org.gvsig.sqliteext.impl.DefaultSqliteExtServiceTest)
Time elapsed: 0.052 sec <<< ERROR!<br>
java.lang.NullPointerException<br>
at
org.gvsig.fmap.dal.DALLibrary.registerDataStoreMetadataDefinition(DALLibrary.java:131)<br>
at
org.gvsig.fmap.dal.DALLibrary.doPostInitialize(DALLibrary.java:81)<br>
at
org.gvsig.tools.library.AbstractLibrary.postInitialize(AbstractLibrary.java:143)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.initializeLibraries(AbstractLibrariesInitializer.java:132)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:94)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:84)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.fullInitialize(AbstractLibrariesInitializer.java:100)<br>
at
org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase.setUp(AbstractLibraryAutoInitTestCase.java:55)<br>
at junit.framework.TestCase.runBare(TestCase.java:125)<br>
at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
at junit.framework.TestResult.run(TestResult.java:109)<br>
at junit.framework.TestCase.run(TestCase.java:118)<br>
at junit.framework.TestSuite.runTest(TestSuite.java:208)<br>
at junit.framework.TestSuite.run(TestSuite.java:203)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)<br>
at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)<br>
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)<br>
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
at java.lang.reflect.Method.invoke(Method.java:597)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)<br>
at
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)<br>
<br>
<br>
<br>
<br>
</div>
[4] <a href="http://jornadas.gvsig.org/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/binarios/view?set_language=en" target="_blank">http://jornadas.gvsig.org/projects/gvsig-desktop/docs/devel/org.gvsig.fmap.dal/2.0.0/binarios/view?set_language=en</a><br>
<div style="margin-left: 40px;"><br>
<br>
<br>
</div>
<br>
<br>
<br>
<div class="gmail_quote">2010/8/3 Jorge Piera Llodrá <span><<a href="mailto:jpiera@prodevelop.es" target="_blank">jpiera@prodevelop.es</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
Hello.<br>
<br>
You don't have any implementation of the ICRSFactory in run time while
you are executing your test. Just add to your pom next dependence:
<div><br>
<br>
<dependency><br>
<groupId>org.gvsig</groupId><br>
</div>
<artifactId>org.gvsig.projection</artifactId>
<div><br>
<version>2.0-SNAPSHOT</version><br>
</div>
<classifier>cresques-impl</classifier><br>
<scope>test</scope><br>
</dependency><br>
<br>
And try again.<br>
<br>
Regards,<br>
Jorge.
<div>
<div><br>
<br>
<br>
On 08/02/2010 05:35 PM, luca bianconi wrote:
</div>
</div>
<blockquote>
<div>
<div>Hi both,<br>
<br>
I've tried to enjoy of both your suggestions but I still can't compile
it. :-(<br>
<br>
I've tried to adapt the pom of the project suggested by Joaquin [1] but
I've got a new error.<br>
I get it from
/home/luca/workspace2/org.gvsig.myprov/org.gvsig.myprov.lib/org.gvsig.myprov.lib.impl/target/surefire-reports
as
suggested by Jorge : <br>
<br>
<div style="margin-left: 40px;"><i>testMyProvServiceMessage(org.gvsig.myprov.impl.DefaultMyProvServiceTest)
Time
elapsed: 0.024 sec <<< ERROR!<br>
An instance of ICRSFactory has not been registered in the CRSFactory<br>
at
org.gvsig.tools.exception.BaseRuntimeException.<init>(BaseRuntimeException.java:73)<br>
at
org.cresques.CRSFactoryNotRegisteredException.<init>(CRSFactoryNotRegisteredException.java:46)<br>
at
org.cresques.ProjectionLibrary.doPostInitialize(ProjectionLibrary.java:45)<br>
at
org.gvsig.tools.library.AbstractLibrary.postInitialize(AbstractLibrary.java:143)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.initializeLibraries(AbstractLibrariesInitializer.java:132)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:94)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.postInitialize(AbstractLibrariesInitializer.java:84)<br>
at
org.gvsig.tools.library.AbstractLibrariesInitializer.fullInitialize(AbstractLibrariesInitializer.java:100)<br>
at
org.gvsig.tools.junit.AbstractLibraryAutoInitTestCase.setUp(AbstractLibraryAutoInitTestCase.java:55)<br>
at junit.framework.TestCase.runBare(TestCase.java:125)<br>
<br>
<br>
</i><br>
</div>
Does it make any sense to you ? I felt quite discouraged. <br>
If anyone has enough patience to help me I could put it on <a href="https://svn.forge.osor.eu/svn/gvsig-sandbox/gvsig-sqlite/trunk/TestCode/ExtensionsTests" target="_blank">https://svn.forge.osor.eu/svn/gvsig-sandbox/gvsig-sqlite/trunk/TestCode/ExtensionsTests</a>
. Probably it's a trivial thing for you but it's driving me crazy and
making me loosing lots of time.<br>
<br>
Thanks both for your precious help,<br>
Luca<br>
<br>
[1] <a href="https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer/pom.xml?root=gvsig-fortuneco&view=markup" target="_blank">https://forge.osor.eu/plugins/scmsvn/viewcvs.php/org.gvsig.landregistryviewer/trunk/org.gvsig.landregistryviewer/pom.xml?root=gvsig-fortuneco&view=markup</a><br>
</div>
</div>
<pre><fieldset></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<div><a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</div></pre>
</blockquote>
<br>
<br>
<pre>--
Jorge Piera Llodrá
gvSIG Development Team
PRODEVELOP
Plaza Don Juan de Villarrasa, 14 - 5
46001 Valencia
Tel: +34 963510612
Fax: +34 963510908
e-mail: <a href="mailto:jpiera@prodevelop.es" target="_blank">jpiera@prodevelop.es</a><div>
<a href="http://www.prodevelop.es" target="_blank">http://www.prodevelop.es</a>
<a href="http://www.gvsig.org" target="_blank">http://www.gvsig.org</a>
</div></pre>
</div>
<br>
_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br>
</blockquote>
</div>
<br>
<pre><fieldset></fieldset>
_______________________________________________
Gvsig_internacional mailing list
<a href="mailto:Gvsig_internacional@listserv.gva.es" target="_blank">Gvsig_internacional@listserv.gva.es</a>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a>
</pre>
</blockquote>
<br>
<br>
<pre cols="72">--
Jorge Piera Llodrá
gvSIG Development Team
PRODEVELOP
Plaza Don Juan de Villarrasa, 14 - 5
46001 Valencia
Tel: +34 963510612
Fax: +34 963510908
e-mail: <a href="mailto:jpiera@prodevelop.es" target="_blank">jpiera@prodevelop.es</a>
<a href="http://www.prodevelop.es" target="_blank">http://www.prodevelop.es</a>
<a href="http://www.gvsig.org" target="_blank">http://www.gvsig.org</a>
</pre>
</div></div></div>
<br>_______________________________________________<br>
Gvsig_internacional mailing list<br>
<a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
<a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
<br></blockquote></div><br>