Custom CC PostURL causes CC to not start

Hi,

I am trying to test out a custom post url on CommCare. I have set both the
PostURL and PostTestURL tags in the application profile as follows:

<property key=“PostURL” value="

http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1"
force=“true”/>

The application errors out on the startup screen with the “There was an
error. CommCare could not be started.” error message. The log file shows the
following:

java.lang.RuntimeException[No external or local definition could be found

for resource commcare-application-profile]

I’m pretty sure that the PostURLs are the issue since the application worked
just fine when they were still set to data.commcarehq.org.

I have attached program and rms files, and the profile.

thanks!
jon

omrs-test.zip (607 KB)

profile.xml (1.22 KB)

Hi Jonathan,

Clayton would know better, but I’m 95% sure that the issue is trying
to post to port 8080. Don’t think it works to put it inline with the
URL like that. Anyway you can have apache (or IIS or whatever
webserver you have available) forward requests from port 80 to Tomcat
on 8080?

Also, I assume you’ll change your password before anything goes out in
the field? It’s unlikely that anything would happen, but this is a
publicly viewable forum and passwords have a tendency not to change
once they’re in code out in the wild…

Brian

··· On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne wrote: > Hi, > I am trying to test out a custom post url on CommCare. I have set both the > PostURL and PostTestURL tags in the application profile as follows: >> >> > value="http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1" >> force="true"/> >> >> > value="http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1" >> force="true"/> > > The application errors out on the startup screen with the "There was an > error. CommCare could not be started." error message. The log file shows the > following: >> >> java.lang.RuntimeException[No external or local definition could be found >> for resource commcare-application-profile] > > I'm pretty sure that the PostURLs are the issue since the application worked > just fine when they were still set to data.commcarehq.org. > I have attached program and rms files, and the profile. > thanks! > jon

Jon and Brian,

I think that 8080 should work like this. I posted with an old version of
CommCare to one of Andy Kanter’s OpenMRS servers with a url with a port in
the HTTP address.

I’m not actually sure what’s breaking here. It’s absolutely failing to parse
the profile file because of some issue with the URL, but the error doesn’t
really make a lot of sense. I’ll check it out and get back to you.

-Clayton

··· On Wed, Dec 15, 2010 at 8:35 AM, Brian DeRenzi wrote:

Hi Jonathan,

Clayton would know better, but I’m 95% sure that the issue is trying
to post to port 8080. Don’t think it works to put it inline with the
URL like that. Anyway you can have apache (or IIS or whatever
webserver you have available) forward requests from port 80 to Tomcat
on 8080?

Also, I assume you’ll change your password before anything goes out in
the field? It’s unlikely that anything would happen, but this is a
publicly viewable forum and passwords have a tendency not to change
once they’re in code out in the wild…

Brian

On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne paynejd@gmail.com wrote:

Hi,
I am trying to test out a custom post url on CommCare. I have set both
the
PostURL and PostTestURL tags in the application profile as follows:

<property key="PostURL"
value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

<property key="PostTestURL"
value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

The application errors out on the startup screen with the “There was an
error. CommCare could not be started.” error message. The log file shows
the
following:

java.lang.RuntimeException[No external or local definition could be
found

for resource commcare-application-profile]

I’m pretty sure that the PostURLs are the issue since the application
worked
just fine when they were still set to data.commcarehq.org.
I have attached program and rms files, and the profile.
thanks!
jon

Figured it out, can’t believe I didn’t see it sooner.

You can’t have ampersand characters in XML attributes unenforced, because
they are the escape character for attribute encoding.

You need to replace each ‘&’ character with

&

As in:

http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

-Clayton

··· On Wed, Dec 15, 2010 at 4:08 PM, Clayton Sims wrote:

Jon and Brian,

I think that 8080 should work like this. I posted with an old version of
CommCare to one of Andy Kanter’s OpenMRS servers with a url with a port in
the HTTP address.

I’m not actually sure what’s breaking here. It’s absolutely failing to
parse the profile file because of some issue with the URL, but the error
doesn’t really make a lot of sense. I’ll check it out and get back to you.

-Clayton

On Wed, Dec 15, 2010 at 8:35 AM, Brian DeRenzi bderenzi@gmail.com wrote:

Hi Jonathan,

Clayton would know better, but I’m 95% sure that the issue is trying
to post to port 8080. Don’t think it works to put it inline with the
URL like that. Anyway you can have apache (or IIS or whatever
webserver you have available) forward requests from port 80 to Tomcat
on 8080?

Also, I assume you’ll change your password before anything goes out in
the field? It’s unlikely that anything would happen, but this is a
publicly viewable forum and passwords have a tendency not to change
once they’re in code out in the wild…

Brian

On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne paynejd@gmail.com wrote:

Hi,
I am trying to test out a custom post url on CommCare. I have set both
the
PostURL and PostTestURL tags in the application profile as follows:

<property key="PostURL"
value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

<property key="PostTestURL"
value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

The application errors out on the startup screen with the “There was an
error. CommCare could not be started.” error message. The log file shows
the
following:

java.lang.RuntimeException[No external or local definition could be
found

for resource commcare-application-profile]

I’m pretty sure that the PostURLs are the issue since the application
worked
just fine when they were still set to data.commcarehq.org.
I have attached program and rms files, and the profile.
thanks!
jon

Good catch Clayton. Maybe ODK had/has this problem of not being able
to submit to a url with an embedded port?

Anyway, great that it works here.

Brian

··· On Wed, Dec 15, 2010 at 2:19 PM, Clayton Sims wrote: > Figured it out, can't believe I didn't see it sooner. > You can't have ampersand characters in XML attributes unenforced, because > they are the escape character for attribute encoding. > You need to replace each '&' character with > & > As in: > http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1 > -Clayton > On Wed, Dec 15, 2010 at 4:08 PM, Clayton Sims wrote: >> >> Jon and Brian, >> I think that 8080 should work like this. I posted with an old version of >> CommCare to one of Andy Kanter's OpenMRS servers with a url with a port in >> the HTTP address. >> I'm not actually sure what's breaking here. It's absolutely failing to >> parse the profile file because of some issue with the URL, but the error >> doesn't really make a lot of sense. I'll check it out and get back to you. >> -Clayton >> >> On Wed, Dec 15, 2010 at 8:35 AM, Brian DeRenzi wrote: >>> >>> Hi Jonathan, >>> >>> Clayton would know better, but I'm 95% sure that the issue is trying >>> to post to port 8080. Don't think it works to put it inline with the >>> URL like that. Anyway you can have apache (or IIS or whatever >>> webserver you have available) forward requests from port 80 to Tomcat >>> on 8080? >>> >>> Also, I assume you'll change your password before anything goes out in >>> the field? It's unlikely that anything would happen, but this is a >>> publicly viewable forum and passwords have a tendency not to change >>> once they're in code out in the wild... >>> >>> Brian >>> >>> >>> On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne wrote: >>> > Hi, >>> > I am trying to test out a custom post url on CommCare. I have set both >>> > the >>> > PostURL and PostTestURL tags in the application profile as follows: >>> >> >>> >> >> >> >>> >> value="http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1" >>> >> force="true"/> >>> >> >>> >> >> >> >>> >> value="http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1" >>> >> force="true"/> >>> > >>> > The application errors out on the startup screen with the "There was an >>> > error. CommCare could not be started." error message. The log file >>> > shows the >>> > following: >>> >> >>> >> java.lang.RuntimeException[No external or local definition could be >>> >> found >>> >> for resource commcare-application-profile] >>> > >>> > I'm pretty sure that the PostURLs are the issue since the application >>> > worked >>> > just fine when they were still set to data.commcarehq.org. >>> > I have attached program and rms files, and the profile. >>> > thanks! >>> > jon >> > >

Can’t believe I didn’t catch the ampersand either! The application now opens
without error.

Thanks,
Jon

··· On Wed, Dec 15, 2010 at 9:33 PM, Brian DeRenzi wrote:

Good catch Clayton. Maybe ODK had/has this problem of not being able
to submit to a url with an embedded port?

Anyway, great that it works here.

Brian

On Wed, Dec 15, 2010 at 2:19 PM, Clayton Sims csims@dimagi.com wrote:

Figured it out, can’t believe I didn’t see it sooner.
You can’t have ampersand characters in XML attributes unenforced, because
they are the escape character for attribute encoding.
You need to replace each ‘&’ character with
&
As in:

http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

-Clayton
On Wed, Dec 15, 2010 at 4:08 PM, Clayton Sims csims@dimagi.com wrote:

Jon and Brian,
I think that 8080 should work like this. I posted with an old version of
CommCare to one of Andy Kanter’s OpenMRS servers with a url with a port
in

the HTTP address.
I’m not actually sure what’s breaking here. It’s absolutely failing to
parse the profile file because of some issue with the URL, but the error
doesn’t really make a lot of sense. I’ll check it out and get back to
you.

-Clayton

On Wed, Dec 15, 2010 at 8:35 AM, Brian DeRenzi bderenzi@gmail.com wrote:

Hi Jonathan,

Clayton would know better, but I’m 95% sure that the issue is trying
to post to port 8080. Don’t think it works to put it inline with the
URL like that. Anyway you can have apache (or IIS or whatever
webserver you have available) forward requests from port 80 to Tomcat
on 8080?

Also, I assume you’ll change your password before anything goes out in
the field? It’s unlikely that anything would happen, but this is a
publicly viewable forum and passwords have a tendency not to change
once they’re in code out in the wild…

Brian

On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne paynejd@gmail.com wrote:

Hi,
I am trying to test out a custom post url on CommCare. I have set
both

the
PostURL and PostTestURL tags in the application profile as follows:

<property key=“PostURL”

value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

<property key=“PostTestURL”

value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

The application errors out on the startup screen with the "There was
an

error. CommCare could not be started." error message. The log file
shows the
following:

java.lang.RuntimeException[No external or local definition could be
found
for resource commcare-application-profile]

I’m pretty sure that the PostURLs are the issue since the application
worked
just fine when they were still set to data.commcarehq.org.
I have attached program and rms files, and the profile.
thanks!
jon

Can’t believe I didn’t catch the ampersand either! The application now opens
without error.

Thanks,
Jon

··· On Wed, Dec 15, 2010 at 9:33 PM, Brian DeRenzi wrote:

Good catch Clayton. Maybe ODK had/has this problem of not being able
to submit to a url with an embedded port?

Anyway, great that it works here.

Brian

On Wed, Dec 15, 2010 at 2:19 PM, Clayton Sims csims@dimagi.com wrote:

Figured it out, can’t believe I didn’t see it sooner.
You can’t have ampersand characters in XML attributes unenforced, because
they are the escape character for attribute encoding.
You need to replace each ‘&’ character with
&
As in:

http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

-Clayton
On Wed, Dec 15, 2010 at 4:08 PM, Clayton Sims csims@dimagi.com wrote:

Jon and Brian,
I think that 8080 should work like this. I posted with an old version of
CommCare to one of Andy Kanter’s OpenMRS servers with a url with a port
in

the HTTP address.
I’m not actually sure what’s breaking here. It’s absolutely failing to
parse the profile file because of some issue with the URL, but the error
doesn’t really make a lot of sense. I’ll check it out and get back to
you.

-Clayton

On Wed, Dec 15, 2010 at 8:35 AM, Brian DeRenzi bderenzi@gmail.com wrote:

Hi Jonathan,

Clayton would know better, but I’m 95% sure that the issue is trying
to post to port 8080. Don’t think it works to put it inline with the
URL like that. Anyway you can have apache (or IIS or whatever
webserver you have available) forward requests from port 80 to Tomcat
on 8080?

Also, I assume you’ll change your password before anything goes out in
the field? It’s unlikely that anything would happen, but this is a
publicly viewable forum and passwords have a tendency not to change
once they’re in code out in the wild…

Brian

On Wed, Dec 15, 2010 at 4:45 AM, Jonathan Payne paynejd@gmail.com wrote:

Hi,
I am trying to test out a custom post url on CommCare. I have set
both

the
PostURL and PostTestURL tags in the application profile as follows:

<property key=“PostURL”

value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

<property key=“PostTestURL”

value=“
http://173.201.25.111:8080/openmrs/module/xforms/xformDataUpload.form?uname=admin&pw=Opendtree1

force=“true”/>

The application errors out on the startup screen with the "There was
an

error. CommCare could not be started." error message. The log file
shows the
following:

java.lang.RuntimeException[No external or local definition could be
found
for resource commcare-application-profile]

I’m pretty sure that the PostURLs are the issue since the application
worked
just fine when they were still set to data.commcarehq.org.
I have attached program and rms files, and the profile.
thanks!
jon