Comments (5)
你好,我用你的项目成功运行了,可是我的owl文件并没有生成。。
按照 README 创建目录,复制相关文件,配置 ontology-construction.properties。如果不行请给出具体错误信息。
from answer-ontology-construction.
我将resources文件添加为源文件了,也成功配置了ontology-construction.properties。然后maven clean,maven install后 运行程序出现了以下错误:
Exception in thread "pool-1-thread-1" java.lang.ExceptionInInitializerError
at cn.lcy.ontologyconstruction.crawler.OntologyConstructionPageProcessor.process(OntologyConstructionPageProcessor.java:77)
at us.codecraft.webmagic.Spider.processRequest(Spider.java:421)
at us.codecraft.webmagic.Spider$1.run(Spider.java:322)
at us.codecraft.webmagic.thread.CountableThreadPool$1.run(CountableThreadPool.java:74)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:72)
at cn.lcy.ontologyconstruction.util.Configuration.propertiesLoader(Configuration.java:21)
at cn.lcy.ontologyconstruction.config.Config.(Config.java:53)
... 7 more
对了,在maven install途中出现了一个小插曲:
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
在查询之后将JRE系统库从javaSE1.8改成了jdk。
会不会是由于这个库的原因?
from answer-ontology-construction.
我将resources文件添加为源文件了,也成功配置了ontology-construction.properties。然后maven clean,maven install后 运行程序出现了以下错误:
Exception in thread "pool-1-thread-1" java.lang.ExceptionInInitializerError
at cn.lcy.ontologyconstruction.crawler.OntologyConstructionPageProcessor.process(OntologyConstructionPageProcessor.java:77)
at us.codecraft.webmagic.Spider.processRequest(Spider.java:421)
at us.codecraft.webmagic.Spider$1.run(Spider.java:322)
at us.codecraft.webmagic.thread.CountableThreadPool$1.run(CountableThreadPool.java:74)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at java.io.Reader.(Reader.java:78)
at java.io.InputStreamReader.(InputStreamReader.java:72)
at cn.lcy.ontologyconstruction.util.Configuration.propertiesLoader(Configuration.java:21)
at cn.lcy.ontologyconstruction.config.Config.(Config.java:53)
... 7 more对了,在maven install途中出现了一个小插曲:
No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
在查询之后将JRE系统库从javaSE1.8改成了jdk。
会不会是由于这个库的原因?
下载最新版本代码,将里面的目录结构设置成下图(java 文件夹设置为源码文件夹、resources 设置为资源文件):
from answer-ontology-construction.
我以下载新代码,并如图设置,可还是有这个错,并且从“pool-1-thread-1”到“pool-1-thread-5”都报错。
from answer-ontology-construction.
一、这个错应该是开发环境和 IDE 配置的问题,由于没有你那边的环境,所以我这边也很难复现。
这里给出我的开发环境供你参考:
Ubuntu 18.04.2 LTS
maven 3.5.4
idea IntelliJ IDEA 2018.3.5 (Ultimate Edition)
JDK 1.8
另外报的错是指 Configuration
类中 21 行在读取 resources
底下的 ontology-construction.properties
文件时找不到该文件导致的,你可以看看 maven install
生成的 jar 包里是否含有 ontology-construction.properties
这个文件。
如果没有就说明 maven
没有把 resources
包里的文件作为资源打包进去,可以再仔细检查是否在 IDE 中把 resources
正确设置成了资源类型目录。
二、另外你可以直接在一个新的目录试试(前提是设置好了 README 中提到的一些文件目录):
git clone [email protected]:YueHub/answer-ontology-construction.git
不用 ide 导入项目,直接进入 answer-ontology-construction
目录直接用命令行运行 mvn install
然后进入 target,在命令行中执行:
java -jar answer-ontology-construction-1.0.0.jar
如果能够成功或没有再报现在的这个错且 answer-ontology-construction-1.0.0.jar 里含有ontology-construction.properties
这个文件,说明就是 IDE 的设置问题。
from answer-ontology-construction.
Related Issues (2)
- 你好,不知道为什么运行有这样的错误 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from answer-ontology-construction.