{"action":"closed","issue":{"url":"https://api.github.com/repos/yogthos/clj-pdf/issues/42","labels_url":"https://api.github.com/repos/yogthos/clj-pdf/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/yogthos/clj-pdf/issues/42/comments","events_url":"https://api.github.com/repos/yogthos/clj-pdf/issues/42/events","html_url":"https://github.com/yogthos/clj-pdf/issues/42","id":54716236,"number":42,"title":"Error: Invalid or corrupt jarfile","user":{"login":"adamneilson","id":1318407,"avatar_url":"https://avatars.githubusercontent.com/u/1318407?v=3","gravatar_id":"","url":"https://api.github.com/users/adamneilson","html_url":"https://github.com/adamneilson","followers_url":"https://api.github.com/users/adamneilson/followers","following_url":"https://api.github.com/users/adamneilson/following{/other_user}","gists_url":"https://api.github.com/users/adamneilson/gists{/gist_id}","starred_url":"https://api.github.com/users/adamneilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamneilson/subscriptions","organizations_url":"https://api.github.com/users/adamneilson/orgs","repos_url":"https://api.github.com/users/adamneilson/repos","events_url":"https://api.github.com/users/adamneilson/events{/privacy}","received_events_url":"https://api.github.com/users/adamneilson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-19T00:22:36Z","updated_at":"2015-01-19T00:36:37Z","closed_at":"2015-01-19T00:36:37Z","body":"I have an error when trying to run a standalone jar when `[clj-pdf \"1.11.26\"]` is in the dependencies list. My project is an API built using Liberator that generates a PDF invoice after a trade and sends this as an attachment via email to the customer. \r\n\r\nDeveloping this locally on OSX I use `lein uberjar` to build the project and then using the following command: `$ java -javaagent:/usr/local/myproject/newrelic.jar -jar target/myproject-0.8.16-standalone.jar &` it runs without any issues.\r\n\r\nIf I then take that exact same jar file over to the production environment (Ubuntu 12.04) and try to run it I get the following error:\r\n```\r\n$ java -javaagent:/usr/local/myproject/newrelic.jar -jar target/myproject-0.8.16-standalone.jar &\r\n$ Error: Invalid or corrupt jarfile target/myproject-0.8.16-standalone.jar\r\n```\r\n\r\nI also tried creating the jar on the server and it compiles and packages itself correctly but again complains about an invalid jar when I try to run it.\r\n\r\nWhen I remove the clj-pdf (and the pdf generator function) the project builds and runs without issue.\r\n\r\nJava version is the following:\r\n\r\n```\r\njava version \"1.7.0_65\"\r\nOpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.12.04.1)\r\nOpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)\r\n```\r\n\r\nThis suggests the problem is with the JVM so I did a bit of searching around the interwebs for a clue as to what might be causing this.\r\n\r\nFirst off I tried swapping the order of the dependencies as mentioned as a solution in a similar error [here](http://stackoverflow.com/questions/13021423/invalid-or-corrupt-jar-file-built-by-maven-shade-plugin). This didn't help.\r\n\r\nI then found [this blog post](http://dan.bodar.com/2014/02/17/error-invalid-or-corrupt-jarfile/) which suggested starting the service this way: \r\n\r\n```\r\njava -javaagent:/usr/local/myproject/newrelic.jar -cp target/myproject-0.8.16-standalone.jar myproject.core\r\n```\r\n\r\nThis worked. But I don't really understand why.\r\n\r\nBefore I go and update all my deployment scripts to the alternative command I was wondering if this was a known issue?\r\n\r\n\r\n"}}