After succesfull installation and configuration of HBase on top of HDFS on our local servers, I did the same configuration on our OVH VPS machines, however I am getting a strange error.
Entire setup is starting fine, however, when I try to create a table from hbase shell, I am getting following error:
2017-05-20 11:59:19,256 ERROR
[RpcServer.FifoWFPBQ.default.handler=29,queue=2,port=16000]
master.MasterRpcServices: Region server prdhad001,16020,1495274311971
reported a fatal error:
ABORTING region server prdhad001,16020,1495274311971: The coprocessor
org.apache.hadoop.hbase.client.coprocessor.AggregateImplementation
threw java.lang.ClassNotFoundException:
org.apache.hadoop.hbase.client.coprocessor.AggregateImplementation
Cause: java.lang.ClassNotFoundException:
org.apache.hadoop.hbase.client.coprocessor.AggregateImplementation
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
and after that entire hbase is getting corrupted and throwing numerous errors. It seems that it doesn't load some jars properly , however jar is present inside lib folder.
My configuration :
Virtualization: kvm Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-514.16.1.el7.x86_64
Architecture: x86-64 Hadoop 2.7.3 HBase 1.3.0
export PATH=$PATH:$HADOOP_HOME/bin export
HADOOP_HOME=/usr/local/hadoop export PATH=$PATH:$HADOOP_HOME/bin
export PATH=$PATH:$HADOOP_HOME/sbin export
HADOOP_MAPRED_HOME=$HADOOP_HOME export
HADOOP_COMMON_HOME=$HADOOP_HOME export HADOOP_HDFS_HOME=$HADOOP_HOME
export YARN_HOME=$HADOOP_HOME export
HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native export
HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib" export
HBASE_CLASSPATH=/usr/local/hbase/lib/
I figured it out, inside the hbase-site.xml I had following property added:
<property>
<name>hbase.coprocessor.region.classes</name>
<value>org.apache.hadoop.hbase.coprocessor.AggregateImplementation</value>
</property>
which is used for the coprocessor, which we don't use at the moment. Removing this part fixed the issue, however, I guess that if we would like to use coprocessor in the future we might encounter this issue again do any other help will bee appreciated.
Related
I am using NCache NodeJS client package and writing tests by calling NCache API's. Package has dependency of Java. After I installed and used that package to write simple test. Test execution failed with module not Found error:
Error Message
Messgae:
The specified module could not be found.
\\D:\GitHome\Test\node_modules\java\build\Release\nodejavabridge_bindings.node
at Runtime._loadModule (node_modules/jest-runtime/build/index.js:893:29)
at Object.<anonymous> (node_modules/java/lib/nodeJavaBridge.js:21:16)
File in above mentioned directory exits.
Note: When I used that package in simple index.js file it worked fine as expected but unable to run with jest.
No major configuration done for jest in package.json file.
Java jdk-11.0.6 installed on box and JAVA_HOME is set.
Package.json
test.specs.js
Unable to identify the exact reason of failure therefore stuck on how to resolve it.
Environment:
OS: Windows
node: 14.15.3
jest: 26.6.3
C:\Program Files\OpenJDK\jdk-16.0.1\bin\server needs to be in your path. On windows can Edit the system environment > Environment Variables... > System variables and add C:\Program Files\OpenJDK\jdk-16.0.1\bin\server
Other option is to add it to your test runner. For example in WebStorm edit the Run Configurations and add Environment variables PATH=C:\Program Files\OpenJDK\jdk-16.0.1\bin\server
I've successfully added jasper reports to my java app, and added fonts via font extensions. When i run my app in intelij idea, everything works fine, the report generate with chosen fonts. But, when I compile everything into one unified (single, fat and etc.) jar file, deploy it to the Wildfly and try to generate the report, i get the following error:
2020-04-30 13:44:20,834 ERROR [net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper] (DefaultDispatcher-worker-1) Error loading font family: net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font "net/sf/jasperreports/fonts/icons/icons.ttf".
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.loadFont(SimpleFontFace.java:206)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:167)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFace(SimpleFontExtensionHelper.java:390)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:311)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontExtensions(SimpleFontExtensionHelper.java:259)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontExtensions(SimpleFontExtensionHelper.java:230)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontExtensions(SimpleFontExtensionHelper.java:187)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.ensureFontExtensions(FontExtensionsRegistry.java:93)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:57)
at deployment.develop.war//net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:134)
at deployment.develop.war//net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:86)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:116)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:79)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:251)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:156)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:739)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:1061)
at deployment.develop.war//ru.myproject.testspring.services.reports.ReportProvider.generateReportInternal(ReportProvider.kt:27)
at deployment.develop.war//ru.myproject.testspring.services.reports.ReportProvider.generateReportInternal(ReportProvider.kt:10)
at deployment.develop.war//ru.myproject.testspring.services.reports.AbstractReportProvider$generateReport$1$1.invokeSuspend(AbstractReportProvider.kt:52)
at deployment.develop.war//kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at deployment.develop.war//kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.io.IOException: Problem reading font data.
at java.desktop/java.awt.Font.createFont0(Font.java:1177)
at java.desktop/java.awt.Font.createFont(Font.java:1046)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.loadFont(SimpleFontFace.java:198)
... 28 more
2020-04-30 13:44:20,826 ERROR [net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper] (DefaultDispatcher-worker-1) Error loading font family: net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font "fonts/TimesFont/times.ttf".
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.loadFont(SimpleFontFace.java:206)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:167)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFace(SimpleFontExtensionHelper.java:379)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:311)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontExtensions(SimpleFontExtensionHelper.java:259)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontExtensions(SimpleFontExtensionHelper.java:230)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontExtensions(SimpleFontExtensionHelper.java:187)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.ensureFontExtensions(FontExtensionsRegistry.java:93)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:57)
at deployment.develop.war//net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:134)
at deployment.develop.war//net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:86)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:116)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:79)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.createBandReportFiller(JRFiller.java:251)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.createReportFiller(JRFiller.java:272)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:156)
at deployment.develop.war//net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:145)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:758)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:739)
at deployment.develop.war//net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:1061)
at deployment.develop.war//ru.myproject.testspring.services.reports.ReportProvider.generateReportInternal(ReportProvider.kt:27)
at deployment.develop.war//ru.myproject.testspring.services.reports.ReportProvider.generateReportInternal(ReportProvider.kt:10)
at deployment.develop.war//ru.myproject.testspring.services.reports.AbstractReportProvider$generateReport$1$1.invokeSuspend(AbstractReportProvider.kt:52)
at deployment.develop.war//kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at deployment.develop.war//kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at deployment.develop.war//kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.io.IOException: Problem reading font data.
at java.desktop/java.awt.Font.createFont0(Font.java:1177)
at java.desktop/java.awt.Font.createFont(Font.java:1046)
at deployment.develop.war//net.sf.jasperreports.engine.fonts.SimpleFontFace.loadFont(SimpleFontFace.java:198)
... 28 more
There is my code of font-extension
jasperreports_extension.properties
net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.engine.fonts.SimpleFontExtensionsRegistryFactory
net.sf.jasperreports.extension.simple.font.families.ireportfamily1586778266566=fonts/fontsfamily1586778266566.xml
fontsfamily1586778266566.xml:
<?xml version="1.0" encoding="UTF-8"?>
<fontFamilies>
<fontFamily name="TimesFont">
<normal><![CDATA[fonts/TimesFont/times.ttf]]></normal>
<bold><![CDATA[fonts/TimesFont/timesbd.ttf]]></bold>
<italic><![CDATA[fonts/TimesFont/timesi.ttf]]></italic>
<boldItalic><![CDATA[fonts/TimesFont/timesbi.ttf]]></boldItalic>
<pdfEncoding><![CDATA[Cp1251]]></pdfEncoding>
<pdfEmbedded><![CDATA[true]]></pdfEmbedded>
<exportFonts/>
</fontFamily>
<fontSet name="ReportFontSet">
<family familyName="TimesFont" primary="true"/>
</fontSet>
</fontFamilies>
I see my font-extension jar in lib folder of my .war file (WEB-INF\lib).
My environment:
jasperreports:6.12.2
Wildfly 19
P.S.
And very strange, that i receive the follow error from the logs:
Error loading font family: net.sf.jasperreports.engine.fonts.InvalidFontException: Error loading font "net/sf/jasperreports/fonts/icons/icons.ttf"
because icon.ttf locates in jasper default fonts folder in jasperreports:6.12.2.jar
I found the solution of this problem. I use docker container with WildFly and in docker i have Linux, that wasn't configured for fonts. I used following commands:
For enter:
docker exec -it -u 0 wildfly /bin/bash
where wildfly is a container's name
For fonts (IT IS SOLUTION)
sudo apt-get install fontconfig
System : windows 10 and AWS EC2
I have follow below steps:
install jdk
install tomcat8
install maven
PhantomJS
Updated app-convert.properties according to system (windows/linux)
Added new required highchart java-script files in diectory /phantomjs
Updated required java-scripts files names in resources.json
Export war/ install export server from repository
Deploy war in tomcat/ start server using mvn jetty:run
On preview server logs error
[ERROR] [http-nio-8080-exec-25 05:19:49] (ExportController.java:writeFileToStream:356) Tried to read file from filesystem: File '/tmp/tomcat8-tomcat8-tmp/export4935023327417038147/output/UOBhqYub.png' does not exist
So I debug Server.java, server is responding as
"ReferenceError: Can't find variable: highcharts".
(SVGConverter.java:convert:108) responce json: ReferenceError: Can't
find variable: Highcharts
I have added required js files in resource/phontomjs directory and mentioned these files in resources.json.
GitHub issue
Please correct me if I am missing anything.
My bad, my stupid mistake, I was using old version of highchart java-scripts files.
I am trying to integrate Apache Nutch 2.1 with Mysql server on Windows 8 platform. I am following tutorial http://nlp.solutions.asia/?p=180. I have made following changes to the apache-nutch-2.1.
I downloaded apache-nutch-2.1-src.zip and extracted.
Uncommented following in ivy/ivy.xml
<dependency org="mysql" name="mysql-connector-java" rev="5.1.18" conf="*->default"/>
commented sql properties for and added gora properties for mysql conf/gora.properties.
gora.sqlstore.jdbc.driver=com.mysql.jdbc.Driver
gora.sqlstore.jdbc.url=jdbc:mysql://localhost:3306/nutch?
createDatabaseIfNotExist=true
gora.sqlstore.jdbc.user=root
gora.sqlstore.jdbc.password=root
Added properties to conf/nutch-site.xml
executed ant runtime command from command prompt. It created /runtime directory.
Added seeds.txt file inside /runtime/local/urls directory with www.apache.nutch.org value.
added +^http://([a-z0-9]*.)*nutch.org/ to both domain-urlfilter.txt and regex-urlfilter.txt files inside /runtime/local/conf directory.
When I am running command for start crawling through cygwin terminal..following exception is occurring,
Exception in thread "main" java.io.IOException: Failed to set permissions of path: \tmp\hadoop-Abhijeet\mapred\staging\Abhijeet530509219\.staging to 0700
at org.apache.hadoop.fs.FileUtil.checkReturnValue(FileUtil.java:689)
at org.apache.hadoop.fs.FileUtil.setPermission(FileUtil.java:662)
at org.apache.hadoop.fs.RawLocalFileSystem.setPermission(RawLocalFileSystem.java:509)
at org.apache.hadoop.fs.RawLocalFileSystem.mkdirs(RawLocalFileSystem.java:344)
at org.apache.hadoop.fs.FilterFileSystem.mkdirs(FilterFileSystem.java:189)
at org.apache.hadoop.mapreduce.JobSubmissionFiles.getStagingDir(JobSubmissionFiles.java:116)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:856)
at org.apache.hadoop.mapred.JobClient$2.run(JobClient.java:850)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1121)
at org.apache.hadoop.mapred.JobClient.submitJobInternal(JobClient.java:850)
at org.apache.hadoop.mapreduce.Job.submit(Job.java:500)
at org.apache.hadoop.mapreduce.Job.waitForCompletion(Job.java:530)
at org.apache.nutch.util.NutchJob.waitForCompletion(NutchJob.java:50)
at org.apache.nutch.crawl.InjectorJob.run(InjectorJob.java:219)
at org.apache.nutch.crawl.Crawler.runTool(Crawler.java:68)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:136)
at org.apache.nutch.crawl.Crawler.run(Crawler.java:250)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
at org.apache.nutch.crawl.Crawler.main(Crawler.java:257)
I have searched over internet that Hadoop does not work with Windows which is alright as I my not using Hadoop for storing data. I am using Mysql.
Can anybody suggest What am i doing wrong ?
I have using Nutch2 on both windows and Linux. Just to run it on Windows you need this Haddop 1.0.3 patch installed: https://github.com/congainc/patch-hadoop_7682-1.0.x-win.
On one server, and on my Windows laptop, producing PDFs with this method works fine:
http://www.databasesandlife.com/svg-to-pdf/
But on the other server I get this error:
org.apache.batik.transcoder.TranscoderException: Error while setting up PDFDocumentGraphics2D
Enclosed Exception:
Error while setting up fonts
at org.apache.fop.svg.PDFTranscoder.transcode(PDFTranscoder.java:189)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source)
at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source)
I have been Googling and searching for hours, but to no avail. What can I do?
I tried installing the following packages but they didn't help:
sudo apt-get install gsfonts gsfonts-x11 gsfonts-other batik \
libbatik-java libxmlgraphics-commons-java \
libxmlgraphics-commons-java fop sun-java6-fonts
My situation is:
Debian 6.0.3
Sun Java version "1.6.0_26"
JARs: avalon-framework-4.2.0.jar batik-all-1.7.jar commons-io-1.3.1.jar commons-logging-1.0.4.jar fop-0.95.jar log4j-1.2.15.jar xml-apis-ext.jar xmlgraphics-commons-1.3.1.jar
Sincerely it is not a good idea to create such temporary files inside the jetty structure from the Debian package. In case of an update, you may get into troubles. Such a cache directory should be located in /var, like /var/tmp for instance.
According to documentation, FOP is supposed to use the temporary directory in case of failure. Probably your finding deserves a bug report.
Until it is fixed, you should set cache-file option Disabling cache with use-cache is another way but probably with performance impacts.
The approach to solving this problem is in log4j.properties I turned up the level to TRACE.
There I saw the extra log before the TranscoderException that I'd seen previously:
2012-02-28 11:51:24,863 DEBUG: org.apache.fop.fonts.FontCache:
Writing font cache to /usr/share/jetty/.fop/fop-fonts.cache
org.apache.batik.transcoder.TranscoderException:
Error while setting up PDFDocumentGraphics2D
Horray for logs! (And writing a log about what the program is about to do, not just once it has done it, so that if the operation fails, then you know what it was trying to do while it failed.)
On Debian, the Jetty webserver runs under the user jetty and has its home directory at /usr/share/jetty/. However, the jetty user does not have write-access to its own home directory, therefore this ~/.fop directory could not be created.
adrian#10770-02:~$ grep jetty /etc/passwd
jetty:x:107:111::/usr/share/jetty:/bin/false
adrian#10770-02:~$ ls -ld /usr/share/jetty
drwxr-xr-x 7 root root 4096 Feb 28 11:52 /usr/share/jetty/
I don't know whether this is by design, or a bug, but creating this directory so that Jetty could write it...
sudo mkdir -p -m 0777 /usr/share/jetty/.fop
...solved the problem.