Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
0.4
-
A custom Gora 0.4 irrelevant for the improvement (but maybe for the stacktrace)
Description
This line of HBaseStore throws the following exception:
Stacktrace
org.apache.gora.util.GoraException: java.lang.RuntimeException: java.net.MalformedURLException at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:174) at org.apache.gora.store.DataStoreFactory.getDataStore(DataStoreFactory.java:285) at org.apache.gora.pig.GoraStorageTest.setUpBeforeClass(GoraStorageTest.java:59) 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:622) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113) 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:622) at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189) at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165) at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74) Caused by: java.lang.RuntimeException: java.net.MalformedURLException at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:133) at org.apache.gora.store.DataStoreFactory.initializeDataStore(DataStoreFactory.java:109) at org.apache.gora.store.DataStoreFactory.createDataStore(DataStoreFactory.java:168) ... 24 more Caused by: java.net.MalformedURLException at java.net.URL.<init>(URL.java:619) at java.net.URL.<init>(URL.java:482) at java.net.URL.<init>(URL.java:431) at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:518) at org.jdom.input.SAXBuilder.build(SAXBuilder.java:865) at org.apache.gora.hbase.store.HBaseStore.readMapping(HBaseStore.java:656) at org.apache.gora.hbase.store.HBaseStore.initialize(HBaseStore.java:116) ... 26 more Caused by: java.lang.NullPointerException at java.net.URL.<init>(URL.java:524) ... 39 more
The objetive is to catch MalformedURLException and log a better message showing what expected file was not found.