Class .. $ Proxy $ _ $$ _ WeldClientProxy 'does not have the property' ... '

Therefore, I am struggling to get an example application for work. I am using Primefaces 3.3M4-SNAPSHOT, JBOSS 7 web profile (CDI and JSF Mojarra).

I have my bean support:

@Named @ViewScoped @URLMapping(id = "viewEditor", pattern = "/editor/e", viewId = "/editor/editor.jsf") public class ViewEditor implements Serializable { public void deleteNode() { selectedNode.getChildren().clear(); selectedNode.getParent().getChildren().remove(selectedNode); selectedNode.setParent(null); selectedNode = null; } } 

My xhtml:

  <p:contextMenu for="docs"> <p:menuitem value="View" update="documentPanel" icon="ui-icon ui-icon-search" oncomplete="documentDialog.show()" /> <p:menuitem value="Delete" actionListener="#{viewEditor.deleteNode}" update="docs" icon="ui-icon ui-icon-close" /> </p:contextMenu> 

When I run my application, this exception I get:

 javax.el.ELException: /editor/editor.xhtml: The class 'application.ViewEditor$Proxy$_$$_WeldClientProxy' does not have the property 'deleteNode'. com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:94) com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82) com.sun.faces.facelets.compiler.UILeaf.encodeAll(UILeaf.java:183) javax.faces.render.Renderer.encodeChildren(Renderer.java:168) 

Has anyone encountered the same problem as me?

+6
source share
2 answers

Ok, got the answer. It turns out that the namespace for simple surfaces has changed from

 xmlns:p="http://primefaces.prime.com.tr/ui" 

to

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

By changing the namespace, everything worked. Wow, that was an elusive thing to keep track of.

+5
source

In my case, the reason was completely different.

I copied the class, including the serialVersionUID field:

 private static final long serialVersionUID = 5443351151396868724L; 

so I had two different classes and objects with the same serialVersionUID, and that was the key to the problem.

0
source

Source: https://habr.com/ru/post/900325/


All Articles