NetBeans中的项目文件夹名称干扰JSF / GlassFish部署 [英] Project folder name in NetBeans interfering with JSF/GlassFish deployment

查看:136
本文介绍了NetBeans中的项目文件夹名称干扰JSF / GlassFish部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定这是JSF问题还是NetBeans问题。我对这两个都很陌生。我也不知道,如果stackoverflow是最好的SE网站,所以如果我错了,请帮助我并迁移它。感谢。



我在一个文件夹中有一个项目,比如说C:\Folder1,当我尝试在GlassFish服务器上部署它时,关于失踪班的错误...虽然这个班甚至不是这个项目的一部分。我相信C:\\ \\ Folder1可能是我过去用于不同项目的东西,但那已经很久了。所以这个新项目,如果我将它移动到文件夹C:\Folder1a或C:\Folder2或任何其他但C:\Folder1 ...然后它将部署罚款。但是,如果我将它移回到Folder1(即该级别下的完全相同的目录结构),我会从GlassFish服务器收到关于无法找到它甚至不需要的类的神秘错误消息。



我在其他地方得到了一个建议,尝试清理并重新构建项目,但这并不奏效。这里是关于我遵循的步骤的更多细节。



在Netbeans中创建新项目,将其指向一个名为Ex2605的空文件夹。之后,我将几个源文件(.java和.xhtml)带入该Ex2605目录结构中。当我清理和建造时,它说好。当我尝试部署时,出现此错误:
$ b


部署期间发生错误:加载应用程序时发生异常:
java。 lang.IllegalStateException:ContainerBase.addChild:start:
org.apache.catalina.LifecycleException:java.lang.RuntimeException:
java.lang.NoClassDefFoundError:LShoppingCart ;.有关更多详细信息,请参阅server.log
。 C:\\Ex2605\\\
bproject\build-impl.xml:721:
模块尚未部署。详情请参阅服务器日志。 BUILD
FAILED(总时间:16秒)

ShoppingCart是一个来自不同项目的类,很久以前在一个名为Ex2605的目录中有相同的位置。但是该目录早已消失,已从Netbeans项目列表中删除,并且在Ex2605文件夹中的任何文件中的任何位置都没有提及ShoppingCart类。因此,Netbeans显然正在寻找一种叫做LShoppingCart的事实,告诉我它在Ex2605文件夹中保留了一段历史,显然我需要清除历史记录,但不知道如何。



如果我尝试使用任何目录(非命名为Ex2605)进行上述所有操作,它都可以正常工作。

有什么想法?很明显,我可以解决它,但它仍然令我烦恼。

Netbeans有一个编译缓存,有时导致问题。您可以删除编译缓存并查看它是否有帮助。



以下是我的问题答案中的步骤:




  • 清理项目


  • 停止服务器
  • li>

    停止NetBeans

  • 删除%HOME .netbeans\6.9\var\cache


  • 启动NetBeans



  • I am not sure if this is a JSF issue or a NetBeans issue. I am very new to both. I am also not sure if stackoverflow is the best SE site for this, so if I am wrong please help me out and migrate it. Thanks.

    I have a project in a folder, let's say C:\Folder1, and when I try to "deploy" it on the GlassFish server, I get strange errors about a missing class... though that class is not even a part of this project. I believe that C:\Folder1 may have been something I used in the past for a different project but that is long gone. So this new project, if I move it to folder C:\Folder1a or C:\Folder2 or ANYTHING else but C:\Folder1... then it will deploy fine. But if I move it back to Folder1 (i.e. the exact same directory structure underneath that level), I get the mysterious error messages from GlassFish server about being unable to find the class that it doesn't even need.

    I got a suggestion elsewhere to try "cleaning" and re-building the project, but that did not work. Here is more detail about the steps I followed.

    Create new project in Netbeans, point it to an empty folder called Ex2605. After that, I bring a couple source files (.java and .xhtml) into that Ex2605 directory structure. When I clean and build, it says ok. When I try to deploy, I get this error:

    Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: LShoppingCart;. Please see server.log for more details. C:\\Ex2605\nbproject\build-impl.xml:721: The module has not been deployed. See the server log for details. BUILD FAILED (total time: 16 seconds)

    "ShoppingCart" is a class from a different project, that I once long ago had in a directory named Ex2605 at the same location. But that directory is long gone, it has been removed from the Netbeans project list, and there are NO references to the ShoppingCart class anywhere in any of the files currently in the Ex2605 folder. So that fact that Netbeans apparently is looking for something called LShoppingCart tells me it maintains a history somewhere else of what I used to have in the Ex2605 folder, and apparently I need to purge that history but have no idea how.

    If I try all of the above with any directory NOT named Ex2605, it works fine.

    Any ideas? Obviously I can work around it, but it still irks me.

    解决方案

    Netbeans has a compile cache that sometimes causes problems. You could delete the compile cache and see if it helps.

    Here are the steps from the answer to my question:

    1. Stop the server

    2. Clean the project

    3. Stop NetBeans

    4. Delete %HOME%.netbeans\6.9\var\cache

    5. Start NetBeans

    这篇关于NetBeans中的项目文件夹名称干扰JSF / GlassFish部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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