Facing issue while connecting to hsql server if I create hsql server through java code - hsqldb

I want to create hsql server through java code.I dont want to use server.properties to specify my properties. Instead I am trying to specify properties through HSQLProperties.
Below is my code for creating server.
HsqlProperties p = new HsqlProperties();
p.setProperty("server.database.0","file:/sampledb/ipl5;user=user;password=password");
p.setProperty("server.dbname.0","ipl5");
Server server = new Server();
server.setProperties(p);
but when I try to connect to the started server through client call ,
conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost/ipl5","user","password");
I get following stacktrace:
java.sql.SQLException: General error: database alias does not exist
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCConnection.<init>(Unknown Source)
at org.hsqldb.jdbc.JDBCDriver.getConnection(Unknown Source)
at org.hsqldb.jdbc.JDBCDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at com.test.hsql.HSQLSample.main(HSQLSample.java:41)
When I specify properties in server.properties file and then connect using jdbc call , I am successful. But I am not getting reason , why I am getting error when I specify all properties while creating server itself in java code.
Can anyone help me?

Related

Dbfit: Login failed for user 'dev\abc'. Client connectionId:a12f7cab

I am trying to connect sqlserver from dbfit, and getting below error:
com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user
'DEV\abc'. ClientConnectionId:a12f7cab-7261-4fa7-8064-ea355f03f883 at
com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:216)
at
com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:254)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:84)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.sendLogon(SQLServerConnection.java:2908)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2234)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:2220)
at
com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1326)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:991)
at
com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:827)
at
com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1012)
at java.sql.DriverManager.getConnection(DriverManager.java:664) at
java.sql.DriverManager.getConnection(DriverManager.java:208) at
dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:51)
at
dbfit.environment.SqlServerEnvironment.connect(SqlServerEnvironment.java:53)
at
dbfit.api.AbstractDbEnvironment.connect(AbstractDbEnvironment.java:78)
at
dbfit.fixture.DatabaseEnvironment.connect(DatabaseEnvironment.java:52)
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:497) at
fitlibrary.closure.MethodClosure.invoke(MethodClosure.java:35) at
fitlibrary.closure.MethodClosure.invokeTyped(MethodClosure.java:28)
at
fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:77)
at
fitlibrary.closure.CalledMethodTarget.invokeTyped(CalledMethodTarget.java:95)
at
fitlibrary.closure.CalledMethodTarget.invokeAndWrap(CalledMethodTarget.java:358)
at
fitlibrary.traverse.workflow.caller.ActionCaller.run(ActionCaller.java:37)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretRow(DoTraverseInterpreter.java:176)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretAfterFirstRow(DoTraverseInterpreter.java:66)
at
fitlibrary.traverse.workflow.DoTraverseInterpreter.interpretInFlow(DoTraverseInterpreter.java:151)
at fitlibrary.DoFixture.interpretAfterFirstRow(DoFixture.java:47) at
fitlibrary.FitLibraryFixture.doTable(FitLibraryFixture.java:83) at
dbfit.fixture.DatabaseEnvironment.doTable(DatabaseEnvironment.java:22)
at fit.Fixture.interpretFollowingTables(Fixture.java:121) at
fit.Fixture.interpretTables(Fixture.java:107) at
fit.Fixture.doTables(Fixture.java:81) at
fit.FitServer.process(FitServer.java:81) at
fit.FitServer.run(FitServer.java:56) at
fit.FitServer.main(FitServer.java:41)
Is anyone facing similar issue?
Appreciate your help.
Thanks
I missed below step:
(http://dbfit.github.io/dbfit/docs/database-specific-information.html#microsoft-sql-server)
Microsoft SQL Server
Deploying the JDBC Driver
Download MS SQL Server JDBC driver from their site (It is not open source and cannot be distributed with DbFit.)
Deploy sqljdbc4.jar in DbFit’s lib folder - the same folder as dbfit-XXX.jar.
Deploy auth\x86\sqljdbc_auth.dll in %programfiles(x86)%\Java\jre7\bin folder to allow integrated windows authentication
Then use connetion as
!|DatabaseEnvironment|sqlserver|
|Connect|jdbc:sqlserver://myhost;integratedSecurity=true|
and it worked.

Exception while using Apache Commons Mail API from IBM Worklight Studio 5.0.5

I have been trying to make use of Apache Commons API with in a Java class to send out an email. I invoke this Java function from a worklight adapter in order to send the email.
I'm making use of Worklight Studio on a Mac, version of the studio is: 5.0.5.20131003
Here is the piece of Java Code:
package com.customclass.helper;
import org.apache.commons.mail.HtmlEmail;
public class EmailHelper{
public static void sendHTMLMail (String serverHostName, String serverPort, String isSSLEnabledOnServer, String isTLSEnabledOnServer, String fromAddress, String toAddress, String cc, String bcc, String subject, String body){
HtmlEmail email = new HtmlEmail();
email.setHostName(serverHostName);
email.setSmtpPort(serverPort);
email.setSSLOnConnect(isSSLEnabledOnServer);
email.setStartTLSEnabled(isTLSEnabledOnServer);
email.addTo(toAddressArray);
email.addCc(ccArray);
email.addBcc(bcc);
email.setSubject(subject);
email.setMsg(body);
email.send();}}
This is how in invoke it from the Adapter:
com.customclass.helper.EmailHelper.sendHTMLMail(SMTP_SERVER_HOST, SMTP_SERVER_PORT, SMTP_SERVER_SSL_ENABLED, SMTP_SERVER_TLS_ENABLED, fromMailAddress, toAddress, cc, bcc, subject, body);
The SMTP server that I'm making use of does not require any authentication and does not work on SSL or TLS and are set to false.
When I run the Java class as a stand alone Java application it works fine, but when its utilised from with in the Worklight server using the adapter it throws an exception. The exception does not have enough information in it for me to debug the issue.
Here is the stack trace:
Exception while sending email:Sending the email to the following server failed : my.smtp.server.com:25
com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:676)
javax.mail.Transport.send0(Transport.java:189)
javax.mail.Transport.send(Transport.java:118)
org.apache.commons.mail.Email.sendMimeMessage(Email.java:1400)
org.apache.commons.mail.Email.send(Email.java:1437)
com.customclass.helper.EmailHelper.sendHTMLMail(EmailHelper.java:131)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.mozilla.javascript.MemberBox.invoke(MemberBox.java:161)
org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:247)
org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:86)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593._c_sendEmail_1(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js:91)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593.call(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:426)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3178)
org.mozilla.javascript.gen._2FUsers_2F914854_2Fprojects_2Fcustom_2Fworkspaces_2Fphase2dec10_2FMyWorklightProject_2Fadapters_2FMessageAdapter_MessageAdapter_impl_js_593.call(%2FUsers%2F914854%2Fprojects%2Fcustom%2Fworkspaces%2Fphase2dec10%2FMyWorklightProject%2Fadapters%2FMessageAdapter/MessageAdapter-impl.js)
com.worklight.integration.js.JavaScriptManager.callFunction(JavaScriptManager.java:180)
com.worklight.integration.js.JavaScriptManager.invokeFunction(JavaScriptManager.java:156)
com.worklight.integration.services.impl.AdapterManagerImpl.invokeFunction(AdapterManagerImpl.java:101)
com.worklight.integration.js.JavaScriptProcedureInvoker.invoke(JavaScriptProcedureInvoker.java:42)
com.worklight.integration.model.ProcedureInvoker.invokeProcedure(ProcedureInvoker.java:57)
com.worklight.integration.model.Procedure.invoke(Procedure.java:165)
com.worklight.integration.model.InvocationContext.call(InvocationContext.java:150)
com.worklight.integration.model.InvocationContext.call(InvocationContext.java:34)
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
java.util.concurrent.FutureTask.run(FutureTask.java:138)
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
java.lang.Thread.run(Thread.java:695)
Is there some thing that I'm missing to do on the Worklight studios embedded Jetty server?
I had got around this issue by making use of Java's Mail API instead of Apache's mail API. Looks like some of the JARs/Java Classes that Apache is dependant on does not seem to work well with the Worklight server both the embedded server with the IDE and also the server deployed on WAS

Mule Database endpoint JDBC test connection

I have created a database endpoint. But while testing the connection I am getting the following error:
Test connection failed: Error creating bean with name '_muleSimpleRegistryBootstrap' defined in URL [jar:file:/D:/MuleStudio/plugins/org.mule.tooling.server.3.4.0.ee_3.4.0.201305131832/mule/mule/mule-module-spring-config-3.4.0.jar!/default-mule-config.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/mule/security/oauth/processor/AbstractExpressionEvaluator (org.mule.api.lifecycle.InitialisationException)
org.mule.common.MuleArtifactFactoryException: Error initializing
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.doGetArtifact(SpringXmlConfigurationMuleArtifactFactory.java:149)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:49)
at org.mule.config.spring.SpringXmlConfigurationMuleArtifactFactory.getArtifact(SpringXmlConfigurationMuleArtifactFactory.java:39)
at org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:72)
at org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:108)
at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1.run(TestConnectorConnectionFromMuleConfigAction.java:72)
at java.lang.Thread.run(Unknown Source)
Do you happen to have a Cloud Connector for Mule 3.5 in your project?
If yes, it's a well-known issue: https://www.mulesoft.org/jira/browse/STUDIO-3831

Pentaho BI-Server JDBC Exception

I'm setting up the pentaho bi-server and I get the following exception when I run start-pentaho.sh:
11:45:29,280 ERROR [SchemaUpdate] could not get database metadata
java.sql.SQLException: socket creation error
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcConnection.<init>(Unknown Source)
at org.hsqldb.jdbcDriver.getConnection(Unknown Source)
at org.hsqldb.jdbcDriver.connect(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:174)
at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:165)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:149)
at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:119)
at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:82)
at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:27)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:127)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:314)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1300)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
I think that I must have missed adding my database username/password and hostname into a configuration file. However, I don't know which of the several pentaho configuration files that I missed updating. From the stacktrace, does anyone have any suggestions about which pentaho file I need to update with my correct db credentials? Thanks.
Update - the three configuration files that I already updated were:
pentaho-solutions/system/hibernate/mysql5.hibernate.cfg.xml
pentaho-solutions/system/hibernate/hibernate-settings.xml
pentaho-solutions/system/applicationContext-spring-security-jdbc.xml
Sounds like you needed to update the file pentaho-solutions/system/applicationContext-spring-security-hibernate.propertie‌​s!
Do you have jdbc libarry in to tomcat/lib ?
I do not know this can help you but I try http://anonymousbi.wordpress.com/2012/10/28/pentaho-bi-server-4-5-0-definitive-mysql-installation-guide/

