[JBoss JIRA] Created: (TEIID-1739) VDB deployment fails if metadata index file has been removed due to NPE during Index.initialize
by Larry O'Leary (JIRA)
VDB deployment fails if metadata index file has been removed due to NPE during Index.initialize
-----------------------------------------------------------------------------------------------
Key: TEIID-1739
URL: https://issues.jboss.org/browse/TEIID-1739
Project: Teiid
Issue Type: Bug
Components: Server
Affects Versions: 7.5
Reporter: Larry O'Leary
Assignee: Steven Hawkins
VDB couldn't be deployed, so customer restarted SOA-P server and the server.log shows:
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "VDBDeployer" is missing the following dependencies:
Dependency "SystemVDBDeployer" (should be in state "Create", but is actually in state "**ERROR**")
DEPLOYMENTS IN ERROR:
Deployment "SystemVDBDeployer" is in error due to the following reason(s): java.lang.NullPointerException, **ERROR**
ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=SystemVDBDeployer state=Create
java.lang.NullPointerException
at org.teiid.internal.core.index.BlocksIndexInput.close(BlocksIndexInput.java:65)
at org.teiid.internal.core.index.Index.initialize(Index.java:222)
at org.teiid.internal.core.index.Index.<init>(Index.java:82)
at org.teiid.metadata.index.IndexMetadataFactory.getMetadataStore(IndexMetadataFactory.java:119)
at org.teiid.deployers.SystemVDBDeployer.start(SystemVDBDeployer.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Although we do not yet know what has caused this situation, the NPE is a direct result of a bug in the way the index initialization is performed. In the event the file can not be read, we should simply remove the index entry but we don't get this far because when the file fails to be opened, we attempt to close it to ensure we cleanup our code. The problem is, the object was never initialized due to the file not being opened and therefore, we cause a NullPointerException:
Specifically, org.teiid.internal.core.index.BlocksIndexInput.close():
if (raf != null)
raf.close();
vraf.close();
should be something like:
if (raf != null)
raf.close();
if (vraf != null)
vraf.close();
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 4 months