MattC

Maximum Length of Package Name

0 votes

Hello, what is the maximum number of characters allowed in the package name?  The JavaDoc for the method PackageBuilder.newPackageNamed() states:

@param name the package name @size(min="1", max="64")

However, when using the Web Portal, I was able to create a package with 100 characters in the name before it prevented me from typing any more.  Also, I was able to call PackageBuilder.newPackageNamed() with a 150-character string, and it built the package successfully.  I did not try anything beyond 150 characters.

What is the true maximum length for a package name?

Thanks.


Reply to: Maximum Length of Package Name

0 votes

Hi MattC,

 

I believe both the transaction/package and the document names' length limitation have been increased to 255 at one point. For SDK, we can make a ticket and suggest to update the Java doc. For web portal, there's an additional frontend validation prevents you from typing, but web portal can list and display an existing transaction with longer name. If you have a requirement to create a long name transaction from UI, we can also raise this to support team.

 

Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to:

0 votes

Thanks Duo.  I confirmed I was able to create a package with a name 255 characters long.  However, when I tried 256 characters, the call to EslClient.createPackage() throws the following exception:

Could not create a new package Exception: HTTP POST on URI https://sandbox.e-signlive.com/api/packages resulted in response with status code: [500, Internal Server Error]. Optional details: {"messageKey":"error.internal.default","technical":"org.hibernate.exception.DataException: could not execute statement","message":"Unexpected error. We apologize for any inconvenience this may have caused you, please try again. If the problem persists, please contact our support team.","code":500,"name":"Unhandled Server Error"} 

So that is good to know.  I don't have any need to create a long name transaction in the UI, but I like your idea of having the SDK JavaDoc updated, since it would probably help other developers.

Thanks for your help!


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off