部署 - 错误:从netbeans到glassfish 4.0的Java-Webproject [英] Deployment-Error: Java-Webproject from netbeans to glassfish 4.0

查看:951
本文介绍了部署 - 错误:从netbeans到glassfish 4.0的Java-Webproject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




$ b

我使用 Netbeans 7.4 在Mac OSX Mavericks和 Glassfish 4.0(内部版本89)在我的专用服务器上, JDK 1.7 。要在本地使用服务器,我需要设置和ssh-tunnel。以下方式:

  ssh -L 4848:127.0.0.1:4848 -p 6122 glassfish @ XXXXXXXXXX 
code>

这个工作非常好,我可以通过本地主机访问服务器,没有任何问题。要使用此服务器,我在Netbeans中添加了一个服务器,请参阅prinscreen: alt =Netbeans中的Serversetup>



问题




现在我想将项目部署到服务器(右键单击项目 - >部署),但我得到以下错误:

<$ p $构建jar:/Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war
将/Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war分配给[glassfish.ivo]
glassfish.ivo,deploy,null,false
/Users/tzhware7/NetBeansProjects/SkyLogicAddon/nbproject/build-impl.xml:1050:该模块尚未部署。
查看服务器日志以获取详细信息。
BUILD FAILED(总时间:1秒)

现在我已经检查了哪个行错误 - 显示的,正在跟随(1049-1051)。对我来说,一切都很正常: >
< nbdeploy clientUrlPart =$ {client.urlPart}debugmode =falseforceRedeploy =$ {forceRedeploy}/>
< / target>

事先我检查了serverlogs,它们是空的 - 没有显示错误。我究竟做错了什么?有人能告诉我要改变什么吗?

编辑1 - 08.01.2014






好的,我没有找到解决上述问题的解决方案,但以下方法至少可以手动部署应用程序。


  1. Netbeans - >右键单击项目 - >清理/构建(现在检查您的outputlog保存项目的位置。

  2. 现在进入该路径,您将找到 .war 文件

  3. 登录到glassfish-server - >单击应用程序的 - >点击部署 - >上传 .war 文件 - >再次点击部署

)现在,glassfish会为您部署该项目:

编辑2 - 17.01.2014






我可以解决这个问题,以下是错误的。在netbeans中,我配置了Target应该是domain1,如果你这样做,它将不起作用。

感谢Tim B的帮助!


<如果NetBeans在将它添加到列表中时无法与服务器通信,那么它会以静默方式失败。服务器出现在列表中,但不能单击+并将其展开以查看其包含的内容。



检查NetBeans实际可以看到的服务器列表服务器。另外请记住,NetBeans需要访问管理端口(通常是4848)而不是正常的网络端口,尽管看起来您的隧道是正确的。



您也需要打开远程管理并设置用户名和密码等。尝试将浏览器指向本地主机6122,并检查是否可以使用netbeans使用的相同用户名和密码登录管理面板。



打开远程管理:

https://blogs.oracle.com/quinn/entry/securing_adminstration_in_glassfish_server1

  asadmin enable-secure-admin 

您还需要添加管理员用户名和密码。


Setup


I'm using Netbeans 7.4 on Mac OSX Mavericks and Glassfish 4.0 (build 89) on my dedicated server and JDK 1.7. To use the server locally I setup and ssh-tunnel. The following way:

ssh -L 4848:127.0.0.1:4848 -p 6122 glassfish@XXXXXXXXXX

This is working perfectly fine, I can access the server via localhost without any problems. To use this server I added a server in Netbeans, see prinscreen:

Problem


Now I'd like to deploy the project to the server (Right-Click Project -> Deploy) but I get following Error:

Building jar: /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war
Distributing /Users/tzhware7/NetBeansProjects/SkyLogicAddon/dist/SkyLogicAddon.war to [glassfish.ivo]
glassfish.ivo, deploy, null, false
/Users/tzhware7/NetBeansProjects/SkyLogicAddon/nbproject/build-impl.xml:1050: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 1 second)

Now I'd checked the line where the Error-Show's up, which is following (1049-1051). For me everything looks normal:

<target if="netbeans.home" name="-run-deploy-nb">
        <nbdeploy clientUrlPart="${client.urlPart}" debugmode="false" forceRedeploy="${forceRedeploy}"/>
    </target>

In advance I checked the serverlogs, which are empty - no error is shown. What am I doing wrong? Can someone advice me what to change? Thank you in advance!

Edit 1 - 08.01.2014


Allright, I didn't found a solution for solving the problem above, but following way worked at least to deploy the app manually.

  1. Netbeans -> Right-Click on Project -> Clean/Build (now check your outputlog where it save's the project.
  2. Now go to that path, you'll shoud find a .war file
  3. Log into your glassfish-server -> Click Application's -> Click deploy -> upload the .war file -> Click again deploy

Now glassfish deploys the project for you. :)

Edit 2 - 17.01.2014


I could fix the problem, following was wrong. In netbeans I configured that the Target should be domain1, if you do this, it won't work. Let the target be empty, and everything works fine.

Thank you Tim B for your help!

解决方案

If NetBeans can't talk to the server when you add it to the list then it silently fails. The server appears in the list but you can't click on the + and expand it out to see what it contains.

Check in your server list that NetBeans can actually see the server. Also keep in mind that NetBeans needs access to the admin port (usually 4848) not the normal web one, although it looks like your tunnel is correct for that.

You also need to turn on remote administration and set up the username and password etc. Try pointing a web browser to your localhost 6122 and check you can log in to the admin panel using the same username and password that netbeans is using.

To turn on remote administration:

https://blogs.oracle.com/quinn/entry/securing_adminstration_in_glassfish_server1

asadmin enable-secure-admin

You will also need to add an administrator username and password.

这篇关于部署 - 错误:从netbeans到glassfish 4.0的Java-Webproject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