Old Version of Commons-HttpClient gives IOException in the Axis2 Web Service Client

I am using a wsdl2java generated web service client for the axis2 web service (axis2 version is 1.6.1). So for http connection the old version of commons-httpclient 3.1 is used. While doing some load tests to my web service client. In some cases i came across this exception
org.apache.axis2.AxisFault: org.apache.axiom.ext.io.StreamCopyException: Error reading from source
at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
at com.ardic.arcsp.carbon.registry.ws.stub.WSStorageServiceStub.fromOM(WSStorageServiceStub.java:16706)
at com.ardic.arcsp.carbon.registry.ws.stub.WSStorageServiceStub.wSgetById(WSStorageServiceStub.java:6659)
at com.ardic.arcsp.update.wsclient.WSStorageServiceClient.getResourceById(WSStorageServiceClient.java:177)
at com.ardic.arcsp.update.wsclient.OTAUpdateTestServlet.downloadResource(OTAUpdateTestServlet.java:162)
at com.ardic.arcsp.update.wsclient.OTAUpdateTestServlet.doGet(OTAUpdateTestServlet.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:273)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:270)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:305)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:298)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:57)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:164)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:462)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.wso2.carbon.server.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:154)
at org.wso2.carbon.server.TomcatServer$1.invoke(TomcatServer.java:254)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:399)
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:396)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:356)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1534)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:705)
Caused by: org.apache.axiom.om.OMException: org.apache.axiom.ext.io.StreamCopyException: Error reading from source
at org.apache.axiom.attachments.impl.PartFactory.createPart(PartFactory.java:172)
at org.apache.axiom.attachments.Attachments.getPart(Attachments.java:705)
at org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:623)
at org.apache.axiom.attachments.Attachments.getDataHandler(Attachments.java:350)
at org.apache.axiom.om.impl.builder.OMAttachmentAccessorMimePartProvider.getDataHandler(OMAttachmentAccessorMimePartProvider.java:45)
at org.apache.axiom.util.stax.xop.XOPDecodingStreamReader$DataHandlerProviderImpl.getDataHandler(XOPDecodingStreamReader.java:81)
at org.apache.axiom.util.stax.xop.XOPDecodingStreamReader.getDataHandler(XOPDecodingStreamReader.java:472)
at org.apache.axiom.om.impl.SwitchingWrapper.getDataHandler(SwitchingWrapper.java:1360)
at org.apache.axiom.util.stax.XMLStreamReaderUtils.getDataHandlerFromElement(XMLStreamReaderUtils.java:230)
at com.ardic.arcsp.carbon.registry.ws.stub.xsd.WSResource$Factory.parse(WSResource.java:2087)
at com.ardic.arcsp.carbon.registry.ws.stub.WSgetByIdResponse$Factory.parse(WSgetByIdResponse.java:417)
at com.ardic.arcsp.carbon.registry.ws.stub.WSStorageServiceStub.fromOM(WSStorageServiceStub.java:16273)
... 37 more
Caused by: org.apache.axiom.ext.io.StreamCopyException: Error reading from source
at org.apache.axiom.attachments.utils.BAAOutputStream.readFrom(BAAOutputStream.java:114)
at org.apache.axiom.attachments.impl.BufferUtils.inputStream2OutputStream(BufferUtils.java:76)
at org.apache.axiom.attachments.impl.PartFactory.createPart(PartFactory.java:136)
... 48 more
Caused by: java.io.IOException: CRLF expected at end of chunk: 116/161
at org.apache.commons.httpclient.ChunkedInputStream.readCRLF(ChunkedInputStream.java:207)
at org.apache.commons.httpclient.ChunkedInputStream.nextChunk(ChunkedInputStream.java:219)
at org.apache.commons.httpclient.ChunkedInputStream.read(ChunkedInputStream.java:176)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:108)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at org.apache.axiom.om.util.DetachableInputStream.read(DetachableInputStream.java:147)
at java.io.FilterInputStream.read(FilterInputStream.java:116)
at java.io.PushbackInputStream.read(PushbackInputStream.java:169)
at org.apache.axiom.attachments.BoundaryPushbackInputStream.readFromStream(BoundaryPushbackInputStream.java:114)
at org.apache.axiom.attachments.BoundaryPushbackInputStream.read(BoundaryPushbackInputStream.java:248)
at org.apache.axiom.attachments.MIMEBodyPartInputStream.read(MIMEBodyPartInputStream.java:87)
at org.apache.axiom.attachments.utils.BAAOutputStream.readFrom(BAAOutputStream.java:112)
... 50 more
The web service client request files from the server and downloads the file. These exceptions occurs on the response while receiving files in chunks.
While searching i came across this fix mentioned here.
https://issues.apache.org/jira/browse/HTTPCORE-190
However the exceptions still occur. So what else can cause this exceptions?
UPDATE:
Ok, i got the real reason for exception.On the client side if the memory allocation for jvm is low, the response from the server cannot be processed due to SocketTimeOut. But the exception itself could not stress this. Increasing the heap on the client side can solve the problem temporary.
You definitely need enough memory to hold all the data that is chucked to the client. Java can give really weird results, especially the older JVMs, when there isn't enough memory to go around. It can be tricky sometimes to identify that as the root cause so bravo on that find.
There are a few helpful big on the Apache Axis2 User's Guide - Creating Clients page that might be helpful if you are new to wsdl2java.
Our next step is to learn what command line options are available. One thing you can try is using the -u option to generate separate classes for the data bindings instead of creating them as inner classes. (Take a look at this Stack Overflow question.)
Since this question is 10 years old if you run into this or another error please create a new question specific to that context.