Re: [Dspace-tech] problems with dspace 5.1 migration - error on eperson-firstname and unable to create administrator fresh install

2015-05-18 Thread Searle, Shannon
Hi all,

New environment:
Red Hat 6.6
DSpace 5.1
Postgresql 9.3
Tomcat 7
Java 7
Ant 1.9.4
Maven 3.2

Old environment
Dspace 1.6 – no solr!
Java 6
Tomcat 5.5
Postgresql 7.4


Well, at least now I have discovered why there was no 
eperson.firstname/lastname value – the eperson schema was never installed into 
the metadataschemaregistry table.  At the end of the migration, the data had 
moved to the appropriate tables, but the schemas for the extended Dublin core 
attributes and dspace.eperson.org were not there at all. I added the namespace 
and values into eperson metadata manually, so then it stopped generating NPE’s 
in Java whenever I tried to access the eperson admin interface.

My eperson pages look like the attached png now – new epeople are OK of course 
but can’t find the names of any of the other 900 because when the name and 
phone and language data was migrated into the metadatavalue table there was no 
metadata_field_id- so this is what happens if I try - the logs say:

2015-05-18 18:21:11,486 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT count(*) as epcount FROM eperson WHERE eperson_id = ? OR 
LOWER((select text_value from metadatavalue where resource_id=? and 
resource_type_id=? and metadata_field_id=?)) LIKE LOWER(?) OR LOWER((select 
text_value from metadatavalue where resource_id=? and resource_type_id=? and 
metadata_field_id=?)) LIKE LOWER(?) OR LOWER(eperson.email) LIKE LOWER(?)  
with parameters: -1,-1,7,81,%%,-1,7,83,%%,%%
2015-05-18 18:21:11,489 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query select e.* from eperson e  LEFT JOIN metadatavalue fn on 
(resource_id=e.eperson_id AND fn.resource_type_id=? and fn.metadata_field_id=?) 
 LEFT JOIN metadatavalue ln on (ln.resource_id=e.eperson_id AND 
ln.resource_type_id=? and ln.metadata_field_id=?)  WHERE e.eperson_id = ? OR 
LOWER(fn.text_value) LIKE LOWER(?) OR LOWER(ln.text_value) LIKE LOWER(?) OR 
LOWER(email) LIKE LOWER(?) ORDER BY   ln.text_value, fn.text_value ASC LIMIT ? 
  with parameters: 7,81,7,83,-1,%%,%%,%%,15
2015-05-18 18:21:11,492 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * FROM MetadataValue WHERE resource_id= ? and 
resource_type_id = ? ORDER BY metadata_field_id, place  with parameters: 106,7
2015-05-18 18:21:11,492 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from item where submitter_id= ?   with parameters: 106
2015-05-18 18:21:11,493 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from workflowitem where owner= ?   with parameters: 106
2015-05-18 18:21:11,493 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from tasklistitem where eperson_id= ?   with 
parameters: 106
2015-05-18 18:21:11,493 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from item where submitter_id= ?   with parameters: 950
2015-05-18 18:21:11,494 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from workflowitem where owner= ?   with parameters: 950
2015-05-18 18:21:11,494 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from tasklistitem where eperson_id= ?   with 
parameters: 950
2015-05-18 18:21:11,494 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * FROM MetadataValue WHERE resource_id= ? and 
resource_type_id = ? ORDER BY metadata_field_id, place  with parameters: 1003,7
2015-05-18 18:21:11,494 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from item where submitter_id= ?   with parameters: 1003
2015-05-18 18:21:11,495 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from workflowitem where owner= ?   with parameters: 
1003
2015-05-18 18:21:11,495 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from tasklistitem where eperson_id= ?   with 
parameters: 1003
2015-05-18 18:21:11,495 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * FROM MetadataValue WHERE resource_id= ? and 
resource_type_id = ? ORDER BY metadata_field_id, place  with parameters: 251,7
2015-05-18 18:21:11,495 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from item where submitter_id= ?   with parameters: 251
2015-05-18 18:21:11,496 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from workflowitem where owner= ?   with parameters: 251
2015-05-18 18:21:11,496 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * from tasklistitem where eperson_id= ?   with 
parameters: 251

