I am getting an error when I try to build my project in NetBeans. I am using JBoss 5.1.0 server and have attached that to my project. The error is -
我尝试在NetBeans中构建项目时收到错误。我正在使用JBoss 5.1.0服务器并将其附加到我的项目中。错误是 -
The following error occurred while executing this line:
.../myPath/build-impl.xml:176: The Java EE server classpath is not correctly set up - server home directory is missing.
Either open the project in the IDE and assign the server or setup the server classpath manually.
For example like this:
ant -Dj2ee.server.home=<app_server_installation_directory>
I am using Mac OS X Lion.
我正在使用Mac OS X Lion。
5 个解决方案
#1
2
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
我错过了一个图书馆。当我右键单击该项目并前往图书馆时,它显示我缺少了库。我添加了库并做了一个干净的构建,错误消失了
#2
2
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
干净的构建也没有帮助我。我看了一下project.properties,发现j2ee.server.home没有设置在任何地方,虽然j2ee.platform.classpath依赖于它。
I do have Weblogic Server set up under /home (on a Linux machine).
我确实在/ home(在Linux机器上)设置了Weblogic Server。
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
所以,我关闭了项目并向project.properties添加了一行:j2ee.server.home = / home / blister / wls / wlserver
(where wlserver = the server name)
(其中wlserver =服务器名称)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
并重新开放了该项目。 Presto,该应用程序现在构建。它仍然不知道应用服务器在哪里,但至少我可以构建我的jar并且可以担心以后部署它。 (我告诉它要建立一个可以很好地部署到Weblogic的战争。)
#3
1
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
如果您使用的是netBeans Ide,请右键单击该项目。单击属性。在属性菜单中选择“运行”。因为第一个文本框是服务器。选择服务器。你想用它来运行项目。如果之前未配置服务器详细信息。配置服务器详细信息并尝试它会帮助你解决上述问题。
#4
0
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
我也有这个错误。但是,尽管在“属性”窗口的“运行”部分中添加了服务器,但多次没有显示可用于添加到项目的服务器(再次在“运行”部分中)。能够在此服务器列表中查看服务器的解决方案是将Netbeans作为管理员运行(我在此线程中看到Rotunba引用。然后可以添加服务器并成功构建项目..
#5
-2
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.
它也可以像运行IDE一样简单,即netbeans作为计算机的管理员。我有同样的问题。浪费了一些时间。
#1
2
I was missing a library. When I right clicked the project and went to libraries, it showed me library missing. I added the library and did a clean and build and the error disappeared
我错过了一个图书馆。当我右键单击该项目并前往图书馆时,它显示我缺少了库。我添加了库并做了一个干净的构建,错误消失了
#2
2
Clean builds did not help me, either. I took a look at project.properties and found that j2ee.server.home was not set anywhere, although j2ee.platform.classpath depends on it.
干净的构建也没有帮助我。我看了一下project.properties,发现j2ee.server.home没有设置在任何地方,虽然j2ee.platform.classpath依赖于它。
I do have Weblogic Server set up under /home (on a Linux machine).
我确实在/ home(在Linux机器上)设置了Weblogic Server。
So, I closed the project and added a line to project.properties:
j2ee.server.home=/home/blister/wls/wlserver
所以,我关闭了项目并向project.properties添加了一行:j2ee.server.home = / home / blister / wls / wlserver
(where wlserver = the server name)
(其中wlserver =服务器名称)
And reopened the project. Presto, the app now builds. It still doesn't know where the app server is, but at least I can built my jar and can worry about deploying it later. (I tell it to build a war which deploys nicely to Weblogic.)
并重新开放了该项目。 Presto,该应用程序现在构建。它仍然不知道应用服务器在哪里,但至少我可以构建我的jar并且可以担心以后部署它。 (我告诉它要建立一个可以很好地部署到Weblogic的战争。)
#3
1
If you are using netBeans Ide, then right click on the project. click properties. in the properties menu select Run. in that the first text box is server. There select the server. with which u want to run the project. If the server details are not configured before. configure server details and try. it wil help you to solve the above problem.
如果您使用的是netBeans Ide,请右键单击该项目。单击属性。在属性菜单中选择“运行”。因为第一个文本框是服务器。选择服务器。你想用它来运行项目。如果之前未配置服务器详细信息。配置服务器详细信息并尝试它会帮助你解决上述问题。
#4
0
I also had this error. However despite adding servers in the Run section of the Properties window, repeatedly no servers showed as being available to add to the Project ( again within the Run section ). The solution to being able to see a server in this server list was to run Netbeans as an admin ( which I saw Rotunba referencing in this thread..It was then possible to add a server and the project built successfully..
我也有这个错误。但是,尽管在“属性”窗口的“运行”部分中添加了服务器,但多次没有显示可用于添加到项目的服务器(再次在“运行”部分中)。能够在此服务器列表中查看服务器的解决方案是将Netbeans作为管理员运行(我在此线程中看到Rotunba引用。然后可以添加服务器并成功构建项目..
#5
-2
It could also be as simple as not running your IDE i.e. netbeans as an administrator on your machine. I had the same problem. Wasted some time.
它也可以像运行IDE一样简单,即netbeans作为计算机的管理员。我有同样的问题。浪费了一些时间。