Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7882259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T04:14:30+00:00 2026-06-03T04:14:30+00:00

I’m trying to iterate over a collection of entity objects using ui:repeat tags. While

  • 0

I’m trying to iterate over a collection of entity objects using ui:repeat tags. While iterating over the collection of entity objects, the iterable gives out entityIds of type java.lang.Integer. I’m able to successfully iterate over the Iterable<Integer> in my java classes but when I use this iterable inside the EL(expression language) with ui:repeat‘s value attribute, the page rendering fails giving out this exception:

SEVERE: Error Rendering View[/channelPages.xhtml]
javax.el.ELException: /channelPages.xhtml: Cannot convert px10.BusinessLayer.DBExecutions.ColNames_Iterable@4ae65b of type class px10.BusinessLayer.DBExecutions.ColNames_Iterable to class java.lang.Long
    at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:96)
    at com.sun.faces.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:82)
    at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:54)
    at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:45)
    at org.primefaces.component.datalist.DataListRenderer.encodeList(DataListRenderer.java:148)
    at org.primefaces.component.datalist.DataListRenderer.encodeMarkup(DataListRenderer.java:85)
    at org.primefaces.component.datalist.DataListRenderer.encodeEnd(DataListRenderer.java:49)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
    at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:61)
    at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:45)
    at org.primefaces.component.panel.PanelRenderer.encodeContent(PanelRenderer.java:185)
    at org.primefaces.component.panel.PanelRenderer.encodeMarkup(PanelRenderer.java:108)
    at org.primefaces.component.panel.PanelRenderer.encodeEnd(PanelRenderer.java:55)
    at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1763)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
    at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1759)
    at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:401)
    at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:131)
    at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
    at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
    at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1539)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:343)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:79)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at px10.Security.AuthenticationFilter.doFilter(AuthenticationFilter.java:48)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:256)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:217)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:655)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:595)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:98)
    at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:91)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:162)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:330)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:231)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:174)
    at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:828)
    at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:725)
    at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1019)
    at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:225)
    at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
    at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
    at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
    at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
    at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
    at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
    at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
    at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Cannot convert px10.BusinessLayer.DBExecutions.ColNames_Iterable@4ae65b of type class px10.BusinessLayer.DBExecutions.ColNames_Iterable to class java.lang.Long
    at com.sun.el.lang.ELSupport.coerceToNumber(ELSupport.java:293)
    at com.sun.el.lang.ELSupport.equals(ELSupport.java:154)
    at com.sun.el.lang.ELSupport.compare(ELSupport.java:77)
    at com.sun.el.parser.AstLessThan.getValue(AstLessThan.java:62)
    at com.sun.el.parser.AstChoice.getValue(AstChoice.java:60)
    at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:219)
    at com.sun.faces.facelets.el.ELText$ELTextVariable.toString(ELText.java:214)
    at com.sun.faces.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:89)
    ... 58 more

Here is my Iterable implementation that is used while iterating over the ids of the entityObjects in collection of entities.

public class ColNames_Iterable<N> implements Iterable<N> {
    private List<HColumn> columnsList;

    public ColNames_Iterable(List<HColumn> columnsList) {
        this.columnsList = columnsList;
    }

    @Override
    public Iterator<N> iterator() {
        return new ColNamesIterator(columnsList.iterator());
    }

    public int getSize() {
        return columnsList.size();
    }

    public class ColNamesIterator<K, N, V> implements Iterator<N> {
        private Iterator<HColumn<N, V>> original;

        public ColNamesIterator(Iterator<HColumn<N, V>> original) {
            this.original = original;
        }

        @Override
        public N next() {
            return original.next().getName();
        }

        @Override
        public boolean hasNext() {
            return original.hasNext();
        }

        @Override
        public void remove() {
            original.remove();
        }
    }
}

However I found that another Iterable (actually an Arraylist) is being successfully iterated. But iteration over my iterable is also successful within java class but not inside EL.

Using :

JSF 2.1.6 on
Glassfish 3.1

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T04:14:31+00:00Added an answer on June 3, 2026 at 4:14 am

    According to the tag documentation the <ui:repeat> value supports only the following types:

    The collection may be a List, array, java.sql.ResultSet, or an individual java Object. If the collection is null, this tag does nothing.

    You need to turn it into a List.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am trying to understand how to use SyndicationItem to display feed which is
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I am trying to render a haml file in a javascript response like so:
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.