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

update to CDK 2.2 #191

Open
egonw opened this issue Jul 25, 2019 · 6 comments
Open

update to CDK 2.2 #191

egonw opened this issue Jul 25, 2019 · 6 comments

Comments

@egonw
Copy link
Member

egonw commented Jul 25, 2019

Just replacing the dependency causes several regressions.

@johnmay
Copy link
Contributor

johnmay commented Jul 25, 2019

What are they...? We should be API stable, in the past though there was issues with classes duplicated across JChemPaint and CDK.

@araskind
Copy link

araskind commented Jan 6, 2020

I would like to use JChemPaint as a part of a larger application and at the moment I have to keep CDK version at 2.0 since both 2.2 and 2,3 lead to the following exception when I am trying to make any modifications to the current molecule (I think it pops out often even when I just mouse-over the screen). This specific case is when I've added a single bond to the canvas and then tried to delete it. I am not giving the full text of the exception since all the rest seems to be just Swing stuff not related to the cause of the problem. I will greatly appreciate if you could fix this problem.

Exception in thread "AWT-EventQueue-0" org.openscience.cdk.exception.NoSuchAtomException: Atom is not a member of this AtomContainer
at org.openscience.cdk.AtomContainer2.getAtomRef(AtomContainer2.java:182)
at org.openscience.cdk.AtomContainer2.newBondRef(AtomContainer2.java:217)
at org.openscience.cdk.AtomContainer2.addBond(AtomContainer2.java:924)
at org.openscience.cdk.renderer.selection.AbstractSelection.addToAtomContainer(AbstractSelection.java:90)
at org.openscience.jchempaint.renderer.selection.SingleSelection.getConnectedAtomContainer(SingleSelection.java:54)
at org.openscience.jchempaint.controller.ControllerModuleAdapter.getSelectedAtomContainer(ControllerModuleAdapter.java:189)
at org.openscience.jchempaint.controller.RemoveModule.mouseClickedDown(RemoveModule.java:53)
at org.openscience.jchempaint.controller.ControllerModuleAdapter.mouseClickedDown(ControllerModuleAdapter.java:77)
at org.openscience.jchempaint.controller.ControllerHub.mouseClickedDown(ControllerHub.java:281)
at org.openscience.jchempaint.controller.SwingMouseEventRelay.mousePressed(SwingMouseEventRelay.java:95)
at java.desktop/java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:287)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6633)...

@egonw
Copy link
Member Author

egonw commented Jan 9, 2020

I need to continue looking into this too. A partner in the NanoSolveIT project needs an update of JChemPaint to 2.3 too.

@johnmay
Copy link
Contributor

johnmay commented Jan 9, 2020

See Gotha's https://github.com/cdk/cdk/wiki/AtomContainer2.
Quick fix should be -DCdkUseLegacyAtomContainer=false

@johnmay
Copy link
Contributor

johnmay commented Jan 9, 2020

Sorry other way... -DCdkUseLegacyAtomContainer=true

@johnmay
Copy link
Contributor

johnmay commented Jan 9, 2020

Yep, java -DCdkUseLegacyAtomContainer=true -jar app-jar/target/JChemPaint.jar stops the exception as expected but there still a lot of other things that are broken in general to the point it's unusable.

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

No branches or pull requests

3 participants