[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897375#comment-16897375 ] Michael Cizmar commented on CONNECTORS-1615: Roger that. Please forgive my ignorance, is that a pull request to github or how would I suggest a change? > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897372#comment-16897372 ] Karl Wright commented on CONNECTORS-1615: - Patches welcome. > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897370#comment-16897370 ] Michael Cizmar commented on CONNECTORS-1615: Which doesn't explain why the logging can't be changed. and couldn't a prepare statement be executed to verify the query? > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897343#comment-16897343 ] Karl Wright commented on CONNECTORS-1615: - Right, but as I said, I have no way of detecting the difference between these two cases. > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897158#comment-16897158 ] Michael Cizmar commented on CONNECTORS-1615: Right. However, the case is: # That processing on the job stops when a single null is returned from the result set # The error message misinforms the user to the structure of the query and not the result So ManifoldCF could handle 99+% of the result set but fails due to one bad record. This record could come in after the initial configuration. As I said, the message does not direct the user to the root problem. What I had to do was look up the code to see that there was in fact a null check and then find out that in row 40k+ there was a null. The message should say explicitly what failed. "Null was returned for identity column, bad seed query" > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Updated] (CONNECTORS-1616) Confluence Authority does not handle Confluence API errors
[ https://issues.apache.org/jira/browse/CONNECTORS-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julien Massiera updated CONNECTORS-1616: Description: The Confluence Authority asks spaces permissions for each space returned by the getSpaces() method of the ConfluenceClient class. The concerned method getSpacePermissionsForUser(Space space, String username) sends a request to Confluence and triggers a ConfluenceException if the request response is different from 200, otherwise it parses the response as a JSONArray to get the permissions. The problem is that even with a 200 request response code, the content of the response may be a simple JSONObject that explains an internal Confluence error. It happens frequently when the username is not allowed to get permissions on certain spaces : {code:java} { "id": null, "error": { "code": 500, "message": "The application was unable to serve your request: com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.", "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\n\tat com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat" } } {code} As a username will almost never have the rights to get permissions on ALL spaces, it is problematic because the response parsing process triggers an Exception and so the Confluence Authority response is UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for allowed spaces. was: The Confluence Authority ask spaces permissions for each space returned by the getSpaces() method of the ConfluenceClient class. The concerned method getSpacePermissionsForUser(Space space, String username) sends a request to Confluence and triggers a ConfluenceException if the request response is different from 200, otherwise it parses the response as a JSONArray to get the permissions. The problem is that even with a 200 request response code, the content of the response may be a simple JSONObject that explains an internal Confluence error. It happens frequently when the username is not allowed to get permissions on certain spaces : {code:java} { "id": null, "error": { "code": 500, "message": "The application was unable to serve your request: com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.", "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\n\tat com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat" } } {code} As a username will almost never have the rights to get permissions on ALL spaces, it is problematic because the response parsing process triggers an Exception and so the Confluence Authority response is UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for allowed spaces. > Confluence Authority does not handle Confluence API errors > -- > > Key: CONNECTORS-1616 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1616 > Project: ManifoldCF > Issue Type: Bug > Components: Confluence connector >Affects Versions: ManifoldCF 2.12 >Reporter: Julien Massiera >Priority: Critical > Fix For: ManifoldCF 2.12 > > Attachments: patch-CONNECTORS-1616.diff > > > The Confluence Authority asks spaces permissions for each space returned by > the getSpaces() method of the ConfluenceClient class. > The concerned method getSpacePermissionsForUser(Space space, String > username) sends a request to Confluence and triggers a ConfluenceException if > the request response is different from 200, otherwise it parses the response
[jira] [Comment Edited] (CONNECTORS-1616) Confluence Authority does not handle Confluence API errors
[ https://issues.apache.org/jira/browse/CONNECTORS-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897104#comment-16897104 ] Julien Massiera edited comment on CONNECTORS-1616 at 7/31/19 12:14 PM: --- I propose a patch that triggers an exception when the request response is not what expected, logs the error, and returns an empty permissions list for the concerned space was (Author: julienfl): I propose a patch that triggers an exception when the request response is not what expected, logs the error, and return an empty permissions list for the concerned space > Confluence Authority does not handle Confluence API errors > -- > > Key: CONNECTORS-1616 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1616 > Project: ManifoldCF > Issue Type: Bug > Components: Confluence connector >Affects Versions: ManifoldCF 2.12 >Reporter: Julien Massiera >Priority: Critical > Fix For: ManifoldCF 2.12 > > Attachments: patch-CONNECTORS-1616.diff > > > The Confluence Authority ask spaces permissions for each space returned by > the getSpaces() method of the ConfluenceClient class. > The concerned method getSpacePermissionsForUser(Space space, String username) > sends a request to Confluence and triggers a ConfluenceException if the > request response is different from 200, otherwise it parses the response as a > JSONArray to get the permissions. > The problem is that even with a 200 request response code, the content of the > response may be a simple JSONObject that explains an internal Confluence > error. It happens frequently when the username is not allowed to get > permissions on certain spaces : > {code:java} > { > "id": null, > "error": { > "code": 500, > "message": "The application was unable to serve your request: > com.atlassian.confluence.rpc.NotPermittedException: Only space administrators > can view permissions for other users in the space.", > "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the > space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the space.\n\tat > com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat > > com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat > sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat > java.lang.reflect.Method.invoke(Method.java:498)\n\tat" > } > } > {code} > As a username will almost never have the rights to get permissions on ALL > spaces, it is problematic because the response parsing process triggers an > Exception and so the Confluence Authority response is > UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for > allowed spaces. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1616) Confluence Authority does not handle Confluence API errors
[ https://issues.apache.org/jira/browse/CONNECTORS-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897105#comment-16897105 ] Karl Wright commented on CONNECTORS-1616: - Patches welcome. I'm not the author of the confluence connector so any help you can provide is useful. > Confluence Authority does not handle Confluence API errors > -- > > Key: CONNECTORS-1616 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1616 > Project: ManifoldCF > Issue Type: Bug > Components: Confluence connector >Affects Versions: ManifoldCF 2.12 >Reporter: Julien Massiera >Priority: Critical > Fix For: ManifoldCF 2.12 > > Attachments: patch-CONNECTORS-1616.diff > > > The Confluence Authority ask spaces permissions for each space returned by > the getSpaces() method of the ConfluenceClient class. > The concerned method getSpacePermissionsForUser(Space space, String username) > sends a request to Confluence and triggers a ConfluenceException if the > request response is different from 200, otherwise it parses the response as a > JSONArray to get the permissions. > The problem is that even with a 200 request response code, the content of the > response may be a simple JSONObject that explains an internal Confluence > error. It happens frequently when the username is not allowed to get > permissions on certain spaces : > {code:java} > { > "id": null, > "error": { > "code": 500, > "message": "The application was unable to serve your request: > com.atlassian.confluence.rpc.NotPermittedException: Only space administrators > can view permissions for other users in the space.", > "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the > space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the space.\n\tat > com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat > > com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat > sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat > java.lang.reflect.Method.invoke(Method.java:498)\n\tat" > } > } > {code} > As a username will almost never have the rights to get permissions on ALL > spaces, it is problematic because the response parsing process triggers an > Exception and so the Confluence Authority response is > UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for > allowed spaces. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Assigned] (CONNECTORS-1616) Confluence Authority does not handle Confluence API errors
[ https://issues.apache.org/jira/browse/CONNECTORS-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Wright reassigned CONNECTORS-1616: --- Assignee: Karl Wright > Confluence Authority does not handle Confluence API errors > -- > > Key: CONNECTORS-1616 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1616 > Project: ManifoldCF > Issue Type: Bug > Components: Confluence connector >Affects Versions: ManifoldCF 2.12 >Reporter: Julien Massiera >Assignee: Karl Wright >Priority: Critical > > The Confluence Authority ask spaces permissions for each space returned by > the getSpaces() method of the ConfluenceClient class. > The concerned method getSpacePermissionsForUser(Space space, String username) > sends a request to Confluence and triggers a ConfluenceException if the > request response is different from 200, otherwise it parses the response as a > JSONArray to get the permissions. > The problem is that even with a 200 request response code, the content of the > response may be a simple JSONObject that explains an internal Confluence > error. It happens frequently when the username is not allowed to get > permissions on certain spaces : > {code:java} > { > "id": null, > "error": { > "code": 500, > "message": "The application was unable to serve your request: > com.atlassian.confluence.rpc.NotPermittedException: Only space administrators > can view permissions for other users in the space.", > "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the > space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space > administrators can view permissions for other users in the space.\n\tat > com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat > > com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat > sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat > java.lang.reflect.Method.invoke(Method.java:498)\n\tat" > } > } > {code} > As a username will almost never have the rights to get permissions on ALL > spaces, it is problematic because the response parsing process triggers an > Exception and so the Confluence Authority response is > UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for > allowed spaces. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Created] (CONNECTORS-1616) Confluence Authority does not handle Confluence API errors
Julien Massiera created CONNECTORS-1616: --- Summary: Confluence Authority does not handle Confluence API errors Key: CONNECTORS-1616 URL: https://issues.apache.org/jira/browse/CONNECTORS-1616 Project: ManifoldCF Issue Type: Bug Components: Confluence connector Affects Versions: ManifoldCF 2.12 Reporter: Julien Massiera The Confluence Authority ask spaces permissions for each space returned by the getSpaces() method of the ConfluenceClient class. The concerned method getSpacePermissionsForUser(Space space, String username) sends a request to Confluence and triggers a ConfluenceException if the request response is different from 200, otherwise it parses the response as a JSONArray to get the permissions. The problem is that even with a 200 request response code, the content of the response may be a simple JSONObject that explains an internal Confluence error. It happens frequently when the username is not allowed to get permissions on certain spaces : {code:java} { "id": null, "error": { "code": 500, "message": "The application was unable to serve your request: com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.", "data": "com.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\ncom.atlassian.confluence.rpc.NotPermittedException: Only space administrators can view permissions for other users in the space.\n\tat com.atlassian.confluence.rpc.soap.services.SpacesSoapService.getPermissions(SpacesSoapService.java:188)\n\tat com.atlassian.confluence.rpc.soap.XhtmlSoapService.getPermissionsForUser(XhtmlSoapService.java:226)\n\tat sun.reflect.GeneratedMethodAccessor3812.invoke(Unknown Source)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat" } } {code} As a username will almost never have the rights to get permissions on ALL spaces, it is problematic because the response parsing process triggers an Exception and so the Confluence Authority response is UNREACHABLEAUTHORITY:confluence, instead of delivering permissions for allowed spaces. -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Resolved] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Wright resolved CONNECTORS-1615. - Resolution: Won't Fix Fix Version/s: ManifoldCF 2.14 > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > Fix For: ManifoldCF 2.14 > > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Assigned] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Karl Wright reassigned CONNECTORS-1615: --- Assignee: Karl Wright > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Assignee: Karl Wright >Priority: Major > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)
[jira] [Commented] (CONNECTORS-1615) Bad Error Message when IDCOLUMN's value is actually null
[ https://issues.apache.org/jira/browse/CONNECTORS-1615?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16897066#comment-16897066 ] Karl Wright commented on CONNECTORS-1615: - Your query should never return rows that have null IDs. ManifoldCF cannot work with documents that don't have an ID. As for the error message being incorrect -- if you accept that null IDs are not allowed, then the error message is perfectly fine. There is no good way to disambiguate a null from a null that is common across all JDBC drivers we support. > Bad Error Message when IDCOLUMN's value is actually null > > > Key: CONNECTORS-1615 > URL: https://issues.apache.org/jira/browse/CONNECTORS-1615 > Project: ManifoldCF > Issue Type: Bug > Components: JDBC connector >Affects Versions: ManifoldCF 2.13 >Reporter: Michael Cizmar >Priority: Major > > In the edge case that the id column is null, the error message doesn't > suggest that. > > {code:java} > Object o = row.getValue(JDBCConstants.idReturnColumnName); > if (o == null) > throw new ManifoldCFException("Bad seed query; doesn't return > $(IDCOLUMN) column. Try using quotes around $(IDCOLUMN) variable, e.g. > \"$(IDCOLUMN)\", or, for MySQL, select \"by label\" in your repository > connection."); > String idValue = JDBCConnection.readAsString(o); > {code} > > > Also, should it entirely fail if one $IDCOLUMN record is null? -- This message was sent by Atlassian JIRA (v7.6.14#76016)