Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8758

Fail to display DBList property in edit mode when 'Use suggest' is checked and doc.fullName column is selected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 4.5-milestone-1
    • Display
    • None
    • Unknown

    Description

      Steps to reproduce :

      1. Add a DBList property ('propName') to class X
      2. Make sure 'Use suggest' is checked
      3. Make sure 'Display Type' is set on 'input'
      4. Add the following query :
        select doc.fullName,doc.title from XWikiDocument as doc
        
      5. Save the class
      6. Create a sheet for class X and display the property :
          $doc.display('propName')
        
      7. Add an object of type X to document Y
      8. Edit document Y (in inline mode)

      The result is empty, but there is the following error in logs :

      WARN  c.x.x.d.XWikiDocument          - Failed to display field [propName] in [edit] mode for Object of Class [xwiki:Main.Y] 
      java.lang.StringIndexOutOfBoundsException: String index out of range: -1
      	at java.lang.String.substring(String.java:1937) ~[na:1.6.0_37]
      	at com.xpn.xwiki.objects.classes.DBListClass.getValue(DBListClass.java:448) ~[xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.objects.classes.DBListClass.displayEdit(DBListClass.java:513) ~[xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:2810) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:2749) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:2698) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:2675) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.display(XWikiDocument.java:2648) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.api.Document.display(Document.java:1407) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
      	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) [velocity-1.7.jar:1.7]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:124) [xwiki-platform-rendering-macro-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.internal.macro.velocity.VelocityMacro.evaluateString(VelocityMacro.java:50) [xwiki-platform-rendering-macro-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.macro.script.AbstractScriptMacro.evaluateBlock(AbstractScriptMacro.java:302) [xwiki-platform-rendering-macro-script-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:198) [xwiki-platform-rendering-macro-script-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.macro.script.AbstractScriptMacro.execute(AbstractScriptMacro.java:59) [xwiki-platform-rendering-macro-script-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transformOnce(MacroTransformation.java:185) [xwiki-rendering-transformation-macro-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.internal.transformation.macro.MacroTransformation.transform(MacroTransformation.java:132) [xwiki-rendering-transformation-macro-4.5-milestone-1.jar:na]
      	at org.xwiki.rendering.internal.transformation.DefaultTransformationManager.performTransformations(DefaultTransformationManager.java:87) [xwiki-rendering-legacy-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:250) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:124) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.DocumentContentDisplayer.display(DocumentContentDisplayer.java:54) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:80) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.DefaultDocumentDisplayer.display(DefaultDocumentDisplayer.java:38) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:253) [xwiki-platform-sheet-api-4.5-milestone-1.jar:na]
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.applySheet(SheetDocumentDisplayer.java:212) [xwiki-platform-sheet-api-4.5-milestone-1.jar:na]
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.maybeDisplayWithSheet(SheetDocumentDisplayer.java:164) [xwiki-platform-sheet-api-4.5-milestone-1.jar:na]
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:102) [xwiki-platform-sheet-api-4.5-milestone-1.jar:na]
      	at org.xwiki.sheet.internal.SheetDocumentDisplayer.display(SheetDocumentDisplayer.java:50) [xwiki-platform-sheet-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:67) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at org.xwiki.display.internal.ConfiguredDocumentDisplayer.display(ConfiguredDocumentDisplayer.java:41) [xwiki-platform-display-api-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:917) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:896) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.doc.XWikiDocument.getRenderedContent(XWikiDocument.java:927) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.api.Document.getRenderedContent(Document.java:603) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_37]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_37]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
      	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.value(ASTReference.java:567) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTExpression.value(ASTExpression.java:71) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTSetDirective.render(ASTSetDirective.java:142) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) [velocity-1.7.jar:1.7]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1769) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.XWiki.parseTemplate(XWiki.java:1709) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.api.XWiki.parseTemplate(XWiki.java:854) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at sun.reflect.GeneratedMethodAccessor158.invoke(Unknown Source) ~[na:na]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_37]
      	at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_37]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.doInvoke(UberspectImpl.java:395) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:384) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:173) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:280) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:369) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.directive.VelocimacroProxy.render(VelocimacroProxy.java:216) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:311) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:230) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:207) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:87) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:72) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:106) [velocity-1.7.jar:1.7]
      	at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:342) [velocity-1.7.jar:1.7]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:228) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at org.xwiki.velocity.internal.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187) [xwiki-commons-velocity-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.render.XWikiVelocityRenderer.evaluate(XWikiVelocityRenderer.java:105) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluate(DefaultPrivilegedTemplateRenderer.java:125) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.internal.template.DefaultPrivilegedTemplateRenderer.evaluateTemplate(DefaultPrivilegedTemplateRenderer.java:75) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.XWiki.evaluateTemplate(XWiki.java:1769) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.web.Utils.parseTemplate(Utils.java:155) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:241) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at com.xpn.xwiki.web.XWikiAction.execute(XWikiAction.java:116) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431) [struts-1.2.9.jar:1.2.9]
      	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236) [struts-1.2.9.jar:1.2.9]
      	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) [struts-1.2.9.jar:1.2.9]
      	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) [struts-1.2.9.jar:1.2.9]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) [servlet-api-2.5.jar:2.5]
      	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [servlet-api-2.5.jar:2.5]
      	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:538) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1352) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:120) [xwiki-platform-legacy-oldcore-4.5-milestone-1.jar:na]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.xwiki.wysiwyg.server.filter.ConversionFilter.doFilter(ConversionFilter.java:144) [xwiki-platform-wysiwyg-server-4.5-milestone-1.jar:na]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:66) [xwiki-platform-webdav-server-4.5-milestone-1.jar:na]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208) [xwiki-platform-container-servlet-4.5-milestone-1.jar:na]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111) [xwiki-platform-container-servlet-4.5-milestone-1.jar:na]
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1323) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:476) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:517) [jetty-security-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:225) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:937) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:406) [jetty-servlet-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:183) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:871) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:247) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:110) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.Server.handle(Server.java:346) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.HttpConnection.handleRequest(HttpConnection.java:589) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:1048) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:601) [jetty-http-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:214) [jetty-http-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.server.HttpConnection.handle(HttpConnection.java:411) [jetty-server-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:535) [jetty-io-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:40) [jetty-io-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:529) [jetty-util-7.4.5.v20110725.jar:7.4.5.v20110725]
      	at java.lang.Thread.run(Thread.java:680) [na:1.6.0_37]
      
      

      Attachments

        Issue Links

          Activity

            People

              sdumitriu Sergiu Dumitriu
              ralucamorosan Raluca Stavro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: