Extensis Logo SUPPORT | FORUMS | KNOWLEDGE BASE

Server error when uploading images (PF 2016)


#1

Dear all,

I’ve a question on uploading assets to Portfolio 2016 by restAPI. My client program is based on .NET, connection to restAPI will be established by an API token, which is working well so far.

I assume (even if the documentation is not describing this) that when uploading I still have to use the “old” http upload. What I’ve done is to replace the session id in the request header by the api token. Unfortunately I get no response from server when uploading. I’ve switched the server to debug mode and find the following in the server log:

2017-11-29 12:14:24,255 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) Starting upload
2017-11-29 12:14:29,145 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000056.tmp, size=42 bytes, isFormField=true, FieldName=sessionId
2017-11-29 12:14:29,145 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 42
2017-11-29 12:14:29,146 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000057.tmp, size=36 bytes, isFormField=true, FieldName=catalogId
2017-11-29 12:14:29,146 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 36
2017-11-29 12:14:29,146 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000058.tmp, size=1 bytes, isFormField=true, FieldName=destinationFolder
2017-11-29 12:14:29,146 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 1
2017-11-29 12:14:29,146 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000059.tmp, size=11 bytes, isFormField=true, FieldName=filename
2017-11-29 12:14:29,147 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 11
2017-11-29 12:14:29,147 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000060.tmp, size=6 bytes, isFormField=true, FieldName=action
2017-11-29 12:14:29,147 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 6
2017-11-29 12:14:29,295 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) ### item: name=OBJ4714.JPG, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_74594769_918a_4a7f_904a_5b2add84a960_00000061.tmp, size=4684424 bytes, isFormField=false, FieldName=Filedata
2017-11-29 12:14:29,296 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) * size: 4684424
2017-11-29 12:14:29,432 DEBUG [extensis.portfolio.server.manager.MediaEngineManager] (http-executor-threads - 11) using media engine localhost:40372
2017-11-29 12:14:32,386 DEBUG [extensis.portfolio.server.manager.IdentityManager] (EJB default - 2) IdentityManager.listCatalogs() invoked.
2017-11-29 12:14:37,697 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component exif, of type Metadata
2017-11-29 12:14:37,699 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component msoffice-metadata, of type Metadata
2017-11-29 12:14:37,699 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component iptc, of type Metadata
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component geo, of type Metadata
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component thumbnail, of type Derivative
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner found derivative in response content with length 6633
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component xmp, of type Metadata
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component doctext, of type Metadata
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component movie-metadata, of type Metadata
2017-11-29 12:14:37,700 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component diskpreview, of type Derivative
2017-11-29 12:14:37,701 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner found derivative in response content with length 126535
2017-11-29 12:14:37,701 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 11) sendRequestInner processing component info, of type GeneralInformation
2017-11-29 12:14:37,730 DEBUG [extensis.portfolio.server.cataloging.Cataloger] (http-executor-threads - 11) UpdateAssetById: Media processing: 8298
2017-11-29 12:14:39,124 DEBUG [extensis.portfolio.server.cataloging.Cataloger] (http-executor-threads - 11) UpdateFile: Post-scan processing: 1394. wasPartiallyCataloged = false
2017-11-29 12:14:39,124 DEBUG [extensis.portfolio.server.elasticsearch.ElasticSearchServer] (http-executor-threads - 11) Creating a version for asset 4
2017-11-29 12:14:39,575 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 11) UPLOAD TIME: 15.318 seconds
2017-11-29 12:14:39,575 ERROR [org.apache.catalina.connector] (http-executor-threads - 11) JBWEB001018: An exception or error occurred in the container during the request processing: java.nio.BufferOverflowException
at java.nio.DirectByteBuffer.put(DirectByteBuffer.java:357) [rt.jar:1.7.0_80]
at org.apache.coyote.http11.AbstractInternalOutputBuffer.commit(AbstractInternalOutputBuffer.java:471) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProcessor.commit(Http11NioProcessor.java:477) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProcessor.action(Http11NioProcessor.java:795) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.Response.action(Response.java:190) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.Response.sendHeaders(Response.java:390) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:335) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:301) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.Response.finishResponse(Response.java:475) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:363) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:350) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:902) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:1031) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:847) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final.jar:2.1.0.Final]

