PX’s Missing from /tmp/sdk.extensions.libs/

Frequently PX’s will miss from cache(/tmp/sdk.extensions.libs/) folder

java.io.FileNotFoundException: /tmp/sdk.extensions.libs/pharmaIntegrationPX7882115601177018280.jar (No such file or directory)

I am restarting the Agile application will solve my problem, But anyone can let me know is there any other solution without restart

Add Comment
11 Answer(s)

Hi,
is the jar file in the process extension folder? the temp file should not be removed/modified manually by the cache folder.

To check the issue, please have a look at that documentation file:

PX Class Loading in Server

You are always asked by Oracle Support to check this url: http://agile.company.com/Agile/ServerAPIProperties . Below is sample output from the link:

#
# java.io.tmpdir=C:WindowsTEMP
# java.io.tmpdir.readable=true
# java.io.tmpdir.writable=true
# sdk.extensions=C:/Agile/Agile931/integration/sdk/extensions
# sdk.extensions.readable=true
# sdk.extensions.writable=true
# cookie.domain=.sl.agilesoft.com
#
minimum-api-version=9.22
current-server-version=9.3.1.1 (Build 43)
current-impl-version=Agile PLM 9.3.1.1 (2011-04-20.15-14-39.966)
session-class=com.agile.api.pc.Session
authenticator-class=com.agile.api.common.WebLogicAuthenticator
transaction-manager=com.agile.api.common.WebLogicTransactionManager
app.server.type=weblogic
env-name.0=java.naming.factory.initial
env-name.1=java.naming.provider.url
env-value.1=t3://agile.company.com:80
env-set.1=false
env-value.0=weblogic.jndi.WLInitialContextFactory
env-set.0=false

There are two important items you need to care about: java.io.tmpdir and sdk.extensions. All the PX jars are deployed to sdk.extensions folder, but why we need to care about java.io.tmpdir? Check the folder and you would see a folder name “sdk.extensions.libs”, and there are all the PX jars here. Why these jars are copied from sdk.extensions to java.io.tmpdirsdk.extensions.libs ? Agile first copies them to java.io.tmpdirsdk.extensions.libs folder, then uses URL Class Loader to dynamically load all the classes/jars in this temporary folder upon below event:

  • When PX is invoked for the first time and no such jar in sdk.extensions.libs folder
  • When the timestamp of same Jar in sdk.extensions is newer than the one in sdk.extensions.libs and PX executes again
  • When PX is setup in JavaClient for the first time
Agile Angel Answered on December 2, 2016.
Add Comment

Hi Antonio,

I appreciate your feedback, 

But frequently( in every 10 days) jar files will be deleted automatically from sdk cache (java.io.tmpdir)

and if you check in the JavaClient PX or Event Action class will be missing and code will not trigger.

Currently, if I found jar is missing in the cache directory restarting the application.

Instead of restarting application shall i delete  “/sdk.extensions.libs”  from /tmp whether it will create fresh cache directory?

 

  • When PX is invoked for the first time and no such jar in sdk.extensions.libs folder
    No Issue works fine
  • When the timestamp of same Jar in sdk.extensions is newer than the one in sdk.extensions.libs and PX executes again
    No Issue works fine
  • When PX is setup in JavaClient for the first time
    No Issue works fine

 

Agile Talent Answered on December 2, 2016.
Add Comment

this cache problem could occurs when some dependency or jar file is modified, not available or deleted at certain point under the EXTENSION folder 
# sdk.extensions=C:/Agile/Agile93XXXXXX

As I know, the jar file from that cache folder are never deleted or replaced automatically by Agile.Could you please share your ServerAPIProperties ?

Additionally, When exactly the FileNotFound exception is generated?

Agile Angel Answered on December 2, 2016.
Add Comment

Server API Properties attached.

Additionally, When exactly the FileNotFound exception is generated?

   Yesterday on 12-01-2016 it is generated.

java.io.FileNotFoundException: /tmp/sdk.extensions.libs/ecSolutionPack5479565172488201938.jar (No such file or directory)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(ZipFile.java:215)
at java.util.zip.ZipFile.<init>(ZipFile.java:145)
at java.util.jar.JarFile.<init>(JarFile.java:153)
at java.util.jar.JarFile.<init>(JarFile.java:90)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:150)
at java.net.URL.openStream(URL.java:1037)
at com.agile.px.Extensions2.discoverNames(Extensions2.java:458)
at com.agile.px.Extensions2.discoverExtensions(Extensions2.java:118)
at com.agile.px.PxSessionBean.discoverExtensionNames(PxSessionBean.java:75)
at com.agile.px.com_agile_px_PxSession_l8vd22_EOImpl.__WL_invoke(Unknown Source)
at weblogic.ejb.container.internal.SessionRemoteMethodInvoker.invoke(SessionRemoteMethodInvoker.java:32)
at com.agile.px.com_agile_px_PxSession_l8vd22_EOImpl.discoverExtensionNames(Unknown Source)
at com.agile.px.com_agile_px_PxSession_l8vd22_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:695)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:520)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:146)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:516)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)

Agile Talent Answered on December 2, 2016.
Add Comment

Sorry I was not clear.
I mean to which user action the error is generated? Is it generated when a PX is triggered or when you deploy a jar into extension folder?

Agile Angel Answered on December 2, 2016.
Add Comment

On any trigger or because of code It does not disappear jar from temp directory.

Suddenly and automatically it disappears from temp directory.  It works for a week (somet time for 10 days) and then suddenly some of the jar files  disappear from the sdk.extensions.libs/ location.

Agile Talent Answered on December 2, 2016.
Add Comment

so it is random. You need to contact otn for that submitting the generated averify probably
Waiting meantime that someone figured it out here

Agile Angel Answered on December 2, 2016.
Add Comment

I have tried with oracle support, Even they dont have any solution for this.

Even I ran averify and acollect but no errors.

Agile Talent Answered on December 2, 2016.
Add Comment

Just a question. I see in your properties file that the temporary folder is /tmp
Where is mapped your folder /tmp ? The same for /agile folder. Where  it is mapped? If it used a temprary folder on server, it could be cleaned up by window randomly during disk cleansing. I used to have (looking the documentation ) to have a full path declared there. 
Could you please try to use a absolute path instead of a relative one?

Agile Angel Answered on December 2, 2016.
Add Comment

Hi Antonio, This is not windows os,  Agile is on Red hat Linux .

/tmp is like temp folder in windows.

Agile Talent Answered on December 2, 2016.
Add Comment

Your Answer

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