2015-05-18 18:21:11,496 DEBUG org.dspace.storage.rdbms.DatabaseManager @ 
Running query SELECT * FROM MetadataValue WHERE resource_id= ? and 
resource_type_id = ? ORDER BY metadata_field_id, place  with parameters: 802,7
2015-05-18 18:21:11,496 ERROR org.dspace.content.DSpaceObject @ Loading item - 
cannot find metadata field -1 for resourceType=7 and resourceId=802
2015-05-18 18:21:11,496 ERROR 

Re: [Dspace-tech] problems with dspace 5.1 migration - error on eperson-firstname and unable to create administrator fresh install

2015-05-12 Thread Andrea Schweer

  
  
Hi,

On 12/05/15 05:19, Searle, Shannon
  wrote:


  
  
  
  I have been working on an upgrade from
an older postgres db in 1.6 dspace to the latest install of
dspace 5.1.
I ran the upgrades, checked migrate and
  started up the tomcat server. All looked well at first, but
  then any attempt to update profiles or show users resulted in
  an exception.
 
I ran a maven clean package, then an ant
  fresh install.  After that I couldn’t even create an
  administrator:
  


Did you really run an ant fresh_install? You should only ever do
that the very first time you install DSpace. From then on, run ant
update. As helix84 wrote, ant update will try to auto-upgrade your
database schema; I assume fresh_install won't try to do that since
it assumes the database has no tables yet.

cheers,
Andrea

-- 
Dr Andrea Schweer
IRR Technical Specialist, ITS Information Systems
The University of Waikato, Hamilton, New Zealand
  


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] problems with dspace 5.1 migration - error on eperson-firstname and unable to create administrator fresh install

2015-05-12 Thread helix84
Judging from the stacktrace, my guess is that your DB schema version
doesn't correspond to your DSpace version, for some unknown reason.

There was a significant change to several DB tables in DSpace 5 where many
entity attributes (including eperson last name) moved from the entity table
to the metadatavalue table, where they are referenced by resource_id (e.g.
eperson_id) and resource_type_id (e.g. 7 for eperson). That's how you can
tell a pre-DSpace 5 database from a DSpace 5 database. Please, check that
the schema corresponds to your DSpace version.

Assuming you're running DSpace 5 on a DSpace 4 database, DSpace 5 will
attempt to upgrade the schema automatically to DSpace 5 (this is a new
feature in DSpace 5). It will also print information about all successful
and unsuccessful migrations in the log, so check that. It will also create
the schema_version table which contains this information.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] problems with dspace 5.1 migration - error on eperson-firstname and unable to create administrator fresh install

2015-05-11 Thread Searle, Shannon
Hello,
I have been working on an upgrade from an older postgres db in 1.6 dspace to 
the latest install of dspace 5.1.
I ran the upgrades, checked migrate and started up the tomcat server. All 
looked well at first, but then any attempt to update profiles or show users 
resulted in an exception.

I ran a maven clean package, then an ant fresh install.  After that I couldn't 
even create an administrator:
Exception: Invalid metadata field: [eperson.lastname]
java.sql.SQLException: Invalid metadata field: [eperson.lastname]
at org.dspace.content.DSpaceObject.updateMetadata(DSpaceObject.java:122)
at org.dspace.eperson.EPerson.update(EPerson.java:1056)
at 
org.dspace.administer.CreateAdministrator.createAdministrator(CreateAdministrator.java:259)
at 
org.dspace.administer.CreateAdministrator.negotiateAdministratorDetails(CreateAdministrator.java:206)
at 
org.dspace.administer.CreateAdministrator.main(CreateAdministrator.java:82)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:225)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:77)

Anyone know where this is coming from? I did delete my old browse indexes but I 
didn't think they were needed any more...this is the same type of error I was 
getting on the web ui when trying to access anything to do with the eperson 
admin interface.

Anyone who can help - greatly appreciated. I need to get this server up and 
running :)

Thanks!
Shannon
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette