[GeoNetwork-devel] SQL scripts

Hi all,
in 2.6.x branches [1] and trunk [2] there are quite a number of
differences and I'm not sure what should be done for all of them.

1) An IndexLanguages table was added to 2.6.3 but does not appear in
trunk (where those settings are set in the Settings table I think)
2) An ElementSetName table exist in 2.6.x but not in trunk
3) Català was added to trunk but not in the SQL file
4) Türkçe is not in trunk

Any comments ? Is there any plan to align trunk for them, because it
make migration more complex if we need to rollback changes between
versions (even if we could).

Thanks.

Francois (trying to improve db migration task #583, comments are
welcomed on that ticket too)

[1] https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/branches/2.6.x/web/src/main/webapp/WEB-INF/classes/setup/sql/create/create-db-default.sql
[2] https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk/web/src/main/webapp/WEB-INF/classes/setup/sql/create/create-db-default.sql

I can confirm these problems. Trying to start geonetwork trunk results in an NPE. Should I try to update the sql scripts on trunk and try to get geonetwork running ?

index languages root is null
index languages root is nulljava.lang.NullPointerException
  at org.fao.geonet.kernel.setting.SettingInfo.getSelectedIndexLanguages(SettingInfo.java:178)
  at org.fao.geonet.kernel.search.SearchManager.findStopwords(SearchManager.java:187)
  at org.fao.geonet.kernel.search.SearchManager.createGeoNetworkAnalyzer(SearchManager.java:157)
  at org.fao.geonet.kernel.search.SearchManager.createAnalyzerFromLuceneConfig(SearchManager.java:241)
  at org.fao.geonet.kernel.search.SearchManager.createAnalyzer(SearchManager.java:301)
  at org.fao.geonet.kernel.search.SearchManager.<init>(SearchManager.java:345)
  at org.fao.geonet.Geonetwork.start(Geonetwork.java:309)
  at jeeves.server.JeevesEngine.initAppHandler(JeevesEngine.java:515)
  at jeeves.server.JeevesEngine.init(JeevesEngine.java:160)
  at jeeves.server.sources.http.JeevesServlet.init(JeevesServlet.java:76)
  at javax.servlet.GenericServlet.init(GenericServlet.java:241)
  at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:440)
  at org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:263)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:736)
  at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
  at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
  at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
  at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
  at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
  at runjettyrun.Bootstrap$3.filesChanged(Bootstrap.java:465)
  at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
  at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
  at org.mortbay.util.Scanner.scan(Scanner.java:280)
  at org.mortbay.util.Scanner$1.run(Scanner.java:232)
  at java.util.TimerThread.mainLoop(Timer.java:512)
  at java.util.TimerThread.run(Timer.java:462)

Zitat von Francois Prunayre <fx.prunayre@anonymised.com>:

Hi all,
in 2.6.x branches [1] and trunk [2] there are quite a number of
differences and I'm not sure what should be done for all of them.

1) An IndexLanguages table was added to 2.6.3 but does not appear in
trunk (where those settings are set in the Settings table I think)
2) An ElementSetName table exist in 2.6.x but not in trunk
3) Català was added to trunk but not in the SQL file
4) Türkçe is not in trunk

Any comments ? Is there any plan to align trunk for them, because it
make migration more complex if we need to rollback changes between
versions (even if we could).

Thanks.

Francois (trying to improve db migration task #583, comments are
welcomed on that ticket too)

[1] https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/branches/2.6.x/web/src/main/webapp/WEB-INF/classes/setup/sql/create/create-db-default.sql
[2] https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk/web/src/main/webapp/WEB-INF/classes/setup/sql/create/create-db-default.sql

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

AFAIK Sqlserver, postgres and mysql are fine with the validation query "select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException because the sql connection is closed during an open transaction. I cannot investigate further since I could not find a source jar for dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to config.xml. If the element is not present for a db, no validation query is used.

Should I provide a patch for this ?.

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Hello Christian

2011/8/25 <christian.mueller@anonymised.com>:

AFAIK Sqlserver, postgres and mysql are fine with the validation query
"select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException
because the sql connection is closed during an open transaction. I
cannot investigate further since I could not find a source jar for
dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to
config.xml. If the element is not present for a db, no validation
query is used.

Should I provide a patch for this ?.

Sure if you could that would be great as Simon is off for a few days
now (I think).
Open a ticket and add your patch if you could, I'll try to find time
to commit it.

Thanks a lot.

Francois

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

2011/8/26 Francois Prunayre <fx.prunayre@anonymised.com>:

Hello Christian

2011/8/25 <christian.mueller@anonymised.com>:

AFAIK Sqlserver, postgres and mysql are fine with the validation query
"select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException
because the sql connection is closed during an open transaction. I
cannot investigate further since I could not find a source jar for
dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to
config.xml. If the element is not present for a db, no validation
query is used.

