NullPointerException when creating a root community

57 views
Skip to first unread message

karma.some...@gmail.com

unread,
Oct 31, 2017, 7:47:53 AM10/31/17
to DSpace Technical Support
Hi,

We're running DSpace 6.2 and we're having an issue creating root communities (on the top of the hierarchy). Immediately after hitting the "Create" button, a NullPointerException is shown. The strange thing is that there are no logs anywhere in the 'logs' directory nor in the tomcat logs when the exception pops-up. I could get Cocoon and Java logs though from the web browser, which I'm attaching.

We can just reproduce it when it comes to create a root community, no issues when creating subcommunities nor collections.

Could someone give some pointers on why is this happening and possibly how to solve it?

Thanks in advance

James
java-full.txt
java.txt
cocoon.txt

karma.some...@gmail.com

unread,
Oct 31, 2017, 10:54:53 AM10/31/17
to DSpace Technical Support
As per what I could see, the exception happens in the aspect/administrative/FlowContainerUtils.java file, in the line marked with bold:

        public static FlowResult processCreateCommunity(Context context, UUID communityID, Request request)
            throws AuthorizeException, IOException, SQLException
        {
                FlowResult result = new FlowResult();
                Community newCommunity;
                if (communityID != null)
        {
            newCommunity = communityService.createSubcommunity(context, communityService.find(context, communityID));
        }
                else
        {
            newCommunity = communityService.create(null, context);
        }

Any hints?

Thanks

Evgeni Dimitrov

unread,
Nov 2, 2017, 5:28:35 AM11/2/17
to DSpace Technical Support
May be something with the migration of the database. I have freshly installed DSpace 6.2 and I had no problems creating communities and collections.

karma.some...@gmail.com

unread,
Nov 2, 2017, 5:36:41 AM11/2/17
to DSpace Technical Support
Any way of how could I debug this? Something like activating a SQL debug or something... From the logs I cannot see any further information and the .create() call seems quite generic to see why it fails this way.

Thanks.

karma.some...@gmail.com

unread,
Nov 7, 2017, 6:47:20 AM11/7/17
to DSpace Technical Support
Guys, any help with this? At least a tip to start debugging?

Tim Donohue

unread,
Nov 7, 2017, 12:49:42 PM11/7/17
to karma.some...@gmail.com, DSpace Technical Support
Hi James,

The NullPointerException seems to happen here: https://github.com/DSpace/DSpace/blob/dspace-6_x/dspace-api/src/main/java/org/dspace/content/CommunityServiceImpl.java#L120

This is a very odd error, as it seems to throw an error on the Site object, which is an object that doesn't actually exist in the database, but in the API itself (i.e. it's a conceptual object that should *always* exist).  This is very odd behavior, so it makes me wonder if you upgraded from a previous release (4.x or 5.x), and accidentally have some old API/JARs sitting around (which could cause conflicts with the DSpace 6 APIs).  This shouldn't be occurring on a fresh installation.

I'd recommend trying a fresh install either in a different directory (on same server) or perhaps on a different server. I've never seen this behavior, and it almost seems like you have conflicting JAR files in place.

You also could closely check your logs for other errors...It's possible there are other related errors here that could give clues.  See also: https://wiki.duraspace.org/display/DSPACE/Troubleshoot+an+error

Good luck, and feel free to report back to this list with whatever you find.

Tim


--
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 post to this group, send email to dspac...@googlegroups.com.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
--
Tim Donohue
Technical Lead for DSpace & DSpaceDirect
DuraSpace.org | DSpace.org | DSpaceDirect.org
Message has been deleted

herna...@gmail.com

unread,
Aug 30, 2020, 3:30:05 PM8/30/20
to DSpace Technical Support
Hi,

I want to post my solution in case it works for anyone. I had this same problem and I was able to solve it, this happened after upgrading from version 3.x to 6.3. 

I manually added a value for site table.

I generated a new UUID: d94cb9fa-ce34-4225-8e0d-96c08e599b3f

insert into dspaceobject (uuid) values ('d94cb9fa-ce34-4225-8e0d-96c08e599b3f');
insert into handle (handle_id, handle, resource_type_id, resource_id) values(3329, '123456789/0',5, 'd94cb9fa-ce34-4225-8e0d-96c08e599b3f');
insert into site (uuid) values ('d94cb9fa-ce34-4225-8e0d-96c08e599b3f');

Regards

Hernán
Reply all
Reply to author
Forward
0 new messages