Anaplan Connect 1.4 Null pointer exceptions
I am getting NullPointerException errors from Anaplan Connect when I include -process -execute instructions. I started from the example.sh script. The process runs two Import actions that import from the same file, first into a List and then into a Module.
Here is my script:
#!/bin/sh
# This example uploads a file and runs an import
AnaplanUser="myUser"
WorkspaceId="myWorkspaceId"
ModelId="myModelId"
Operation="-service 'https://api.anaplan.com' -auth 'https://auth.anaplan.com' -file 'products.sql.csv' -chunksize 1 -put '/Users/me/anaplan/anaplan_load/input_files/products.sql.csv' -process 'Import Products' -execute -output '/Users/me/anaplan/anaplan_load/errors.txt'"
#____________________________ Do not edit below this line ______________________________
if [ "${AnaplanUser}" ]; then
Credentials="-user ${AnaplanUser}"
fi
echo cd "`dirname "$0"`"
cd "`dirname "$0"`"
if [ ! -f AnaplanClient.sh ]; then
echo "Please ensure this script is in the same directory as AnaplanClient.sh." >&2
exit 1
elif [ ! -x AnaplanClient.sh ]; then
echo "Please ensure you have executable permissions on AnaplanClient.sh." >&2
exit 1
fi
Command="./AnaplanClient.sh ${Credentials} -workspace ${WorkspaceId} -model ${ModelId} ${Operation}"
/bin/echo "${Command}"
exec /bin/sh -c "${Command}"
If I exclude "-process 'Import Products' -execute", I get:
anaplan-connect-1.4$ ./example.sh
cd .
./AnaplanClient.sh -user myUser -workspace myWorkspace -model myModel -service 'https://api.anaplan.com' -auth 'https://auth.anaplan.com' -file 'products.sql.csv' -chunksize 1 -put '/Users/me/anaplan/anaplan_load/input_files/products.sql.csv' -output '/Users/me/anaplan/anaplan_load/errors.txt'
Absolute path to JAVA8 executable not provided. Will attempt to figure out path from JAVA_HOME or which command...
Found Java executable from JAVA_HOME...
Java 8 found!
Using ./anaplan-connect-1.4-jar-with-dependencies.jar
Warning: cannot find lib directory
Password:
2018-10-09 14:02:09 INFO 54552 |-- Initializing Service...
2018-10-09 14:02:09 INFO 54552 |-- Authenticating via Basic...
2018-10-09 14:02:12 INFO 54552 |-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
2018-10-09 14:02:12 INFO 54552 |-- Uploading file: /Users/me/anaplan/anaplan_load/input_files/products.sql.csv
2018-10-09 14:02:14 INFO 54552 |-- The file "/Users/me/anaplan/anaplan_load/input_files/products.sql.csv" has been uploaded as products.sql.csv.
2018-10-09 14:02:14 INFO 54552 |-- No dump file is available.
If I include "-process 'Import Products' -execute", the process doesn't complete gracefully; I have to kill it. I get:
anaplan-connect-1.4$ ./example.sh
cd .
./AnaplanClient.sh -user myUser -workspace myWorkspace -model myModel -service 'https://api.anaplan.com' -auth 'https://auth.anaplan.com' -file 'products.sql.csv' -chunksize 1 -put '/Users/me/anaplan/anaplan_load/input_files/products.sql.csv' -process 'Import Products' -execute -output '/Users/me/anaplan/anaplan_load/errors.txt'
Absolute path to JAVA8 executable not provided. Will attempt to figure out path from JAVA_HOME or which command...
Found Java executable from JAVA_HOME...
Java 8 found!
Using ./anaplan-connect-1.4-jar-with-dependencies.jar
Warning: cannot find lib directory
Password:
2018-10-09 13:55:07 INFO 54455 |-- Initializing Service...
2018-10-09 13:55:07 INFO 54455 |-- Authenticating via Basic...
2018-10-09 13:55:10 INFO 54455 |-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
2018-10-09 13:55:10 INFO 54455 |-- Uploading file: /Users/me/anaplan/anaplan_load/input_files/products.sql.csv
2018-10-09 13:55:12 INFO 54455 |-- The file "/Users/me/anaplan/anaplan_load/input_files/products.sql.csv" has been uploaded as products.sql.csv.
2018-10-09 13:55:13 INFO 54455 |-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2018-10-09 13:55:13 INFO 54455 |-- Running Process: Import Products (id=118000000021)
2018-10-09 13:55:15 INFO 54455 |-- Run status: Complete. (100.0%)
2018-10-09 13:55:15 INFO 54455 |-- -----------------------------------------
2018-10-09 13:55:15 INFO 54455 |-- <<< The operation was successful >>> 😃
2018-10-09 13:55:15 INFO 54455 |-- - - - - - - - - - - - - - - - - - - - - -
2018-10-09 13:55:15 ERROR 54455 |-- Null pointer
Client terminated, cancelling...2018-10-09 13:55:17 INFO |-- Run status: Complete. (100.0%)
2018-10-09 13:55:17 INFO |-- -----------------------------------------
2018-10-09 13:55:17 INFO |-- <<< The operation was successful >>> 😃
2018-10-09 13:55:17 INFO |-- - - - - - - - - - - - - - - - - - - - - -
2018-10-09 13:55:17 ERROR |-- Null pointer
Killed: 9
If I further include "-debug", I get:
anaplan-connect-1.4$ ./example.sh
cd .
./AnaplanClient.sh -user myUser -workspace myWorkspace -model myModel -debug -service 'https://api.anaplan.com' -auth 'https://auth.anaplan.com' -file 'products.sql.csv' -chunksize 1 -put '/Users/me/anaplan/anaplan_load/input_files/products.sql.csv' -process 'Import Products' -execute -output '/Users/me/anaplan/anaplan_load/errors.txt'
Absolute path to JAVA8 executable not provided. Will attempt to figure out path from JAVA_HOME or which command...
Found Java executable from JAVA_HOME...
Java 8 found!
Using ./anaplan-connect-1.4-jar-with-dependencies.jar
Warning: cannot find lib directory
2018-10-09 13:09:49 DEBUG [c.a.client.Program :1609 ] 54087 |-- ======================================================================
2018-10-09 13:09:49 DEBUG [c.a.client.Program :1610 ] 54087 |-- Anaplan Connect 1.4.0
2018-10-09 13:09:49 DEBUG [c.a.client.Program :1611 ] 54087 |-- Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)/ (25.181-b13)/
2018-10-09 13:09:49 DEBUG [c.a.client.Program :1613 ] 54087 |-- (Mac OS Xx86_64)/10.13.6
2018-10-09 13:09:49 DEBUG [c.a.client.Program :1614 ] 54087 |-- ======================================================================
Password:
2018-10-09 13:09:58 INFO [c.a.client.Service :92 ] 54087 |-- Initializing Service...
2018-10-09 13:09:58 INFO [a.BasicAuthenticator:26 ] 54087 |-- Authenticating via Basic...
2018-10-09 13:10:01 INFO [c.a.c.l.LogUtils :48 ] 54087 |-- ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
2018-10-09 13:10:01 INFO [c.a.c.ServerFile :258 ] 54087 |-- Uploading file: /Users/me/anaplan/anaplan_load/input_files/products.sql.csv
2018-10-09 13:10:03 DEBUG [c.a.c.ServerFile :305 ] 54087 |-- Uploaded chunk: 0 (size=1MB)
2018-10-09 13:10:04 INFO [c.a.client.Program :469 ] 54087 |-- The file "/Users/me/anaplan/anaplan_load/input_files/products.sql.csv" has been uploaded as products.sql.csv.
2018-10-09 13:10:04 INFO [c.a.c.l.LogUtils :44 ] 54087 |-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2018-10-09 13:10:04 INFO [c.a.c.TaskFactory :118 ] 54087 |-- Running Process: Import Products (id=118000000021)
2018-10-09 13:10:07 INFO [c.a.client.Task :207 ] 54087 |-- Run status: Complete. (100.0%)
2018-10-09 13:10:07 INFO [c.a.c.l.LogUtils :56 ] 54087 |-- -----------------------------------------
2018-10-09 13:10:07 INFO [c.a.client.Task :230 ] 54087 |-- <<< The operation was successful >>> 😃
2018-10-09 13:10:07 INFO [c.a.c.l.LogUtils :60 ] 54087 |-- - - - - - - - - - - - - - - - - - - - - -
2018-10-09 13:10:07 DEBUG [c.a.client.Program :592 ] 54087 |-- java.lang.NullPointerException
at com.anaplan.client.TaskResultDetail.appendTo(TaskResultDetail.java:66)
at com.anaplan.client.TaskResult.appendTo(TaskResult.java:170)
at com.anaplan.client.TaskResult.appendTo(TaskResult.java:175)
at com.anaplan.client.TaskResult.toString(TaskResult.java:187)
at com.anaplan.client.Task.trackRunningTask(Task.java:235)
at com.anaplan.client.Task.runTask(Task.java:121)
at com.anaplan.client.Program.main(Program.java:287)
2018-10-09 13:10:07 ERROR [c.a.client.Program :595 ] 54087 |-- Null pointer
Client terminated, cancelling...2018-10-09 13:10:09 INFO [c.a.client.Task :207 ] |-- Run status: Complete. (100.0%)
2018-10-09 13:10:09 INFO [c.a.c.l.LogUtils :56 ] |-- -----------------------------------------
2018-10-09 13:10:09 INFO [c.a.client.Task :230 ] |-- <<< The operation was successful >>> 😃
2018-10-09 13:10:09 INFO [c.a.c.l.LogUtils :60 ] |-- - - - - - - - - - - - - - - - - - - - - -
2018-10-09 13:10:09 DEBUG [c.a.client.Task :138 ] |-- java.lang.NullPointerException
at com.anaplan.client.TaskResultDetail.appendTo(TaskResultDetail.java:66)
at com.anaplan.client.TaskResult.appendTo(TaskResult.java:170)
at com.anaplan.client.TaskResult.appendTo(TaskResult.java:175)
at com.anaplan.client.TaskResult.toString(TaskResult.java:187)
at com.anaplan.client.Task.trackRunningTask(Task.java:235)
at com.anaplan.client.Task.cancelRunningTask(Task.java:136)
at com.anaplan.client.Task.lambda$static$0(Task.java:52)
at java.lang.Thread.run(Thread.java:748)
2018-10-09 13:10:09 ERROR [c.a.client.Task :139 ] |-- Null pointer
Killed: 9
The data do load successfully and both of the imports inside the process run successfully. So, I see my test line item in the list and its associated data in the module.
Also, nothing is written to the errors.txt file in any of the scenarios.
Comments
-
More info. I tried replacing the -process command with each of its component -import commands, and determined that the NullPointException is generated from importing into a List. Running any import into a list causes the NullPointerExceptions. Running imports into modules so far does not.
0 -
More testing results. If the import has any errors in it, Anaplan Connect throws a NullPointerException and aborts.
0 -
I have the same issue on list imports.
Additionally, half of the times, and only without the -debug option, the java process hangs and do not ends. When this happen, I have to kill the java process to ends it.
Note: I am on Windows
Simple Null pointer exception with debug:
E:\Applications-ppd\ANAPLAN_Connect>"C:\Program Files\Java\jdk1.8.0_141\bin\java.exe" -classpath "E:\Applications-ppd\ANAPLAN_Connect\anaplan-connect-1.4\anaplan-connect-1.4-jar-w
ith-dependencies.jar;E:\Applications-ppd\ANAPLAN_Connect\anaplan-connect-1.4\lib\sqljdbc42.jar" com.anaplan.client.Program -debug -service https://api.anaplan.com -auth https://aut
h.anaplan.com -user %userpwd% -workspace %workspaceid% -model %modelid% -import "IMP-08 Liste Pôles / Projets" -execute
2018-12-13 13:15:25 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m1609 [0;39m][0;39m [35m3752[0;39m |-- ==================================================================
====
2018-12-13 13:15:25 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m1610 [0;39m][0;39m [35m3752[0;39m |-- Anaplan Connect 1.4.0
2018-12-13 13:15:25 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m1611 [0;39m][0;39m [35m3752[0;39m |-- Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)/ (25.141-b1
5)/
2018-12-13 13:15:25 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m1613 [0;39m][0;39m [35m3752[0;39m |-- (Windows Server 2008 R2amd64)/6.1
2018-12-13 13:15:25 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m1614 [0;39m][0;39m [35m3752[0;39m |-- ==================================================================
====
2018-12-13 13:15:25 [32mINFO [0;39m [33m[c.a.client.Service :[36m92 [0;39m][0;39m [35m3752[0;39m |-- Initializing Service...
2018-12-13 13:15:25 [32mINFO [0;39m [33m[a.BasicAuthenticator:[36m26 [0;39m][0;39m [35m3752[0;39m |-- Authenticating via Basic...
2018-12-13 13:15:28 [32mINFO [0;39m [33m[c.a.c.l.LogUtils :[36m44 [0;39m][0;39m [35m3752[0;39m |-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2018-12-13 13:15:28 [32mINFO [0;39m [33m[c.a.c.TaskFactory :[36m118 [0;39m][0;39m [35m3752[0;39m |-- Running Import: IMP-08 Liste Pôles / Projets (id=112000000083)
2018-12-13 13:15:30 [32mINFO [0;39m [33m[c.a.client.Task :[36m207 [0;39m][0;39m [35m3752[0;39m |-- Run status: Complete. (100.0%)
2018-12-13 13:15:30 [32mINFO [0;39m [33m[c.a.c.l.LogUtils :[36m56 [0;39m][0;39m [35m3752[0;39m |-- -----------------------------------------
2018-12-13 13:15:30 [32mINFO [0;39m [33m[c.a.client.Task :[36m230 [0;39m][0;39m [35m3752[0;39m |-- <<< The operation was successful >>>
2018-12-13 13:15:30 [32mINFO [0;39m [33m[c.a.c.l.LogUtils :[36m60 [0;39m][0;39m [35m3752[0;39m |-- - - - - - - - - - - - - - - - - - - - - -
2018-12-13 13:15:30 [33mDEBUG[0;39m [33m[c.a.client.Program :[36m592 [0;39m][0;39m [35m3752[0;39m |-- java.lang.NullPointerException
at com.anaplan.client.TaskResultDetail.appendTo(TaskResultDetail.java:66)
at com.anaplan.client.TaskResult.appendTo(TaskResult.java:170)
at com.anaplan.client.TaskResult.toString(TaskResult.java:187)
at com.anaplan.client.Task.trackRunningTask(Task.java:235)
at com.anaplan.client.Task.runTask(Task.java:121)
at com.anaplan.client.Program.main(Program.java:287)
2018-12-13 13:15:30 [1;31mERROR[0;39m [33m[c.a.client.Program :[36m595 [0;39m][0;39m [35m3752[0;39m |-- Null pointerProcess hangs without debug (I did not reproduce than when the debug option is present).
E:\Applications-ppd\ANAPLAN_Connect>"C:\Program Files\Java\jdk1.8.0_141\bin\java.exe" -classpath "E:\Applications-ppd\ANAPLAN_Connect\anaplan-connect-1.4\anaplan-connect-1.4-jar-w
ith-dependencies.jar;E:\Applications-ppd\ANAPLAN_Connect\anaplan-connect-1.4\lib\sqljdbc42.jar" com.anaplan.client.Program -service https://api.anaplan.com -auth https://auth.anapl
an.com -user %userpwd% -workspace %workspaceid% -model %modelid% -import "IMP-08 Liste Pôles / Projets" -execute
2018-12-13 13:15:34 [32mINFO [0;39m [35m6860[0;39m |-- Initializing Service...
2018-12-13 13:15:34 [32mINFO [0;39m [35m6860[0;39m |-- Authenticating via Basic...
2018-12-13 13:15:38 [32mINFO [0;39m [35m6860[0;39m |-- = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
2018-12-13 13:15:38 [32mINFO [0;39m [35m6860[0;39m |-- Running Import: IMP-08 Liste Pôles / Projets (id=112000000083)
2018-12-13 13:15:40 [32mINFO [0;39m [35m6860[0;39m |-- Run status: Complete. (100.0%)
2018-12-13 13:15:40 [32mINFO [0;39m [35m6860[0;39m |-- -----------------------------------------
2018-12-13 13:15:40 [32mINFO [0;39m [35m6860[0;39m |-- <<< The operation was successful >>>
2018-12-13 13:15:40 [32mINFO [0;39m [35m6860[0;39m |-- - - - - - - - - - - - - - - - - - - - - -
2018-12-13 13:15:40 [1;31mERROR[0;39m [35m6860[0;39m |-- Null pointer
Client terminated, cancelling...2018-12-13 13:15:42 [32mINFO [0;39m [35m[0;39m |-- Run status: Complete. (100.0%)
2018-12-13 13:15:42 [32mINFO [0;39m [35m[0;39m |-- -----------------------------------------
2018-12-13 13:15:42 [32mINFO [0;39m [35m[0;39m |-- <<< The operation was successful >>>
2018-12-13 13:15:42 [32mINFO [0;39m [35m[0;39m |-- - - - - - - - - - - - - - - - - - - - - -
2018-12-13 13:15:42 [1;31mERROR[0;39m [35m[0;39m |-- Null pointer0 -
Yes. This bug is a reason (possibly THE reason) that they pushed out the end-of-life for AC 1.3 certificates.
0
Categories
- All Categories
- 2.3K Anaplan Community
- Academy
- Anaplan Talent Builder
- Model Design Course
- The Anaplan Way
- Archive
- 2 Idea exchange
- 62 Enterprise Scale
- 1.1K Extensibility
- 21 Intelligence
- 1.6K Planning & Modeling
- 331 Security
- Community Connections
- Connections
- Experiences
- Groups
- Personas
- Employees
- CS Toolkit
- Customer Care Center
- Forums
- Academy & Training
- Community Feedback & Updates
- Japan
- Anaplan Community Japan
- Anaplan Community Japan Knowledge Base
- HyperCare Japan
- JP-Central
- Support-Japanese
- Partners
- Partner Leadership Council
- Partner Product Council
- 724 Platform
- Anapedia
- App Hub
- Centers Of Excellence
- Extensions
- Planual
- Platform Updates
- 724 User Experience
- Profile Builder
- Resources
- Anaplan Advocates
- Anaplan Live!
- Community
- Community Advancement
- Community Connections
- Partner Program
- The Official Master Anaplanner Program
- Videos
- Welcome to the Anaplan Community!
- Success Central
- Support
- Case Portal Link
- Common Support Questions
- HyperCare Redirect
- Known Issues and Workarounds
- Support test page
- SupportFAQ
- Survey
- 2 Training Day Takeaways