| Summary: | ClassCastException due to missing uses constraints | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | EPP Error Reports <error-reports-inbox> |
| Component: | Recommenders | Assignee: | Andreas Sewe <sewe> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | sewe |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://git.eclipse.org/r/58055 https://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/?id=7c00d229086371b184b3ecbf93662cc73b80792e |
||
| Whiteboard: | |||
(In reply to EPP Error Reports from comment #0) > This is due to a missing uses constraint in org.eclipse.recommenders.jdt; > org.eclipse.recommenders.utils.names is missing. > > Export-Package: org.eclipse.recommenders.jdt; > uses:="org.eclipse.jdt.core, > com.google.common.base, > org.eclipse.jdt.core.dom, > com.google.common.collect", This is ugly. Due to Bug 458845, PDE's "Calculate Uses" functionality cannot calculate the uses constraint (to org.eclipse.recommenders.utils.names) automatically. This makes it *very* easy to reintroduce this bug. In fact, it has been fixed previously already [1], but was reintroduced later. [1] <https://git.eclipse.org/r/#/c/40790/> New Gerrit change created: https://git.eclipse.org/r/58055 Gerrit change https://git.eclipse.org/r/58055 was merged to [maintenance]. Commit: http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/?id=7c00d229086371b184b3ecbf93662cc73b80792e (In reply to Eclipse Genie from comment #3) > Gerrit change https://git.eclipse.org/r/58055 was merged to [maintenance]. > Commit: > http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/ > ?id=7c00d229086371b184b3ecbf93662cc73b80792e Brought back the uses constraint we accidentally lost due to PDE Bug 458845. (In reply to Andreas Sewe from comment #4) > (In reply to Eclipse Genie from comment #3) > > Gerrit change https://git.eclipse.org/r/58055 was merged to [maintenance]. > > Commit: > > http://git.eclipse.org/c/recommenders/org.eclipse.recommenders.git/commit/ > > ?id=7c00d229086371b184b3ecbf93662cc73b80792e > > Brought back the uses constraint we accidentally lost due to PDE Bug 458845. Marking as FIXED. |
The class in question (QueryConstruction) invokes org.eclipse.recommenders.jdt.AstBindings.toTypeName(...), but apparently the bundles org.eclipse.recommenders.jdt and com.codetrails.codesearch.rcp have been wired to different versions of the org.eclipse.recommenders.utils bundle. This is due to a missing uses constraint in org.eclipse.recommenders.jdt; org.eclipse.recommenders.utils.names is missing. Export-Package: org.eclipse.recommenders.jdt; uses:="org.eclipse.jdt.core, com.google.common.base, org.eclipse.jdt.core.dom, com.google.common.collect", == The following incident was reported via the automated error reporting: code: 2 plugin: org.eclipse.core.jobs_3.7.0.v20150330-2103 message: An internal error occurred during: "Selection Changed". fingerprint: 65d14937 exception class: java.lang.ClassCastException exception message: org.eclipse.recommenders.utils.names.VmTypeName cannot be cast to org.eclipse.recommenders.utils.names.ITypeName number of children: 0 java.lang.ClassCastException: org.eclipse.recommenders.utils.names.VmTypeName cannot be cast to org.eclipse.recommenders.utils.names.ITypeName at com.codetrails.codesearch.rcp.QueryConstruction.a(QueryConstruction.java:688) at com.codetrails.codesearch.rcp.QueryConstruction.handleLinkedModeSelection(QueryConstruction.java:181) at com.codetrails.codesearch.rcp.QueryConstruction.handleLinkedModeSelection(QueryConstruction.java:96) at com.codetrails.codesearch.rcp.SelectionChangedJob.run(SelectionChangedJob.java:42) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) General Information: reported-by: anonymous-id: 110b15c6-5f04-4cc8-9434-dfeedc1eef8e eclipse-build-id: 4.5.1.M20150904-0015 eclipse-product: org.eclipse.epp.package.java.product operating system: Windows8 6.3.0 (x86_64) - win32 jre-version: 1.8.0_60-b27 The following plug-ins were present on the execution stack (*): 1. com.codetrails.codesearch.rcp_1.6.3.v20151005-1654-b205 2. com.codetrails.codesearch_1.6.3.v20151005-1654-b205 3. org.eclipse.core.jobs_3.7.0.v20150330-2103 Please note that: * Messages, stacktraces, and nested status objects may be shortened. * Bug fields like status, resolution, and whiteboard are sent back to reporters. * The list of present bundles and their respective versions was calculated by package naming heuristics. This may or may not reflect reality. Other Resources: * Report: https://dev.eclipse.org/recommenders/committers/confess/#/problems/56180033e4b00fa844a18722 * Manual: https://dev.eclipse.org/recommenders/community/confess/#/guide Thank you for your assistance. Your friendly error-reports-inbox. This bug was created on behalf of andreas.sewe@xxxxxxxxxxxx.