Problem with <dp:import>

159 views
Skip to first unread message

Leigh Hunter

unread,
Nov 30, 2011, 11:59:35 AM11/30/11
to DataPower Buddy
I have successfully implemented a backup and export project using
dpbuddy. logically, then next step in an automated deployment would
be an import project. This is where I'm having trouble.

As per the example build file I have implemented a checkpoint and then
import. I am entering the command:

ant -v -e -f import.xml > import.log

I get the following in the import.log file:

Apache Ant(TM) version 1.8.2 compiled on December 20 2010
Buildfile: C:\Users\Leigh\Downloads\dpbuddy-2.2-dist
\dpbuddy-2.2\_leigh_\import.xml
Detected Java version: 1.7 in: C:\Program Files\Java\jdk1.7.0_01\jre
Detected OS: Windows 7
parsing buildfile C:\Users\Leigh\Downloads\dpbuddy-2.2-dist
\dpbuddy-2.2\_leigh_\import.xml with URI = file:/C:/Users/Leigh/
Downloads/dpbuddy-2.2-dist/dpbuddy-2.2/_leigh_/import.xml
Project base dir set to: C:\Users\Leigh\Downloads\dpbuddy-2.2-dist
\dpbuddy-2.2\_leigh_
parsing buildfile jar:file:/C:/Apache-ant/apache-ant-1.8.2/lib/
ant.jar!/org/apache/tools/ant/antlib.xml with URI = jar:file:/C:/
Apache-ant/apache-ant-1.8.2/lib/ant.jar!/org/apache/tools/ant/
antlib.xml from a zip file
parsing buildfile jar:file:/C:/Users/Leigh/Downloads/dpbuddy-2.2-dist/
dpbuddy-2.2/lib/dpbuddy-2.2-single.jar!/com/myarch/datapower/
antlib.xml with URI = jar:file:/C:/Users/Leigh/Downloads/dpbuddy-2.2-
dist/dpbuddy-2.2/lib/dpbuddy-2.2-single.jar!/com/myarch/datapower/
antlib.xml from a zip file
parsing buildfile jar:file:/C:/Users/Leigh/Downloads/dpbuddy-2.2-dist/
dpbuddy-2.2/lib/dpbuddy-2.2.jar!/com/myarch/datapower/antlib.xml with
URI = jar:file:/C:/Users/Leigh/Downloads/dpbuddy-2.2-dist/dpbuddy-2.2/
lib/dpbuddy-2.2.jar!/com/myarch/datapower/antlib.xml from a zip file
Build sequence for target(s) `run.import' is [checkpoint,
import.deploymentPolicies, run.import]
Complete build sequence is [checkpoint, import.deploymentPolicies,
run.import, import.domain, ]

checkpoint:
Could not load definitions from resource com/myarch/datapower/
antlib.xml. It could not be found.
Executing request 'do-action/RemoveCheckpoint' against 'HH_SNDBX_GTWY'
domain
Request:

[snip]

Successfully created checkpoint 'preDeployChkPt'

import.deploymentPolicies:
Executing DataPower import...
Importing dpconfigs/HH_DEV_DEPLOYMENT.zip...
Executing request 'do-import' against 'HH_SNDBX_GTWY' domain
Request:
<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/">
<Body>
<request xmlns="http://www.datapower.com/schemas/management"
domain="HH_SNDBX_GTWY">
<do-import overwrite-files="true" overwrite-objects="true">
<input-
file>UEsDBAoAAAAAAHRTfj8AAAAAAAAAAAAAAAAHABUAZHAtYXV4L1VUCQADe1nWTntZ1k5VeAQAAAAA

[snip]

AF0CAABQ4wcAAAA=</input-file>
</do-import>
</request>
</Body>
</Envelope>

Validating against the schema C:\Users\Leigh\Downloads\dpbuddy-2.2-dist
\dpbuddy-2.2\schema\xml-mgmt-ops.xsd
Successfully validated do-import against DataPower schema
Connecting to URL https://172.21.67.17:5550/service/mgmt/current
Username: dpadmin
Response:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<dp:response xmlns:dp="http://www.datapower.com/schemas/
management">
<dp:timestamp>2011-11-30T10:39:13-06:00</dp:timestamp>
<dp:result>ERROR</dp:result>
</dp:response>
</env:Body>
</env:Envelope>

on the console I get this additional information:

BUILD FAILED
C:\Users\Leigh\Downloads\dpbuddy-2.2-dist\dpbuddy-2.2\_leigh_
\import.xml:49: Rec
eived invalid response from the device. The response has to contain at
least one
'dp:import' element. Please check the device logs. XML of the
response:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<dp:response xmlns:dp="http://www.datapower.com/schemas/
management">
<dp:timestamp>2011-11-30T10:39:13-06:00</dp:timestamp>
<dp:result>ERROR</dp:result>
</dp:response>
</env:Body>
</env:Envelope>


at
com.myarch.datapower.ant.BaseDPTask.executeRequest(BaseDPTask.java:21
8)
at
com.myarch.datapower.ant.ImportTask.executeDPTask(ImportTask.java:56)
...


there is nothing in the DataPower logs that I have seen. If it helps,
I am using DataPower firmware XI50.4.0.2.0. I have downloaded the
schemas as per the documentation and example build file. Any way to
attach build and log file to this post? Any suggestions?

thank you

Leigh

Alexander 'Sasha' Ananiev

unread,
Nov 30, 2011, 1:11:34 PM11/30/11
to Leigh Hunter, DataPower Buddy
Hi Leigh,
Are you able to import the same file using Web GUI? There has to be the actual error in the data power logs, perhaps in the default domain.
You can reply to this message and attach the build log and other log files.
Regards,
-Alexander

Leigh Hunter

unread,
Nov 30, 2011, 1:59:50 PM11/30/11
to Alexander 'Sasha' Ananiev, DataPower Buddy
Alexander,

good question.
 
Yes, I did find the log info.

12:46:57 mgmt error 8910688 request 10.63.46.31 0x83a00099 xmlfirewall (xml-mgmt): The export file '' specified as is unreadable. Import failed.


Yes, I can import the file using the webGUI.  Here's the log info to prove it

12:51:09 mgmt notice 8913280 response 10.63.46.31 0x83a00073 xmlfirewall (web-mgmt): Configuration Import completed: 0/0 files and 1/1 objects and 0/0 data-sets successfully imported into Domain HH_SNDBX_GTWY. Identical files not selected for import : 0 .


I have attached the zip file (only contains deployment policy), build file, and log.  BTW, the zip file was create by the dpbuddy export task

Thank you very much.

Leigh
HH_DEV_DEPLOYMENT.zip
import.xml
import.log

Leigh Hunter

unread,
Dec 9, 2011, 10:46:43 AM12/9/11
to Alexander 'Sasha' Ananiev, DataPower Buddy
Alexander,

Any update on this issue?  I've been busy doing other DataPower related activities, however, I'm still keen to automate deployments.

I created a file using the webGUI and tried to import it with dpbuddy with same, ERROR, result.

Thanks for you assistance.

Leigh

jane wang

unread,
Jan 4, 2012, 3:18:59 PM1/4/12
to DataPower Buddy
Any update on this? I am experiencing the same error recently. The
script used to work before.

On Dec 9 2011, 10:46 am, Leigh Hunter <leighhunte...@gmail.com> wrote:
> Alexander,
>
> Any update on this issue?  I've been busy doing other DataPower related
> activities, however, I'm still keen to automate deployments.
>
> I created a file using the webGUI and tried to import it with dpbuddy with
> same, ERROR, result.
>
> Thanks for you assistance.
>
> Leigh
>
> On Wed, Nov 30, 2011 at 1:59 PM, Leigh Hunter <leighhunte...@gmail.com>wrote:
>
> > Alexander,
>
> > good question.
>
> > Yes, I did find the log info.
>
> >  12:46:57 mgmt error 8910688<https://172.21.67.17:9090/system/displayLog/?navFrame=false#>
> > request 10.63.46.31<https://172.21.67.17:9090/system/displayLog/?navFrame=false#>
> > 0x83a00099 <https://172.21.67.17:9090/system/displayLog/?navFrame=false#> xmlfirewall
> > (xml-mgmt): The export file '' specified as is unreadable. Import failed.
>
> > Yes, I can import the file using the webGUI.  Here's the log info to prove
> > it
>
> >  12:51:09 mgmt notice 8913280<https://172.21.67.17:9090/system/displayLog?navFrame=false#>
> > response 10.63.46.31<https://172.21.67.17:9090/system/displayLog?navFrame=false#>
> > 0x83a00073 <https://172.21.67.17:9090/system/displayLog?navFrame=false#> xmlfirewall
> > (web-mgmt): Configuration Import completed: 0/0 files and 1/1 objects and
> > 0/0 data-sets successfully imported into Domain HH_SNDBX_GTWY. Identical
> > files not selected for import : 0 .
>
> > I have attached the zip file (only contains deployment policy), build
> > file, and log.  BTW, the zip file was create by the dpbuddy export task
>
> > Thank you very much.
>
> > Leigh
>
> > On Wed, Nov 30, 2011 at 1:11 PM, Alexander 'Sasha' Ananiev <
> > alexan...@myarch.com> wrote:
>
> >> Hi Leigh,
> >> Are you able to import the same file using Web GUI? There has to be the
> >> actual error in the data power logs, perhaps in the default domain.
> >> You can reply to this message and attach the build log and other log
> >> files.
> >> Regards,
> >> -Alexander
>
> >>> Connecting to URLhttps://172.21.67.17:5550/service/mgmt/current

Leigh Hunter

unread,
Jan 4, 2012, 4:08:00 PM1/4/12
to jane wang, DataPower Buddy
No.  I had other project deliverables to create over the holidays.  When things settle down here, I want to get back to this.  Stll doing deployments manually.

Sorry to hear you are having difficulty also.  then again, it's not just me :-)

Leigh

Alexander 'Sasha' Ananiev

unread,
Jan 4, 2012, 5:52:28 PM1/4/12
to jane wang, DataPower Buddy
Jane, 
Please enable debug logging for the "mgmt" log category on the device (under Manage log targets/Even Subscription). After that rerun the dpbuddy script and let me know what you see in the logs. 
Best,
-Alexander

On Wed, Jan 4, 2012 at 3:18 PM, jane wang <jane...@gmail.com> wrote:

jw@dpbuddy

unread,
Jan 4, 2012, 8:22:22 PM1/4/12
to DataPower Buddy
In my case, I do not see logs from mgmt regarding import. I just had
couple of success run with my script and here is how I felt about it
1) Above error '...the response has to contain at least one
dp:import...' and the response

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Body>
<dp:response xmlns:dp="http://www.datapower.com/schemas/
management">
<dp:timestamp>2011-11-30T10:39:13-06:00</dp:timestamp>
<dp:result>ERROR</dp:result>
</dp:response>
</env:Body>
</env:Envelope>

at
com.myarch.datapower.ant.BaseDPTask.executeRequest(BaseDPTask.java:21
8)
at
com.myarch.datapower.ant.ImportTask.executeDPTask(ImportTask.java:56)
...

is a common error for different error import conditions. I had this
error for scenarios that the object was not imported. I also had this
same error for scenario that the object was imported successfully.
2) In my case, the error was triggered by a deployment policy name
missmatch.


On Jan 4, 5:52 pm, "Alexander 'Sasha' Ananiev" <alexan...@myarch.com>
wrote:
> Jane,
> Please enable debug logging for the "mgmt" log category on the device
> (under Manage log targets/Even Subscription). After that rerun the dpbuddy
> script and let me know what you see in the logs.
> Best,
> -Alexander
>

Alexander 'Sasha' Ananiev

unread,
Jan 4, 2012, 9:23:28 PM1/4/12
to jw@dpbuddy, DataPower Buddy
You're right, this is a generic error since DataPower does not return any information back to the client.
Could you elaborate on what you meant by the deployment policy name mismatch?
Thank you,
-Alexander

jw@dpbuddy

unread,
Jan 5, 2012, 2:56:57 PM1/5/12
to DataPower Buddy
It is one of the attribute of <dp:import deploymentPolicyName="$
{policy.name}"..... There was a typo with the policy name.

On Jan 4, 9:23 pm, "Alexander 'Sasha' Ananiev" <alexan...@myarch.com>
wrote:
> You're right, this is a generic error since DataPower does not return any
> information back to the client.
> Could you elaborate on what you meant by the deployment policy name
> mismatch?
> Thank you,
> -Alexander
>
> ...
>
> read more »

jw@dpbuddy

unread,
Jan 5, 2012, 2:57:28 PM1/5/12
to DataPower Buddy
It is one of the attribute of <dp:import deploymentPolicyName="$
{policy.name}"..... There was a typo with the policy name.

On Jan 4, 9:23 pm, "Alexander 'Sasha' Ananiev" <alexan...@myarch.com>
wrote:
> You're right, this is a generic error since DataPower does not return any
> information back to the client.
> Could you elaborate on what you meant by the deployment policy name
> mismatch?
> Thank you,

Leigh Hunter

unread,
Jan 5, 2012, 3:03:46 PM1/5/12
to jw@dpbuddy, DataPower Buddy
Hi ... glad to see there's some activity on this ... I'm busy doing defect remediation and deploy lately.

I'm curious how the deployment policy name is part of the issue?  With regard to my original post, there were no deployment policies involved, in fact, i was attempting to import the deployment policy.  Also there was an issue that the XML file worked but took a long time but the ZIP file did not.

thanks

leigh
Reply all
Reply to author
Forward
0 new messages