Reading sbt dependency tree - scala

I'm upgrading some libraries within a Play! project. During the process I'm trying to resolve errors like this:
java.lang.ClassNotFoundException: akka.event.slf4j.Slf4jLoggingFilter
Which I am assuming comes from incompatible transitive dependencies?
But I'm struggling to effectively use sbt-dependency-graph to help me track down the problem.
[info] +-ch.qos.logback:logback-classic:1.1.3
[info] | +-ch.qos.logback:logback-core:1.1.3
[info] | +-org.slf4j:slf4j-api:1.7.21
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.21)
Why are there 2 versions of slf4j-api listed 👆🏻
I'm assuming, the newer version (1.7.21) is taking precedence over 1.7.7 But then, why in some instances, do I see as many as 5 different versions of the same dependency (all but 1 evicted):
| | | | +-org.slf4j:slf4j-ext:1.7.12
| | | | +-ch.qos.cal10n:cal10n-api:0.8.1
| | | | +-org.slf4j:slf4j-api:1.6.2 (evicted by: 1.7.21)
| | | | +-org.slf4j:slf4j-api:1.6.4 (evicted by: 1.7.21)
| | | | +-org.slf4j:slf4j-api:1.7.12 (evicted by: 1.7.21)
| | | | +-org.slf4j:slf4j-api:1.7.2 (evicted by: 1.7.21)
| | | | +-org.slf4j:slf4j-api:1.7.21
Once the conflict is found -- do I need to upgrade all dependencies to be using the same version?
Is there another approach I should be taking?

Discovered that "the SLF4J API is backward compatible for all versions". Despite java.lang.ClassNotFoundException being called from an slf4j. So digging a little deeper:
Akka Kindly provides binary compatibility rules which show that backwards compatibility is violated between major versions.
Looking at the dependency tree we were seeing different major versions of akka dependencies (2.3.x and 2.4.x): com.typesafe.akka:akka-actor_2.11:2.3.13 (evicted by: 2.4.11) and com.typesafe.akka:akka-slf4j_2.11:2.3.13
Standardizing all akka dependencies around a major version fixed it:
Our original dependencies only provided the "com.typesafe.akka" %% "akka-actor" % "2.4.11" and play was providing "akka-slf4j" % "2.3.13" transitively which was breaking binary compatibility.
+-com.typesafe.akka:akka-slf4j_2.11:2.3.13 [S]
| +-com.typesafe.akka:akka-actor_2.11:2.3.13 (evicted by: 2.4.11)
Providing both akka-slf4j and akka-actor with the same major version solved this issue.

Related

linker command failed with exit code 1 appflow

