I have upgraded Ext Direct from 1.3.2 to 1.8.0 and Spring Framework from 4.2.6.RELEASE to 5.1.7.RELEASE
After that actions in REMOTING_API becomes empty
Ext.app.REMOTING_API = {
"url" : "/ui/.../services/router",
"namespace" : "Ext....",
"type" : "remoting",
"actions" : { }
};
I'm stuck on this, any help will be appreciated.
Related
I am using Apache Superset and trying to configure its OAuth2 capability to connect to my (custom) Spring-Security OAuth2 server. Unfortunately, it ain't working right now. The stack track begins with this.
15:09:16.584 [qtp1885996206-21] ERROR org.springframework.boot.web.support.ErrorPageFilter - Forwarding to error page from request [/oauth/authorize] due to exception [Could not resolve view with name 'forward:/oauth/confirm_access' in servlet with name 'dispatcherServlet'] javax.servlet.ServletException: Could not resolve view with name 'forward:/oauth/confirm_access' in servlet with name 'dispatcherServlet' at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1262) ~[spring-webmvc-4.3.8.RELEASE.jar:4.3.8.RELEASE] at
Here is the relevant portion of my config.py from Superset.
AUTH_TYPE = AUTH_OAUTH
OAUTH_PROVIDERS = [
{
"name" : "MY-OAUTH",
"icon" : APP_ICON,
"token_key" : "password",
"remote_app" : {
"consumer_key" : "my_dashboard",
"consumer_secret" : "my_secret",
"base_url" : "http://localhost:8088/myoauth",
"request_token_params" : {
"scope": "my_dashboard read write",
"grant_type" : "password"
},
"request_token_url" : None,
"access_token_url" : "http://localhost:8088/myoauth/oauth/token",
"access_token_params" : {
"scope": "my_dashboard read write",
"grant_type" : "password",
"response_type" : "authorization_code"
},
"access_token_method" : "POST",
"authorize_url" : "http://localhost:8088/myoauth/oauth/authorize"
}
}
]
A nice gentleman suggested that I have somehow disabled the servlet handler for /oauth/confirm_access, but I am not sure how to check on that or fix such a problem.
Do you know what is going on here, what I can do to fix this or where I can start looking?
Thanks,
Matt
If I deploy an artifact to a Maven repository with version number 1.0.0-SNAPSHOT, it will get an internal version number of the form 1.0.0-21321323-2 (timestamp and number). How can I find out this version number?
When deploying an artifact to Artifactory you get a JSON response which includes the URI of the deployed artifact. You can use that to get the timestamp version. For example:
{
"repo" : "libs-snapshot-local",
"path" : "/org/jfrog/buildinfo/build-info-extractor-maven3/2.5.4-SNAPSHOT/build-info-extractor-maven3-2.5.4-20160205.203000-1.jar",
"created" : "2016-02-05T22:30:00.624+02:00",
"createdBy" : "admin",
"downloadUri" : "http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.5.4-SNAPSHOT/build-info-extractor-maven3-2.5.4-20160205.203000-1.jar",
"mimeType" : "application/java-archive",
"size" : "67966",
"checksums" : {
"sha1" : "f608440d5aadc64a5ef50320a385aeae49abd58a",
"md5" : "a844a8ab8226ff25854127480f3cfeac"
},
"originalChecksums" : {
},
"uri" : "http://localhost:8081/artifactory/libs-snapshot-local/org/jfrog/buildinfo/build-info-extractor-maven3/2.5.4-SNAPSHOT/build-info-extractor-maven3-2.5.4-20160205.203000-1.jar"
}
Another option is using the latest version search REST API which allows searching for the latest artifact version by groupId and artifactId.
For example:
$ curl -uadmin:password "http://localhost:8081/artifactory/api/search/latestVersion?g=org.jfrog.buildinfo&a=build-info-extractor-maven3&v=2.5.4-SNAPSHOT&repos=libs-snapshot-local"
2.5.4-20160205.203000-1
I created a new project in Eclipse from these helpful spring examples (Import Getting Started Content). It is called "gs-accessing-data-rest-complete"
Reference and full Code can be found: spring-guides/gs-accessing-data-rest
When leaving the example unchanged, except using WAR instead of JAR packaging, everything works well. When calling $ curl http://localhost:8080/, I'll get an exposure of usable resources.
$ curl http://localhost:8080/
{
"_links" : {
"people" : {
"href" : "http://localhost:8080/name{?page,size,sort}",
"templated" : true
},
"profile" : {
"href" : "http://localhost:8080/alps"
}
}
But when moving the PersonRepository into another package, e.g. myRepos via Eclipse's Refactor-->Move command, a resource is not accessible anymore.
The response from curl is then:
$ curl http://localhost:8080/
{
"_links" : {
"profile" : {
"href" : "http://localhost:8080/alps"
}
}
}
As far as I understood, Spring scans for Repositories automatically. Because the main class uses #SpringBootApplication annotation, everything should be found by spring itself.
What am I missing? Do I have to add some special XML configuration file or add another Configuration Class somewhere? Or do I have to update application.properties in order to sth.?
Perhaps somebody has some useful experiences, she or he might share with me. Thank you.
Try specifying the base package to use when scanning for repositories by using this annotation on your config class: #EnableJpaRepositories(basePackages = "your.base.repository.package")
I know it's possible to require other modules, but how can you tell aura to process a module as an extension?
Background:
For a large project I'm working on, I'm using aura extensions to modify a jQuery instance I'm keeping in the app's sandbox. A typical extension would look something like this, where plug1 and plug2 are jQuery plugins.
define({
require : {
paths : {
'jquery.plug1' : 'lib/plug1',
'jquery.plug2' : 'lib/plug2'
},
shim : {
'jquery.plug1' : {
exports : 'jQuery'
},
'jquery.plug2' : {
deps : ['jquery.plug1'],
exports : 'jQuery'
}
}
},
initialize : function(app) {
var $ = app.sandbox.$;
$ = require('jquery.plug1');
app.sandbox.$ = require('jquery.plug2');
}
});
For tightly coupled plugins I can specify dependencies as shown here, but I'd rather avoid this for more loosely coupled components.
I am migrating Maven project to Gradle. I needed manage dependencies so tryed resolutionStrategy like so:
def dependencyVersions = [
'org.slf4j:slf4j-api' : '1.7.2',
'javax.inject:javax.inject' : '1',
'com.google.code.findbugs:annotations' : '2.0.1',
'com.typesafe:config' : '1.0.0',
'ch.qos.logback:logback-classic' : '1.0.9',
'com.google.guava:guava' : '14.0',
'com.google.inject:guice' : '3.0',
'com.google.inject.extensions:guice-multibindings' : '3.0',
'com.google.code.gson:gson' : '2.2.2',
'joda-time:joda-time' : '2.1',
'com.thoughtworks.paranamer:paranamer' : '2.5.2',
'org.codehaus.groovy:groovy-all' : '2.0.6',
'commons-validator:commons-validator': '1.4.0',
'org.apache.shiro:shiro-core' : '1.2.1',
'junit:junit-dep' : '4.10',
'org.mockito:mockito-core' : '1.9.5',
'org.hamcrest:hamcrest-core': '1.3',
'org.hamcrest:hamcrest-library': '1.3',
'org.unitils:unitils-core': '3.3'
]
configurations.all {
resolutionStrategy {
eachDependency { DependencyResolveDetails details ->
def version = dependencyVersions["$details.requested.group:$details.requested.name"]
if (version != null)
details.useVersion version
}
}
}
but now when I try to Gradle install (into local Maven repository) I am getting this error:
Execution failed for task ':counter-module:install'.
Could not publish configuration 'archives'
Unable to initialize POM pom-default.xml: Failed to validate POM for project lt.counter at /home/workspace/counter/counter-module/build/poms/pom-default.xml
I still may be missing an aspect of your problem, but I just noticed something in the docs.
// force certain versions of dependencies (including transitive)
// *append new forced modules:
force 'asm:asm-all:3.3.1', 'commons-io:commons-io:1.4'
// *replace existing forced modules with new ones:
forcedModules = ['asm:asm-all:3.3.1']
It seems like you could do the following:
def dependencyVersions = [
'org.slf4j:slf4j-api' : '1.7.2',
'javax.inject:javax.inject' : '1',
'com.google.code.findbugs:annotations' : '2.0.1',
'com.typesafe:config' : '1.0.0',
'ch.qos.logback:logback-classic' : '1.0.9',
'com.google.guava:guava' : '14.0',
'com.google.inject:guice' : '3.0',
'com.google.inject.extensions:guice-multibindings' : '3.0',
'com.google.code.gson:gson' : '2.2.2',
'joda-time:joda-time' : '2.1',
'com.thoughtworks.paranamer:paranamer' : '2.5.2',
'org.codehaus.groovy:groovy-all' : '2.0.6',
'commons-validator:commons-validator': '1.4.0',
'org.apache.shiro:shiro-core' : '1.2.1',
'junit:junit-dep' : '4.10',
'org.mockito:mockito-core' : '1.9.5',
'org.hamcrest:hamcrest-core': '1.3',
'org.hamcrest:hamcrest-library': '1.3',
'org.unitils:unitils-core': '3.3'
]
force dependencyVersion.collect {k, v -> "$k:$v"}
To my eyes, it looks like this would accomplish two principles.
Give users a nice map notation to use when they want to play nice and add a dep with your predetermined version.
Force them to use the predetermined version any time they try to get tricky.
The default resolution strategy for Gradle is to use the newest version, so version N will be used; version N-1 will not.
You do not tell us which version of Gradle you are using and the full structure of your project(s). Are you doing a multi-project build?
Also I don't understand your custom resolution strategy - why would the version ever be null?
-- edit --
The newest version is the default resolution strategy, so the highest version encountered will be used.
Maybe have a look at Gradle's examples on custom resolution strategies, such as forcing a particular version.