Glad to see that LATIN1 worked. However, if you need to use UTF8
encoding, then I suspect that the database needs to be modified.
I believe this is causing the problem.
CREATE TABLE `Metadata` (
`id` int(11) NOT NULL default '0',
`uuid` varchar(250) collate latin1_bin NOT NULL,
`schemaId` varchar(32) collate latin1_bin NOT NULL,
`isTemplate` char(1) collate latin1_bin NOT NULL default 'n',
`isHarvested` char(1) collate latin1_bin NOT NULL default 'n',
`createDate` varchar(24) collate latin1_bin NOT NULL,
`changeDate` varchar(24) collate latin1_bin NOT NULL,
`data` text collate latin1_bin NOT NULL,
`source` varchar(250) collate latin1_bin NOT NULL,
`title` varchar(255) collate latin1_bin default NULL,
`root` varchar(255) collate latin1_bin default NULL,
`harvestUuid` varchar(250) collate latin1_bin default NULL,
`owner` int(11) NOT NULL,
`groupOwner` int(11) default NULL,
`harvestUri` varchar(255) collate latin1_bin default NULL,
`rating` int(11) NOT NULL default '0',
`popularity` int(11) NOT NULL default '0',
PRIMARY KEY (`id`),
UNIQUE KEY `uuid` (`uuid`,`source`,`harvestUuid`),
KEY `owner` (`owner`),
KEY `groupOwner` (`groupOwner`),
KEY `MetadataNDX1` (`uuid`),
KEY `MetadataNDX2` (`source`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_bin;
This is my metadata table as dumped from MySQL. The unique key length is
too long . However, the composite fields, namely uuid and harvestUuid
are listed at varchar (255). This field length is too long, and I assume
that this data could be stored in a much shorter field length. I have
not delved into the code either at this point, but see no reason why a
UUID needs to be stored in a varchar(255) column. This would have the
effect of shortening the key length certainly improving performance. If
you need multibyte encodings such as UTF8, shorten the field length to
32 and see what happens.
Maybe the developers can comment here?
With regards to this error, did you try and restart Tomcat?
Best regards,
Jason
-----Original Message-----
From: geonetwork-users-bounces@lists.sourceforge.net
[mailto:geonetwork-users-bounces@lists.sourceforge.net] On Behalf Of
ajs6f
Sent: 01 November 2007 19:29
To: geonetwork-users@lists.sourceforge.net
Subject: Re: [GeoNetwork-users] problem configuring MySQL (improving but
newproblem with sample data)
I've taken Mr. Pickering's advice and tried setup with a MySQL
database using LATIN1. It did the trick with the 'setup' problem.
Thanks!
But now I'm getting a completely different blockage.
I'm getting "The requested operation could not be performed." all
over the website (caused by the sort of exception I've quoted out
twice at the bottom of the message; once thrown for trying to login
to the web admin interface and once for loading part of the main page).
Also, the 'sample data' functionality in GAST now throws a Exception:
<no message> and the stack trace is shown below (third of three).
Any thoughts? I'm a bit stuck because it's a generic
NullPointerException and I don't know much about the actual code.
---
A. Soroka ; DSS R&D / University of Virginia Library
Exception thrown by trying to login to the web admin interface:
2007-11-01 13:48:26,526 INFO [jeeves.request] -
2007-11-01 13:48:26,527 INFO [jeeves.request] - HTML Request (from
128.143.193.233) : /geonetwork/srv/en/user.login
2007-11-01 13:48:26,527 DEBUG [jeeves.request] - Method : POST
2007-11-01 13:48:26,527 DEBUG [jeeves.request] - Content type :
application/x-www-form-urlencoded
2007-11-01 13:48:26,527 DEBUG [jeeves.request] - Accept : text/
xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/
plain;q=0.8,image/png,*/*;q=0.5
2007-11-01 13:48:26,527 INFO [jeeves.service] - Dispatching :
user.login
2007-11-01 13:48:26,528 DEBUG [jeeves.service] - -> parameters are :
<request>
<password>admin</password>
<username>admin</username>
</request>
2007-11-01 13:48:26,528 ERROR [jeeves.service] - Exception when
executing service
2007-11-01 13:48:26,528 ERROR [jeeves.service] - (C) Exc :
java.lang.NullPointerException
2007-11-01 13:48:26,529 DEBUG [jeeves.service] - Raised exception
while executing service
<error id="error">
<message />
<class>NullPointerException</class>
<stack>
<at class="org.fao.geonet.services.login.Login"
file="Login.java" line="67" method="exec" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="238" method="execService" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="141" method="execServices" />
<at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="372" method="dispatch" />
<at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="600" method="dispatch" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="163" method="execute" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="98" method="doPost" />
<at class="javax.servlet.http.HttpServlet"
file="HttpServlet.java" line="710" method="service" />
<at class="javax.servlet.http.HttpServlet"
file="HttpServlet.java" line="803" method="service" />
<at class="org.apache.catalina.core.ApplicationFilterChain"
file="ApplicationFilterChain.java" line="269"
method="internalDoFilter" />
</stack>
<request>
<language>en</language>
<service>user.login</service>
</request>
</error>
2007-11-01 13:48:26,529 INFO [jeeves.service] - -> dispatching to
error for : user.login
2007-11-01 13:48:26,638 ERROR [jeeves.service] - Exception executing
gui service : java.lang.NullPointerException
2007-11-01 13:48:26,639 ERROR [jeeves.service] - (C) Stack trace is :
java.lang.NullPointerException
at org.fao.geonet.guiservices.util.Env.exec(Env.java:53)
at jeeves.server.dispatchers.guiservices.Call.exec(Call.java:
75)
at jeeves.server.dispatchers.AbstractPage.invokeGuiService
(AbstractPage.java:119)
at jeeves.server.dispatchers.AbstractPage.invokeGuiServices
(AbstractPage.java:103)
at jeeves.server.dispatchers.ServiceManager.dispatchError
(ServiceManager.java:668)
at jeeves.server.dispatchers.ServiceManager.handleError
(ServiceManager.java:460)
at jeeves.server.dispatchers.ServiceManager.dispatch
(ServiceManager.java:405)
at jeeves.server.JeevesEngine.dispatch(JeevesEngine.java:600)
at jeeves.server.sources.http.JeevesServlet.execute
(JeevesServlet.java:163)
at jeeves.server.sources.http.JeevesServlet.doPost
(JeevesServlet.java:98)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
2007-11-01 13:48:26,642 INFO [jeeves.service] - -> transforming
with stylesheet : /usr/local/projects/geonetwork/web/geonetwork/xsl/
error.xsl
2007-11-01 13:48:26,773 INFO [jeeves.service] - -> end error
transformation for : user.login
2007-11-01 13:48:26,773 INFO [jeeves.service] - -> error ended
for : user.login
Exception thrown by the main page trying to get a service:
2007-11-01 13:49:39,123 INFO [jeeves.webapp.main.home] - Returning
search data
2007-11-01 13:49:39,124 ERROR [jeeves.service] - Exception executing
gui service : java.lang.NullPointerException
2007-11-01 13:49:39,124 ERROR [jeeves.service] - (C) Stack trace is :
java.lang.NullPointerException
at org.fao.geonet.guiservices.keywords.Get.exec(Get.java:55)
at jeeves.server.dispatchers.guiservices.Call.exec(Call.java:
75)
at jeeves.server.dispatchers.AbstractPage.invokeGuiService
(AbstractPage.java:119)
at jeeves.server.dispatchers.AbstractPage.invokeGuiServices
(AbstractPage.java:104)
at jeeves.server.dispatchers.ServiceManager.dispatchOutput
(ServiceManager.java:584)
at jeeves.server.dispatchers.ServiceManager.dispatch
(ServiceManager.java:378)
at jeeves.server.JeevesEngine.dispatch(JeevesEngine.java:600)
at jeeves.server.sources.http.JeevesServlet.execute
(JeevesServlet.java:163)
at jeeves.server.sources.http.JeevesServlet.doGet
(JeevesServlet.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:174)
at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service
(CoyoteAdapter.java:151)
at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:874)
at org.apache.coyote.http11.Http11BaseProtocol
$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket
(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt
(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:595)
Exception thrown by trying to import sample data in GAST:
323951 [Thread-4] WARN cookie.CookieSpec - Invalid cookie state:
domain not specified
323956 [Thread-4] WARN httpclient.HttpMethodBase - Going to buffer
response body of large or unknown size. Using getResponseBodyAsStream
instead is recommended.
*** Error is:
<error id="error">
<message />
<class>NullPointerException</class>
<stack>
<at class="org.fao.geonet.services.login.Login"
file="Login.java" line="67" method="exec" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="238" method="execService" />
<at class="jeeves.server.dispatchers.ServiceInfo"
file="ServiceInfo.java" line="141" method="execServices" />
<at class="jeeves.server.dispatchers.ServiceManager"
file="ServiceManager.java" line="372" method="dispatch" />
<at class="jeeves.server.JeevesEngine" file="JeevesEngine.java"
line="600" method="dispatch" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="163" method="execute" />
<at class="jeeves.server.sources.http.JeevesServlet"
file="JeevesServlet.java" line="88" method="doGet" />
<at class="javax.servlet.http.HttpServlet"
file="HttpServlet.java" line="690" method="service" />
<at class="javax.servlet.http.HttpServlet"
file="HttpServlet.java" line="803" method="service" />
<at class="org.apache.catalina.core.ApplicationFilterChain"
file="ApplicationFilterChain.java" line="269"
method="internalDoFilter" />
</stack>
<request>
<language>en</language>
<service>xml.user.login</service>
</request>
</error>
java.lang.Exception:
at org.fao.gast.lib.ServiceLib.checkError(ServiceLib.java:82)
at org.fao.gast.lib.ServiceLib.login(ServiceLib.java:53)
at org.fao.gast.gui.panels.database.sample.Worker.login
(Worker.java:125)
at org.fao.gast.gui.panels.database.sample.Worker.executeJob
(Worker.java:96)
at org.fao.gast.gui.panels.database.sample.Worker.run
(Worker.java:73)
at java.lang.Thread.run(Thread.java:595)
On Oct 31, 2007, at 3:26 PM, Pickering, Jason wrote:
With regards to the cyclic reference in MySQL, it does not seem to
prevent geonetwork from working. I ignored it, and it seems to
work, although it should be looked into.
The other message is likely caused by the encoding scheme of your
databsae. Unless you need to use something other than LATIN1,
don't. I got the same message when I created a geonetwork datbase
with the UTF8 encoding scheme. Using LATIN1 works fine. If you need
to use UTF8, you may need to make changes to your MySQL instance,
but maybe as a first step you can try to create the database with
the LATIN1 scheme.
Best regards,
Jason Pickering
-----Original Message-----
From: geonetwork-users-bounces@lists.sourceforge.net on behalf of
ajs6f
Sent: Wed 10/31/2007 5:36 PM
To: geonetwork-users@lists.sourceforge.net
Subject: [GeoNetwork-users] problem configuring MySQL
Hello!
My name is Adam Soroka. I'm bringing up a Geonetwork instance at the
University of Virginia Library. We're using Tomcat 5.5.25 and MySQL
5.0.27, or rather, we're trying to. {grin}
I'm getting a error message when I try to use GAST to configure the
database. I'm fairly sure I've got the connections lined up properly
and passwords in place and so forth. Here's the error:
Error
Cyclic reference found:
[Metadata, MetadataCateg, OperationAllowed]
and then when I okay that dialog box to move on, I'm given:
MySQLSyntaxErrorException
Specified key was too long: max key length is 1000 bytes
The readout at the console doesn't include the stacktrace for the
first-- just the second:
346138 [Thread-7] INFO gast - Removing database objects
356087 [Thread-7] INFO gast - Creating database schema
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: Specified key
was too long; max key length is 1000 bytes
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:
936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
at com.mysql.jdbc.Connection.execSQL(Connection.java:3256)
at com.mysql.jdbc.PreparedStatement.executeInternal
(PreparedStatement.java:1313)
at com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1585)
at com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1500)
at com.mysql.jdbc.PreparedStatement.executeUpdate
(PreparedStatement.java:1485)
at jeeves.resources.dbms.Dbms.execute(Dbms.java:256)
at jeeves.resources.dbms.Dbms.execute(Dbms.java:232)
at org.fao.gast.lib.DatabaseLib.createSchema
(DatabaseLib.java:391)
at org.fao.gast.lib.DatabaseLib.setup(DatabaseLib.java:103)
at org.fao.gast.gui.panels.database.setup.Worker.run
(Worker.java:59)
at java.lang.Thread.run(Thread.java:595)
I don't see anything at all show up in the Tomcat or the MySQL logs.
Any thoughts?
Thanks-- it looks like a great system and we're really looking
forward to bringing it up.
---
A. Soroka ; DSS R&D / University of Virginia Library
----------------------------------------------------------------------
---
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a
browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/
projects/geonetwork
------------------------------------------------------------------------
-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork