WSDL to Java -client creation error - xsd

I am trying to create a web service from the WSDL but is repeatedly giving me the following error. Tried refreshing axis.jar in the build path but is still giving same error whereas I have another WSDL and client is very well being generated for the same.
Anyone here who has encountered something similar?
IWAB0399E Error in generating Java from WSDL: WSDLException (at
/definitions/types/xsd:schema): faultCode=OTHER_ERROR: An error
occurred trying to resolve schema referenced at
'#sp.schema.url#/FinancialStatement.xsd', relative to
'file:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl'.:
This file was not found:
file:/C:/hrishi_workspace/findata/web/wsdl/#sp.schema.url#/FinancialStatement.xsd:
java.io.FileNotFoundException: This file was not found:
file:/C:/hrishi_workspace/findata/web/wsdl/#sp.schema.url#/FinancialStatement.xsd
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown
Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown
Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at
com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:516)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:495)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
Thanks.
Rishi

It looks as if your file:/C:/hrishi_workspace/findata/web/wsdl/FinancialStatement.wsdl is making a reference to an external schema file. If you look inside that WSDL file, under the definitions/types/xsd:schema element, you'll have one or more xsd:include and/or xsd:import. These elements may have a schemaLocation attribute; look for the one that ends in FinancialStatement.xsd; I suspect it has the #sp.schema.url# in there which to me looks like a placeholder that is probably supposed to be changed by your build script or something else... Replace that with the relative path between the WSDL and XSD; if they are in the same folder, simply use the XSD file name. It should take care of the error. Once it works, you should try to understand what's with that placeholder, and maybe figure out what you need to configure in your particular environment to make it work like that...

Related

Logging the actual file/directory on SFTP "no such file" failure

We use Spring Integration fairly heavily and it works great. However, I'm unsure how to get Jsch/Spring Integration to log the actual file that is in question, when I get an error thrown from, for example, trying to do a list on a directory that does not exist on an sftp server. I get exceptions like the below.
Is there any way to coax either Spring Integration or Jsch to print out information on the file for "No such file"? When I looked at Jsch code it did not seem like there was any logging for that particular issue, but I may have missed something, and even if it does not have something, maybe the Spring code that is catching this exception has some context that it could log.
As it is, we either have to attach a debugger in instances like this, or try to make an educated guess about what directory or directories we may have to set up.
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is org.springframework.core.NestedIOException: Failed to list files; nested exception is 2: No such file
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:444)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer.synchronizeToLocalDirectory(AbstractInboundFileSynchronizer.java:235)
... 13 common frames omitted
Caused by: org.springframework.core.NestedIOException: Failed to list files; nested exception is 2: No such file
at org.springframework.integration.sftp.session.SftpSession.list(SftpSession.java:104)
at org.springframework.integration.sftp.session.SftpSession.list(SftpSession.java:50)
at org.springframework.integration.file.remote.session.CachingSessionFactory$CachedSession.list(CachingSessionFactory.java:218)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:239)
at org.springframework.integration.file.remote.synchronizer.AbstractInboundFileSynchronizer$1.doInSession(AbstractInboundFileSynchronizer.java:235)
at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:435)
... 14 common frames omitted
Caused by: com.jcraft.jsch.SftpException: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2873)
I opened INT-4534 to add the directory to the exception.

Issue with Excel DecisionTable to load from newClasspathResource

There is some issue with the implementation of DecisionTable in Excel file, if i am using newClasspathResource to load the excel file, where as if i use newFileResource with path of the file it works fine with the same file.
The Exception is:
Caused by: org.drools.template.parser.DecisionTableParseException: An error occurred opening the workbook. It is possible that the encoding of the document did not match the encoding of the reader.
at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:85)
at org.drools.decisiontable.SpreadsheetCompiler.parseResource(SpreadsheetCompiler.java:126)
at org.drools.decisiontable.SpreadsheetCompiler.getRuleSheetListener(SpreadsheetCompiler.java:185)
at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:172)
at org.drools.decisiontable.SpreadsheetCompiler.compile(SpreadsheetCompiler.java:167)
at org.drools.decisiontable.DecisionTableProviderImpl.compileResource(DecisionTableProviderImpl.java:81)
at org.drools.decisiontable.DecisionTableProviderImpl.loadFromResource(DecisionTableProviderImpl.java:44)
at org.drools.compiler.compiler.DecisionTableFactory.loadFromResource(DecisionTableFactory.java:37)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.decisionTableToPackageDescr(KnowledgeBuilderImpl.java:404)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addPackageFromDecisionTable(KnowledgeBuilderImpl.java:374)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.addKnowledgeResource(KnowledgeBuilderImpl.java:766)
at org.drools.compiler.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:2249)
Caused by: org.apache.poi.openxml4j.exceptions.InvalidFormatException: Your InputStream was neither an OLE2 stream, nor an OOXML stream
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:211)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:168)
at org.drools.decisiontable.parser.xls.ExcelParser.parseFile(ExcelParser.java:83)
... 47 more
I think i found the reason, why this was a problem. Actually with my gradle builds, i was processing and filtering some resources and realised that xls file being in resources as well, was being processed through it and somehow being changed while in compiled build path.
I skipped this file to pass through those filtering and processing via build and all is good.

a strange FactoryConfigurationError in Bonita

I've coded a Java class in Eclipse in which i've a method who reads a xml file and return an ArrayList of Element.
I've exported this class as a Jar and i've added in my studio this jar with Jdom2 (to parse xml).
I call this method in a groovy script but doen't work very well.
But, when I test this script whith dependencies Jdom and my class jar, it works fine but when I run my process via Bonita portal it occurs an Error...
I've added too the javax jar from Apache but nothing..
I need your help please to solve this problem.
you can see here the start of error :
org.bonitasoft.engine.exception.BonitaRuntimeException: USERNAME=big73 | javax.xml.parsers.FactoryConfigurationError: Provider for javax.xml.parsers.SAXParserFactory cannot be found
at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:143)
at org.bonitasoft.engine.api.impl.ClientInterceptor.invoke(ClientInterceptor.java:88)
at com.sun.proxy.$Proxy18.evaluateExpressionsOnActivityInstance(Unknown Source)
at org.bonitasoft.forms.server.accessor.api.ExpressionEvaluatorEngineClient.evaluateExpressionsOnActivityInstance(ExpressionEvaluatorEngineClient.java:45)
PS : sorry for my bad english, I'm not a native english speaker

Chainsaw log format pattern syntax

We have a log4j file that has the following pattern:
#|%d{yyyy-MM-dd HH:mm:ss.SSS}|%X{Machine}|%X{CorrelationId}|%X{Sender}|%X{Receiver}|%-5p|%X{Runtime}|%X{ClientUser}|%c|%M|%L|%m%n
I created a LogFilePatternReceiver with the following pattern:
#|TIMESTAMP|PROP(MACHINE)|PROP(CORRELATIONID)|PROP(SENDER)|PROP(RECEIVER)|LEVEL|PROP(RUNTIME)|PROP(CLIENTUSER)|CLASS|METHOD|LINE|MESSAGE
But when I start that receiver I get an error:
java.lang.IllegalArgumentException: invalid expression:
at org.apache.log4j.rule.ExpressionRule$PostFixExpressionCompiler.compileExpression(ExpressionRule.java:132)
at org.apache.log4j.rule.ExpressionRule.getRule(ExpressionRule.java:64)
at org.apache.log4j.rule.ExpressionRule.getRule(ExpressionRule.java:56)
at org.apache.log4j.varia.LogFilePatternReceiver.initialize(LogFilePatternReceiver.java:557)
at org.apache.log4j.varia.LogFilePatternReceiver$1.run(LogFilePatternReceiver.java:801)
at java.lang.Thread.run(Unknown Source)
regexp is #|(\w+-\w+-\w+ \w+:\w+:\w+.\w+)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+?)|(.+)
I don't really see where the error is? Any input? Can I use the "PROP(...)" keyword like that for columns that are non-standard?
Yes, you can use the PROP keyword for your own columns..
Can you try the latest developer snapshot of Chainsaw? It can parse your log4j.xml or log4j.properties configuration containing FileAppender entries and will build a matching Chainsaw config to process that.
Snapshot available here..the new version also has a lot of new features:
http://people.apache.org/~sdeboy
What usually trips people up is timestamp formatting and special characters, but I don't see anything weird here, so see if the latest developer snapshot helps.
Scott

biff exception: unrecognizedOLE

Just trying to read from an ordinary excel file which I craeted using microsoft excel starter 2010 and saved as an excel 97-2003 file because I originally thought the exception was due to the file format. Apparently this exception means there is something embedded in the file that cannot be read, but for the life of me I dont know how or why that is. It's just a simple excel file I typed out myself. The stacktrace is as follows:
[CDATA[jxl.read.biff.BiffException: Unable to recognize OLE stream
at jxl.read.biff.CompoundFile.<init>(CompoundFile.java:116)
at jxl.read.biff.File.<init>(File.java:127)
at jxl.Workbook.getWorkbook(Workbook.java:221)
at jxl.Workbook.getWorkbook(Workbook.java:198)
at test.ExcelClass.updateTestResultsSpreadsheet(ExcelClass.java:1707)
at test.Internal_TestSuite.afterSuite(Internal_Virgin_TestSuite.java:846)
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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:543)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:212)
at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:309)
at org.testng.SuiteRunner.run(SuiteRunner.java:241)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1169)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1094)
at org.testng.TestNG.run(TestNG.java:1006)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:107)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:199)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:170)
]]>
I have used similar files without this exception being thrown. Any ideas?? Thanks in advance!
UPDATE: I solved the problem by removing another MS excel starter 2010 (.xlsx) file I was using elsewhere in my testNG class and making it a .xls file. It appears the stacktrace was not pointing at the correct location of the problem? Or at least it didn't change when I removed the first file? Anyway it's fixed, the JExcel api isn't compatible with other excel formats.

Resources