Comments (4)
Hi @ChrisNeveu
I can't seem to be able to reproduce the issue.
this is the spec I'm running:
it should "support uploading with eager async transformations" taggedAs(EagerTest) in {
val eagerTransforms = List(Transformation().c_("scale").w_(0.5), Transformation().c_("scale").w_(0.4))
val uploadParams = UploadParameters().eager(eagerTransforms).eagerAsync(true)
Await.result(for {
response <- cloudinary.uploader().upload("http://cloudinary.com/images/logo.png", uploadParams)
} yield {
response.eager.length should equal(2)
}, 10.seconds)
}
Can you please try to run it in your environment?
Are you using a different json4s version from 3.2.10? Do you perhaps have dependency on more than one version?
from cloudinary_scala.
We only depend on json4s through Cloudinary.
The following example throws an exception in our code:
val eagerTransforms = List(Transformation())
val uploadParams = UploadParameters().eager(eagerTransforms).eagerAsync(true).tags(Set())
Await.result(for {
response <- cloudinary.uploader().upload("http://i.kinja-img.com/gawker-media/image/upload/tragfjufpswym5ilco8e.jpg", uploadParams)
} yield {
response.raw
}, 10.seconds)
I tried to write a test to confirm but your test suite does not work for me. Every test throws a NullPointerException
[info] An Uploader
[info] - should upload a file and get sizes, colors, predominant, public_id, version and signature back *** FAILED ***
[info] java.lang.NullPointerException:
[info] at java.net.URI$Parser.parse(URI.java:3023)
[info] at java.net.URI.<init>(URI.java:595)
[info] at com.cloudinary.Cloudinary$.configFromUrl(Cloudinary.scala:20)
[info] at com.cloudinary.Cloudinary.<init>(Cloudinary.scala:129)
[info] at com.cloudinary.UploaderSpec.cloudinary$lzycompute(UploaderSpec.scala:19)
[info] at com.cloudinary.UploaderSpec.cloudinary(UploaderSpec.scala:18)
[info] at com.cloudinary.UploaderSpec$$anonfun$1.apply$mcV$sp(UploaderSpec.scala:30)
[info] at com.cloudinary.UploaderSpec$$anonfun$1.apply(UploaderSpec.scala:28)
[info] at com.cloudinary.UploaderSpec$$anonfun$1.apply(UploaderSpec.scala:28)
[info] at org.scalatest.Transformer$$anonfun$apply$1.apply$mcV$sp(Transformer.scala:22)
from cloudinary_scala.
It might also be worth mentioning that we are constructing our Cloudinary
instance with a cname:
private lazy val cloud = new Cloudinary(Map(
"cloud_name" -> apiName,
"api_key" -> apiKey,
"api_secret" -> apiSec,
"cname" -> "i.kinja-img.com"))
from cloudinary_scala.
After a lot more testing, we've discovered the cause of the issue. While we weren't depending on a different version of json4s, we were depending on the same version down the line. Something with how this all got packaged up was messing with json4s' reflection and causing the exception. We've removed our dependency, instead relying on the implicit dependency from the cloudinary_scala library and everything works now.
from cloudinary_scala.
Related Issues (20)
- Sample for multiple file upload
- Do not use snapshot version to publish lib HOT 1
- UNRESOLVED DEPENDENCY HOT 2
- jshint error
- CloudinaryPlugin Constructor Issue HOT 4
- How do I specify named transformations in play views? HOT 1
- README dependency location is wrong HOT 4
- Can't resolve dependency from maven on sonatype HOT 1
- Can't upload message HOT 2
- Publish for scala 2.12 HOT 7
- Upload large video HOT 4
- Play plugin dependency failing HOT 5
- Update to support Scala 2.13 HOT 1
- Support playframework 2.8 HOT 1
- Play compilation error caused by trailing comma in jquery.cloudinary.js HOT 2
- Unresloved dependencies: Can't build with Play framework HOT 5
- scala 2.11 ? HOT 1
- Missing support for Play 2.3 HOT 2
- CloudinaryPlugin should support CLOUDINARY_URL HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cloudinary_scala.