Parameter was used but not defined - java

Trying to retrieve an item from a response object for validation but getting an error.
What am I doing wrong ?
My code:
#And("^Delete record for member 0000000555for SC_1_1 scenario")
public void deleteClaimsInserted_SC_1_1() {
Response deleteClaimsInsertedSC1 = SerenityRest.given().auth().oauth2(RestAssuredOAuth2.access_token_code)
.header("platform", "DR2")
.contentType("application/json")
.header("Accept", "application/json")
.queryParam("mbrId", "000000055564627500")
.queryParam("custId", "444")
.queryParam("clntId", "2")
.queryParam("grpId", "1")
.queryParam("bnftPrdBgnDt", "2019-01-01")
.get(deleteClaimsURI)
.then()
.statusCode(200)
.extract().response();
int validateClaimsDeleteSuccess = deleteClaimsInsertedSC1.jsonPath().getInt("deleted H96 records");
System.out.println(validateClaimsDeleteSuccess);
if (validateClaimsDeleteSuccess > 0) {
System.out.println(successfullDeletion);
} else {
System.out.println(failedDeletion);
}
softAssert.assertAll();
}
THE ERROR
Failed scenarios:
C:/Users/dt234939/IdeaProjects/adjudication-automation/src/test/resources/features/adjcpe/comAccum/SCR.feature:6 # SIT_MVP1_PI5_ADJCPE_SC_1_1 - SCR Phase - UNDER limit
1 Scenarios (1 failed)
5 Steps (1 failed, 4 passed)
0m29.568s
**java.lang.IllegalArgumentException: The parameter "H96" was used but not defined. Define parameters using the JsonPath.params(...) function**
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at org.codehaus.groovy.reflection.CachedConstructor.invoke(CachedConstructor.java:83)
at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor(ConstructorSite.java:105)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor(CallSiteArray.java:59)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:237)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor(AbstractCallSite.java:257)
at io.restassured.internal.path.json.JSONAssertion.getAsJsonObject(JSONAssertion.groovy:50)
at io.restassured.internal.path.json.JSONAssertion$getAsJsonObject.callCurrent(Unknown Source)
at io.restassured.internal.path.json.JSONAssertion.getResult(JSONAssertion.groovy:28)
at io.restassured.path.json.JsonPath.get(JsonPath.java:203)
at io.restassured.path.json.JsonPath.getInt(JsonPath.java:237)
at com.domanirx.automation.adjudication.adjcpe.comAccum.steps.steps.deleteClaimsInserted_SC_1_1(steps.java:6801)
at ✽.Delete claim record for member 000000055564627500 for SC_1_1 scenario(C:/Users/dt234939/IdeaProjects/adjudication-automation/src/test/resources/features/adjcpe/comAccum/SCR.feature:10)
Caused by: groovy.lang.MissingPropertyException: No such property: H96 for class: Script1
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:67)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:51)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:309)
at Script1.run(Script1.groovy:1)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:441)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:479)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:450)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrap.invoke(PogoMetaMethodSite.java:179)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:70)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:127)
at io.restassured.internal.path.json.JSONAssertion.eval(JSONAssertion.groovy:80)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.runtime.callsite.PlainObjectMetaMethodSite.doInvoke(PlainObjectMetaMethodSite.java:43)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:190)
at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:58)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:184)
at io.restassured.internal.path.json.JSONAssertion.getAsJsonObject(JSONAssertion.groovy:46)
at io.restassured.internal.path.json.JSONAssertion$getAsJsonObject.callCurrent(Unknown Source)
at io.restassured.internal.path.json.JSONAssertion.getResult(JSONAssertion.groovy:28)
at io.restassured.path.json.JsonPath.get(JsonPath.java:203)
at io.restassured.path.json.JsonPath.getInt(JsonPath.java:237)
at com.domanirx.automation.adjudication.adjcpe.comAccum.steps.steps.deleteClaimsInserted_SC_1_1(steps.java:6801)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at cucumber.runtime.Utils$1.call(Utils.java:31)
at cucumber.runtime.Timeout.timeout(Timeout.java:16)
at cucumber.runtime.Utils.invoke(Utils.java:25)
at cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:37)
at cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:40)
at cucumber.api.TestStep.executeStep(TestStep.java:102)
at cucumber.api.TestStep.run(TestStep.java:83)
at cucumber.api.TestCase.run(TestCase.java:58)
at cucumber.runner.Runner.runPickle(Runner.java:80)
at cucumber.runtime.Runtime.runFeature(Runtime.java:119)
at cucumber.runtime.Runtime.run(Runtime.java:104)
at cucumber.api.cli.Main.run(Main.java:36)
at cucumber.api.cli.Main.main(Main.java:18)
Process finished with exit code 1