Should I provide a patch for this ?.

Sure if you could that would be great as Simon is off for a few days
now (I think).
Open a ticket and add your patch if you could, I'll try to find time
to commit it.

Thanks for the patch Christian.

Added to trunk : http://trac.osgeo.org/geonetwork/ticket/591

Francois

Thanks a lot.

Francois

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Btw, since I am not knowing your internal procedures, I want to ask a question.
Some times ago, we patched a document on trunk concerning installing databases. I can see the commitment here

https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk/docs/eng/users/source/quickstartguide/installing/index.rst

But if I look here I see nothing about sql databases
http://geonetwork-opensource.org/manuals/trunk/users/quickstartguide/installing/index.html

Is this wanted ?

Zitat von Francois Prunayre <fx.prunayre@anonymised.com>:

2011/8/26 Francois Prunayre <fx.prunayre@anonymised.com>:

Hello Christian

2011/8/25 <christian.mueller@anonymised.com>:

AFAIK Sqlserver, postgres and mysql are fine with the validation query
"select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException
because the sql connection is closed during an open transaction. I
cannot investigate further since I could not find a source jar for
dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to
config.xml. If the element is not present for a db, no validation
query is used.

Should I provide a patch for this ?.

Sure if you could that would be great as Simon is off for a few days
now (I think).
Open a ticket and add your patch if you could, I'll try to find time
to commit it.

Thanks for the patch Christian.

Added to trunk : http://trac.osgeo.org/geonetwork/ticket/591

Francois

Thanks a lot.

Francois

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Hello Christian,

2011/8/30 <christian.mueller@anonymised.com>:

Btw, since I am not knowing your internal procedures, I want to ask a
question.
Some times ago, we patched a document on trunk concerning installing
databases. I can see the commitment here

https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk/docs/eng/users/source/quickstartguide/installing/index.rst

But if I look here I see nothing about sql databases
http://geonetwork-opensource.org/manuals/trunk/users/quickstartguide/installing/index.html

Is this wanted ?

Jose updated the website this morning so it should ok now.

Cheers.

Francois

Zitat von Francois Prunayre <fx.prunayre@anonymised.com>:

2011/8/26 Francois Prunayre <fx.prunayre@anonymised.com>:

Hello Christian

2011/8/25 <christian.mueller@anonymised.com>:

AFAIK Sqlserver, postgres and mysql are fine with the validation query
"select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException
because the sql connection is closed during an open transaction. I
cannot investigate further since I could not find a source jar for
dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to
config.xml. If the element is not present for a db, no validation
query is used.

Should I provide a patch for this ?.

Sure if you could that would be great as Simon is off for a few days
now (I think).
Open a ticket and add your patch if you could, I'll try to find time
to commit it.

Thanks for the patch Christian.

Added to trunk : http://trac.osgeo.org/geonetwork/ticket/591

Francois

Thanks a lot.

Francois

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Yep, thanks a lot

Cheers
Christian

Zitat von Francois Prunayre <fx.prunayre@anonymised.com>:

Hello Christian,

2011/8/30 <christian.mueller@anonymised.com>:

Btw, since I am not knowing your internal procedures, I want to ask a
question.
Some times ago, we patched a document on trunk concerning installing
databases. I can see the commitment here

https://geonetwork.svn.sourceforge.net/svnroot/geonetwork/trunk/docs/eng/users/source/quickstartguide/installing/index.rst

But if I look here I see nothing about sql databases
http://geonetwork-opensource.org/manuals/trunk/users/quickstartguide/installing/index.html

Is this wanted ?

Jose updated the website this morning so it should ok now.

Cheers.

Francois

Zitat von Francois Prunayre <fx.prunayre@anonymised.com>:

2011/8/26 Francois Prunayre <fx.prunayre@anonymised.com>:

Hello Christian

2011/8/25 <christian.mueller@anonymised.com>:

AFAIK Sqlserver, postgres and mysql are fine with the validation query
"select 1".

For Oracle, I think it has to be "select 1 from dual".

For DB2, it has to be
"SELECT 1 FROM SYSIBM.SYSDUMMY1 WHERE 0=1"

Even worse, using the correct query on db2 results in an SQLException
because the sql connection is closed during an open transaction. I
cannot investigate further since I could not find a source jar for
dbcp-6.0.29.jar.

IMHO, a manageable way is to add a xml element <validationQuery> to
config.xml. If the element is not present for a db, no validation
query is used.

Should I provide a patch for this ?.

Sure if you could that would be great as Simon is off for a few days
now (I think).
Open a ticket and add your patch if you could, I'll try to find time
to commit it.

Thanks for the patch Christian.

Added to trunk : http://trac.osgeo.org/geonetwork/ticket/591

Francois

Thanks a lot.

Francois

Cheers
Christian

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
GeoNetwork-devel mailing list
GeoNetwork-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-devel
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.