Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clb importer mybatis exception #38

Closed
mdoering opened this issue Aug 25, 2017 · 3 comments
Closed

clb importer mybatis exception #38

mdoering opened this issue Aug 25, 2017 · 3 comments

Comments

@mdoering
Copy link
Member

mdoering commented Aug 25, 2017

java.lang.RuntimeException: java.util.concurrent.ExecutionException: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
### The error may exist in org/gbif/checklistbank/service/mybatis/mapper/ParsedNameMapper.xml
### The error may involve org.gbif.checklistbank.service.mybatis.mapper.ParsedNameMapper.getByName-Inline
### The error occurred while setting parameters
### SQL: SELECT          n.id, n.scientific_name, n.canonical_name, n.type,     n.genus_or_above, n.infra_generic, n.specific_epithet, n.infra_specific_epithet, n.cultivar_epithet,     n.notho_type, n.rank, n.nom_status, n.sensu, n.remarks,     n.authors_parsed, n.parsed, n.authorship, n.year, n.bracket_authorship, n.bracket_year             FROM               name n             WHERE n.scientific_name=? AND n.rank=?::rank
### Cause: org.postgresql.util.PSQLException: ERROR: invalid byte sequence for encoding "UTF8": 0x00
at com.google.common.base.Throwables.propagate(Throwables.java:160)
at org.gbif.checklistbank.cli.importer.Importer.run(Importer.java:142)
@mdoering
Copy link
Member Author

this happened again when importing the new IRMNG. Is the null character encountered in this dataset for the first time? We would need to replace the null with a regular space or nothing in java beforehand:

myValue.replaceAll("\u0000", "")

@mdoering
Copy link
Member Author

IRMNG contains a null char in this line:
1144985 urn:lsid:irmng.org:taxname:1144985 1144985 100871 Paratiberioides Paratiberioides Passalidae Elytra 22 (2), Nov 15 Animalia Arthropoda Insecta Coleoptera Passalidae Paratiberioides Genus Iwase, 1994 ICZN accepted 2012-01-01 IRMNG (2012). Paratiberioides Iwase?, 1994. Accessed through: The Interim Register of Marine and Nonmarine Genera at http://www.irmng.org/aphia.php?p=taxdetails&id=1144985 http://www.irmng.org/aphia.php?p=taxdetails&id=1144985

@mdoering
Copy link
Member Author

fixed in 945be68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant