小编Dee*_*Dee的帖子

Pip安装pandas:安装依赖项错误

我正在尝试pip install pandas在虚拟环境中,但我有一个错误,我真的不明白.

熊猫错误

我猜这与它有关,Double requirement given但我真的不知道从哪里开始.

python virtualenv pandas

8
推荐指数
1
解决办法
4293
查看次数

引起:java.lang.ClassNotFoundException:org.apache.commons.io.FileUtils

我正在测试maven及其功能.我正在尝试使用commons-io将字符串写入文本文件

import org.apache.commons.io.FileUtils;
...
public void writeToFile(String fileName){
    File file = new File(fileName);
    ...
    FileUtils.writeStringToFile(file,rowEntry); //rowEntry is a String
}  
Run Code Online (Sandbox Code Playgroud)

我已将commons-io添加到依赖项中

的pom.xml

<dependency>
    <groupId>commons-io</groupId>
    <artifactId>commons-io</artifactId>
    <version>2.5</version>
 </dependency>  
Run Code Online (Sandbox Code Playgroud)

它编译但是当我运行它时会引发异常

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
at com.RandCollections.StringFinder.writeToFile(StringFinder.java:704)
at com.RandCollections.StringFinder.menu(StringFinder.java:123)
at com.RandCollections.StringFinderMain.main(StringFinderMain.java:28)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.io.FileUtils
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 3 more   
Run Code Online (Sandbox Code Playgroud)

我想我错过了一些事情,你能指点一下吗?

java dependencies maven

6
推荐指数
1
解决办法
6387
查看次数

引起:org.hibernate.QueryException:无法解析属性:last_name

我有这个代码工作有我想要的输出

String hql = "FROM Employee ORDER BY last_name";  
Query query = session.createQuery(hql);  
employeeList = query.list();  
Run Code Online (Sandbox Code Playgroud)

我试过这段代码,但它失败了

String hql = "FROM Employee E ORDER BY E.last_name";
Query query = session.createQuery(hql);
employeeList = query.list();  
Run Code Online (Sandbox Code Playgroud)

这是例外

Exception in thread "main" java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: last_name of: com.hibernate.exercise6.model.Employee [FROM com.hibernate.exercise6.model.Employee E ORDER BY E.last_name]
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:131)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:631)
at org.hibernate.internal.AbstractSharedSessionContract.createQuery(AbstractSharedSessionContract.java:101)
at com.hibernate.exercise6.service.EmployeeFunctions.listEmployees(EmployeeFunctions.java:208)
at com.hibernate.exercise6.app.GUIMain.displayListMenu(GUIMain.java:329)
at com.hibernate.exercise6.app.GUIMain.manageRecords(GUIMain.java:140)
at com.hibernate.exercise6.app.GUIMain.main(GUIMain.java:62)
Caused by: org.hibernate.QueryException: could not resolve property: last_name of: …
Run Code Online (Sandbox Code Playgroud)

java hibernate

0
推荐指数
1
解决办法
9995
查看次数

标签 统计

java ×2

dependencies ×1

hibernate ×1

maven ×1

pandas ×1

python ×1

virtualenv ×1