You should change getInt("deleted H96 records"); to getInt("\"deleted H96 records\"");.
Since you have whitespace in your field name you need to quote it otherwise you break jsonpath syntax.

Related

ReceivePacketEvent not triggering

I have a mod that is not executing receive packet events when I run
#Cancelable public class ReceivePacketEvent extends Event { public Packet<?> packet; public ReceivePacketEvent(Packet<?> packet) { System.out.println("PKT"); this.packet = packet; } }
Nothing will happen. Other events will work like on render or tick event but packet wont work. for reference I'm using this mod in a server
I get an error seemingly randomly that looks like this and im not sure where it comes from or if it affects the packet event so id say im lost
[01:22:45] [main/FATAL] (Minecraft) Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_351]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_351]
at net.minecraft.util.Util.runTask(Util.java:43) [Util.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:987) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:443) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:111) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_351]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_351]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_351]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_351]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) [dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.NullPointerException
at net.minecraft.scoreboard.Scoreboard.removeTeam(Scoreboard.java:240) ~[Scoreboard.class:?]
at net.minecraft.client.network.NetHandlerPlayClient.handleTeams(NetHandlerPlayClient.java:1452) ~[NetHandlerPlayClient.class:?]
at net.minecraft.network.play.server.S3EPacketTeams.processPacket(S3EPacketTeams.java:114) ~[S3EPacketTeams.class:?]
at net.minecraft.network.play.server.S3EPacketTeams.processPacket(S3EPacketTeams.java:36) ~[S3EPacketTeams.class:?]
at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:24) ~[PacketThreadUtil$1.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_351]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_351]
at net.minecraft.util.Util.runTask(Util.java:42) ~[Util.class:?]
... 10 more

How to solve Maven project plugin error,When I click on project the maven project it show's error as below

also in windows- preferance -maven it show as below
and here i am pasting error logs,which comes when i click to create maven project.
java.lang.NullPointerException: Cannot invoke "org.eclipse.m2e.core.ui.internal.archetype.ArchetypePlugin.getActiveArchetypeCatalogs()" because "archetypeManager" is null
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createViewer(MavenProjectWizardArchetypePage.java:248)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createControl(MavenProjectWizardArchetypePage.java:174)
at org.eclipse.jface.wizard.Wizard.createPageControls(Wizard.java:178)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizard.createPageControls(MavenProjectWizard.java:147)
at org.eclipse.jface.wizard.WizardDialog.createPageControls(WizardDialog.java:744)
at org.eclipse.jface.wizard.WizardDialog.setWizard(WizardDialog.java:1182)
at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1235)
at org.eclipse.jface.wizard.WizardDialog.lambda$3(WizardDialog.java:1223)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1223)
at org.eclipse.ui.internal.dialogs.NewWizardSelectionPage.advanceToNextPageOrFinish(NewWizardSelectionPage.java:73)
at org.eclipse.ui.internal.dialogs.NewWizardNewPage.lambda$0(NewWizardNewPage.java:342)
at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:780)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174)
at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:777)
at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1542)
at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1211)
at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:272)
at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:329)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:263)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:283)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at jdk.internal.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
at java. Base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java. Base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
The second error is as below
Unhandled event loop exception
java.lang.NullPointerException: Cannot invoke "org.eclipse.m2e.core.ui.internal.archetype.ArchetypePlugin.getActiveArchetypeCatalogs()" because "archetypeManager" is null
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createViewer(MavenProjectWizardArchetypePage.java:248)
at org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypePage.createControl(MavenProjectWizardArchetypePage.java:174)
at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1240)
at org.eclipse.jface.wizard.WizardDialog.lambda$3(WizardDialog.java:1223)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:74)
at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1223)
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:918)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:469)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:263)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:283)
at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
at jdk.internal.reflect.GeneratedMethodAccessor59.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:317)
at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:251)
at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:485)
at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4251)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1066)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4068)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3645)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1155)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:643)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:550)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:171)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Java XML Web Service

