Getting error 'duplicate "message" entity' when running wsimport - wsimport

When using wsimport, for example
wsimport -J-Djavax.xml.accessExternalSchema=all -keep -verbose https://example.com/path/foo.svc?wsdl
The error I get is
[ERROR] duplicate "message" entity: "..."
line 1 of https://example.com/Path/foo.svc?wsdl
Exception in thread "main" com.sun.tools.internal.ws.wscompile.AbortException
at com.sun.tools.internal.ws.wsdl.framework.AbstractDocument.define(AbstractDocument.java:129)
at com.sun.tools.internal.ws.wsdl.document.Definitions.add(Definitions.java:81)
at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.parseDefinitionsNoImport(WSDLParser.java:278)
at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.processImports(WSDLParser.java:221)
at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.parseDefinitions(WSDLParser.java:210)
at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.buildWSDLDocument(WSDLParser.java:193)
at com.sun.tools.internal.ws.wsdl.parser.WSDLParser.parse(WSDLParser.java:165)
at com.sun.tools.internal.ws.processor.modeler.wsdl.WSDLModeler.buildModel(WSDLModeler.java:120)
at com.sun.tools.internal.ws.wscompile.WsimportTool.buildWsdlModel(WsimportTool.java:429)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:190)
at com.sun.tools.internal.ws.wscompile.WsimportTool.run(WsimportTool.java:168)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.tools.internal.ws.Invoker.invoke(Invoker.java:159)
at com.sun.tools.internal.ws.WsImport.main(WsImport.java:42)
What are some reasons why I get this error?

I have a similar problem. My problem is the alpha numeric casing of the url doesn't match the location url in the xml file.
Your https url should point to an xml formatted file. In the xml file, you should have an location attribute.
When using wsimport, make sure the alpha numeric casing matches the url location in the xml file.
For example,
https://example.com/Path/foo.svc?wsdl ---> try https://example.com/path/foo.svc?wsdl
wsimport -keep -verbose https://example.com/path/foo.svc?wsdl

Related

Getting error while importing Excel file using POI in SoapUI

I am stuck at 1 point where i wan't to fetch excel data having formula, i am able to achieve this in Eclipse and tried using same jars in soapUI but getting below error:
Getting error on below code:
ERROR:An error occurred [Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader], see error log for details
Using below jars in my ext folder.
Below are the error logs Caused by:
java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56) at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:63)

Error when connecting mylyn Gitlab connector to Eclipse

I'm trying to configure the Mylyn Gitlab Connector for Eclipse Oxygen v4.7.1a but when I try to add a new task it throws me an exception and it does not let me continue with the creation of the new task.
Enter correctly my data and the url address of the gitlab repository and even probe with several url and with all of them throw me the same exception.
Exception Stack Trace:
java.lang.reflect.InvocationTargetException
at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:398)
at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:980)
at org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard.performFinish(NewTaskWizard.java:113)
at org.eclipse.mylyn.internal.tasks.ui.wizards.SelectRepositoryPage.performFinish(SelectRepositoryPage.java:295)
at org.eclipse.mylyn.internal.tasks.ui.wizards.MultiRepositoryAwareWizard.performFinish(MultiRepositoryAwareWizard.java:53)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:778)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:417)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:81)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:249)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5268)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at org.eclipse.mylyn.tasks.ui.TasksUiUtil.openNewTaskEditor(TasksUiUtil.java:237)
at org.eclipse.mylyn.tasks.ui.TasksUiUtil.openNewTaskEditor(TasksUiUtil.java:253)
at org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction.run(NewTaskAction.java:95)
at org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction.run(NewTaskAction.java:102)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:247)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:565)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:397)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:86)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:5268)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1348)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4522)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4107)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1150)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1039)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:153)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:680)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:594)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:151)
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(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1499)
at org.eclipse.equinox.launcher.Main.main(Main.java:1472)
Caused by: java.lang.Error: de.weingardt.mylyn.gitlab.core.exceptions.GitlabException: Invalid path in host
at de.weingardt.mylyn.gitlab.core.GitlabTaskDataHandler.getAttributeMapper(GitlabTaskDataHandler.java:67)
at org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal.createTaskData(TasksUiInternal.java:872)
at org.eclipse.mylyn.tasks.ui.wizards.NewTaskWizard$1.run(NewTaskWizard.java:103)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:119)
Caused by: de.weingardt.mylyn.gitlab.core.exceptions.GitlabException: Invalid path in host
at de.weingardt.mylyn.gitlab.core.exceptions.GitlabExceptionHandler.handle(GitlabExceptionHandler.java:20)
at de.weingardt.mylyn.gitlab.core.ConnectionManager.validate(ConnectionManager.java:139)
at de.weingardt.mylyn.gitlab.core.ConnectionManager.get(ConnectionManager.java:159)
at de.weingardt.mylyn.gitlab.core.ConnectionManager.get(ConnectionManager.java:45)
at de.weingardt.mylyn.gitlab.core.GitlabTaskDataHandler.getAttributeMapper(GitlabTaskDataHandler.java:65)
... 3 more
Any suggestions on how to solve this problem?
Right click on Mylyn repository and select Repository -> Properties
Expand Additional Settings and check "Use private token"
works well for me.
Eclipse Oxygen.2 Release (4.7.2)

