netbeans找不到此命名空间的库 [英] netbeans no library found for this namespace

查看:140
本文介绍了netbeans找不到此命名空间的库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了搜索,但无法确定解决方案.我正在使用netbeans + Maven,并尝试从Primefaces 2.2.1升级到3.0.M3-当我将index.xhtml taglib更改为xmlns:p ="http://primefaces.org/ui"时,netbeans会抛出找不到此名称空间错误的库.

I've searched around but cannot fine a definitive solution. I'm using netbeans+Maven and am trying to upgrade from Primefaces 2.2.1 to 3.0.M3 - when I change the index.xhtml taglib to xmlns:p="http://primefaces.org/ui" netbeans throws the 'no library found for this namespace' error.

index.xhtml文件为:

The index.xhtml file is:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:f="http://java.sun.com/jsf/core"      
  xmlns:h="http://java.sun.com/jsf/html"
  xmlns:p="http://primefaces.org/ui" >
<f:view contentType="text/html">
    <h:head>
    </h:head>            
<h:body>
    <h:form>
        <h:commandButton value="Run Test" action="selecttype" />
        <h:commandButton value="Manage Methods" action="addmethod" />
        <h:commandButton value="Manage Data" action="managedata" />
        <p:tagCloud model="#{tagCloudBean.model}" />  
    </h:form>
</h:body>
</f:view>
</html>

因此,新的taglib和p:tagCloud行是netbeans所说的不起作用-当我运行该程序时,我在消息警告:此页面要求XML名称空间

So the new taglib and p:tagCloud line are what netbeans says are not working - when I run the program I see the 3 buttons above the message "Warning: This page calls for XML namespace http://primefaces.org/ui declared with prefix p but no taglibrary exists for that namespace.".

对于Maven,我已经更新了pom.xml的以下部分:

For Maven I've updated these parts of the pom.xml:

<dependency>
    <groupId>org.primefaces</groupId>
    <artifactId>primefaces</artifactId>
    <version>3.0.M3</version>
</dependency>

<repositories>
    <repository>
        <id>java.net.m2</id>
        <name>java.net m2 repo</name>
        <url>http://download.java.net/maven/2</url>
    </repository>

    <repository>
        <id>prime-repo</id>
        <name>PrimeFaces Maven Repository</name>
        <url>http://repository.primefaces.org</url>
        <layout>default</layout>
     </repository>
</repositories>

并注释掉了旧的主存储库信息.

and commented out the old prime-repo repository info.

我已经将primefaces-3.0.M3.jar作为本地依赖项-似乎可以,因为使用该库的所有Java类文件都可以引用它. primefaces-3.0.M3.jar二进制文件也位于我的WEB-INF/lin文件夹中.我见过很多人在使用netbeans时遇到奇怪的问题,并且不确定我是否只是缺少某些东西,或者它是否是IDE.任何想法将不胜感激.

I have got primefaces-3.0.M3.jar as a local dependency - this seems to be ok as all java class files using the library are referencing it ok. The primefaces-3.0.M3.jar binary is also in my WEB-INF/lin folder. I've seen a lot of people having weird issues with netbeans and am not sure if I'm simply missing something or if its the IDE. Any ideas would be greatly appreciated.

推荐答案

xmlns对于Primefaces组件是错误的.尝试根据 Primefaces入门指南将网址更改为http://primefaces.prime.com.tr/ui.

The xmlns is wrong for the Primefaces component. Try changing the url to http://primefaces.prime.com.tr/ui as per the Primefaces Getting Started guide.

更新08-08-2013:

到目前为止,以下链接中列出的正确名称空间是:

As of this moment the correct namespace as listed in the following link is:

xmlns:p="http://primefaces.org/ui"

这篇关于netbeans找不到此命名空间的库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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