Logstash (EACCESS) Permission Denied - logstash

My logstash instance has stopped working with a Permission denied error. I'm running on Windows. I've been using version 7.8.1 and have also tried with 7.16.2. Both return the same error. I'm running as an administrator. Same error in Windows cmd and git bash shells. Same error when I try to run the command on different logstash configuration files.
My command: logstash -tf logstash-sample.conf
Error message and stack trace for v7.16.2:
Using JAVA_HOME defined java: C:\Program Files\Java\jdk1.8.0_331
WARNING: Using JAVA_HOME while Logstash distribution comes with a bundled JDK.
DEPRECATION: The use of JAVA_HOME is now deprecated and will be removed starting from 8.0. Please configure LS_JAVA_HOME instead.
[FATAL] 2022-05-02 18:08:05.960 [main] Logstash - Logstash stopped processing because of an error: (EACCES) Permission denied - NUL
org.jruby.exceptions.SystemCallError: (EACCES) Permission denied - NUL
at org.jruby.RubyIO.sysopen(org/jruby/RubyIO.java:1237) ~[jruby-complete-9.2.20.1.jar:?]
at org.jruby.RubyFile.initialize(org/jruby/RubyFile.java:365) ~[jruby-complete-9.2.20.1.jar:?]
at org.jruby.RubyIO.open(org/jruby/RubyIO.java:1156) ~[jruby-complete-9.2.20.1.jar:?]
at uri_3a_classloader_3a_.META_minus_INF.jruby_dot_home.lib.ruby.stdlib.rubygems.user_interaction.initialize(uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/user_interaction.rb:645) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.ui.rg_proxy.initialize(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/ui/rg_proxy.rb:11) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.ui=(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler.rb:90) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.ui(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler.rb:86) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.rubygems_integration.validate(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/rubygems_integration.rb:72) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.source.path.validate_spec(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/source/path.rb:168) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.source.path.load_spec_files(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/source/path.rb:182) ~[?:?]
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1821) ~[jruby-complete-9.2.20.1.jar:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.source.path.load_spec_files(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/source/path.rb:176) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.source.path.local_specs(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/source/path.rb:107) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.source.path.specs(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/source/path.rb:115) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.specs_for_source_changed?(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:557) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.specs_changed?(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:542) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.converge_paths(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:586) ~[?:?]
at org.jruby.RubyArray.any?(org/jruby/RubyArray.java:4553) ~[jruby-complete-9.2.20.1.jar:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.converge_paths(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:585) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.initialize(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:128) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.dsl.to_definition(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/dsl.rb:221) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.dsl.evaluate(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/dsl.rb:13) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition.build(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler/definition.rb:33) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.definition(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler.rb:196) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.vendor.bundle.jruby.$2_dot_5_dot_0.gems.bundler_minus_2_dot_2_dot_33.lib.bundler.setup(C:/apps/logstash/logstash-7.16.2/vendor/bundle/jruby/2.5.0/gems/bundler-2.2.33/lib/bundler.rb:144) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.lib.bootstrap.bundler.setup!(C:/apps/logstash/logstash-7.16.2/lib/bootstrap/bundler.rb:79) ~[?:?]
at C_3a_.apps.logstash.logstash_minus_7_dot_16_dot_2.lib.bootstrap.environment.<main>(C:\apps\logstash\logstash-7.16.2\lib\bootstrap\environment.rb:89) ~[?:?]
I'm not sure what to look at to fix the permission issue. Any ideas on the underlying cause?

This is an open issue in logstash. The underlying Java issue is here. You can make it work with a current JVM by adding -Djdk.io.File.enableADS=true to the JVM options.

I had a similar issue but mine would work if I try an older JDK released around Feb 2022.

Related

JMeter open File using JSR223 Sampler/Groovy

I'm trying to open a file with a JSR223 Sampler using Groovy.
The file is in the same directory as the .jmx file.
The Sampler runs first in the test plan, so no other part of the plan should interfere with it.
Script
import org.apache.jmeter.services.FileServer;
String path = FileServer.getFileServer().getBaseDir() + "\\requestBody.txt"
String file = new File(path).getText('UTF-8')
In the log, I'm getting the exception:
2021-02-18 15:46:17,708 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script Load SOAP Request Config, message: javax.script.ScriptException: javax.script.ScriptException: java.io.FileNotFoundException: C:\Users\MatthiasWalk\Documents\Workspace\JMeter\requestBody.txt (The system cannot find the file specified)
javax.script.ScriptException: javax.script.ScriptException: java.io.FileNotFoundException: C:\Users\MatthiasWalk\Documents\Workspace\JMeter\requestBody.txt (The system cannot find the file specified)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:158) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:233) ~[java.scripting:?]
at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:219) ~[ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:72) [ApacheJMeter_java.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core.jar:5.4.1]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core.jar:5.4.1]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: javax.script.ScriptException: java.io.FileNotFoundException: C:\Users\MatthiasWalk\Documents\Workspace\JMeter\requestBody.txt (The system cannot find the file specified)
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:320) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) ~[groovy-jsr223-3.0.7.jar:3.0.7]
... 8 more
Caused by: java.io.FileNotFoundException: C:\Users\MatthiasWalk\Documents\Workspace\JMeter\requestBody.txt (The system cannot find the file specified)
at java.io.FileInputStream.open0(Native Method) ~[?:?]
at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]
at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]
at org.codehaus.groovy.runtime.ResourceGroovyMethods.newReader(ResourceGroovyMethods.java:1797) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.ResourceGroovyMethods.getText(ResourceGroovyMethods.java:579) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.dgm$1042.invoke(Unknown Source) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:247) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125) ~[groovy-3.0.7.jar:3.0.7]
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:139) ~[groovy-3.0.7.jar:3.0.7]
at Script8.run(Script8.groovy:5) ~[?:?]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:317) ~[groovy-jsr223-3.0.7.jar:3.0.7]
at org.codehaus.groovy.jsr223.GroovyScriptEngineImpl.eval(GroovyScriptEngineImpl.java:155) ~[groovy-jsr223-3.0.7.jar:3.0.7]
... 8 more
The path seems to be alright, the file exists and I checked it for trailing/leading whitespaces.
What am I missing?
I cannot reproduce your issue for the file which exists and my user has read permissions for this file:
So I would recommend double-checking the file path and your user access details.
Also
if you need to read the file from the current folder there is no need to use full path, file name will be sufficient
reading a file into a string can be done without having to write a single line of code, JMeter provides __FileToString() function:
See Apache JMeter Functions - An Introduction article to get familiarized with JMeter Functions concept.

