Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UC constraint violation when filtering in picking window #508

Open
metas-ts opened this issue Jul 18, 2017 · 1 comment
Open

UC constraint violation when filtering in picking window #508

metas-ts opened this issue Jul 18, 2017 · 1 comment
Assignees
Labels

Comments

@metas-ts
Copy link
Member

Is this a bug or feature request?

Bug

What is the current behavior?

When opening the picking window in the webui without a filter and then filtering, an error is thrown.

The same problem might occur with filtering within that window in general.

Which are the steps to reproduce?

  • go to http:///window/540345
    • => all rows are shown
  • filter to only see a subset (in my case, i picked a warehouse within the filter)

NOK: an error happens. Here is the log from the console.
Note that the "uuid"/view-id is a new one (i.e. not the one from the "unfiltered" window, which is good :-) )

2017-07-18 10:17:09.428 ERROR 5760 [                ][          ] --- [nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.adempiere.exceptions.DBUniqueConstraintException: org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »t_webui_viewselectionline_pkey«
  Detail: Schlüssel »(uuid, record_id, line_id)=(540345-1fc342aad7634d18934b6cc6be7e9541, 1000053, 1331761)« existiert bereits.
    SQL: INSERT INTO T_WEBUI_ViewSelectionLine ( UUID, Record_ID, Line_ID)
 SELECT 
  ?
, MIN(M_ShipmentSchedule_ID) OVER agg
 ,M_ShipmentSchedule_ID
 FROM M_Packageable_V master
 WHERE 1=1   AND 
 /* security-client */ master.AD_Client_ID IN (0,1000000)
 AND (
 /* filters */ (
/* default */((M_Warehouse_ID = ?)))

)
 WINDOW agg AS (PARTITION BY M_Warehouse_ID, M_Product_ID)
 LIMIT ?
    SQL params: [540345-1fc342aad7634d18934b6cc6be7e9541, 1000053, 5000]] with root cause

org.postgresql.util.PSQLException: FEHLER: doppelter Schlüsselwert verletzt Unique-Constraint »t_webui_viewselectionline_pkey«
  Detail: Schlüssel »(uuid, record_id, line_id)=(540345-1fc342aad7634d18934b6cc6be7e9541, 1000053, 1331761)« existiert bereits.
    at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
    at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
    at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
    at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
    at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
    at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
    at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:135)
    at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:1449)
    at org.adempiere.sql.impl.CPreparedStatementProxy.executeUpdate(CPreparedStatementProxy.java:128)
    at org.compiere.util.DB.executeUpdate(DB.java:921)
    at org.compiere.util.DB.executeUpdateEx(DB.java:1040)
    at org.compiere.util.DB.executeUpdateEx(DB.java:1023)
    at de.metas.ui.web.view.SqlViewRowIdsOrderedSelectionFactory.createOrderedSelection(SqlViewRowIdsOrderedSelectionFactory.java:101)

What is the expected or desired behavior?

should work

@teosarca
Copy link
Member

as discussed, cannot reproduce.
@metas-ts pls ping me if you get it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants