[JIRA] (JENKINS-40690) One of files fails with SdkClientException: Couldn't initialize a SAX driver to create an XMLReader

83 views
Skip to first unread message

kampak1111@interia.pl (JIRA)

unread,
Dec 27, 2016, 12:12:01 PM12/27/16
to jenkinsc...@googlegroups.com
Kamil P created an issue
 
Jenkins / Bug JENKINS-40690
One of files fails with SdkClientException: Couldn't initialize a SAX driver to create an XMLReader
Issue Type: Bug Bug
Assignee: Alexander A
Components: s3-plugin
Created: 2016/Dec/27 5:11 PM
Environment: jenkins 2.19.4, S3 Publisher Plugin 0.10.11
Priority: Major Major
Reporter: Kamil P

It is run from jenkinsfile

    step([$class: 'S3BucketPublisher',
          consoleLogLevel: 'INFO',
          dontWaitForConcurrentBuildCompletion: true,
          entries: [[
                            bucket: 'mybucket',
                            excludedFile: '',
                            flatten: false,
                            gzipFiles: true,
                            keepForever: false,
                            managedArtifacts: true,
                            noUploadOnFailure: false,
                            selectedRegion: 'eu-central-1',
                            showDirectlyInBrowser: false,
                            sourceFile: 'artifacts/**/*.*',
                            storageClass: 'STANDARD',
                            uploadFromSlave: false,
                            useServerSideEncryption: false]],
          pluginFailureResultConstraint: 'FAILURE',
          profileName: 'jenkins',
          userMetadata: []])

Some files are uploaded sucessfuly to s3 bucket, but then it keep failing on one of the files. with the following error

Jenkins console output

ERROR: Failed to upload files
com.amazonaws.SdkClientException: Couldn't initialize a SAX driver to create an XMLReader
at com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser.<init>(XmlResponsesSaxParser.java:113)
at com.amazonaws.services.s3.model.transform.Unmarshallers$InitiateMultipartUploadResultUnmarshaller.unmarshall(Unmarshallers.java:237)
at com.amazonaws.services.s3.model.transform.Unmarshallers$InitiateMultipartUploadResultUnmarshaller.unmarshall(Unmarshallers.java:234)
at com.amazonaws.services.s3.internal.S3XmlResponseHandler.handle(S3XmlResponseHandler.java:62)
at com.amazonaws.services.s3.internal.ResponseHeaderHandlerChain.handle(ResponseHeaderHandlerChain.java:44)
at com.amazonaws.services.s3.internal.ResponseHeaderHandlerChain.handle(ResponseHeaderHandlerChain.java:30)
at com.amazonaws.http.response.AwsResponseHandlerAdapter.handle(AwsResponseHandlerAdapter.java:70)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleResponse(AmazonHttpClient.java:1444)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1151)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:964)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:676)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:650)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:633)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$300(AmazonHttpClient.java:601)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:583)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:447)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4137)
at com.amazonaws.services.s3.AmazonS3Client.initiateMultipartUpload(AmazonS3Client.java:2988)
at com.amazonaws.services.s3.transfer.internal.UploadCallable.initiateMultipartUpload(UploadCallable.java:362)
at com.amazonaws.services.s3.transfer.internal.UploadCallable.uploadInParts(UploadCallable.java:180)
at com.amazonaws.services.s3.transfer.internal.UploadCallable.call(UploadCallable.java:123)
at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:139)
at com.amazonaws.services.s3.transfer.internal.UploadMonitor.call(UploadMonitor.java:47)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.xml.sax.SAXException: SAX2 driver class org.apache.xerces.parsers.SAXParser not found
java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:230)
at org.xml.sax.helpers.XMLReaderFactory.createXMLReader(XMLReaderFactory.java:191)
at com.amazonaws.services.s3.model.transform.XmlResponsesSaxParser.<init>(XmlResponsesSaxParser.java:111)
... 26 more
Caused by: java.lang.ClassNotFoundException: org.apache.xerces.parsers.SAXParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403)
at org.xml.sax.helpers.NewInstance.newInstance(NewInstance.java:82)
at org.xml.sax.helpers.XMLReaderFactory.loadClass(XMLReaderFactory.java:228)
... 28 more

Seems like the original exception is not known as it was hidden in the s3 client code as per this article

The only thing that is different in the file it fails on from the files that went fine is that its size is 75519KB. Other files are much smaller.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

kampak1111@interia.pl (JIRA)

unread,
Dec 27, 2016, 12:14:01 PM12/27/16
to jenkinsc...@googlegroups.com
Kamil P updated an issue
Change By: Kamil P
It is run from jenkinsfile
{code}

    step([$class: 'S3BucketPublisher',
          consoleLogLevel: 'INFO',
          dontWaitForConcurrentBuildCompletion: true,
          entries: [[
                     bucket: 'mybucket',
                     excludedFile: '',
                     flatten: false,
                     gzipFiles: true,
                     keepForever: false,
                     managedArtifacts: true,
                     noUploadOnFailure: false,
                     selectedRegion: 'eu-central-1',
                     showDirectlyInBrowser: false,
                     sourceFile: 'artifacts/**/*.*',
                     storageClass: 'STANDARD',
                     uploadFromSlave: false,
                     useServerSideEncryption: false]],
          pluginFailureResultConstraint: 'FAILURE',
          profileName: 'jenkins',
          userMetadata: []])
{code}


Some files are uploaded sucessfuly to s3 bucket, but then it keep failing on one of the files. with the following error

{panel:title=Jenkins console output}
{panel}

Seems like the original exception is not known as it was hidden in the s3 client code as per [this article|http://stackoverflow.com/questions/12180606/best-practice-creation-of-sax-parser-for-xmlreader]

The only thing that is different in the
failing file it fails on from the files that went fine is that its size is 75519KB. Other files are much smaller.

kampak1111@interia.pl (JIRA)

unread,
Dec 27, 2016, 12:18:01 PM12/27/16
to jenkinsc...@googlegroups.com

sjoerd@afrogleap.com (JIRA)

unread,
Feb 1, 2017, 4:34:03 AM2/1/17
to jenkinsc...@googlegroups.com

We experience this issue with files bigger than 14Mb, if you add xerces-2.9.0.jar to the s3 pugin lib folder it should be solved (/var/lib/jenkins/plugins/s3/WEB-INF/lib/)

sjoerd@afrogleap.com (JIRA)

unread,
Feb 1, 2017, 4:35:01 AM2/1/17
to jenkinsc...@googlegroups.com
Sjoerd van Gestel edited a comment on Bug JENKINS-40690
We experience this issue with files bigger than 14Mb, if you add xerces-2.9.0.jar to the s3 pugin plugin lib folder it should be solved (/var/lib/jenkins/plugins/s3/WEB-INF/lib/)
Reply all
Reply to author
Forward
0 new messages