Opendistro Elasticsearch Azure repository plugin

I've been trying to use azure blob storage with opendistro elasticsearch for snapshot. I've passed account name and key for storage account but while trying to register repo. getting following error
{"error":{"root_cause":[{"type":"repository_verification_exception","reason":"[bk] path is not accessible on master node"}],"type":"repository_verification_exception","reason":"[bk] path is not accessible on master node","caused_by":{"type":"null_pointer_exception","reason":"Cannot invoke \"String.length()\" because \"host\" is null"}},"status":500}
also error on node
Caused by: org.elasticsearch.repositories.RepositoryVerificationException: [bk] path is not accessible on master node
at org.elasticsearch.repositories.blobstore.BlobStoreRepository.startVerification(BlobStoreRepository.java:1276) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.repositories.RepositoriesService$3.doRun(RepositoriesService.java:268) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:743) ~[elasticsearch-7.10.2.jar:7.10.2]
at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) ~[elasticsearch-7.10.2.jar:7.10.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630) ~[?:?]
at java.lang.Thread.run(Thread.java:832) [?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "String.length()" because "host" is null
at com.microsoft.azure.storage.core.Utility.isHostDnsName(Utility.java:533) ~[?:?]
at com.microsoft.azure.storage.core.Utility.determinePathStyleFromUri(Utility.java:521) ~[?:?]
at com.microsoft.azure.storage.StorageUri.<init>(StorageUri.java:71) ~[?:?]
at com.microsoft.azure.storage.core.PathUtility.appendPathToUri(PathUtility.java:124) ~[?:?]
at com.microsoft.azure.storage.core.PathUtility.appendPathToUri(PathUtility.java:108) ~[?:?]
at com.microsoft.azure.storage.blob.CloudBlobContainer.<init>(CloudBlobContainer.java:169) ~[?:?]
at com.microsoft.azure.storage.blob.CloudBlobClient.getContainerReference(CloudBlobClient.java:123) ~[?:?]
Following is my custom docker image
FROM amazon/opendistro-for-elasticsearch:1.13.0
RUN /usr/share/elasticsearch/bin/elasticsearch-plugin install --batch repository-azure
ENV AZURE_CLIENT_ACCOUNT <bas64 encoded account>
ENV AZURE_CLIENT_KEY <base64 encoded key>
RUN /usr/share/elasticsearch/bin/elasticsearch-keystore create
RUN echo $AZURE_CLIENT_ACCOUNT | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.account
RUN echo $AZURE_CLIENT_KEY | /usr/share/elasticsearch/bin/elasticsearch-keystore add --stdin azure.client.default.key
Can anyone help ?

CentOS6.8, Hive:Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

I was trying to build spark environment on CentOS6.8 on macOS using VMware Fusion.
I have previously installed jdk-10.0.1, hadoop-2.4.1.tar.gz, and MySQL. They worked successfully.
However, when I finished installing apache-hive-0.13.1-bin.tar.gz, I received the following as I entered "hive":
`Logging initialized using configuration in file:/usr/local/hive/conf/hive-log4j.properties
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/usr/local/hadoop/share/hadoop/common/lib/hadoop-auth-2.4.1.jar) to method sun.security.krb5.Config.getInstance()
WARNING: Please consider reporting this to the maintainers of org.apache.hadoop.security.authentication.util.KerberosUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /usr/local/hadoop/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:346)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:625)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1412)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62)
at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)
at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2453)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2465)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:340)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1410)
... 12 more
Caused by: javax.jdo.JDOFatalInternalException: The java type java.lang.Integer (jdbc-type="", sql-type="") cant be mapped for this datastore. No mapping is available.
NestedThrowables:
org.datanucleus.exceptions.NucleusException: The java type java.lang.Integer (jdbc-type="", sql-type="") cant be mapped for this datastore. No mapping is available.
at org.datanucleus.api.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:591)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:788)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.createPersistenceManagerFactory(JDOPersistenceManagerFactory.java:333)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.getPersistenceManagerFactory(JDOPersistenceManagerFactory.java:202)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at javax.jdo.JDOHelper$16.run(JDOHelper.java:1965)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javax.jdo.JDOHelper.invoke(JDOHelper.java:1960)
at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1166)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:808)
at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:701)
at org.apache.hadoop.hive.metastore.ObjectStore.getPMF(ObjectStore.java:310)
at org.apache.hadoop.hive.metastore.ObjectStore.getPersistenceManager(ObjectStore.java:339)
at org.apache.hadoop.hive.metastore.ObjectStore.initialize(ObjectStore.java:248)
at org.apache.hadoop.hive.metastore.ObjectStore.setConf(ObjectStore.java:223)
at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:73)
at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:133)
at org.apache.hadoop.hive.metastore.RawStoreProxy.<init>(RawStoreProxy.java:58)
at org.apache.hadoop.hive.metastore.RawStoreProxy.getProxy(RawStoreProxy.java:67)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.newRawStore(HiveMetaStore.java:497)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.getMS(HiveMetaStore.java:475)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.createDefaultDB(HiveMetaStore.java:523)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.init(HiveMetaStore.java:397)
at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.<init>(HiveMetaStore.java:356)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.<init>(RetryingHMSHandler.java:54)
at org.apache.hadoop.hive.metastore.RetryingHMSHandler.getProxy(RetryingHMSHandler.java:59)
at org.apache.hadoop.hive.metastore.HiveMetaStore.newHMSHandler(HiveMetaStore.java:4944)
at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:171)
... 17 more
Caused by: org.datanucleus.exceptions.NucleusException: The java type java.lang.Integer (jdbc-type="", sql-type="") cant be mapped for this datastore. No mapping is available.
at org.datanucleus.store.rdbms.mapping.RDBMSMappingManager.getDatastoreMappingClass(RDBMSMappingManager.java:1215)
at org.datanucleus.store.rdbms.mapping.RDBMSMappingManager.createDatastoreMapping(RDBMSMappingManager.java:1378)
at org.datanucleus.store.rdbms.table.ProbeTable.initialize(ProbeTable.java:66)
at org.datanucleus.store.rdbms.RDBMSStoreManager.initialiseSchema(RDBMSStoreManager.java:1430)
at org.datanucleus.store.rdbms.RDBMSStoreManager.<init>(RDBMSStoreManager.java:391)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
at org.datanucleus.plugin.NonManagedPluginRegistry.createExecutableExtension(NonManagedPluginRegistry.java:631)
at org.datanucleus.plugin.PluginManager.createExecutableExtension(PluginManager.java:301)
at org.datanucleus.NucleusContext.createStoreManagerForProperties(NucleusContext.java:1187)
at org.datanucleus.NucleusContext.initialise(NucleusContext.java:356)
at org.datanucleus.api.jdo.JDOPersistenceManagerFactory.freezeConfiguration(JDOPersistenceManagerFactory.java:775)
... 46 more
Any help is appreciated. Thanks!

Simple Groovy with Geb script

I am trying to learn Geb and on my Mac I created a groovy script and tried to run it. I getting errors about grapes not being able to download some dependencies. Do I need to do something special for this to work?
#Grab(group='org.codehaus.geb', module='geb-core', version='0.7.1')
#Grab(group='org.seleniumhq.selenium', module='selenium-firefox-driver', version='2.31.0')
import geb.*
import org.openqa.selenium.firefox.FirefoxDriver
Browser.drive(driver: new FirefoxDriver()) {
go "http://ebay.com/"
$('input#gh-ac').value("transformers")
$('input#gh-btn').click()
sleep 10000
}
Here is the error message I am getting.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [download failed: org.apache.httpcomponents#httpclient;4.2.1!httpclient.jar, download failed: org.apache.httpcomponents#httpcore;4.2.1!httpcore.jar]
java.lang.RuntimeException: Error grabbing Grapes -- [download failed: org.apache.httpcomponents#httpclient;4.2.1!httpclient.jar, download failed: org.apache.httpcomponents#httpcore;4.2.1!httpcore.jar]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:77)
at org.codehaus.groovy.reflection.CachedConstructor.doConstructorInvoke(CachedConstructor.java:71)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrap.callConstructor(ConstructorSite.java:81)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:57)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:182)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:190)
at groovy.grape.GrapeIvy.getDependencies(GrapeIvy.groovy:411)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:231)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:52)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:546)
at groovy.grape.GrapeIvy$resolve$0.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:153)
at groovy.grape.GrapeIvy.resolve(GrapeIvy.groovy:515)
at groovy.grape.GrapeIvy$resolve.callCurrent(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:149)
at groovy.grape.GrapeIvy.grab(GrapeIvy.groovy:254)
at groovy.grape.Grape.grab(Grape.java:141)
at groovy.grape.GrabAnnotationTransformation.visit(GrabAnnotationTransformation.java:312)
at org.codehaus.groovy.transform.ASTTransformationVisitor$3.call(ASTTransformationVisitor.java:319)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:912)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:575)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:551)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:528)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:279)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:258)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:244)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:185)
at groovy.lang.GroovyShell$2.run(GroovyShell.java:206)
at groovy.lang.GroovyShell$2.run(GroovyShell.java:204)
at java.security.AccessController.doPrivileged(Native Method)
at groovy.lang.GroovyShell.run(GroovyShell.java:204)
at groovy.lang.GroovyShell.run(GroovyShell.java:150)
at groovy.ui.GroovyMain.processOnce(GroovyMain.java:588)
at groovy.ui.GroovyMain.run(GroovyMain.java:375)
at groovy.ui.GroovyMain.process(GroovyMain.java:361)
at groovy.ui.GroovyMain.processArgs(GroovyMain.java:120)
at groovy.ui.GroovyMain.main(GroovyMain.java:100)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.tools.GroovyStarter.rootLoader(GroovyStarter.java:106)
at org.codehaus.groovy.tools.GroovyStarter.main(GroovyStarter.java:128)
1 error
Thanks for any help.
I had the same error as above -- problems downloading httpclient.
I commented the following line in my grapeConfig.xml and the problem was resolved:
<ibiblio name="local" root="file:${user.home}/.m2/repository/" m2compatible="true"/>
Interestingly, after successfully running the Geb script, I could re-enable the above line of XML and the script still runs. I'm guessing something was corrupted in the "local" .m2 repository.
Looks to me like it's an environment issue. I've just copypasted the code from your snippet to a groovy console and it worked without any problems. Are you behind some firewall that would prevent Ivy from connecting to Maven Central?

Vuze client on Rhel 5 machine

I downloaded the vuze client for linux(Rhel 5) and xtracted the tar file.When I execute the vuze launcher I get the following error. Am trying to debug the issue , in the mean time any linux experts have any idea on this issue ? Someone tried to install vuze on linux and encountered this issue.
[root#localhost vuze]# ./vuze
Starting Azureus...
Suitable java version found [java = 1.6.0_24]
Configuring environment...
Java exec found in PATH. Verifying...
Browser check failed with: Cannot load 64-bit SWT libraries on 32-bit JVM
Auto-scanning for GRE/XULRunner. You can skip this by appending the GRE path to LD_LIBRARY_PATH and setting MOZILLA_FIVE_HOME.
checking /etc/gre.d/gre.conf for GRE_PATH
GRE found at /usr/lib/xulrunner-1.9.
Browser check failed with: Could not initialize class org.eclipse.swt.widgets.Display
Can't create browser. Will try to set LD_LIBRARY_PATH and hope Vuze has better luck.
setting LD_LIBRARY_PATH to: /usr/lib/xulrunner-1.9
setting MOZILLA_FIVE_HOME to: /usr/lib/xulrunner-1.9
Loading Azureus:
java -Xmx128m -cp "./Azureus2.jar:./swt.jar" -Djava.library.path="/root/Desktop/Downloads/vuze" -Dazureus.install.path="/root/Desktop/Downloads/vuze" -Dazureus.script="./vuze" -Dazureus.script.version=2 org.gudy.azureus2.ui.swt.Main
file:/root/Desktop/Downloads/vuze/Azureus2.jar ; file:/root/Desktop/Downloads/vuze/swt.jar ; file:/root/Desktop/Downloads/vuze/
changeLocale: *Default Language* != English (United States). Searching without country..
changeLocale: Searching for language English in *any* country..
changeLocale: no message properties for Locale 'English (United States)' (en_US), using 'English (default)'
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.gudy.azureus2.ui.swt.Main.<init>(Main.java:114)
at org.gudy.azureus2.ui.swt.Main.main(Main.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.aelitis.azureus.launcher.MainExecutor$1.run(MainExecutor.java:37)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:194)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:174)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:63)
at org.eclipse.swt.internal.Converter.wcsToMbcs(Converter.java:54)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:132)
at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.<init>(SWTThread.java:84)
at org.gudy.azureus2.ui.swt.mainwindow.SWTThread.createInstance(SWTThread.java:63)
at com.aelitis.azureus.ui.swt.Initializer.<init>(Initializer.java:163)
... 12 more
Exit from Azureus complete
No shutdown tasks to do
Azureus TERMINATED.
For some reason the swt.jar file inside the downloadable Vuze is for 64 bits systems. Just go to http://www.eclipse.org/swt/ and download the stable release from there.
Open the tar.gz and extract swt.jar and overwrite the one from vuze.

Resources