Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with Box.com Invoice Demo on Tomcat #39

Open
mathiasconradt opened this issue Dec 19, 2017 · 5 comments
Open

Problems with Box.com Invoice Demo on Tomcat #39

mathiasconradt opened this issue Dec 19, 2017 · 5 comments

Comments

@mathiasconradt
Copy link

mathiasconradt commented Dec 19, 2017

I try to setup the Box.com demo and followed the instructions, but cannot get it to work properly.

Using Camunda BPM 7.8.0 CE (latest available CE I downloaded today).

I created a box.com app (actually, I tried with two: a custom app and a partner app, because I wasn't sure if it makes a difference.) using OAuth2.0 with JWT.

image

image

I configured the config.properties and saved the private_key.pem that I got from the box.com app admin interface, then built the camunda-example-invoice-box app with maven, which built the war file just fine, and deployed it. (I tried with both approaches: deploying the war file, and also deploying the exploded folder under the target directory.)

When going into the Camunda Tasklist, I do see the box window, but there are some issues:

  1. the icon b.png is missing

  2. clicking on the "Open Box Folder" doesn't do anything, and I am not sure what the html/target should look like, or if there is a click event handler supposed to be associated with this link. All that happens is that the same Camunda windows re-opens again in a new browser tab. But not box folder in sight.
    I noticed that the <a> has on href nor id. Not sure if this is supposed to be like that.

image

@mathiasconradt
Copy link
Author

An additional question which I would like to clarify: is the boxUserId parameter in the config.properties supposed to be the box userId, or the enterpriseId. Just to be sure, because app settings json in the console shows just the enterpriseId ?

image

@itlabs-eu
Copy link

I'm also interested in this topic. Thanks.

@mathiasconradt
Copy link
Author

mathiasconradt commented Jan 2, 2018

I started off with a new clean database, to be sure that the original invoice process and the box invoice process does not get mixed. I think that was one of the issues mentioned above (issue 2.)

I also made sure that only the camunda-example-invoice-box application is deployed and not the camunda-example-invoice application. I also cleared all relevant files under <tomcat>/work/Catalina/localhost/camunda-example-invoice*

Nevertheless, when I now want to start a new box invoice process, there are a few 404 errors, i.e. when selecting a local document and trying to upload it, the REST API at http://localhost:8080/camunda-invoice-box/rest/rest/upload as well as the icon http://localhost:8080/camunda-invoice-box/assets/img/ajax-loader.gif cannot be found.

image

Update:

I found the reason for the images not being found: in the html forms, the path is hardcoded to /camunda-invoice-box/..., while the example application is called camunda-example-invoice-box due to the artifactId in pom.xml. Note the example in the name.

<artifactId>camunda-example-invoice-box</artifactId>

However, the /rest/upload still fails with a 404. This is on Camunda 7.8.0 CE as well as EE with Tomcat.

Also related: #40

Update 2:

I just tried with Camunda EE 7.8.0 with WildFly 10. On there, I don't get a 404 when calling POST /rest/upload but a 505 instead:

org.jboss.resteasy.spi.UnhandledException: java.lang.ClassCastException: org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo cannot be cast to org.bouncycastle.openssl.PEMKeyPair

@felix-mueller
Copy link
Member

Hi @mathiasconradt
this example was only tested on Wildfly.
So I will leave this ticket open, so we can fix it for tomcat.

The second issue you are mentioning is probably an issue with the box.com api that needs a specific JDK extension.
I remember this one here: http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html & https://github.com/box/box-java-sdk#quickstart

Hope this helps.

@felix-mueller felix-mueller changed the title Problems with Box.com Invoice Demo Problems with Box.com Invoice Demo on Tomcat Jan 15, 2018
@mathiasconradt
Copy link
Author

@felix-mueller Confirming, it's working fine on Wildfly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants