Hi,

the last few hours i try to implement a enum to represent the status of the bagit container in the asseststore.

The code snip is from my Bagit object

@Enumerated(EnumType.ORDINAL)
@Column(name = "status")
 private BagitStatus status;

and this is the BagitStatus

public enum  BagitStatus {
    DBONLY,
    CREATED,
    .....

The column status is from the datatype int. The building process runs without errors. But if start the tomcat the xmlui Webapp crash with the following stacktrace:

SEVERE: Exception sending context initialized event to listener instance of class org.dspace.app.util.DSpaceWebappListener
java.lang.NullPointerException
at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:48) at org.dspace.core.AbstractHibernateDAO.create(AbstractHibernateDAO.java:38) at org.dspace.app.util.WebAppServiceImpl.create(WebAppServiceImpl.java:49) at org.dspace.app.util.AbstractDSpaceWebapp.register(AbstractDSpaceWebapp.java:75) at org.dspace.app.util.DSpaceWebappListener.contextInitialized(DSpaceWebappListener.java:31) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5068) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5584) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Here are the dspace.log:

2017-03-29 20:34:19,001 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. 2017-03-29 20:34:21,270 INFO org.dspace.core.Context @ abort() was called on a closed Context object. No changes to abort. 2017-03-29 20:34:21,350 ERROR org.dspace.core.Context @ Exception aborting context
java.lang.NullPointerException
        at org.dspace.core.Context.abort(Context.java:532)
at org.dspace.discovery.SolrServiceImpl.cleanIndex(SolrServiceImpl.java:493)
        at org.dspace.discovery.IndexClient.main(IndexClient.java:153)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81)
2017-03-29 20:34:21,440 ERROR org.dspace.discovery.SolrServiceImpl @
java.lang.NullPointerException
at org.dspace.core.AbstractHibernateDAO.getHibernateSession(AbstractHibernateDAO.java:48) at org.dspace.core.AbstractHibernateDAO.createQuery(AbstractHibernateDAO.java:116) at org.dspace.content.dao.impl.ItemDAOImpl.findAll(ItemDAOImpl.java:60) at org.dspace.content.ItemServiceImpl.findAllUnfiltered(ItemServiceImpl.java:195) at org.dspace.discovery.SolrServiceImpl.updateIndex(SolrServiceImpl.java:399)
        at org.dspace.discovery.IndexClient.main(IndexClient.java:154)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
at org.dspace.app.launcher.ScriptLauncher.runOneCommand(ScriptLauncher.java:229) at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:81) 2017-03-29 20:34:21,446 INFO org.dspace.discovery.IndexClient @ Done with indexing

Could someone give me a hint what is wrong with the enum.

Thanks for your help.
Stefan




--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to