It appears that the upload was finished successfully, but then any kind of error happened. I would appreciate you kind assistence in this case…

Best,
Dirk


#2

Hi Dirk,

Sorry you’re having trouble uploading with the API. We’ll get it all sorted out.

Can you tell us a couple things:
• What version of Portfolio Server are you working with?
• Can you send us your code that does the upload?
• Does the uploaded asset show up in the catalog after you’re done with the upload?
• Does your code get a response code from the server? If so, what is it?

Thanks in advance,
-Loren


#3

Hi Loren,
thanks for your reply. Here comes the answers to your questions:

-> I’m currently using Portfolio 2016 running on Windows
-> Yes, the uploaded asset shows up correctly in the catalog
-> No, I get no response code from the server - my code waits and runs into a timeout after the predefined timeout period

The code that I’m using is the following (VB.NET):

        Public Function UploadAsset(ByVal sCatalogId As String, ByVal sFileName As String, ByVal sDestinationFolder As String, ByVal iMulId As Integer, ByVal iModuleId As Integer, ByVal iReferenceId As Integer, ByVal iTaskId As Integer, Optional sAssetId As String = "", Optional bQuiet As Boolean = True) As String
        ' Uploads asset to Portfolio and returns AssetId
        Dim sBoundary As String = ""
        Dim lStreamPosition As Long
        Dim lFileSize As Long
        Dim iBytesRead As Integer
        Dim arrBuffer(4096) As Byte
        Dim sFileData As String = ""
        Dim sContent As String = ""
        Dim arrResponse() As Byte
        Dim sResultAssetId As String

        Try
            ' initialize return value
            UploadAsset = ""
            ' create boundary
            sBoundary = Guid.NewGuid().ToString
            ' initialize web client
            Using oWebClient As WebClient = New WebClient
                oWebClient.Headers.Add("Content-Type", "multipart/form-data; boundary=" & sBoundary)
                ' define content
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""sessionId""" & vbCrLf & vbCrLf & Token & vbCrLf
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""catalogId""" & vbCrLf & vbCrLf & sCatalogId & vbCrLf
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""destinationFolder""" & vbCrLf & vbCrLf & sDestinationFolder & vbCrLf
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""filename""" & vbCrLf & vbCrLf & Path.GetFileName(sFileName) & vbCrLf
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""action""" & vbCrLf & vbCrLf & "upload" & vbCrLf
                sContent &= "--" & sBoundary & vbCrLf
                sContent &= "Content-Disposition: form-data; name=""Filedata""; filename=""" & Path.GetFileName(sFileName) & """" & vbCrLf
                sContent &= "Content-Type: application/octet-stream" & vbCrLf & vbCrLf
                ' Open file and convert to string (for easier content handling)
                Using oFileStream As FileStream = New FileStream(sFileName, FileMode.Open, FileAccess.Read)
                    Using oMemoryStream As MemoryStream = New MemoryStream
                        lStreamPosition = 0
                        lFileSize = oFileStream.Length
                        Do
                            iBytesRead = oFileStream.Read(arrBuffer, 0, arrBuffer.Length)
                            If iBytesRead > 0 Then
                                oMemoryStream.Write(arrBuffer, 0, iBytesRead)
                                lStreamPosition += iBytesRead
                            End If
                        Loop Until iBytesRead = 0
                        sContent &= oWebClient.Encoding.GetString(oMemoryStream.ToArray)
                    End Using
                End Using
                ' set end boundary
                sContent &= vbCrLf & "--" & sBoundary & "--"
                ' perform upload 
                arrResponse = oWebClient.UploadData(priv_oDAMConfiguration.UploadUrl, "POST", oWebClient.Encoding.GetBytes(sContent))
                sResultAssetId = oWebClient.Encoding.GetString(arrResponse)
            End Using
            If sResultAssetId.Length > 0 Then
                ' returning AssetId 
                UploadAsset = sResultAssetId
            Else
                UploadAsset = ""
            End If

        Catch ex As Exception
            UploadAsset = ""
            If Not bQuiet Then LogError(2, priv_cLogName & ".UploadAsset_A", ex.Message)
        End Try

    End Function

The [Token] used in this function is a property within the same class and filled with the asset token. As you can see I’m using a standard class (WebClient) by .NET to do the complete handshaking between server and client. Initially the function was using the HttpWebRequest and HttpWebResponse classes, but I’be changed to that to be sure to sort out any problems with the stream handling. Now the complete communication level is encapsulated in the webclient - and I would assume that this standard class is working correctly. The content preparation appear also to be correct, since the asset shows up correctly in the correct catalog. So whatever it is - it appears to be on portfolio side somewhere deep inside…

Thanks for your support!

Dirk


#4

Hi Dirk,

I suspect that the declaration of arrResponse might be the problem. Looks like it’s a single byte. Try making it a small array, similar to how you declare arrBuffer.

Hope that works!
-Loren


#5

Dear Loren,

nope, that can’t bei the problem. The declaration you’ve mentioned IS an array declaration (it’s a dynamic array without fix array limits), and actually the program never reaches that point. Before we run into the timeout since PF isn’t completing the http request (see log file).
The problem really must be located on PF side.

Best
Dirk

SOLVATEC
create software_webdesign_arts
Deutschländer, Lock und Wurdack GbR

Storkower Str. 113
10407tel:10407 Berlin

---- Loren Barr schrieb ----

[https://avatars.discourse.org/v2/letter/l/cc9497/45.png] Loren_Barrhttps://forums.extensis.com/u/loren_barr
December 4

Hi Dirk,

Sorry you’re having trouble uploading with the API. We’ll get it all sorted out.

Can you tell us a couple things:
• What version of Portfolio Server are you working with?
• Can you send us your code that does the upload?
• Does the uploaded asset show up in the catalog after you’re done with the upload?
• Does your code get a response code from the server? If so, what is it?

Thanks in advance,
-Loren


#6

Hi Dirk,

It looks like you’re running into something like this: https://developer.jboss.org/thread/269615. We are using a similar version of jboss.

Here is a reference java implementation of the upload: http://doc.extensis.com/api/portfolio-server/HTTPuploadFile.html

In particular, note the headers that are sent under the comment “Set up the connection URL.”

My guess is that you will need to specify the Content-Length header.

-Brooks


#7

Also, are you able to upload files using the classic Portfolio client? (This is at host:8090/classic for Portfolio v3.x and at host:8090 for prior versions.) The classic client uses the FileTransferServlet which appears to be what you are using.


#8

Dear Brooks,

thanks for your quick answer. Regarding your hint to the content length: The webclient class which I’m using is offering a “UploadData” method. When using this method, the content length will be set automatically depending on the submitted content. I have another implementation where I’m using a http_request-class. Here I have to set the content length (which I do) – but with exactly the same result at the PF side.

But I read your mail as if there’s another method instead of the FileTransferServlet to upload files to PF via the API. Is this the case? I can’t find any other in the documentation…

Best,
Dirk


#9

Can you verify that you can upload files to Portfolio in the classic (flash) client? Also, can you please tell me what version of Portfolio server you are using?


#10

Dear Brooks,

First regarding your version question: As you already can read in the subject line: I’m working with Portfolio 2016. It runs on a standard Windows 10 machine; the installation procedure was running fine without any errors.

I’ve tried to upload files by the classic flash client, and actually I’m experiencing problems here as well. The upload fails, this is what the server log contains:

2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000008.tmp, size=12 bytes, isFormField=true, FieldName=Filename
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 12
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000009.tmp, size=1 bytes, isFormField=true, FieldName=destinationFolder
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 1
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000010.tmp, size=36 bytes, isFormField=true, FieldName=sessionId
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 36
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000011.tmp, size=36 bytes, isFormField=true, FieldName=catalogId
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 36
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000012.tmp, size=12 bytes, isFormField=true, FieldName=filename
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 12
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=null, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000013.tmp, size=6 bytes, isFormField=true, FieldName=action
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 6
2017-12-12 18:52:04,861 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) ### item: name=DSC_1361.JPG, StoreLocation=C:\Program Files (x86)\Extensis\Portfolio Server\data\work\upload_8c04eb32_eef6_4776_ba70_c9e34e8bbc2f_00000014.tmp, size=9179053 bytes, isFormField=false, FieldName=Filedata
2017-12-12 18:52:04,877 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) * size: 9179053
2017-12-12 18:52:05,065 DEBUG [extensis.portfolio.server.manager.MediaEngineManager] (http-executor-threads - 26) using media engine localhost:40372
2017-12-12 18:52:12,892 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component exif, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component msoffice-metadata, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component iptc, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component geo, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component thumbnail, of type Derivative
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner found derivative in response content with length 11588
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component xmp, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component doctext, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component movie-metadata, of type Metadata
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component diskpreview, of type Derivative
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner found derivative in response content with length 218885
2017-12-12 18:52:12,908 DEBUG [extensis.portfolio.server.mediaprocessing.MediaProcessor] (http-executor-threads - 26) sendRequestInner processing component info, of type GeneralInformation
2017-12-12 18:52:12,955 DEBUG [extensis.portfolio.server.cataloging.Cataloger] (http-executor-threads - 26) UpdateAssetById: Media processing: 7890
2017-12-12 18:52:12,955 ERROR [extensis.portfolio.server.implementation.ImplementationUtils] (http-executor-threads - 26) Unable to locate asset content version for: 15: java.lang.NullPointerException
at extensis.portfolio.server.vault.MongoVault.initialize(VaultFactory.java:107) [portfolio-classes.jar:]
at extensis.portfolio.server.vault.MongoVault.(VaultFactory.java:98) [portfolio-classes.jar:]
at extensis.portfolio.server.vault.VaultFactory.create(VaultFactory.java:28) [portfolio-classes.jar:]
at extensis.portfolio.server.implementation.ImplementationUtils.createAssetVersionIfVaultBasedCatalog(ImplementationUtils.java:1164) [portfolio-classes.jar:]
at extensis.portfolio.server.cataloging.Cataloger.addAsset(Cataloger.java:352) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet$AssetUploader.upload(FileTransferServlet.java:1003) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet.doUpload(FileTransferServlet.java:327) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet.doPost(FileTransferServlet.java:894) [portfolio-classes.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:350) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:902) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:1031) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:847)
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)

2017-12-12 18:52:12,955 ERROR [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) Error catalog file C:\Program Files (x86)\Extensis\Portfolio Server\data\work in catalog 3FA19054-5BED-71D5-307F-AA21524DC500: extensis.portfolio.util.DamEspException: null; nested exception is:
java.lang.NullPointerException
at extensis.portfolio.util.DamEspException.damEspExceptionForException(DamEspException.java:71) [portfolio-classes.jar:]
at extensis.portfolio.server.implementation.ImplementationUtils.createAssetVersionIfVaultBasedCatalog(ImplementationUtils.java:1167) [portfolio-classes.jar:]
at extensis.portfolio.server.cataloging.Cataloger.addAsset(Cataloger.java:352) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet$AssetUploader.upload(FileTransferServlet.java:1003) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet.doUpload(FileTransferServlet.java:327) [portfolio-classes.jar:]
at extensis.portfolio.server.service.FileTransferServlet.doPost(FileTransferServlet.java:894) [portfolio-classes.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final.jar:1.0.2.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:389) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProcessor.process(Http11NioProcessor.java:350) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:902) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.apache.tomcat.util.net.NioEndpoint$ChannelProcessor.run(NioEndpoint.java:1031) [jbossweb-7.2.0.Final.jar:7.2.0.Final]
at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33)
at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:806)
at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45)
at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:847)
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_80]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.NullPointerException
at extensis.portfolio.server.vault.MongoVault.initialize(VaultFactory.java:107) [portfolio-classes.jar:]
at extensis.portfolio.server.vault.MongoVault.(VaultFactory.java:98) [portfolio-classes.jar:]
at extensis.portfolio.server.vault.VaultFactory.create(VaultFactory.java:28) [portfolio-classes.jar:]
at extensis.portfolio.server.implementation.ImplementationUtils.createAssetVersionIfVaultBasedCatalog(ImplementationUtils.java:1164) [portfolio-classes.jar:]
… 25 more

2017-12-12 18:52:12,971 DEBUG [extensis.portfolio.server.service.FileTransferServlet] (http-executor-threads - 26) UPLOAD TIME: 8.875 seconds

Please let me know if you need more information.

Best,

Dirk


#11

Hi Dirk,

Because you can’t upload with the client, it sounds like you have a problem with your Portfolio installation, not the API itself. I’d suggest either re-installing, or testing the API on a known good system, or giving our tech support group a call and trouble-shooting your installation.

-Loren