246
Points
Questions
5
Answers
46
-
- 1331 views
- 3 answers
- 0 votes
-
If you are using log4j, you can call PropertyConfigurator.configure(“path to my log4j.properties file”) within your PX code to start logging using the properties defined.
If you want to be more generic, have default properties file that gets included with the PX jar file and have the internal config file include a pointer to external properties file to “configure” PX specific stuff, like logging parameters.
Your PX would read the config properties file embedded in the jar file when launching and read additional external-to-jar properties file(s) as defined.
- 1971 views
- 2 answers
- 0 votes
-
- 2007 views
- 3 answers
- 0 votes
-
- 1954 views
- 2 answers
- 0 votes
-
Slightly off topic, but use of logging is recommended to actually capture the error as well as where in the source code line the error occurred ( %L in log4j ).
Since it’s hard to generate PX specific log file, a quick hack I used to generate a log for one specific PX was to setup log4j parameters dynamically within the PX code by
1) had a env or hardcoded location where the PX will first read a properties file that contain directives tied to log4j parmaters
2) programatically call the same log4j methodExample:
If log4j.properties are like this:log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=javalog.log
log4j.appender.file.MaxFileSize=100MB
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L – %m%nYou should have something in code to mimic it…. Note: make sure that you DO NOT create multiple loggers writing same log to the same file… create logger only once.
RollingFileAppender rfa = new RollingFileAppender();
rfa.setFile(“javalog.log”);
rfa.setThreshold(Level.DEBUG);
rfa.setMaxFileSize(“100MB”);
rfa.setLayout(new PatternLayout(“%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L – %m%n”));- 2333 views
- 3 answers
- 0 votes
-
Did you delete the local machine’s cache of Agile PLM connection info ?
The above connection code tries to re-use previously successful login meta data. On windows, the cache is at:
C:UsersYourIDAppDataLocalTempAgileSDK.cache
Remove/Clear and retryAnd DO NOT use muti-threading UNTIL execute the connection in single thread and confirmed that session is valid. In fact, for any processing code that you hit Agile PLM via SDK, I would not use multiple threads.
- 3459 views
- 4 answers
- 1 votes
-
If you are processing the SOAP message via code, my recommendation is auto generate a wrapper/proxy against the WSDL and use the generated classes to access the SOAP based result, rather than trying to use XPATH or some string based processing.
As to determining if <name/> is empty or actually null, you will have to handle that in your processing code.
- 2759 views
- 1 answers
- 0 votes
-
- 1869 views
- 6 answers
- 0 votes
-
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- 2795 views
- 7 answers
- 0 votes
-
- 1297 views
- 2 answers
- 0 votes