Comments (4)
java -jar SparrowRecSys-1.0-SNAPSHOT-jar-with-dependencies.jar
log4j:WARN No appenders could be found for logger (org.eclipse.jetty.util.log).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
webRootLocation: jar:file:/mnt/e/work/SparrowRecSys/target/SparrowRecSys-1.0-SNAPSHOT-jar-with-dependencies.jar!/webroot/
Web Root URI: jar:file:/mnt/e/work/SparrowRecSys/target/SparrowRecSys-1.0-SNAPSHOT-jar-with-dependencies.jar!/webroot/
Loading movie data from jar:file:/mnt/e/work/SparrowRecSys/target/SparrowRecSys-1.0-SNAPSHOT-jar-with-dependencies.jar!/webroot/sampledata/movies.csv ...
Exception in thread "main" java.io.FileNotFoundException: jar:file:/mnt/e/work/SparrowRecSys/target/SparrowRecSys-1.0-SNAPSHOT-jar-with-dependencies.jar!/webroot/sampledata/movies.csv (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(FileInputStream.java:219)
at java.base/java.io.FileInputStream.(FileInputStream.java:157)
at java.base/java.util.Scanner.(Scanner.java:639)
at com.sparrowrecsys.online.datamanager.DataManager.loadMovieData(DataManager.java:56)
at com.sparrowrecsys.online.datamanager.DataManager.loadData(DataManager.java:41)
at com.sparrowrecsys.online.RecSysServer.run(RecSysServer.java:58)
at com.sparrowrecsys.online.RecSysServer.main(RecSysServer.java:21)
from sparrowrecsys.
通过修改:SparrowRecSys-master/src/main/java/com/sparrowrecsys/online/RecSysServer.java文件里面:
设置为相应文件的绝对路径可以临时解决:
String path = "/Users/github/SparrowRecSys-master/src/main/resources/webroot/";
DataManager.getInstance().loadData(path + "sampledata/movies.csv" .........
具体原因还得等大佬来回答
from sparrowrecsys.
问题在于本身这个URI指向的是这个jar包,他是个文件,然后底下的load方法尝试使用Scanner去读取文件(jar包)中的文件,这是有问题的,需要改成使用Stream的方式去读取
loadMovieData等方法中修改Scanner读取的方式
Scanner scanner = new Scanner(new BufferedInputStream(this.getClass().getResourceAsStream(movieDataPath)));
然后启动类中修改为相对路径即可
DataManager.getInstance().loadData("/webroot/sampledata/movies.csv",
"/webroot/sampledata/links.csv","/webroot/sampledata/ratings.csv",
"/webroot/modeldata/item2vecEmb.csv",
"/webroot/modeldata/userEmb.csv",
"i2vEmb", "uEmb");
from sparrowrecsys.
如果了解一点Spring Boot 不妨看看Java的实现:https://github.com/iqiancheng/sparrow-recsys-spring-boot
欢迎探讨
from sparrowrecsys.
Related Issues (20)
- 关于随机游走采样的方式 HOT 2
- 直接运行scala文件报错 HOT 3
- DeepFM.py 运训报错 HOT 1
- 运行FeatureEngForRecModel.py报错
- 一些不合理的地方? HOT 6
- tensorflow/serving上线问题 HOT 2
- 运行时报错
- ERR wrong number of arguments for 'hset' command HOT 1
- 请教下关于FM如何处理序列的问题 HOT 1
- DIEN模型的loss为负数
- 执行FeatureEngineering 报错 HOT 1
- 向量文件写不进来
- 个性化推荐代码在哪里啊? HOT 2
- DIEN中 auxiliary_loss_layer实现疑问
- 提示程序包不存在 HOT 2
- WARNING:tensorflow:Layers in a Sequential model should only have a single input tensor, but we receive a <class 'collections.OrderedDict'> input
- 主页上面的的搜索框为什么失效呀,我输入什么内容搜索完都还是跳转回主页 HOT 1
- 如何设置用户推荐模型为“"nerualcf"”
- graph embedding中transitionCountMatrix的计算问题
- 抄袭问题 HOT 3
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 sparrowrecsys.