i'm trying to generate an Ios Build on AppFlow but i'm getting the follow issue:
▸ Compiling CDVIonicKeyboard.m
▸ Compiling CDVInAppBrowserOptions.m
▸ Compiling CDVInAppBrowserNavigationController.m
▸ Compiling CDVDevice.m
▸ Compiling AppDelegate.m
▸ Compiling AppDelegate+FirebasePlugin.m
▸ Linking Doação do Bem
❌ ld: framework not found Pods_Doac_a_o_do_Bem
❌ clang: error: linker command failed with exit code 1 (use -v to see invocation)
** ARCHIVE FAILED **
The following build commands failed:
Ld /Users/ionic/Library/Developer/Xcode/DerivedData/Doação-beqnnqghtsgeefgbqzrcwiwhvhex/Build/Intermediates.noindex/ArchiveIntermediates/Doação do Bem/InstallationBuildProductsLocation/Applications/Doação.app/Doação normal
(1 failure)
[15:00:46]: Exit status: 65
+---------------+-------------------------+
| Build environment |
+---------------+-------------------------+
| xcode_path | /Applications/Xcode.app |
| gym_version | 2.185.0 |
| export_method | development |
| sdk | iPhoneOS14.5.sdk |
+---------------+-------------------------+
[15:00:46]: ▸ /Users/ionic/builds/inovacao/doacao/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FBSDKShareKit' from project 'Pods')
[15:00:46]: ▸ /Users/ionic/builds/inovacao/doacao/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FBSDKLoginKit' from project 'Pods')
[15:00:46]: ▸ /Users/ionic/builds/inovacao/doacao/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FirebaseCoreDiagnostics' from project 'Pods')
[15:00:46]: ▸ /Users/ionic/builds/inovacao/doacao/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FirebaseMessaging' from project 'Pods')
[15:00:46]: ▸ /Users/ionic/builds/inovacao/doacao/platforms/ios/Pods/Pods.xcodeproj: warning: The iOS deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.5.99. (in target 'FirebaseRemoteConfig' from project 'Pods')
[15:00:46]:
[15:00:46]: ⬆️ Check out the few lines of raw `xcodebuild` output above for potential hints on how to solve this error
[15:00:46]: 📋 For the complete and more detailed error log, check the full log at:
[15:00:46]: 📋 /Users/ionic/Library/Logs/gym/Doação-Doação.log
[15:00:46]:
[15:00:46]: Your `export_method` in gym is defined as `development`
[15:00:46]: which might cause problems when signing your application
[15:00:46]: Are you sure want to build and export for development?
[15:00:46]: Please make sure to define the correct export methods when calling
[15:00:46]: gym in your Fastfile or from the command line
[15:00:46]:
[15:00:46]:
[15:00:46]: Looks like fastlane ran into a build/archive error with your project
[15:00:46]: It's hard to tell what's causing the error, so we wrote some guides on how
[15:00:46]: to troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/
[15:00:46]: Before submitting an issue on GitHub, please follow the guide above and make
[15:00:46]: sure your project is set up correctly.
[15:00:46]: fastlane uses `xcodebuild` commands to generate your binary, you can see the
[15:00:46]: the full commands printed out in yellow in the above log.
[15:00:46]: Make sure to inspect the output above, as usually you'll find more error information there
[15:00:46]:
[15:00:46]: -------------------------
[15:00:46]: --- Step: upload_logs ---
[15:00:46]: -------------------------
[15:00:58]: Unable to upload package list log. Skipping.
[15:01:07]: ---------------------------
[15:01:07]: --- Step: shell command ---
[15:01:07]: ---------------------------
[15:01:07]: -----------------------------
[15:01:07]: --- Step: delete_keychain ---
[15:01:07]: -----------------------------
[15:01:07]: Error building the application - see the log above
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
| Lane Context |
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios build_ionic |
| NODE_PACKAGE_MANAGER | npm |
| PROJECT_WEB_DIR | www |
| KEYCHAIN_PATH | ~/Library/Keychains/IonicKeychain |
| DOWNLOAD_CERTS_PROVISION_FILE_UUID | 5be2531f-1aa3-4edf-b681-f04bc2e9e92e |
| DOWNLOAD_CERTS_CODESIGNING_IDENTITY | iPhone Developer: Vinicius Gomes (42QSQ9W96V) |
| DOWNLOAD_CERTS_TEAM_ID | 8PZLTG83YY |
| DOWNLOAD_CERTS_CERT_PATH | /Users/ionic/builds/inovacao/doacao/cert_file.p12 |
| SIGH_PROFILE_PATHS | ["/Users/ionic/builds/inovacao/doacao/5be2531f-1aa3-4edf-b681-f04bc2e9e92e.mobileprovision"] |
| XCODE_PROJECT_NAME | Doação |
| XCODE_PROJECT_PATH | /Users/ionic/builds/inovacao/doacao/platforms/ios/Doação.xcodeproj |
| XCODE_WORKSPACE_PATH | /Users/ionic/builds/inovacao/doacao/platforms/ios/Doação do Bem.xcworkspace
|
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
[15:01:07]: Error building the application - see the log above
[!] Error building the application - see the log above
+------+----------------------------------+-------------+
| fastlane summary |
+------+----------------------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------------------+-------------+
| 1 | add_extra_platforms | 0 |
| 2 | default_platform | 0 |
| 3 | build_summary | 5 |
| 4 | detect_native_type | 0 |
| 5 | Switch to ios build_cordova lane | 0 |
| 6 | detect_package_manager | 0 |
| 7 | add_git_credentials | 0 |
| 8 | get_appflow_config | 0 |
| 9 | dependency_install | 48 |
| 10 | get_web_dir | 0 |
| 11 | modify_config_xml | 0 |
| 12 | create_keychain | 0 |
| 13 | download_certs | 1 |
| 14 | import_certificate | 0 |
| 15 | build_pro_app | 32 |
| 16 | add_cordova_to_index | 0 |
| 17 | cordova platform add ios | 242 |
| 18 | get_xcode_project_paths | 0 |
| 19 | update_code_signing_settings | 0 |
| 💥 | gym | 361 |
| 21 | upload_logs | 21 |
| 22 | shell command | 0 |
| 23 | delete_keychain | 0 |
+------+----------------------------------+-------------+
[15:01:07]: fastlane finished with errors
Running after script...
$ clean-up
ERROR: Job failed: Process exited with: 1. Reason was: ()
Infos:
Ionic:
Ionic CLI : 5.4.16 (C:\Users\guilh\AppData\Roaming\nvm\v18.12.1\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.5
#ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 11.0.0 (cordova-lib#11.1.0)
Cordova Platforms : android 8.1.0, browser 6.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 13 other plugins)
Utility:
cordova-res : 0.15.4
native-run : not installed
System:
Android SDK Tools : 26.1.1 (C:\Users\guilh\AppData\Local\Android\Sdk)
NodeJS : v18.12.1 (C:\Users\guilh\AppData\Roaming\nvm\v18.12.1\node.exe)
npm : 9.2.0
OS : Windows 10
plugins:
cordova-plugin-androidx-adapter 1.1.3 "cordova-plugin-androidx-adapter"
cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-device 2.1.0 "Device"
cordova-plugin-facebook4 6.4.0 "Facebook Connect"
cordova-plugin-firebasex 7.0.2 "Google Firebase Plugin"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-inappbrowser 4.1.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 5.0.0 "cordova-plugin-ionic-webview"
cordova-plugin-request-location-accuracy 2.3.0 "Request Location Accuracy"
cordova-plugin-sign-in-with-apple 0.1.2 "cordova-plugin-sign-in-with-apple"
cordova-plugin-splashscreen 5.0.4 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.5 "Whitelist"
cordova-plugin-x-socialsharing 5.6.8 "SocialSharing"
cordova-sqlite-storage 5.1.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
es6-promise-plugin 4.2.2 "Promise"
i've tried to change versions of plugins and a lot of thing, but nothing resolved this. Also i tried to remove some os plugins buth none of all worked

