Weird (unicode?) characters - unicode
A user has been posting some weird characters on my site and I'd like to block them from doing so but without blocking characters used in foreign languages... Therefore, using a regex such as [a-z0-9!##$%^&*()...] isn't an option.
Could someone explain to me what is happening here, a break down of why it displays the way it does. How the characters are created and how can I prevent them from doing it?
♥̧̧̧̛̣̘̟̘̥͓̫̪̹̪̪̮̯̞̘̙̦̝̭̭͕̜̰̩̗̟̹͔̜̥̟̗̗̥̦̠̖̫͕̺̻̞̥̹͇̱̥̥̻͇̦̙̣͊͗̉̽̈́̉͑̀́̃͒̏͋̃̅̇̊̏̎̈́͊͐̉͑̄̌̉́̈́́́̅̇͌̽̽͗́̄̾̓̈́̇̅͛́̈́͐̽̔̌̋̌̾́̿͌̔͊͆̈́̉́̎̔̊͗̊̂̎̍̏̈̀̏͋͌̋̽̄̐̽͐̀͘̕̕͘̕̚̚̚͘͜͜͜͠͝͠͝͠͝
Thanks
EDIT: So they're used to accent characters? Is there a common practice or way to prevent users from exploiting them without blocking them completely? I don't know enough about foreign languages or their actual use/purpose so crafting something to limit the use of the combining characters is outside my scope of possibilities. :-/
These are combining diacritical marks. For the character é e-acute you can represent it using either the code point U+00E9 (LATIN_SMALL_LETTER_E_WITH_ACUTE) or the sequence U+0065 U+0301 (LATIN_SMALL_LETTER_E COMBINING_ACUTE_ACENT) where the text renderer places the accent above the preceding code point.
The user is exploiting this with a sequence of combining marks:
codepoint glyph escaped UTF-8 info
=======================================================================
U+2665 ♥ \u2665 e2,99,a5, MISCELLANEOUS_SYMBOLS, OTHER_SYMBOL
U+034a ͊ \u034a cd,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0360 ͠ \u0360 cd,a0, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0357 ͗ \u0357 cd,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0309 ̉ \u0309 cc,89, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0309 ̉ \u0309 cc,89, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0351 ͑ \u0351 cd,91, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0340 ̀ \u0340 cd,80, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035d ͝ \u035d cd,9d, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0303 ̃ \u0303 cc,83, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0352 ͒ \u0352 cd,92, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030f ̏ \u030f cc,8f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034b ͋ \u034b cd,8b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0303 ̃ \u0303 cc,83, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0305 ̅ \u0305 cc,85, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0307 ̇ \u0307 cc,87, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030a ̊ \u030a cc,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030f ̏ \u030f cc,8f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030e ̎ \u030e cc,8e, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034a ͊ \u034a cd,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0350 ͐ \u0350 cd,90, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0309 ̉ \u0309 cc,89, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0351 ͑ \u0351 cd,91, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0304 ̄ \u0304 cc,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030c ̌ \u030c cc,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0309 ̉ \u0309 cc,89, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0341 ́ \u0341 cd,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0305 ̅ \u0305 cc,85, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0307 ̇ \u0307 cc,87, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034c ͌ \u034c cd,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0357 ͗ \u0357 cd,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0360 ͠ \u0360 cd,a0, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0304 ̄ \u0304 cc,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033e ̾ \u033e cc,be, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0343 ̓ \u0343 cd,83, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0307 ̇ \u0307 cc,87, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0358 ͘ \u0358 cd,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0305 ̅ \u0305 cc,85, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035d ͝ \u035d cd,9d, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035b ͛ \u035b cd,9b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0350 ͐ \u0350 cd,90, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0314 ̔ \u0314 cc,94, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030c ̌ \u030c cc,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030b ̋ \u030b cc,8b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030c ̌ \u030c cc,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033e ̾ \u033e cc,be, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0360 ͠ \u0360 cd,a0, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0301 ́ \u0301 cc,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033f ̿ \u033f cc,bf, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034c ͌ \u034c cd,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0314 ̔ \u0314 cc,94, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0315 ̕ \u0315 cc,95, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034a ͊ \u034a cd,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0346 ͆ \u0346 cd,86, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0344 ̈́ \u0344 cd,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0309 ̉ \u0309 cc,89, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035d ͝ \u035d cd,9d, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0341 ́ \u0341 cd,81, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0315 ̕ \u0315 cc,95, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030e ̎ \u030e cc,8e, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0314 ̔ \u0314 cc,94, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030a ̊ \u030a cc,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0357 ͗ \u0357 cd,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0358 ͘ \u0358 cd,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030a ̊ \u030a cc,8a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0315 ̕ \u0315 cc,95, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0302 ̂ \u0302 cc,82, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030e ̎ \u030e cc,8e, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030d ̍ \u030d cc,8d, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030f ̏ \u030f cc,8f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0308 ̈ \u0308 cc,88, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0340 ̀ \u0340 cd,80, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030f ̏ \u030f cc,8f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031a ̚ \u031a cc,9a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034b ͋ \u034b cd,8b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031a ̚ \u031a cc,9a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031a ̚ \u031a cc,9a, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+034c ͌ \u034c cd,8c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+030b ̋ \u030b cc,8b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0304 ̄ \u0304 cc,84, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0310 ̐ \u0310 cc,90, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033d ̽ \u033d cc,bd, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0350 ͐ \u0350 cd,90, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031b ̛ \u031b cc,9b, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0358 ͘ \u0358 cd,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0300 ̀ \u0300 cc,80, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0323 ̣ \u0323 cc,a3, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0318 ̘ \u0318 cc,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031f ̟ \u031f cc,9f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035c ͜ \u035c cd,9c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0318 ̘ \u0318 cc,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035c ͜ \u035c cd,9c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0353 ͓ \u0353 cd,93, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032b ̫ \u032b cc,ab, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032a ̪ \u032a cc,aa, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0339 ̹ \u0339 cc,b9, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032a ̪ \u032a cc,aa, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032a ̪ \u032a cc,aa, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+035c ͜ \u035c cd,9c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032e ̮ \u032e cc,ae, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032f ̯ \u032f cc,af, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0327 ̧ \u0327 cc,a7, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031e ̞ \u031e cc,9e, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0318 ̘ \u0318 cc,98, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0319 ̙ \u0319 cc,99, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0326 ̦ \u0326 cc,a6, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031d ̝ \u031d cc,9d, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032d ̭ \u032d cc,ad, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032d ̭ \u032d cc,ad, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0355 ͕ \u0355 cd,95, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031c ̜ \u031c cc,9c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0330 ̰ \u0330 cc,b0, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0329 ̩ \u0329 cc,a9, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0317 ̗ \u0317 cc,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031f ̟ \u031f cc,9f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0339 ̹ \u0339 cc,b9, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0354 ͔ \u0354 cd,94, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031c ̜ \u031c cc,9c, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031f ̟ \u031f cc,9f, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0317 ̗ \u0317 cc,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0317 ̗ \u0317 cc,97, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0326 ̦ \u0326 cc,a6, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0320 ̠ \u0320 cc,a0, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0316 ̖ \u0316 cc,96, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+032b ̫ \u032b cc,ab, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0355 ͕ \u0355 cd,95, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033a ̺ \u033a cc,ba, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0327 ̧ \u0327 cc,a7, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033b ̻ \u033b cc,bb, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+031e ̞ \u031e cc,9e, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0327 ̧ \u0327 cc,a7, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0339 ̹ \u0339 cc,b9, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0347 ͇ \u0347 cd,87, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0331 ̱ \u0331 cc,b1, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0325 ̥ \u0325 cc,a5, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+033b ̻ \u033b cc,bb, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0347 ͇ \u0347 cd,87, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0326 ̦ \u0326 cc,a6, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0319 ̙ \u0319 cc,99, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
U+0323 ̣ \u0323 cc,a3, COMBINING_DIACRITICAL_MARKS, NON_SPACING_MARK
Some points I made in the comments:
The Unicode standard considers all sequences of code points to be valid if not meaningful (see chapter 2 of Unicode 6)
Unicode does not describe how code points should be displayed - that's up to the text rendering technology
Normalizing to NFC and matching on code point category are likely to be useful for detecting redundant diacritics
You can create sequences like the one above using browser consoles
Just type in a UTF-16 JavaScript string literal like "\u2665\u034a\u0360\u0357"
You can just use the code point value from the charts for anything in the basic multilingual plane
For anything outside the BMP you'll have to translate the code points to UTF-16
Blocking these codepoints may be enough for you:
http://en.wikipedia.org/wiki/Combining_character#Unicode_ranges
Allowing users to "post weird characters" probably allows them to do much more damage than just strange-looking text. Check e.g. for cross-site-scripting and similar attacks. Make sure whatever you are using to handle this functionality is up to snuff (security-wise) and well-configured. That should get rid of the problem you are worried about as a side effect.
Related
What is the difference between jetty:start and jetty:quickstart in xsbt-web-plugin
I am running a scala 2.11.12 app on lift 3.3.0 built with sbt 1.3.8. I have tried 4.0.3 and 4.2.0 of xsbt-web-plugin. My app launches fine when I use jetty:start but when I use jetty:quickstart it fails to launch - I get a 500 error in the browser and when I check the application log in the console I see java.lang.NoSuchMethodError: 'int javax.servlet.http.HttpServletResponse.getStatus()' which causes the jetty instance to give back a 500. ** edit ive gone back further in my logile What is the difference between how quickstart runs and how start runs? I cant figure out the problem. Below is my build.sbt in case it helps. Below that Ive include the console logs for the request in jetty:quickstart showing the error Im getting. I dont get this error for jetty:start. ** edit 2 Ive jun jetty:start then show update, and jetty:quickstart then show update. They both have javax.servlet:servlet-api:2.5:default as a dependency. But jetty:start works fine and starts the container, while jetty:quickstart fails to initialize the container. I'm at a loss to understand why one works and one fails - it seems to me both should fail. ** edit 3 I figured out why servlet-api 2.5 was coming in, and have updated the paypal dependencies to fix that. I'd still love to know why jetty:start worked but jetty:quickstart didnt - they both seemingly should've failed. build.sbt name := "knot-core" organization := "com.postrope" version := "0.0.1" scalaVersion := "2.11.12" excludeFilter := HiddenFileFilter -- ".ebextensions" resolvers ++= Seq( "Sonatype scala-tools releases" at "https://oss.sonatype.org/content/repositories/releases", "Sonatype scala-tools snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" ) scalacOptions ++= Seq("-unchecked", "-deprecation", "-feature") libraryDependencies ++= { val liftVersion = "3.3.0" Seq( "net.liftweb" %% "lift-webkit" % liftVersion % "compile", "net.liftweb" %% "lift-mapper" % liftVersion % "compile", "junit" % "junit" % "4.7" % "test", "ch.qos.logback" % "logback-core" % "1.0.0", "ch.qos.logback" % "logback-classic" % "1.0.0", "mysql" % "mysql-connector-java" % "8.0.19", "org.ccil.cowan.tagsoup" % "tagsoup" % "1.2", "net.liftmodules" %% "paypal_3.0" % "1.3.0", "com.paypal.sdk" % "adaptivepaymentssdk" % "2.6.110", "com.paypal.sdk" % "adaptiveaccountssdk" % "2.4.106", "org.apache.solr" % "solr-solrj" % "4.4.0", "org.imgscalr" % "imgscalr-lib" % "4.2", "org.jsoup" % "jsoup" % "1.7.3", "com.amazonaws" % "aws-java-sdk" % "1.7.3", "org.seleniumhq.selenium" % "selenium-java" % "3.9.1", "org.seleniumhq.selenium" % "selenium-chrome-driver" % "3.9.1", "org.scalatest" %% "scalatest" % "3.1.1" % "test", "net.databinder.dispatch" %% "dispatch-core" % "0.11.2", "net.databinder" %% "dispatch-core" % "0.8.10", "net.databinder" %% "dispatch-http" % "0.8.10", "net.databinder" %% "dispatch-oauth" % "0.8.10", "net.databinder" %% "dispatch-http-json" % "0.8.10" ) } enablePlugins(JettyPlugin) javaOptions in Jetty ++= Seq( "-Xdebug", "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000" ) //jRebel class reload support Seq(JRebelPlugin.jrebelSettings: _*) jrebelWebLinks += (sourceDirectory in Compile).value / "webapp" jrebelEnabled := true javaOptions in Jetty ++= Seq( "-agentpath:C:\\Users\\drewb\\tools\\jrebel-2020.2.0\\lib\\jrebel64.dll", ) Error in jetty:quickstart 02:03:55.221 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - REQUEST for //localhost:8080/ on HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=1} GET //localhost:8080/ HTTP/1.1 Host: localhost:8080 Connection: keep-alive Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Sec-Fetch-Site: same-origin Sec-Fetch-Mode: navigate Sec-Fetch-User: ?1 Sec-Fetch-Dest: document Referer: http://localhost:8080/ Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Cookie: _ga=GA1.1.498072716.1587178043; _gid=GA1.1.223715266.1587738288; JSESSIONID=node01b1y37p1yogb5tgcxs7c0pofr0.node0; _gat=1 02:03:55.221 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=2} onContentComplete 02:03:55.222 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=3} onRequestComplete 02:03:55.222 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpInput - HttpInputOverHTTP#243824e[c=0,q=0,[0]=null,s=STREAM] addContent EOF 02:03:55.222 [qtp101874302-67] DEBUG o.e.jetty.server.HttpConnection - HttpConnection#70d9094a::SocketChannelEndPoint#7785c24d{/0:0:0:0:0:0:0:1:55305<->/0:0:0:0:0:0:0:1:8080,OPEN,fill=-,flush=-,to=19/30000}{io=0/0,kio=0,kro=1}->HttpConnection#70d9094a[p=HttpParser{s=END,0 of -1},g=HttpGenerator#43f6ae01{s=START}]=>HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=3} parsed true HttpParser{s=END,0 of -1} 02:03:55.223 [qtp101874302-67] DEBUG o.e.jetty.server.HttpConnection - releaseRequestBuffer HttpConnection#70d9094a::SocketChannelEndPoint#7785c24d{/0:0:0:0:0:0:0:1:55305<->/0:0:0:0:0:0:0:1:8080,OPEN,fill=-,flush=-,to=19/30000}{io=0/0,kio=0,kro=1}->HttpConnection#70d9094a[p=HttpParser{s=END,0 of -1},g=HttpGenerator#43f6ae01{s=START}]=>HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=4} 02:03:55.224 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=IDLE,uri=//localhost:8080/,age=5} handle //localhost:8080/ 02:03:55.224 [qtp101874302-67] DEBUG o.e.jetty.server.HttpChannelState - handling HttpChannelState#69b6a9e2{s=IDLE a=NOT_ASYNC i=true r=IDLE w=false} 02:03:55.227 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=DISPATCHED,uri=//localhost:8080/,age=8} action DISPATCH 02:03:55.229 [qtp101874302-67] DEBUG org.eclipse.jetty.server.Server - REQUEST GET / on HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=DISPATCHED,uri=//localhost:8080/,age=10} 02:03:55.229 [qtp101874302-67] DEBUG o.e.j.server.handler.ContextHandler - scope null||/ # o.e.j.w.WebAppContext#1a45193b{/,file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/,UNAVAILABLE}{file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/} 02:03:55.232 [qtp101874302-67] WARN org.eclipse.jetty.server.HttpChannel - / java.lang.NoSuchMethodError: 'int javax.servlet.http.HttpServletResponse.getStatus()' at org.eclipse.jetty.server.handler.ErrorHandler.doError(ErrorHandler.java:138) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ErrorHandler.handle(ErrorHandler.java:74) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Response.sendError(Response.java:454) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Response.sendError(Response.java:391) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.checkContext(ContextHandler.java:1108) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1149) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:374) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] 02:03:55.232 [qtp101874302-67] DEBUG o.e.jetty.server.HttpChannelState - onError HttpChannelState#69b6a9e2{s=DISPATCHED a=NOT_ASYNC i=true r=IDLE w=false} {} 02:03:55.232 [qtp101874302-67] DEBUG o.e.jetty.server.HttpChannelState - unhandle HttpChannelState#69b6a9e2{s=THROWN a=NOT_ASYNC i=true r=IDLE w=false} 02:03:55.232 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=DISPATCHED,uri=//localhost:8080/,age=13} action ERROR_DISPATCH 02:03:55.234 [qtp101874302-67] DEBUG org.eclipse.jetty.server.Server - ERROR GET / on HttpChannelOverHttp#c1f8711{r=1,c=false,c=false/false,a=DISPATCHED,uri=//localhost:8080/,age=15} 02:03:55.234 [qtp101874302-67] DEBUG o.e.j.server.handler.ContextHandler - scope null||/ # o.e.j.w.WebAppContext#1a45193b{/,file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/,UNAVAILABLE}{file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/} 02:03:55.234 [qtp101874302-67] DEBUG o.e.j.server.handler.ContextHandler - context=||/ # o.e.j.w.WebAppContext#1a45193b{/,file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/,UNAVAILABLE}{file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/} 02:03:55.236 [qtp101874302-67] DEBUG o.e.j.servlet.ErrorPageErrorHandler - getErrorPage(GET /) => error_page=null (from global default) 02:03:55.236 [qtp101874302-67] DEBUG o.e.j.server.handler.ErrorHandler - No Error Page mapping for request(GET /) (using default) 02:03:55.237 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - Could not perform ERROR dispatch, aborting java.lang.NoSuchMethodError: 'int javax.servlet.http.HttpServletResponse.getStatus()' at org.eclipse.jetty.server.handler.ErrorHandler.doError(ErrorHandler.java:138) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ErrorHandler.handle(ErrorHandler.java:74) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Response.sendError(Response.java:454) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.AbstractHandler.doError(AbstractHandler.java:93) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.__doHandle(ContextHandler.java:1301) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:42003) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:190) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1204) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Server.handle(Server.java:494) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:429) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:268) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:782) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:918) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na] 02:03:55.238 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - sendResponse info=null content=HeapByteBuffer#47b52cca[p=0,l=0,c=0,r=0]={<<<>>>} complete=false committing=true callback=Blocker#4483efeb{null} 02:03:55.238 [qtp101874302-67] DEBUG org.eclipse.jetty.server.HttpChannel - COMMIT for / on HttpChannelOverHttp#c1f8711{r=1,c=true,c=false/false,a=DISPATCHED,uri=//localhost:8080/,age=19} 500 null HTTP/1.1 Container initialisation error 11:21:49.793 [main] DEBUG o.eclipse.jetty.webapp.WebAppContext - isServerClass==true class org.eclipse.jetty.annotations.ServletContainerInitializersStarter 11:21:49.793 [main] WARN o.e.j.u.component.AbstractLifeCycle - FAILED ServletContainerInitializersStarter#285f09de{FAILED}: java.lang.NoSuchMethodError: 'javax.servlet.descriptor.JspConfigDescriptor javax.servlet.ServletContext.getJspConfigDescriptor()' java.lang.NoSuchMethodError: 'javax.servlet.descriptor.JspConfigDescriptor javax.servlet.ServletContext.getJspConfigDescriptor()' at org.apache.jasper.servlet.TldScanner.scanJspConfig(TldScanner.java:158) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.apache.jasper.servlet.TldScanner.scan(TldScanner.java:102) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.apache.jasper.servlet.JasperInitializer.onStartup(JasperInitializer.java:101) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.plus.annotation.ContainerInitializer.callStartup(ContainerInitializer.java:141) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.annotations.ServletContainerInitializersStarter.doStart(ServletContainerInitializersStarter.java:64) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:342) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1443) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1407) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:821) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:276) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:524) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Server.start(Server.java:407) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:110) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:106) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.server.Server.doStart(Server.java:371) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.runner.Runner.run(Runner.java:520) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] at org.eclipse.jetty.runner.Runner.main(Runner.java:565) ~[jetty-runner-9.4.20.v20190813.jar:9.4.20.v20190813] 11:21:49.794 [main] WARN o.eclipse.jetty.webapp.WebAppContext - Failed startup of context o.e.j.w.WebAppContext#4bd1f8dd{/,file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/,UNAVAILABLE}{file:///C:/Users/drewb/IdeaProjects/knot-alpha/src/main/webapp/
The jetty:start and jetty:quickstart commands both come from xsbt-web-plugin. Note that jetty:quickstart is unrelated to the Quickstart Webapps feature of Jetty. The main difference between the two is that start builds a complete package of your project and quickstart does not. With quickstart, no .war file is created, your classes are not packaged up in a .jar file, etc. With quickstart, Jetty is run using your project's runtime classpath as managed by sbt. With start, Jetty is run with only your project's package, and the dependencies it contains as .jar files. These can differ, as sbt's runtime classpath will include dependencies in the provided scope, while your package will not. This is why one is working for you, and the other is not. Your error: java.lang.NoSuchMethodError: 'int javax.servlet.http.HttpServletResponse.getStatus()' Indicates that you have a version conflict between the servlet-api .jar on your classpath, and the one that Jetty expects. One or more of your project's dependencies must have a transitive dependency on an old version of servlet-api. There are multiple ways to inspect the dependency tree. Using Coursier, I see that your two Paypal libraries both depend on servlet-api 2.5: ├─ com.paypal.sdk:adaptiveaccountssdk:2.4.106 │ └─ com.paypal.sdk:paypal-core:1.4.4 │ ├─ com.google.code.gson:gson:2.2.2 -> 2.8.2 (possible incompatibility) │ ├─ commons-codec:commons-codec:1.6 -> 1.11 (possible incompatibility) │ └─ javax.servlet:servlet-api:2.5 ├─ com.paypal.sdk:adaptivepaymentssdk:2.6.110 │ └─ com.paypal.sdk:paypal-core:1.4.4 │ ├─ com.google.code.gson:gson:2.2.2 -> 2.8.2 (possible incompatibility) │ ├─ commons-codec:commons-codec:1.6 -> 1.11 (possible incompatibility) │ └─ javax.servlet:servlet-api:2.5 This needs to be excluded, as it is too old for the version of Jetty you're using. There are multiple ways to exclude transitive dependencies in sbt. By adding exclude("javax.servlet", "servlet-api") to both of your Paypal dependencies, we can block the conflicting version of servlet-api: "com.paypal.sdk" % "adaptivepaymentssdk" % "2.6.110" exclude("javax.servlet", "servlet-api"), "com.paypal.sdk" % "adaptiveaccountssdk" % "2.4.106" exclude("javax.servlet", "servlet-api"), You'll also want to add a recent one to provided scope so your code can compile: libraryDependencies += "javax.servlet" % "javax.servlet-api" % "3.0.1" % "provided"
Telugu Anu Script Text
About Indian language script which is losing characters when copy/pasted to browsers I need to know about the character types and conversion of them to different supportable formats. My question is — I have text which is typed using Anu Script Software with Apple Keyboard. The text which is typed using Anu, cannot be used as input at any type of browsers or web WhatsApp also. Can anyone solve this The Text copied and Pasted displays like this:- And the Real Text is as shown as in the Below Screenshot:- This image shows one language of India, typed using Anu Script Software
The character codes that were copied and pasted into the question are Unicode code points in the Unicode BMP (Basic Multilingual Plane) Private Use Area (PUA). The distinct points are: U+F020, U+F026, U+F02B, U+F03C, U+F054, U+F058, U+F05C, U+F06A U+F073, U+F075, U+F077, U+F079, U+F080, U+F083, U+F087, U+F088 U+F08A, U+F090, U+F091, U+F09F, U+F0B2, U+F0BC, U+F0BF, U+F0C2 U+F0D2, U+F0D4, U+F0E1, U+F0E6, U+F0E7, U+F0EC, U+F0FB If you go to the Unicode Charts page and enter 'F020' as the code, it gives you UE000.pdf to download, which says: Private Use Area Range: E000-F8FF The Private Use Area does not contain any character assignments, consequently no character code charts or names lists are provided for this area. What this means is that the Anu Script Software is using Unicode points that have no international agreed meaning — the BMP PUA is, by definition, for 'private use' and the parties sharing data using the PUA must agree on what the code points mean and how to display them. They only work with software that understands the convention. You cannot use these code points except with software that understands what Anu Script Software does. Browsers will only understand those code points if they're made aware of where the relevant font is, which gets into intricate details and is probably platform specific. (I've no idea where to start!) The standard Unicode range for Telugu is U+0C00..U+0C7F. Telugu Range: 0C00–0C7F Your best bet is probably to analyze the similarities and differences between the code points used by Anu Script Software and the Unicode standard range for Telugu, and then use the Unicode standard codes. You might need to understand combining accents and various other aspects of Telugu. I don't know Telugu at all, so what follows may be inaccurate, but I think it more or less makes sense of what's in the Anu Script Software output: UTF-8 bytes PUA Telugu Glyph 0xEF 0x82 0x87 = U+F087 ==> U+0C08 ఈ 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x82 0x80 = U+F080 ==> U+0C06 ఆ 0xEF 0x81 0x9C = U+F05C ==> U+0C32 ల 0xEF 0x81 0xAA = U+F06A \ 0xEF 0x83 0xA1 = U+F0E1 ==> U+0C2F య (three code points for one character) 0xEF 0x81 0x94 = U+F054 / 0xEF 0x80 0xAB = U+F02B ==> U+0C66 ౦ 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x83 0x82 = U+F0C2 0xEF 0x81 0xB3 = U+F073 0xEF 0x80 0xAB = U+F02B 0xEF 0x80 0xA6 = U+F026 0xEF 0x82 0x83 = U+F083 0xEF 0x81 0x94 = U+F054 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x80 0xBC = U+F03C 0xEF 0x82 0x8A = U+F08A 0xEF 0x81 0x98 = U+F058 0xEF 0x83 0xA6 = U+F0E6 0xEF 0x81 0xB5 = U+F075 0xEF 0x82 0xB2 = U+F0B2 0xEF 0x83 0x92 = U+F0D2 0xEF 0x81 0x9C = U+F05C 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x83 0xA7 = U+F0E7 ==> U+0C46 U+0C66 ౦ె (Note 1) 0xEF 0x82 0xBF = U+F0BF 0xEF 0x83 0xAC = U+F0EC 0xEF 0x83 0x94 = U+F0D4 0xEF 0x83 0xA1 = U+F0E1 0xEF 0x80 0xAB = U+F02B 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x81 0xB3 = U+F073 0xEF 0x82 0x90 = U+F090 0xEF 0x83 0xA7 = U+F0E7 0xEF 0x81 0xB7 = U+F077 0xEF 0x82 0x9F = U+F09F 0xEF 0x82 0xBC = U+F0BC 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x80 0xBC = U+F03C 0xEF 0x83 0xBB = U+F0FB 0xEF 0x81 0xB9 = U+F079 0xEF 0x82 0x90 = U+F090 0xEF 0x80 0xBC = U+F03C 0xEF 0x82 0x91 = U+F091 0xEF 0x81 0xAA = U+F06A 0xEF 0x83 0xA1 = U+F0E1 0xEF 0x81 0x94 = U+F054 0xEF 0x80 0xA0 = U+F020 ==> U+0020 space 0xEF 0x80 0xBC = U+F03C 0xEF 0x82 0x8A = U+F08A 0xEF 0x81 0xB3 = U+F073 0xEF 0x82 0x90 = U+F090 0xEF 0x82 0x88 = U+F088 0xEF 0x80 0xBC = U+F03C 0xEF 0x82 0x91 = U+F091 0xEF 0x81 0xAA = U+F06A \ 0xEF 0x83 0xA1 = U+F0E1 ==> U+0C2F య 0xEF 0x81 0x94 = U+F054 / Note 1: The TELUGU VOWEL SIGN E U+0C46 should combine with TELUGU DIGIT ZERO U+0C66 — if I've identified the characters correctly, which seems improbable. I will leave off trying here; I recognize some shapes by matching what you show in the image with the Unicode chart page, but I'm not confident of the mapping to the PUA code points. You should be able to get appropriate information from the people who provided the Anu Script Software.
Can Lsqnonlin iterative output display current point for the algorithm?
My optimization using "Lsqnonlin" is running into an error in the 18th iteration. I was wondering if I could see what is the current input point that the algorithm is using for each iteration. It may help me diagnose what's going wrong. Thanks EDIT: First Pass at Solution I created myoutput.m function stop = myoutput(x,optimValues,state) stop = false; indicator = x; disp(indicator) Then added OutPut Fcn to me options options = optimset('disp','iter-detailed','MaxFunEvals',1000,'TolFun',1e-5,'OutputFcn',#myoutput); HW1Fparams= lsqnonlin(HW1Fobjfun4,x0,lb,ub,options) But I am getting hideous looking results like these: I'd appreciate it if someone can help me make it look nicer. Below the break is the rest of the original question. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Full code below. I am using some Financial Toolbox functions. The idea is to calibrate the Hull White One Factor Model to market data. It's a straightforward exercise and I must be specifying things incorrectly because it's totally tripping me up. ValuationDate = '10-01-2014'; Settle = datenum(ValuationDate); CurveDates = [735874; 735882; 735906; 735936; 735950; 736040; 736133; 736224; 736314; 736424; 736606; 736788; 736971; 737153; 737336; 737518; 737701; 737884; 738069; 738251; 738433; 738615; 738797; 738979; 739162; 739345; 739528; 739710; 739893; 740075; 740260; 740442; 740624; 740806; 740989; 741171; 741354; 741536; 741719; 741901; 742084; 742269; 742451; 742633; 742815; 742997; 743180; 743362; 743545; 743728; 743911; 744093; 744278; 744460; 744642; 744824; 745006; 745189; 745372; 745554; 745737; 745919; 746102; 746284; 746469; 746651; 746833; 747015; 747198; 747380; 747563; 747745; 747928; 748111; 748296; 748478; 748660; 748842; 749024; 749206; 749389; 749572; 749755; 749937; 750120; 750302; 750487]; ZeroRates = 1.0e-03*[0.0172; 0.0188; 0.0191; 0.0221; 0.0249; 0.0244; 0.0269; 0.0333; 0.0423; 0.0571; 0.0789; 0.1021; 0.1253; 0.1435; 0.1617; 0.1749; 0.1881; 0.1973; 0.2064; 0.2158; 0.2253; 0.2311; 0.2370; 0.2429; 0.2488; 0.2547; 0.2607; 0.2640; 0.2672; 0.2706; 0.2738; 0.2772; 0.2807; 0.2842; 0.2877; 0.2913; 0.2948; 0.2964; 0.2979; 0.2995; 0.3011; 0.3026; 0.3043; 0.3060; 0.3077; 0.3095; 0.3112; 0.3118; 0.3125; 0.3132; 0.3138; 0.3146; 0.3152; 0.3160; 0.3167; 0.3175; 0.3183; 0.3186; 0.3189; 0.3192; 0.3196; 0.3199; 0.3202; 0.3206; 0.3209; 0.3213; 0.3217; 0.3217; 0.3216; 0.3216; 0.3216; 0.3216; 0.3216; 0.3216; 0.3216; 0.3216; 0.3216; 0.3217; 0.3217; 0.3218; 0.3218; 0.3219; 0.3219; 0.3220; 0.3220; 0.3221; 0.3221]; Compounding = 2; RateSpec = intenvset('Compounding', 2,'ValuationDate', ValuationDate,'StartDates', ValuationDate,'EndDates', CurveDates,'Rates', ZeroRates); InstrumentMaturity = datenum('12-Sep-2044'); SwaptionBlackVol = [ 0.5940 0.5550 0.4450 0.3710 0.3400 0.3110 0.2910 0.2750 0.2630 0.2520 0.2250 0.2140 0.2080 0.2050; 0.5630 0.5470 0.4420 0.3690 0.3360 0.3090 0.2900 0.2740 0.2630 0.2520 0.2260 0.2150 0.2090 0.2060; 0.5760 0.5330 0.4400 0.3730 0.3410 0.3150 0.2970 0.2820 0.2700 0.2590 0.2330 0.2220 0.2170 0.2140; 0.5840 0.5020 0.4240 0.3730 0.3480 0.3240 0.3060 0.2920 0.2810 0.2710 0.2430 0.2300 0.2230 0.2190; 0.5630 0.4750 0.4100 0.3700 0.3450 0.3230 0.3070 0.2940 0.2830 0.2740 0.2470 0.2330 0.2260 0.2210; 0.5510 0.4520 0.3980 0.3660 0.3410 0.3220 0.3070 0.2950 0.2850 0.2760 0.2500 0.2360 0.2290 0.2240; 0.4630 0.4010 0.3660 0.3440 0.3250 0.3100 0.2990 0.2890 0.2790 0.2720 0.2470 0.2320 0.2260 0.2210; 0.4230 0.3750 0.3480 0.3290 0.3140 0.3030 0.2930 0.2840 0.2760 0.2690 0.2420 0.2300 0.2240 0.2190; 0.3700 0.3470 0.3280 0.3110 0.2960 0.2880 0.2800 0.2730 0.2680 0.2620 0.2360 0.2240 0.2190 0.2150; 0.3420 0.3250 0.3100 0.2970 0.2850 0.2770 0.2700 0.2640 0.2590 0.2540 0.2280 0.2180 0.2140 0.2110; 0.3230 0.3010 0.2900 0.2810 0.2720 0.2650 0.2590 0.2540 0.2500 0.2470 0.2230 0.2130 0.2090 0.2060; 0.3010 0.2860 0.2760 0.2670 0.2580 0.2530 0.2480 0.2450 0.2420 0.2390 0.2160 0.2060 0.2030 0.2000; 0.2850 0.2750 0.2650 0.2560 0.2480 0.2440 0.2400 0.2370 0.2350 0.2320 0.2100 0.2000 0.1970 0.1940; 0.2710 0.2600 0.2510 0.2440 0.2380 0.2340 0.2310 0.2290 0.2260 0.2240 0.2040 0.1940 0.1910 0.1890; 0.2580 0.2470 0.2400 0.2350 0.2300 0.2270 0.2240 0.2210 0.2190 0.2170 0.1980 0.1890 0.1860 0.1840; 0.2460 0.2370 0.2320 0.2270 0.2240 0.2210 0.2180 0.2150 0.2130 0.2110 0.1980 0.1840 0.1820 0.1800; 0.2040 0.1980 0.1950 0.1920 0.1900 0.1890 0.1890 0.1880 0.1880 0.1870 0.1720 0.1660 0.1640 0.1620; 0.1790 0.1750 0.1740 0.1730 0.1730 0.1710 0.1710 0.1700 0.1690 0.1690 0.1530 0.1510 0.1500 0.1480; 0.1650 0.1650 0.1660 0.1670 0.1680 0.1670 0.1670 0.1680 0.1680 0.1680 0.1550 0.1580 0.1560 0.1530; 0.1530 0.1570 0.1590 0.1620 0.1640 0.1650 0.1660 0.1670 0.1680 0.1690 0.1560 0.1650 0.1620 0.1590]; SwaptionExerciseDates = cellstr(['1M ';'2M ';'3M '; '6M ';'9M ';'1Y ';'18M';'2Y ';'3Y ';'4Y ';'5Y ';'6Y ';'7Y ';'8Y ';'9Y ';'10Y';'15Y';'20Y';'25Y';'30Y']); SwaptionTenors = cellstr(['1Y '; '2Y '; '3Y '; '4Y '; '5Y '; '6Y '; '7Y '; '8Y '; '9Y '; '10Y'; '15Y'; '20Y'; '25Y'; '30Y']); testmat = zeros(length(SwaptionExerciseDates),1); for i = 1:length(SwaptionExerciseDates) if SwaptionExerciseDates{i}(end)=='Y' testmat(i) = addtodate(Settle,str2double(SwaptionExerciseDates{i}(1:end-1)),'year'); elseif SwaptionExerciseDates{i}(end)=='M' testmat(i)=addtodate(Settle,str2double(SwaptionExerciseDates{i}(1:end-1)),'month'); end end EurExDates= testmat; EurExDatesFull = repmat(testmat,1,length(SwaptionTenors)); testmat2 = zeros(length(SwaptionExerciseDates),length(SwaptionTenors)); for i = 1:size(EurExDatesFull,1) for j = 1:size(EurExDatesFull,2) if SwaptionTenors{j}(end)=='Y' testmat2(i,j) = addtodate(EurExDatesFull(i,j),str2double(SwaptionTenors{j}(1:end-1)),'year'); elseif SwaptionTenors{j}(end)=='M' testmat2(i,j)= addtodate(EurExDatesFull(i,j),str2double(SwaptionTenors{j}(1:end-1)),'month'); end end end EurMatFull = testmat2; relidx = find(EurMatFull <= InstrumentMaturity); SwaptionBlackPrices = zeros(size(SwaptionBlackVol)); SwaptionStrike = zeros(size(SwaptionBlackVol)); for iSwaption=1:length(SwaptionExerciseDates) for iTenor=1:length(SwaptionTenors) [~,SwaptionStrike(iSwaption,iTenor)] = swapbyzero(RateSpec,[NaN 0],Settle, EurMatFull(iSwaption,iTenor),... 'StartDate',EurExDatesFull(iSwaption,iTenor),'LegReset',[1 2],'Basis',2); SwaptionBlackPrices(iSwaption,iTenor) = swaptionbyblk(RateSpec,'call', SwaptionStrike(iSwaption,iTenor),Settle, ... EurExDatesFull(iSwaption,iTenor), EurMatFull(iSwaption,iTenor),SwaptionBlackVol(iSwaption,iTenor)); end end TimeSpec = hwtimespec(Settle,daysadd(Settle,30*(1:370),6), 12); % B = (214:224) produces error free solutions. B = (150:224); HW1Fobjfun4 = #(x) SwaptionBlackPrices(relidx(B)) - ... swaptionbyhw(hwtree(hwvolspec(ValuationDate,testmat,x(2),testmat,x(1),'spline'), RateSpec, TimeSpec), 'call',SwaptionStrike(relidx(B)),EurExDatesFull(relidx(B)), 0,EurExDatesFull(relidx(B)), EurMatFull(relidx(B)),'Basis',2, 'SwapReset',12); options = optimset('disp','iter','MaxFunEvals',1000,'TolFun',1e-5); x0 = [.1 .01]; lb = [0 0]; ub = [1 1]; HW1Fparams = lsqnonlin(HW1Fobjfun4,x0,lb,ub,options)
Your best bet may be to modify the source lsqnonlin.m file. This can be a somewhat in-depth process, but it gives you the maximum control over what's going on. Open the file by typing lsqnonlin at the command prompt, highlighting it, then right-clicking and clicking on Open Selection. Before you do anything else, save a copy of the file to your default Matlab working directory (e.g. C:\Users\username\Documents\MATLAB\ for Windows 7. Matlab puts your default working directory at the top of the search path, so if you have a program that's the same name as a Matlab built-in one, then Matlab will find yours first and use it instead. I don't have that particular function myself, so I can't give you the exact code to put in there, but the solution should be simple enough for you to implement. With your locally-saved version of the code open, note that on the first line of the program, there's a function declaration that looks something like function [output1,output2,...]=lsqnonlin(input1,input2,...) From the MATLAB help page, it looks like x is the first output. Presumably, it's called x in the code itself or something similar, but if not, just use the first output parameter. Now that we know the name of the variable that is being output, we can go through the code and find where it is being calculated. MATLAB will probably have this routine be a wrapper around a more fundamental numerical code. For lsqnonneg, it calls lsqncommon, which then calls either snls or levenbergMarquardt, depending on the details of the problem. Any code that is iteratively solving something will eventually end up in a while loop, since it has to perform the same calculation an unknown number of times to converge on a solution. Once you find the while loop, it's simply a matter of adding a little code to output whatever parameter(s) you'd like to look at. Just remember that as long as you have a file of the same name in your workspace, you'll be calling that one, not the original code, so you may want to delete (or at lease move) your modified code after you've finished debugging.
Wav file clipping when playing audio file in MATLAB
Here's my problem. I'm implementing high and low pass filers in the continuous time and discrete time domain, without using MATLAB built in functions or the Signal Processing Toolbox. I need to filter an uploaded wav file. I have the following code which implements the low pass continuous time filter. The main problem is that when I go to play the file, I get the following error: Warning: Data clipped during write to file:flute_new In wavwrite>PCM_Quantize at 286 In wavwrite>write_wavedat at 302 In wavwrite at 139 In test2 at 23 I've been reading that a common solution to this problem is: signal = signal/max(abs(signal)), but that still doesn't fix the problem of clipping. I don't quite understand what produces this error, so any help would be appreciated. Thank you for reading. Code is as follows: [y,Fs,nbits]=wavread('flute.wav'); m = length(y); %96375 Fc = 500; %% frequency cut nbits n = -(m-1)/2 : (m-1)/2; %% kernel length / samples %Fs = Fs; %22050 %% sample frequency / (nyquist - %2*m) Tc = 2*pi*(Fc/Fs); %% theta c Hm = sin(Tc*n) ./ (pi*n); if (rem(m, 2) == 1) index = (m+1)/2; Hm(index) = Tc/pi; end [H w] = freqz(Hm, 1, 1024); % 1024 - Amount of Fourier Transform points %do playback sound(w,Fs); %save and playback the file wavwrite(w,'flute_new') UPDATE: From what I understand, because my wav file is 16 bits, I can only have -1<=w<1. I updated my code as suggested in the comments, but when I check the w values, I still have a w=1 at the end. The suggested code did eliminate the clipping warning, but the playback of the audio file through the speakers still has clipping. Maybe I'm understanding the concept wrong. Sorry if that's the case. Playback Code (updated): %Write and play file w = w./max(abs(w(:)))*(1-(2^-(nbits-1))); w %do playback sound(w,Fs); wavwrite(w,'flute_new'); Output from terminal: >> test2 nbits = 16 w = 0 0.0010 0.0020 0.0029 0.0039 0.0049 0.0059 0.0068 0.0078 0.0088 0.0098 0.0108 0.0117 0.0127 0.0137 0.0147 0.0156 0.0166 0.0176 0.0186 0.0195 0.0205 0.0215 0.0225 0.0235 0.0244 0.0254 0.0264 0.0274 0.0283 0.0293 0.0303 0.0313 0.0323 0.0332 0.0342 0.0352 0.0362 0.0371 0.0381 0.0391 0.0401 0.0411 0.0420 0.0430 0.0440 0.0450 0.0459 0.0469 0.0479 0.0489 0.0499 0.0508 0.0518 0.0528 0.0538 0.0547 0.0557 0.0567 0.0577 0.0586 0.0596 0.0606 0.0616 0.0626 0.0635 0.0645 0.0655 0.0665 0.0674 0.0684 0.0694 0.0704 0.0714 0.0723 0.0733 0.0743 0.0753 0.0762 0.0772 0.0782 0.0792 0.0802 0.0811 0.0821 0.0831 0.0841 0.0850 0.0860 0.0870 0.0880 0.0890 0.0899 0.0909 0.0919 0.0929 0.0938 0.0948 0.0958 0.0968 0.0977 0.0987 0.0997 0.1007 0.1017 0.1026 0.1036 0.1046 0.1056 0.1065 0.1075 0.1085 0.1095 0.1105 0.1114 0.1124 0.1134 0.1144 0.1153 0.1163 0.1173 0.1183 0.1193 0.1202 0.1212 0.1222 0.1232 0.1241 0.1251 0.1261 0.1271 0.1281 0.1290 0.1300 0.1310 0.1320 0.1329 0.1339 0.1349 0.1359 0.1368 0.1378 0.1388 0.1398 0.1408 0.1417 0.1427 0.1437 0.1447 0.1456 0.1466 0.1476 0.1486 0.1496 0.1505 0.1515 0.1525 0.1535 0.1544 0.1554 0.1564 0.1574 0.1584 0.1593 0.1603 0.1613 0.1623 0.1632 0.1642 0.1652 0.1662 0.1672 0.1681 0.1691 0.1701 0.1711 0.1720 0.1730 0.1740 0.1750 0.1759 0.1769 0.1779 0.1789 0.1799 0.1808 0.1818 0.1828 0.1838 0.1847 0.1857 0.1867 0.1877 0.1887 0.1896 0.1906 0.1916 0.1926 0.1935 0.1945 0.1955 0.1965 0.1975 0.1984 0.1994 0.2004 0.2014 0.2023 0.2033 0.2043 0.2053 0.2062 0.2072 0.2082 0.2092 0.2102 0.2111 0.2121 0.2131 0.2141 0.2150 0.2160 0.2170 0.2180 0.2190 0.2199 0.2209 0.2219 0.2229 0.2238 0.2248 0.2258 0.2268 0.2278 0.2287 0.2297 0.2307 0.2317 0.2326 0.2336 0.2346 0.2356 0.2366 0.2375 0.2385 0.2395 0.2405 0.2414 0.2424 0.2434 0.2444 0.2453 0.2463 0.2473 0.2483 0.2493 0.2502 0.2512 0.2522 0.2532 0.2541 0.2551 0.2561 0.2571 0.2581 0.2590 0.2600 0.2610 0.2620 0.2629 0.2639 0.2649 0.2659 0.2669 0.2678 0.2688 0.2698 0.2708 0.2717 0.2727 0.2737 0.2747 0.2757 0.2766 0.2776 0.2786 0.2796 0.2805 0.2815 0.2825 0.2835 0.2844 0.2854 0.2864 0.2874 0.2884 0.2893 0.2903 0.2913 0.2923 0.2932 0.2942 0.2952 0.2962 0.2972 0.2981 0.2991 0.3001 0.3011 0.3020 0.3030 0.3040 0.3050 0.3060 0.3069 0.3079 0.3089 0.3099 0.3108 0.3118 0.3128 0.3138 0.3148 0.3157 0.3167 0.3177 0.3187 0.3196 0.3206 0.3216 0.3226 0.3235 0.3245 0.3255 0.3265 0.3275 0.3284 0.3294 0.3304 0.3314 0.3323 0.3333 0.3343 0.3353 0.3363 0.3372 0.3382 0.3392 0.3402 0.3411 0.3421 0.3431 0.3441 0.3451 0.3460 0.3470 0.3480 0.3490 0.3499 0.3509 0.3519 0.3529 0.3539 0.3548 0.3558 0.3568 0.3578 0.3587 0.3597 0.3607 0.3617 0.3626 0.3636 0.3646 0.3656 0.3666 0.3675 0.3685 0.3695 0.3705 0.3714 0.3724 0.3734 0.3744 0.3754 0.3763 0.3773 0.3783 0.3793 0.3802 0.3812 0.3822 0.3832 0.3842 0.3851 0.3861 0.3871 0.3881 0.3890 0.3900 0.3910 0.3920 0.3929 0.3939 0.3949 0.3959 0.3969 0.3978 0.3988 0.3998 0.4008 0.4017 0.4027 0.4037 0.4047 0.4057 0.4066 0.4076 0.4086 0.4096 0.4105 0.4115 0.4125 0.4135 0.4145 0.4154 0.4164 0.4174 0.4184 0.4193 0.4203 0.4213 0.4223 0.4233 0.4242 0.4252 0.4262 0.4272 0.4281 0.4291 0.4301 0.4311 0.4320 0.4330 0.4340 0.4350 0.4360 0.4369 0.4379 0.4389 0.4399 0.4408 0.4418 0.4428 0.4438 0.4448 0.4457 0.4467 0.4477 0.4487 0.4496 0.4506 0.4516 0.4526 0.4536 0.4545 0.4555 0.4565 0.4575 0.4584 0.4594 0.4604 0.4614 0.4624 0.4633 0.4643 0.4653 0.4663 0.4672 0.4682 0.4692 0.4702 0.4711 0.4721 0.4731 0.4741 0.4751 0.4760 0.4770 0.4780 0.4790 0.4799 0.4809 0.4819 0.4829 0.4839 0.4848 0.4858 0.4868 0.4878 0.4887 0.4897 0.4907 0.4917 0.4927 0.4936 0.4946 0.4956 0.4966 0.4975 0.4985 0.4995 0.5005 0.5015 0.5024 0.5034 0.5044 0.5054 0.5063 0.5073 0.5083 0.5093 0.5102 0.5112 0.5122 0.5132 0.5142 0.5151 0.5161 0.5171 0.5181 0.5190 0.5200 0.5210 0.5220 0.5230 0.5239 0.5249 0.5259 0.5269 0.5278 0.5288 0.5298 0.5308 0.5318 0.5327 0.5337 0.5347 0.5357 0.5366 0.5376 0.5386 0.5396 0.5406 0.5415 0.5425 0.5435 0.5445 0.5454 0.5464 0.5474 0.5484 0.5493 0.5503 0.5513 0.5523 0.5533 0.5542 0.5552 0.5562 0.5572 0.5581 0.5591 0.5601 0.5611 0.5621 0.5630 0.5640 0.5650 0.5660 0.5669 0.5679 0.5689 0.5699 0.5709 0.5718 0.5728 0.5738 0.5748 0.5757 0.5767 0.5777 0.5787 0.5796 0.5806 0.5816 0.5826 0.5836 0.5845 0.5855 0.5865 0.5875 0.5884 0.5894 0.5904 0.5914 0.5924 0.5933 0.5943 0.5953 0.5963 0.5972 0.5982 0.5992 0.6002 0.6012 0.6021 0.6031 0.6041 0.6051 0.6060 0.6070 0.6080 0.6090 0.6100 0.6109 0.6119 0.6129 0.6139 0.6148 0.6158 0.6168 0.6178 0.6187 0.6197 0.6207 0.6217 0.6227 0.6236 0.6246 0.6256 0.6266 0.6275 0.6285 0.6295 0.6305 0.6315 0.6324 0.6334 0.6344 0.6354 0.6363 0.6373 0.6383 0.6393 0.6403 0.6412 0.6422 0.6432 0.6442 0.6451 0.6461 0.6471 0.6481 0.6491 0.6500 0.6510 0.6520 0.6530 0.6539 0.6549 0.6559 0.6569 0.6578 0.6588 0.6598 0.6608 0.6618 0.6627 0.6637 0.6647 0.6657 0.6666 0.6676 0.6686 0.6696 0.6706 0.6715 0.6725 0.6735 0.6745 0.6754 0.6764 0.6774 0.6784 0.6794 0.6803 0.6813 0.6823 0.6833 0.6842 0.6852 0.6862 0.6872 0.6882 0.6891 0.6901 0.6911 0.6921 0.6930 0.6940 0.6950 0.6960 0.6969 0.6979 0.6989 0.6999 0.7009 0.7018 0.7028 0.7038 0.7048 0.7057 0.7067 0.7077 0.7087 0.7097 0.7106 0.7116 0.7126 0.7136 0.7145 0.7155 0.7165 0.7175 0.7185 0.7194 0.7204 0.7214 0.7224 0.7233 0.7243 0.7253 0.7263 0.7273 0.7282 0.7292 0.7302 0.7312 0.7321 0.7331 0.7341 0.7351 0.7360 0.7370 0.7380 0.7390 0.7400 0.7409 0.7419 0.7429 0.7439 0.7448 0.7458 0.7468 0.7478 0.7488 0.7497 0.7507 0.7517 0.7527 0.7536 0.7546 0.7556 0.7566 0.7576 0.7585 0.7595 0.7605 0.7615 0.7624 0.7634 0.7644 0.7654 0.7664 0.7673 0.7683 0.7693 0.7703 0.7712 0.7722 0.7732 0.7742 0.7751 0.7761 0.7771 0.7781 0.7791 0.7800 0.7810 0.7820 0.7830 0.7839 0.7849 0.7859 0.7869 0.7879 0.7888 0.7898 0.7908 0.7918 0.7927 0.7937 0.7947 0.7957 0.7967 0.7976 0.7986 0.7996 0.8006 0.8015 0.8025 0.8035 0.8045 0.8054 0.8064 0.8074 0.8084 0.8094 0.8103 0.8113 0.8123 0.8133 0.8142 0.8152 0.8162 0.8172 0.8182 0.8191 0.8201 0.8211 0.8221 0.8230 0.8240 0.8250 0.8260 0.8270 0.8279 0.8289 0.8299 0.8309 0.8318 0.8328 0.8338 0.8348 0.8358 0.8367 0.8377 0.8387 0.8397 0.8406 0.8416 0.8426 0.8436 0.8445 0.8455 0.8465 0.8475 0.8485 0.8494 0.8504 0.8514 0.8524 0.8533 0.8543 0.8553 0.8563 0.8573 0.8582 0.8592 0.8602 0.8612 0.8621 0.8631 0.8641 0.8651 0.8661 0.8670 0.8680 0.8690 0.8700 0.8709 0.8719 0.8729 0.8739 0.8749 0.8758 0.8768 0.8778 0.8788 0.8797 0.8807 0.8817 0.8827 0.8836 0.8846 0.8856 0.8866 0.8876 0.8885 0.8895 0.8905 0.8915 0.8924 0.8934 0.8944 0.8954 0.8964 0.8973 0.8983 0.8993 0.9003 0.9012 0.9022 0.9032 0.9042 0.9052 0.9061 0.9071 0.9081 0.9091 0.9100 0.9110 0.9120 0.9130 0.9140 0.9149 0.9159 0.9169 0.9179 0.9188 0.9198 0.9208 0.9218 0.9227 0.9237 0.9247 0.9257 0.9267 0.9276 0.9286 0.9296 0.9306 0.9315 0.9325 0.9335 0.9345 0.9355 0.9364 0.9374 0.9384 0.9394 0.9403 0.9413 0.9423 0.9433 0.9443 0.9452 0.9462 0.9472 0.9482 0.9491 0.9501 0.9511 0.9521 0.9531 0.9540 0.9550 0.9560 0.9570 0.9579 0.9589 0.9599 0.9609 0.9618 0.9628 0.9638 0.9648 0.9658 0.9667 0.9677 0.9687 0.9697 0.9706 0.9716 0.9726 0.9736 0.9746 0.9755 0.9765 0.9775 0.9785 0.9794 0.9804 0.9814 0.9824 0.9834 0.9843 0.9853 0.9863 0.9873 0.9882 0.9892 0.9902 0.9912 0.9921 0.9931 0.9941 0.9951 0.9961 0.9970 0.9980 0.9990 1.0000
It's not an error, just a warning. If you write a .wav-file with 32 bits resolution, the allowed data range is -1 <= w <= 1. But for 8, 16 or 24 bits, the limits are -1 <= w < 1, such that w==1 creates the clipping warning (1-bit short of '1', i.e., 1 - 1/32768 = 0.99996948242188 in 16-bit mode.), and it can not be written into file. You can ignore that, or : format long w = w./max(abs(w(:)))*(1-(2^-(nbits-1))); wavwrite(w,'flute_new');
NoSuchMethodError SLF4J CentOS 5.8
I got a problem with wicket, slf4j and CentOS 5.8. This is the StackTrace I receive: Can't instantiate page using constructor public MyCompany.backenduser.NewBackendUser() org.apache.wicket.WicketRuntimeException: Can't instantiate page using constructor public MyCompany.backenduser.NewBackendUser() at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212) at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:57) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:298) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234) at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:486) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:319) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:368) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:380) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:169) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307) at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:559) at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072) at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) at org.eclipse.jetty.server.Server.handle(Server.java:365) at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485) at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988) at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:635) at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:627) at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:51) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:192) ... 65 more Caused by: java.lang.NoSuchMethodError: org.slf4j.helpers.MessageFormatter.format(Ljava/lang/String;Ljava/lang/Object;)Lorg/slf4j/helpers/FormattingTuple; at org.slf4j.impl.Log4jLoggerAdapter.warn(Log4jLoggerAdapter.java:420) at org.apache.wicket.Localizer.getStringIgnoreSettings(Localizer.java:198) at org.apache.wicket.Localizer.getString(Localizer.java:313) at org.apache.wicket.model.StringResourceModel.getString(StringResourceModel.java:503) at MyCompany.controls.PermissionsControl.<init>(PermissionsControl.java:28) at MyCompany.backenduser.NewBackendUser.init(NewBackendUser.java:281) at MyCompany.backenduser.NewBackendUser.<init>(NewBackendUser.java:107) ... 70 more I only receive this on CentOS 5.8, on Windows it works great. We use maven to build the project. I the pom.xml we excluded each version of slf4j, from the other jars.
Most probably you have an older slf4j-log4j.jar somewhere in your deployment environment. Look for slf4j* files in your web container's lib directories and check their version to the version of slf4j-api in your application.