Attaching a File using create Row under a change using SDK gives error.

ITable attachmentTab = change.getAttachments();
IRow row = attachmentTab.createRow(file);

While creating attaching a file from Local/ftp location under a change using above SDK gives below error:

<Sep 13, 2017 11:22:22 PM IST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<Sep 13, 2017 11:22:22 PM IST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>

com.agile.webfs.components.common.RepositoryException: The preferred file server : https://hostname:port/Filemgr/services/FileServer for current user is down. Please contact the system administrator.
at com.agile.webfs.client.IFSLocator.pingFileManager(IFSLocator.java:228)
at com.agile.webfs.client.IFSLocator.getConnection(IFSLocator.java:152)
at com.agile.api.pc.EJBLookup.createFileSession(EJBLookup.java:473)
at com.agile.api.pc.EJBLookup.getFileSession(EJBLookup.java:448)
at com.agile.api.pc.attachment.IFSOutputStream.getFileSession(IFSOutputStream.java:133)
at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:87)
at com.agile.api.pc.attachment.IFSOutputStream.copyFrom(IFSOutputStream.java:115)
at com.agile.api.pc.TableAttachment.uploadFile(TableAttachment.java:886)
at com.agile.api.pc.TableAttachment$AddFiles2Action.doSdkAction(TableAttachment.java:724)
at com.agile.api.common.SDKAction.run(SDKAction.java:23)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.security.Security.runAs(Security.java:61)
at com.agile.api.common.WebLogicAuthenticator.doAs(WebLogicAuthenticator.java:111)
at com.agile.api.common.Security.doAs(Security.java:54)
at com.agile.api.common.Security.doAs(Security.java:109)
at com.agile.api.pc.TableAttachment.addFiles2(TableAttachment.java:483)
at com.agile.api.pc.TableAttachment.createNewBlob2(TableAttachment.java:459)
at com.agile.api.pc.TableAttachment.doCreateServerRowWithParam(TableAttachment.java:363)
at com.agile.api.pc.Table.createTableRow(Table.java:238)
at com.agile.api.pc.TableAttachment.createTableRow(TableAttachment.java:169)
at com.agile.api.pc.Table.createRow(Table.java:202)

Add Comment
7 Answer(s)

Hi All,

I am also stuck into the same situation where I am able to attach file in Change Attachments tab via Web Client but getting the above stack trace while trying to attach a file with sdk code. Can anyone suggest a solution for this?
I have made sure I have the rights to create folder in file manager but not sure what is causing the problem here.

Root Cause exception : com.agile.webfs.components.common.RepositoryException: The preferred file server : http://xxxx/Filemgr/services/FileServer for current user is down. Please contact the system administrator.

Agile User Answered on April 26, 2019.
Add Comment

It looks like the PX does not have the My User Profile role. When you setup the PX there is a field for the role(s). If you leave that blank the PX inherits the privileges of the user who triggered the PX. That user usually has My User Profile. If you put anything in that PX role(s) field then the PX inherits nothing and runs only with those roles. You need to make sure one of the roles is My User Profile. Otherwise the PX does not have the privilege to read the user’s primary file server information.

Agile Angel Answered on September 14, 2017.

Steve, actually I am running using standalone code with admin privileges. Isusupect its related to security firewall that is bloacking. please advise

on September 14, 2017.

If you can do file attachments in the web client from that machine then it is not a firewall issue. Your stack dump is going through the security layer. It may be that you are running into the sso timeout. The filemgr uses the login sessions token. If you hit the sso timeout the filemgr will not be able to talk with your program.

  1. Change the sso parameters in the <agile home>/agileDomain/config/agile.properties file on the server. Then restart Agile.

 

######################

#Single sign-on settings

######################

agile.sso.cookie.name=SMSESSION

agile.sso.checkOneTimePXToken = false

# 28800 = 8 hours

agile.sso.expirationTime = 28800

 

 

agile.sso.checkOneTimePXToken = true means a PX can only use the session credentials once. If it tries to do anything requiring credential checking it will fail.

 

agile.sso.expirationTime = 120 means the session credentials are good for 2 minutes after the PX starts. After 2 minutes the credentials will have expired and the PX will not be able to do file operations.

on October 19, 2017.
Add Comment

Starting with 9.3.5 (I believe) and an SSL environment, you will need to add these lines to a stand-alone program before the connect factory is called.

 

System.setProperty(“java.protocol.handler.pkgs”,”URL”);

System.setProperty(“ssl.SocketFactory.provider”,”url”);

System.setProperty(“UseSunHttpHandler”, “true”);

Agile Angel Answered on January 29, 2020.

Steve, you really are an Agile Angel! This is exactly what worked for my stand-alone client. Additionally, your previous comment about the “My User Profile” role fixed the same issue I had in a process extension (PX).

 

Thanks!

on January 29, 2020.
Add Comment

Hey there everyone,

 

Just bumping this post to see if anyone else besides tapan has encountered this lately. I am getting the same error when I attempt to “getFile” from an attachment row on an object. I’m able to do this in the web client, but when trying to do this in a PX or standalone API client, I get this error.

Agile User Answered on January 27, 2020.
Add Comment

Hi,

Looking at the error, there is:
The preferred file server : https://hostname:port/Filemgr/services/FileServer for current user is down. 

Did you hide the real name in order to post it? Otherwise the File Manager server selected in your admin user, is not configured i the Java Client. If you open the web client using the same user, you should have the same issue (it is not related only to SDK).
Try to change this preference or to configure the selected IFS server properly

Agile Angel Answered on September 14, 2017.

Antonio,

The Error is not happening when I am trying to do it manually in agile, Attachment gets added without any issue.

on September 14, 2017.

This is exactly what is happening with me. Any leads on how you resolved this?

on April 29, 2019.
Add Comment

I would recommend you to deploy the code as a PX, place the files in say /tmp directory of the app server host or an ftp location (provided you are able to create a jsch session), and pick the files from there.

BR, Nimish

Agile User Answered on September 20, 2017.
Add Comment

I have used ITable.createRow(File) with success in stand alone SDK applications.  The user connecting to the Agile PLM via SDK must have rights to create FileFolder in AgilePLM.
Your stack error indicates that the file manager maybe down.  Behind the scene, when you attach a local file, the file gets uploaded to the file manager into a new file folder

Agile Talent Answered on October 18, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.