How to install camel-http feature on Karaf

I am using Fuse 7.7 on Apache Karaf.
I am getting this error
2020-09-28 18:08:57,689 | ERROR | lueprint Extender: 2 | o.a.a.b.c.BlueprintContainerImpl | 51 - org.apache.aries.blueprint.core - 1.10.2 |
Unable to start container for blueprint bundle com.esb.iis-to-rm-vr/1.0.0 due to unresolved dependencies [(&(component=http)(objectClass=org.apache.camel.spi.ComponentResolver))]
java.util.concurrent.TimeoutException: null
I did the below steps. camel-http is not installed.
karaf#root()> features:install camel-http
karaf#root()> features:list | grep camel-http
camel-http4
karaf#root()> list | grep camel-http
67 | Active | 50 | 2.21.0.fuse-770013-redhat-00001 | camel-http-common
255 | Active | 50 | 2.21.0.fuse-770013-redhat-00001 | camel-http4
Please let me know apart from the below step, what are the steps i need to follow to install camel-http.
karaf#root()> features:install camel-http
Be careful that camel-http is only meant to be a producer. You won't be able to do from("http://...") only with him. To be able to do it, you need to add a camel component that will allow your route to bind itself to the karaf's jetty. You can try to install camel-jetty.
Moreover, you're feature:list | grep camel-http seemed to have only returned camel-http4. I'm note sure camel-http feature has been dropped, but you could always install http4 component

Ember CLI - Babel is too slow on Mac

From last couple of days my ember is slow, here is the output
version: 2.4.2
Livereload server on http://localhost:49152
Serving on http://localhost:4200/
Build successful - 76337ms.
Slowest Trees | Total
----------------------------------------------+---------------------
Babel | 70809ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
Babel (20) | 72361ms (3618 ms)
How can I debug and fix it. I have checked it on Mac(SSD + 16gb Ram)
Edit
After updating npm to latest version, cleaning npm cache, and reinstalling all node packages. It was quite fast but after couple of rebuilds, it became slow again.
Build successful - 56809ms.
Slowest Trees | Total
----------------------------------------------+---------------------
Babel | 55422ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
Babel (20) | 55580ms (2779 ms)
Edit #2
Is there anything to do with which file it changed here are two results
file changed site/components/site/carpets/neworderform-form/template.hbs - 1822 lines in this template
Build successful - 62844ms.
Slowest Trees | Total
----------------------------------------------+---------------------
Babel | 61122ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
Babel (20) | 61280ms (3064 ms)
file changed site/components/site/countries/country-form/template.hbs - 64 lines total in this template
Build successful - 1322ms.
Slowest Trees | Total
----------------------------------------------+---------------------
SourceMapConcat: Concat: App | 424ms
SourceMapConcat: Concat: App Tests | 77ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
SourceMapConcat: Concat: App (1) | 424ms
Babel (20) | 199ms (9 ms)
SourceMapConcat: Concat: App Tests (1) | 77ms
Edit 3 (after 2 days)
Now I guess I really should fix this or else I cant work on it.
Slowest Trees | Total
----------------------------------------------+---------------------
Babel | 146179ms
Slowest Trees (cumulative) | Total (avg)
----------------------------------------------+---------------------
Babel (20) | 170889ms (8544 ms)

Cannot build Grails app in Eclipse with Java 1.8

I've inherited a Grails project and am trying to build it in eclipse with Java 1.8. I can successfully build a war file with Java 1.7 but when I switch to 1.8 and rebuild I get the following error:
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
| Error java.lang.reflect.InvocationTargetException
| Error at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| Error at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| Error at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| Error at java.lang.reflect.Method.invoke(Method.java:483)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.rootLoader(GrailsStarter.java:234)
| Error at org.codehaus.groovy.grails.cli.support.GrailsStarter.main(GrailsStarter.java:262)
| Error Caused by: java.lang.NoClassDefFoundError: [Ljava/util/HashMap$Entry;
| Error at java.lang.Class.getDeclaredMethods0(Native Method)
| Error at java.lang.Class.privateGetDeclaredMethods(Class.java:2693)
| Error at java.lang.Class.getDeclaredMethods(Class.java:1967)
| Error at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84)
| Error at java.security.AccessController.doPrivileged(Native Method)
| Error at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:81)
| Error at org.codehaus.groovy.reflection.CachedClass$3.initValue(CachedClass.java:79)
| Error at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
| Error at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
| Error at org.codehaus.groovy.reflection.CachedClass.getMethods(CachedClass.java:250)
| Error at groovy.lang.MetaClassImpl.populateMethods(MetaClassImpl.java:334)
| Error at groovy.lang.MetaClassImpl.fillMethodIndex(MetaClassImpl.java:284)
| Error at groovy.lang.MetaClassImpl.initialize(MetaClassImpl.java:2928)
| Error at groovy.lang.ExpandoMetaClass.initialize(ExpandoMetaClass.java:483)
| Error at org.codehaus.groovy.reflection.ClassInfo.getMetaClassUnderLock(ClassInfo.java:166)
| Error at org.codehaus.groovy.reflection.ClassInfo.getMetaClass(ClassInfo.java:182)
| Error at groovy.util.ConfigObject.$getStaticMetaClass(ConfigObject.groovy)
| Error at groovy.util.ConfigObject.<init>(ConfigObject.groovy)
| Error at grails.util.AbstractBuildSettings.<init>(AbstractBuildSettings.java:33)
| Error at grails.util.BuildSettings.<init>(BuildSettings.groovy)
| Error at grails.util.BuildSettings.<init>(BuildSettings.groovy:749)
| Error at org.codehaus.groovy.grails.cli.GrailsScriptRunner.main(GrailsScriptRunner.java:164)
| Error ... 6 more
| Error Caused by: java.lang.ClassNotFoundException: java.util.HashMap$Entry
| Error at org.codehaus.groovy.tools.RootLoader.findClass(RootLoader.java:156)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| Error at org.codehaus.groovy.tools.RootLoader.loadClass(RootLoader.java:128)
| Error at org.codehaus.groovy.grails.cli.support.GrailsRootLoader.loadClass(GrailsRootLoader.java:48)
| Error at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| Error ... 28 more
I've tried downgrading to java 1.8 u31 and even u25 as suggested by other posts, but I still get the same error. I've also tried in Windows & Linux – same error.
I'm using grails version 2.1.2, could that have something to do with it?
I'm brand new to grails, is it possible there is some config in the project that is causing the problem?
Because Grails v2.1.2 does not support java8. Java8 support is available from 2.4.x onwards.
Ref# GRAILS-11063

JPA dependency issue after upgrading to Play framework 2.4

Ebean ORM has been pulled out from main Play core and has been introduced as an dependency in Play 2.4. great move.
But this is breaking the existing code. After following the Play migration instructions for Ebean, I get several JPA annotations errors. Upon investigating, it seems that ebean is pulling JPA 1.0 persistence API.
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm-agent:4.5.3
[info] | | +-javax.persistence:persistence-api:1.0
[info] | |
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm:4.6.2
[info] | +-com.fasterxml.jackson.core:jackson-core:2.4.1 (evicted by: 2.5.3)
[info] | +-com.fasterxml.jackson.core:jackson-core:2.4.3 (evicted by: 2.5.3)
[info] | +-com.fasterxml.jackson.core:jackson-core:2.5.3
[info] | +-javax.persistence:persistence-api:1.0
[info] | +-org.slf4j:slf4j-api:1.7.12
[info] | +-org.slf4j:slf4j-api:1.7.7 (evicted by: 1.7.12)
Where as in Play 2.3.9 this was not the case, it was pulling i jpa 2.0
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm-agent:3.2.2
[info] | +-org.avaje.ebeanorm:avaje-ebeanorm:3.3.4
[info] | +-org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.1.Final
[info] |
[info] +-com.typesafe.play:play-java-jdbc_2.11:2.3.9 [S]
[info] | +-com.typesafe.play:play-java_2.11:2.3.9 [S]
[info] | | +-com.google.code.findbugs:jsr305:2.0.3
[info] | | +-com.google.guava:guava:16.0.1
Any pointers on excluding JPA 1.0 and depend on hibernate-jpa-2.0-api?
You can exclude persistence-api from ebean dependencies.
Something like
("org.avaje.ebeanorm" % "avaje-ebeanorm" % "4.6.2").exclude("javax.persistence","persistence-api")