for a school project I'm trying to create my own SOAP web service.
While doing some work an error occur.
public class ServerMain {
private static final Logger LOGGER = Logger.getAnonymousLogger();
public static void main(String[] args) {
try{
Endpoint.publish("http://localhost:8976/s19103/people",
new PersonServiceImpl());
LOGGER.info("Service started");
System.out.println("START");
}
catch (Exception e){
e.printStackTrace();
}
}}
I got this error
Exception in thread "main" java.util.ServiceConfigurationError: javax.xml.ws.spi.Provider: Provider com.sun.xml.ws.spi.ProviderImpl could not be instantiated
at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:581)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:803)
at java.base/java.util.ServiceLoader$ProviderImpl.get(ServiceLoader.java:721)
at java.base/java.util.ServiceLoader$3.next(ServiceLoader.java:1394)
at javax.xml.ws.spi.Provider.getProviderUsingServiceLoader(Provider.java:180)
at javax.xml.ws.spi.Provider.provider(Provider.java:140)
at javax.xml.ws.Endpoint.publish(Endpoint.java:255)
at example.HelloWorld.main(HelloWorld.java:17)
Caused by: java.lang.NoClassDefFoundError: javax/activation/DataSource
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl.<clinit>(RuntimeBuiltinLeafInfoImpl.java:461)
at com.sun.xml.bind.v2.model.impl.RuntimeTypeInfoSetImpl.<init>(RuntimeTypeInfoSetImpl.java:65)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:133)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.createTypeInfoSet(RuntimeModelBuilder.java:85)
at com.sun.xml.bind.v2.model.impl.ModelBuilder.<init>(ModelBuilder.java:156)
at com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.<init>(RuntimeModelBuilder.java:93)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:455)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:303)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:142)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1174)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:262)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:249)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:442)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:652)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:599)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:274)
at com.sun.xml.ws.spi.ProviderImpl$2.run(ProviderImpl.java:271)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:271)
at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:96)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at java.base/java.util.ServiceLoader$ProviderImpl.newInstance(ServiceLoader.java:779)
... 6 more
Caused by: java.lang.ClassNotFoundException: javax.activation.DataSource
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 36 more
What does it mean and what do I have to do to run my program?
Even when I try to run the automaticaly generated example HelloWorld I get the same error.

Error when creating an object TriangulatedMesh

I want to create a figure in the form of the letter T
When I create an object with these points, the exception drops
Has anyone come across this?
I use FXyz3D
final List<Point3D> points = new ArrayList<>(//I am trying to create an array of points (x, y, 0)
Arrays.asList(
new Point3D(0,150,0),
new Point3D(0, 90,0),
new Point3D(10,90,0),
new Point3D(30,90,0),
new Point3D(40,90,0),
new Point3D(10,0,0),
new Point3D(30,0,0),
new Point3D(40,150,0))
);
TriangulatedMesh customShape = new
TriangulatedMesh(points,20);//Exception falls on this place
This is the console output when I run the program
I can’t understand what the problem is.
Exception in Application start method
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.RuntimeException: Intersecting Constraints
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.flipEdgeEvent(DTSweep.java:657)
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:631)
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:626)
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.edgeEvent(DTSweep.java:348)
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.sweep(DTSweep.java:110)
at org.poly2tri.triangulation.delaunay.sweep.DTSweep.triangulate(DTSweep.java:72)
at org.poly2tri.Poly2Tri.triangulate(Poly2Tri.java:108)
at org.poly2tri.Poly2Tri.triangulate(Poly2Tri.java:60)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.createMesh(TriangulatedMesh.java:285)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.createMesh(TriangulatedMesh.java:218)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.updateMesh(TriangulatedMesh.java:112)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.<init>(TriangulatedMesh.java:103)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.<init>(TriangulatedMesh.java:93)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.<init>(TriangulatedMesh.java:90)
at org.fxyz3d.shapes.primitives.TriangulatedMesh.<init>(TriangulatedMesh.java:82)
at sampleFxyz3D.Sample.start(Sample.java:89)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
... 1 more
Exception running application sampleFxyz3D.Sample
final List<Point3D> points = new ArrayList<>(Arrays.asList(
new Point3D(0, 90,0),
new Point3D(0,150,0),
new Point3D(40,150,0),
new Point3D(40,90,0),
new Point3D(30,90,0),
new Point3D(30,0,0),
new Point3D(10,0,0),
new Point3D(10,90,0)
)
);
It is important that points are ordered forming a closed polygon.

