[jbossseam-issues] [JBoss JIRA] Closed: (JBSEAM-2707) Avoid proxies in directory display

Christian Bauer (JIRA) jira-events at lists.jboss.org
Mon Mar 10 10:54:02 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-2707?page=all ]

Christian Bauer closed JBSEAM-2707.
-----------------------------------

    Fix Version/s: 2.1.0.GA
       Resolution: Done

Found the proxy:

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "DEFAULT_FILE_ID", nullable = true, unique = true)
    @org.hibernate.annotations.LazyToOne(org.hibernate.annotations.LazyToOneOption.NO_PROXY)
    private WikiFile defaultFile;

This is in the WikiDirectory subclass of WikiNode. Hibernate seems to ignore the NO_PROXY and bytecode enhancement when you query "from WikiNode" and attaches a proxy instance for this association. Switched to eager fetching.



> Avoid proxies in directory display
> ----------------------------------
>
>                 Key: JBSEAM-2707
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-2707
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Wiki
>            Reporter: Christian Bauer
>         Assigned To: Christian Bauer
>             Fix For: 2.1.0.GA
>
>
> Sometimes a Hibernate proxied instance sneaks into the list of items in the Wiki directory display. That leads to CCE because we don't handle WikiFile, only its subclasses in some generic handlers:
> javax.servlet.ServletException: /includes/directoryBrowserIconMenu.xhtml @10,113 onmouseout="jQuery(this).children('.dirItemIcon').attr('src','#{icon}').toggleClass('mouseOver')": /dirDisplay_d.xhtml @207,122 value="#{themePath}/img/#{wikiDocumentIconHandler.getIconName(node)}": java.lang.ClassCastException: org.jboss.seam.wiki.core.model.WikiFile_$$_javassist_64
>  
> Need to find out why there is a proxy there, this is supposed to be a direct database query in a fresh persistence context.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list