0

When I deploy my scala app to bluemix, I receive this error during cf start:

FAILED
Server error, status code: 400, error code: 150001, message: The app package is
invalid: bits have not been uploaded

I am using the next manifest.yml:

applications:
   - host: myname
     name: myname
     buildpack: java_buildpack
     path: target\scala-2.11\weather_sender.jar
     instances: 1
     memory: 512M

The jar itself is originated from scala, I am using sbt-assembly and building a fat jar, so it should be possible to run it anywhere. I am able to run it locally.

Update Turned out that Scala is a problem in the end. It works unless I include a library which includes scalaz. Turns out that bluemix (or is it cloud foundry?) cannot process .jar that has scalaz included. Unfortunately I have no idea how to make scalaz work with bluemix. I could try to avoid using it as I do not need it directly, but in scala world lots of libraries have dependencies on scalaz, and this means that I cannot use any of those.

I also assume that the reason why scalaz cannot work is that it has very long paths (more than 256 chars). I've seen a problem when cloud foundry could not even upload scalaz if I unpack it from .jar

Archeg
  • 8,364
  • 7
  • 43
  • 90
  • Can you try using forward slash `target/scala-2.11/weather_sender.jar` – Ram Vennam Feb 18 '16 at 16:04
  • @RamVennam Thanks for your tip. I've tried using just `weather_sender.jar` from the root, and it didn't work either. Please also see my update - I have figured some things out – Archeg Feb 18 '16 at 16:08
  • @Archeg That sounds more like [a Windows issue](http://stackoverflow.com/questions/1880321/why-does-the-260-character-path-length-limit-exist-in-windows) rather than scalaz or cloud foundry. – Dave L. Feb 19 '16 at 02:52
  • @david Not that I do not agree with you, but it is possible on windows to query [longer paths](http://stackoverflow.com/questions/10094365/how-does-java-circumvent-the-windows-max-path-winapi-limitation) This is definitely a windows issue, but given that there are ways to overcome this and windows is not getting fixing that anywhere soon, I think it is responsibility of `cloud foundry` to work around this. Also `scalaz` could just not use that big paths. One of the requirements on my day job is to limit paths to 160 chars - a must if you have to work on windows – Archeg Feb 19 '16 at 07:23

0 Answers0