starting dspace 6.3

127 views
Skip to first unread message

Jose Blanco

unread,
Feb 12, 2020, 1:11:35 PM2/12/20
to DSpace Technical Support
I'm getting this error when trying to deploy webapp via tomcat:

2020-02-12 12:55:16,566 FATAL org.dspace.core.Context @ Cannot obtain the bean which provides a database connection. Check previous entries in the dspace.log to find why the db failed to initialize. The schema validator returned: Could not determine type for: org.dspace.core.Context, at table: bitstreamformatregistry, for columns: [org.hibernate.mapping.Column(bfContext)]


Not sure what it means.

José Geraldo

unread,
Feb 12, 2020, 2:58:15 PM2/12/20
to Jose Blanco, DSpace Technical Support
Check o dspace.log  [dspace]/log/dspace.log



--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/CAK%3DKc-vQZL39XzwN8aGiAM03nQX57Rgk65V7_ioeA7Tw2MU0PA%40mail.gmail.com.


--
At.te,

José Geraldo

Jose Blanco

unread,
Feb 12, 2020, 3:17:05 PM2/12/20
to José Geraldo, DSpace Technical Support
The dspace.log does not have much info.  I think the error happens when the code tries to do this:

Not sure why it was not able to get the db connection in:


I see I get the same error when I try this:

> /l1/dspace/repository/dev63/bin/dspace create-administrator

Exception: The schema validator returned: Could not determine type for: org.dspace.core.Context, at table: bitstreamformatregistry, for columns: [org.hibernate.mapping.Column(bfContext)]

org.dspace.core.exception.DatabaseSchemaValidationException: The schema validator returned: Could not determine type for: org.dspace.core.Context, at table: bitstreamformatregistry, for columns: [org.hibernate.mapping.Column(bfContext)]
at org.dspace.core.Context.init(Context.java:173)
at org.dspace.core.Context.<init>(Context.java:129)
at org.dspace.administer.CreateAdministrator.<init>(CreateAdministrator.java:101)
at org.dspace.administer.CreateAdministrator.main(CreateAdministrator.java:70)
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:607)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)

Jose Blanco

unread,
Feb 13, 2020, 12:35:46 PM2/13/20
to José Geraldo, DSpace Technical Support
Still stuck on this issue.

Tim Donohue

unread,
Feb 13, 2020, 12:47:34 PM2/13/20
to Jose Blanco, José Geraldo, DSpace Technical Support
Jose,

Have you customized the v6.3 "Context" class in some way?  The error line numbers there do not seem to match up with the out-of-the-box DSpace 6.3 codebase.  These are the error lines I'm talking about

at org.dspace.core.Context.init(Context.java:173)
at org.dspace.core.Context.<init>(Context.java:129)

In the v6.3 codebase, lines #129 and #173 in the Context class are both empty lines:
https://github.com/DSpace/DSpace/blob/dspace-6.3/dspace-api/src/main/java/org/dspace/core/Context.java#L129

​It's difficult to help you debug the issue here as it doesn't look like your Context class is the same as out-of-the-box DSpace 6.3.  So, my immediate guess is that your customizations may be causing an issue here -- either customizations in the Context class, or some sort of database customizations or both.  If you didn't mean to customize the Context class, then you might want to try and re-sync it with the one in DSpace 6.3.

Tim


From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of Jose Blanco <bla...@umich.edu>
Sent: Thursday, February 13, 2020 11:35 AM
To: José Geraldo <jos...@gmail.com>
Cc: DSpace Technical Support <dspac...@googlegroups.com>
Subject: Re: [dspace-tech] starting dspace 6.3
 

Jose Blanco

unread,
Feb 13, 2020, 1:10:15 PM2/13/20
to Tim Donohue, José Geraldo, DSpace Technical Support
I did add the following, but did not think it would cause an issue:

private String sessionStatus;


this gets initialized:

sessionStatus = "";


And these two methods:


>     public void setSessionStatus(String info)

>     {

>         sessionStatus = info;

>     }

> 


>     public String getSessionStatus()

>     {

>         return sessionStatus;

>     }




Jose Blanco

unread,
Feb 13, 2020, 3:15:53 PM2/13/20
to Tim Donohue, José Geraldo, DSpace Technical Support
Tim,
I build an out of the box 6.3, and before I did an "ant fresh_install"  I removed all the tables from my database, but the fresh_install did not build all the tables.  Do I have to start over with a new db?

Thanks!
-Jose

Tim Donohue

unread,
Feb 13, 2020, 3:18:37 PM2/13/20
to Jose Blanco, DSpace Technical Support
Hi Jose,

The error says: "Could not determine type for: org.dspace.core.Context, at table: bitstreamformatregistry, for columns: [org.hibernate.mapping.Column(bfContext)]"

Have you modified the org.dspace.content.BitstreamFormat class in some way?  Does "bfContext" maybe represent something you've added to the codebase?  I'm not sure myself what "bfContext" is (as I don't see anything by that name in DSpace code). But, the error makes it sound like Hibernate thinks "bfContext" is supposed to be a Database column in the "bitstreamformatregistry" table, and cannot find it.  

So, maybe some sort of custom code in the "BitstreamFormat" class (which corresponds to the "bitstreamformatregistry" table) is confusing Hibernate & causing this error?

Tim


From: Jose Blanco <bla...@umich.edu>
Sent: Thursday, February 13, 2020 12:10 PM
To: Tim Donohue <tim.d...@lyrasis.org>
Cc: José Geraldo <jos...@gmail.com>; DSpace Technical Support <dspac...@googlegroups.com>

Jose Blanco

unread,
Feb 13, 2020, 3:32:17 PM2/13/20
to Tim Donohue, DSpace Technical Support
When I merged the code, I had this:   

 private Context bfContext;


which actually, I'm not sure what purpose it served, so I'm going to comment it out, and try again.


Thanks!

Jose Blanco

unread,
Feb 13, 2020, 5:15:07 PM2/13/20
to Tim Donohue, DSpace Technical Support
Tim,

How do I get the database to be recreated. I have the db, but it has not tables.  I dropped them.  I thought the fresh_install would create them.

geneviev...@anu.edu.au

unread,
Feb 13, 2020, 5:19:46 PM2/13/20
to DSpace Technical Support
The tables are created when you start up the application.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.


--
At.te,

José Geraldo

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspac...@googlegroups.com.

Tim Donohue

unread,
Feb 14, 2020, 10:14:21 AM2/14/20
to DSpace Technical Support, Jose Blanco
Yes, Genevieve is correct, the database tables should be automatically created when you start Tomcat.

If that is not happening, you also can run 

[dspace]/bin/dspace database migrate

This will update (or create) your database tables (where needed) based on its current status.  More info on this command is in the documentation at https://wiki.lyrasis.org/display/DSDOC6x/Database+Utilities

If for some reason one of these commands is not working, you should check your logs for errors being reported there.

Tim

From: dspac...@googlegroups.com <dspac...@googlegroups.com> on behalf of geneviev...@anu.edu.au <geneviev...@anu.edu.au>
Sent: Thursday, February 13, 2020 4:19 PM
To: DSpace Technical Support <dspac...@googlegroups.com>
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-tech...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-tech/80f0f133-9388-4e7b-bd06-9d1e3d40465d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages