Project

General

Profile

bug #6861

Number format exception in BHL Query when detail is not a pure number

Added by Andreas Müller over 4 years ago. Updated about 1 month ago.

Status:
New
Priority:
New
Category:
taxeditor
Target version:
Start date:
07/31/2017
Due date:
% Done:

0%

Severity:
normal
Found in Version:

Description

Hallo,
im Details view, Name, protologue – Knopf Query BHL kommt untenst. Fehler.
HG
Walter

login : w.berendsohn
editor version : 4.9.0.201707182249
server : test.e-taxonomy.eu (edit-test) / salvador
schema version : 4.7.0.0.201710040000
os : Windows 7 6.1 amd64
java : 1.8.0_131
java.lang.NumberFormatException: For input string: "538-541, t. 213"
                at java.lang.NumberFormatException.forInputString(Unknown Source)
                at java.lang.Integer.parseInt(Unknown Source)
                at java.lang.Integer.valueOf(Unknown Source)
                at eu.etaxonomy.cdm.ext.openurl.MobotOpenUrlServiceWrapper.parsePageNumber(MobotOpenUrlServiceWrapper.java:173)
                at eu.etaxonomy.cdm.ext.openurl.MobotOpenUrlServiceWrapper.doResolve(MobotOpenUrlServiceWrapper.java:114)
                at eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorWizard.getResult(OpenUrlSelectorWizard.java:132)
                at eu.etaxonomy.taxeditor.ui.openurl.OpenUrlResultPage.createControl(OpenUrlResultPage.java:64)
                at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:175)
                at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:696)
                at org.eclipse.jface.wizard.WizardDialog.createContents(WizardDialog.java:588)
                at org.eclipse.jface.window.Window.create(Window.java:426)
                at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1095)
                at org.eclipse.jface.window.Window.open(Window.java:783)
                at eu.etaxonomy.taxeditor.ui.openurl.OpenUrlSelectorElement.widgetSelected(OpenUrlSelectorElement.java:78)
                at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
                at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
                at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4418)
                at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1079)
                at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4236)
                at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3824)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
                at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
                at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
                at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
                at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
                at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
                at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
                at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
                at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
                at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
                at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
                at org.eclipse.equinox.launcher.Main.run(Main.java:1519)

===

see also duplicate #6768


Related issues

Duplicated by Edit - bug #6768: NumberFormatException during BHL query Duplicate 06/30/2017

History

#1 Updated by Andreas Müller over 4 years ago

The reason is that the BHL query tries to find the correct page by computing the offset. This is not possible if details is not a number.

Is there another possibility to compute the page or do we have deny the request for these cases?

#2 Updated by Walter Berendsohn over 4 years ago

a) Link only to publication, not to page
b) Calculate page by using a function like the Val(string) function in VB for the Detail. Val() returns the first number found in the string (that should usually hit at least one of the pages).

#3 Updated by Andreas Müller about 1 month ago

  • Duplicated by bug #6768: NumberFormatException during BHL query added

#4 Updated by Andreas Müller about 1 month ago

  • Description updated (diff)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)