how to upgrade standalone version of graylog

I want to upgrade my standalone graylog2 instance from 1.1.5 to 1.2.1.
I unpacked the new version, copy the old graylog.conf file and data/ directory and after I start the new version I get some errors.
For example if I go to the indices page the graylog-webinterface log says:
Caught Exception while deserializing JSON request:
com.fasterxml.jackson.databind.JsonMappingException: Instantiation of [simple type, class org.graylog2.rest.models.system.indexer.responses.IndexRangeSummary] value failed: Null indexName (through reference chain: org.graylog2.rest.models.system.indexer.responses.IndexRangesResponse["ranges"]->java.util.ArrayList[0])
.
.
.
Caused by: java.lang.NullPointerException: Null indexName
at org.graylog2.rest.models.system.indexer.responses.AutoValue_IndexRangeSummary.<init>(AutoValue_IndexRangeSummary.java:21) ~[org.graylog2.graylog2-rest-models-1.1.5.jar:na]
at org.graylog2.rest.models.system.indexer.responses.IndexRangeSummary.create(IndexRangeSummary.java:47) ~[org.graylog2.graylog2-rest-models-1.1.5.jar:na]
at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]
at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]
at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.call(AnnotatedMethod.java:120) ~[com.fasterxml.jackson.core.jackson-databind-2.5.3.jar:2.5.3]
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:227) ~[com.fasterxml.jackson.core.jackson-databind-2.5.3.jar:2.5.3]
... 61 common frames omitted
What can I do?
Please check whether you also updated the graylog web.

Getting this error when I try to run jar file that I created : Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Appender

I am getting an exception when I try to run the jar file that I created for my java application. I am using log4j for logging purpose and I created a custom log that records per cron job transactions.
Then I have written a shell script where I call the jar file. I have put the properties file outside the jar file.
I am running the jar file through a shell script. The command I use is
java -jar app.jar $1
The java application has 2 properties files
1) app.properties
2) sublog4j.properties
The sublog4j properties file has data like this:
log4j.appender.log=package.CustomFileAppender
log4j.appender.log.File=/serverpath/error.log
I have a gut feeling that I am getting error because of package.CustomFileAppender. It is a java file in app.jar but I don't know how to create a custom appender and use it in the external properties file.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Appender
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getMethod0(Class.java:2856)
at java.lang.Class.getMethod(Class.java:1668)
at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Appender
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
I was getting this error because I was not building the jar file correctly. So what I did is I created an executable jar file and also copied source code when I created the jar. This is how the issue got resolved.

Exception while creating the image using JAI library in shell script

When I work with JAI from the Eclipse (all the classes specified) it works very fine, but when I bundle everything in a jar and make a shell script file from that and try to run that script I have a problem with javax.media.jai.OperationRegistry looking for a initialization file.
Has anyone else seen this problem?
Exception:
Exception in thread "AWT-EventQueue-0" java.lang.ExceptionInInitializerError
at javax.media.jai.TiledImage.<init>(TiledImage.java:259)
at javax.media.jai.TiledImage.<init>(TiledImage.java:222)
at org.syntec.ivb.img.SingleShot.<init>(SingleShot.java:75)
at org.syntec.ivb.jni.GetCapture.<init>(GetCapture.java:21)
at org.syntec.ivb.application.SampleWindow$4.actionPerformed(SampleWindow.java:178)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2012)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2335)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:404)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
at java.awt.Component.processMouseEvent(Component.java:6288)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6053)
at java.awt.Container.processEvent(Container.java:2045)
at java.awt.Component.dispatchEventImpl(Component.java:4649)
at java.awt.Container.dispatchEventImpl(Container.java:2103)
at java.awt.Component.dispatchEvent(Component.java:4475)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4633)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4297)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4227)
at java.awt.Container.dispatchEventImpl(Container.java:2089)
at java.awt.Window.dispatchEventImpl(Window.java:2587)
at java.awt.Component.dispatchEvent(Component.java:4475)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:675)
at java.awt.EventQueue.access$300(EventQueue.java:96)
at java.awt.EventQueue$2.run(EventQueue.java:634)
at java.awt.EventQueue$2.run(EventQueue.java:632)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:116)
at java.awt.EventQueue$3.run(EventQueue.java:648)
at java.awt.EventQueue$3.run(EventQueue.java:646)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:105)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:645)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.RuntimeException: Registry initialization file not found.
at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:365)
at javax.media.jai.JAI.<clinit>(JAI.java:566)
... 41 more

Resources