javax.naming.CommunicationException: Request: 2 cancelled

I get this exception while determining whether there are more elements (Enumeration) to be caught and handled by the application.
com.app.fr.chrom.batch.model.exception.ReaderException: com.app.fr.chrom.model.exception.TechnicalException: javax.naming.CommunicationException: Request: 2 cancelled
at com.app.fr.chrom.batch.ldap.reader.LdapItemReader.open(LdapItemReader.java:79)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:132)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:120)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy32.open(Unknown Source)
at org.springframework.batch.item.support.CompositeItemStream.open(CompositeItemStream.java:96)
at org.springframework.batch.core.step.tasklet.TaskletStep.open(TaskletStep.java:306)
at org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:192)
at org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:141)
at org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:64)
at org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:60)
at org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:151)
at org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:130)
at org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:135)
at org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:301)
at org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:134)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
at org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:127)
at com.app.fr.c4batch.C4Batch.launch(C4Batch.java:136)
at com.app.fr.c4batch.BatchLauncher.main(BatchLauncher.java:54)
Caused by: com.app.fr.chrom.model.exception.TechnicalException: com.app.fr.chrom.model.exception.TechnicalException: javax.naming.CommunicationException: Request: 2 cancelled
at com.app.fr.chrom.batch.service.impl.CollabLdapService.retrieveModifiedCollaborateur(CollabLdapService.java:116)
at com.app.fr.chrom.batch.ldap.reader.LdapItemReader.open(LdapItemReader.java:77)
... 27 more
Caused by: com.app.fr.chrom.model.exception.TechnicalException: javax.naming.CommunicationException: Request: 2 cancelled
at com.app.fr.chrom.dao.ldapimpl.RetrieveCollaborateurLdap.retrieveLastModified(RetrieveCollaborateurLdap.java:142)
at com.app.fr.chrom.batch.service.impl.CollabLdapService.retrieveModifiedCollaborateur(CollabLdapService.java:82)
... 28 more
Caused by: javax.naming.CommunicationException: Request: 2 cancelled
at com.sun.jndi.ldap.LdapRequest.getReplyBer(LdapRequest.java:105)
at com.sun.jndi.ldap.Connection.readReply(Connection.java:452)
at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:638)
at com.sun.jndi.ldap.LdapClient.getSearchReply(LdapClient.java:606)
at com.sun.jndi.ldap.LdapCtx.getSearchReply(LdapCtx.java:1920)
at com.sun.jndi.ldap.LdapNamingEnumeration.getNextBatch(LdapNamingEnumeration.java:129)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMoreImpl(LdapNamingEnumeration.java:216)
at com.sun.jndi.ldap.LdapNamingEnumeration.hasMore(LdapNamingEnumeration.java:189)
at com.app.fr.chrom.dao.ldapimpl.RetrieveCollaborateurLdap.retrieveLastModified(RetrieveCollaborateurLdap.java:97)
... 29 more
This my code:
<pre>
InitialDirContext ctxLdap = new InitialDirContext(envLdap);
final NamingEnumeration<?> userSearch = ctxLdap.search(getUsersSuffixDN(), searchFilter, searchControls);
while (userSearch.hasMore()) {...} // <b>The HasMore method throws <i>javax.naming.CommunicationException</i></b>
this exception is rarely thrown by this method but i want to know why it happened. Thanks for your help
This may happen when you have a registered user and you try to register it again.

Categories