NetBeans WebApplication

时间:2015-07-14 07:25:36

标签: java hibernate netbeans compiler-errors java-8

我在使用hibernate的NetBeans WebApplication上工作。更改了两行代码后,我遇到了下一个错误:

ant -f C:\Users\User\Assignments\AssignmentZaposleni -Dnb.internal.action.name=debug -Ddirectory.deployment.supported=true -DforceRedeploy=false -Dnb.wait.for.caches=true -Dbrowser.context=C:\Users\User\Assignments\AssignmentZaposleni debug
C:\Users\User\Assignments\AssignmentZaposleni\nbproject\build-impl.xml:797: The libs.CopyLibs.classpath property is not set up.
This property must point to 
org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part
of NetBeans IDE installation and is usually located at 
<netbeans_installation>/java<version>/ant/extra folder.
Either open the project in the IDE and make sure CopyLibs library
exists or setup the property manually. For example like this:
 ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar
BUILD FAILED (total time: 0 seconds)

在更改代码编译之前没有错误。 代码更改为:

之前的代码:

mySQL=Restrictions.sqlRestriction(upit.substring(upit.indexOf("WHERE")));
    criteria.add(mySQL);

以下代码:

mySQL=Restrictions.sqlRestriction(upit.substring(upit.indexOf("WHERE")));
    criteria.add(mySQL);
List list =session.createCriteria(Zaposleni.class).add(mySQL).list();

当我发表评论时,更改错误仍然存​​在!? 有人可以帮我弄这个吗?感谢。

1 个答案:

答案 0 :(得分:0)

也许您有自动NetBeans更新,并且在您对Java代码进行更改期间,NetBeans进行了一些更新并对配置文件进行了更改。试试这个,它可能会有所帮助:

右键单击项目名称/ Properties / Libraries / Compile /

如果没有“CopyLibs Task”,请按:

添加它

AddLibrary,选择CopyLib Task和最终AddLibrary / OK。