Deploy 6.1 via jar - broadleaf-commerce

I have a brand new download of broadleaf-commerce source code. It allows me to run mvn clean install and I am able to run mvn spring:boot run in admin. However, when I run mvn package in the root folder. I see different jar file and I run java -jar admin/target/admin.jar with exception
onContext. To display the conditions report re-run your application with 'debug' enabled.
2020-10-07 23:54:33.045 ERROR 4853 --- [ main] o.s.boot.SpringApplication : Application run failed
org.hibernate.exception.SQLGrammarException: could not extract ResultSet
at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:69) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.getResultSet(Loader.java:2265) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:2028) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1990) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQuery(Loader.java:949) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:351) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:321) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.Loader.loadCollectionBatch(Loader.java:2536) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.loader.collection.plan.LegacyBatchingCollectionInitializerBuilder$LegacyBatchingCollectionInitializer.initialize(LegacyBatchingCollectionInitializerBuilder.java:83) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:692) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.event.internal.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:75) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.internal.SessionImpl.initializeCollection(SessionImpl.java:2266) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection$4.doWork(AbstractPersistentCollection.java:585) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.withTemporarySessionIfNeeded(AbstractPersistentCollection.java:263) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:581) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.AbstractPersistentCollection.read(AbstractPersistentCollection.java:148) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.hibernate.collection.internal.PersistentBag.iterator(PersistentBag.java:390) ~[hibernate-core-5.3.17.Final.jar!/:5.3.17.Final]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.attachIndexableDocumentFields(SolrIndexServiceImpl.java:524) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at org.broadleafcommerce.core.search.service.solr.index.SolrIndexServiceImpl.buildDocument(SolrIndexServiceImpl.java:506) ~[broadleaf-framework-6.1.3-GA.jar!/:na]
at
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) ~[ROOT.jar:1.0.0-SNAPSHOT]
Caused by: java.sql.SQLSyntaxErrorException: Unknown column 'fieldtypes0_.ARCHIVED' in 'where clause'
My Configuration
database.user=root
# local database password
#
database.password=dockerPassword
database.driver=com.mysql.jdbc.Driver
# this connection URL assumes that it is connecting to a schema called broadleaf
database.url=jdbc:mysql://127.0.0.1:3306/broadleaf
blPU.hibernate.hbm2ddl.auto=create
blCMSStorage.hibernate.hbm2ddl.auto=create
blSecurePU.hibernate.hbm2ddl.auto=create
blEventPU.hibernate.hbm2ddl.auto=create

When running with java -jar, be sure to include -javaagent:target/agents/spring-instrument.jar as an argument so Spring can instrument the classes.

Related

Gradle sync failed : Cannot cast object 'main classesDirs' with class 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'

I am facing below while building gradle.
I am using gradle 6.5 and gobblin apache-gobblin-incubating-sources-0.14.0 version.
I have added build.gradle file and idesSetup.gradle file.
D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0>gradle build --stacktrace
Configuration on demand is an incubating feature.
> Configure project :
Build property: gobblinFlavor=standard
Build property: jdkVersion=1.8
Build property: sonatypeArtifactRepository=https://oss.sonatype.org/service/local/staging/deploy/maven2/
Build property: sonatypeArtifactSnapshotRepository=https://oss.sonatype.org/content/repositories/snapshots/
Build property: nexusArtifactRepository=https://repository.apache.org/service/local/staging/deploy/maven2
Build property: nexusArtifactSnapshotRepository=https://repository.apache.org/content/repositories/snapshots
Build property: doNotSignArtifacts=false
Build property: avroVersion=1.8.1
Build property: awsVersion=1.11.8
Build property: bytemanVersion=2.2.1
Build property: confluentVersion=2.0.1
Build property: hadoopVersion=2.3.0
Build property: hiveVersion=1.0.1
Build property: kafka08Version=0.8.2.2
Build property: kafka09Version=0.9.0.1
Build property: pegasusVersion=11.0.0
Build property: salesforceVersion=42.0.0
Detected Gradle version major=6 minor=5
FAILURE: Build failed with an exception.
* Where:
Script 'D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\gradle\scripts\idesSetup.gradle' line: 33
* What went wrong:
A problem occurred evaluating script.
> Failed to apply plugin [id 'org.gradle.java']
> Cannot cast object 'main classesDirs' with class 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection' to class 'java.io.File'
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating script.
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.lambda$apply$0(DefaultScriptPluginFactory.java:133)
at org.gradle.configuration.DefaultScriptTarget.addConfiguration(DefaultScriptTarget.java:74)
at
at org.gradle.configuration.BuildOperationScriptPlugin$1.execute(BuildOperationScriptPlugin.java:66)
at org.gradle.configuration.BuildOperationScriptPlugin$1.execute(BuildOperationScriptPlugin.java:63)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.apply(DefaultUserCodeApplicationContext.java:49)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction$1.run(DefaultObjectConfigurationAction.java:75)
at org.gradle.api.internal.plugins.DefaultObjectConfigurationAction.execute(DefaultObjectConfigurationAction.java:183)
at org.gradle.api.internal.project.AbstractPluginAware.apply(AbstractPluginAware.java:49)
at org.gradle.api.internal.project.ProjectScript.apply(ProjectScript.java:37)
at org.gradle.api.Script$apply$1.callCurrent(Unknown Source)
at build_asgsreuarus8fsv3k38ysektr.run(D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\build.gradle:118)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:180)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:37)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:104)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:52)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'org.gradle.java']
at org.gradle.api.internal.plugins.DefaultPluginManager.doApply(DefaultPluginManager.java:167)
at org.gradle.api.internal.plugins.DefaultPluginManager.addImperativePlugin(DefaultPluginManager.java:88)
at org.gradle.api.internal.plugins.DefaultPluginContainer.apply(DefaultPluginContainer.java:69)
at org.gradle.api.plugins.PluginContainer$apply$0.call(Unknown Source)
at jacoco_coveralls_support_e4f4lnoozsin33bmor3fkidu5$_run_closure2.doCall(D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\gradle\scripts\jacoco-coveralls-support.gradle:33)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.util.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:154)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:105)
at org.gradle.util.ConfigureUtil$WrappedConfigureAction.execute(ConfigureUtil.java:166)
at org.gradle.api.internal.DefaultMutationGuard$2.execute(DefaultMutationGuard.java:42)
at org.gradle.internal.Actions.with(Actions.java:251)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$2$1.run(BuildOperationCrossProjectConfigurator.java:79)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$2.run(BuildOperationCrossProjectConfigurator.java:76)
at org.gradle.internal.Factories$1.create(Factories.java:26)
at org.gradle.internal.work.DefaultWorkerLeaseService.withLocks(DefaultWorkerLeaseService.java:180)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withLocks(StopShieldingWorkerLeaseService.java:40)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withProjectLock(DefaultProjectStateRegistry.java:271)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.access$500(DefaultProjectStateRegistry.java:145)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl$1.create(DefaultProjectStateRegistry.java:260)
at org.gradle.internal.work.DefaultWorkerLeaseService.withoutLocks(DefaultWorkerLeaseService.java:251)
at org.gradle.internal.work.StopShieldingWorkerLeaseService.withoutLocks(StopShieldingWorkerLeaseService.java:50)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:256)
at org.gradle.api.internal.project.DefaultProjectStateRegistry$ProjectStateImpl.withMutableState(DefaultProjectStateRegistry.java:226)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.runProjectConfigureAction(BuildOperationCrossProjectConfigurator.java:73)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.access$400(BuildOperationCrossProjectConfigurator.java:32)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$1.doRunProjectConfigure(BuildOperationCrossProjectConfigurator.java:67)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator$BlockConfigureBuildOperation.run(BuildOperationCrossProjectConfigurator.java:121)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.runBlockConfigureAction(BuildOperationCrossProjectConfigurator.java:64)
at org.gradle.api.internal.project.BuildOperationCrossProjectConfigurator.subprojects(BuildOperationCrossProjectConfigurator.java:49)
at org.gradle.api.internal.project.DefaultProject.subprojects(DefaultProject.java:1187)
at jdk.internal.reflect.GeneratedMethodAccessor126.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:484)
at org.gradle.internal.metaobject.BeanDynamicObject.tryInvokeMethod(BeanDynamicObject.java:196)
at org.gradle.internal.metaobject.CompositeDynamicObject.tryInvokeMethod(CompositeDynamicObject.java:98)
at org.gradle.internal.extensibility.MixInClosurePropertiesAsMethodsDynamicObject.tryInvokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:34)
at org.gradle.groovy.scripts.BasicScript$ScriptDynamicObject.tryInvokeMethod(BasicScript.java:134)
at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
at org.gradle.groovy.scripts.BasicScript.invokeMethod(BasicScript.java:83)
at jacoco_coveralls_support_e4f4lnoozsin33bmor3fkidu5.run(D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\gradle\scripts\jacoco-coveralls-support.gradle:31)
at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
... 148 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'main classesDirs' with class 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection' to class 'java.io.File'
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.setProperty(BeanDynamicObject.java:380)
at org.gradle.internal.metaobject.BeanDynamicObject.trySetProperty(BeanDynamicObject.java:181)
at org.gradle.internal.metaobject.CompositeDynamicObject.trySetProperty(CompositeDynamicObject.java:66)
at org.gradle.internal.metaobject.ConfigureDelegate.setProperty(ConfigureDelegate.java:94)
at idesSetup_9ue98th295tn3ja17gvrv7c0v$_run_closure1$_closure2$_closure3.doCall(D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\gradle\scripts\idesSetup.gradle:33)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.util.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:154)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:105)
at org.gradle.plugins.ide.idea.model.IdeaModel.module(IdeaModel.java:90)
at org.gradle.plugins.ide.idea.model.IdeaModel_Decorated.module(Unknown Source)
at org.gradle.plugins.ide.idea.model.IdeaModel_Decorated$module.call(Unknown Source)
at idesSetup_9ue98th295tn3ja17gvrv7c0v$_run_closure1$_closure2.doCall(D:\Gobblin\Apache_Gobblin_0.14.0_Win_O\apache-gobblin-incubating-sources-0.14.0\gradle\scripts\idesSetup.gradle:27)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.gradle.util.ClosureBackedAction.execute(ClosureBackedAction.java:71)
at org.gradle.util.ConfigureUtil.configureTarget(ConfigureUtil.java:154)
at org.gradle.util.ConfigureUtil.configure(ConfigureUtil.java:105)
at org.gradle.util.ConfigureUtil$WrappedConfigureAction.execute(ConfigureUtil.java:166)
at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1$1.run(DefaultCollectionCallbackActionDecorator.java:100)
at org.gradle.configuration.internal.DefaultUserCodeApplicationContext.reapply(DefaultUserCodeApplicationContext.java:60)
at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction$1.run(DefaultCollectionCallbackActionDecorator.java:97)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
at org.gradle.api.internal.DefaultCollectionCallbackActionDecorator$BuildOperationEmittingAction.execute(DefaultCollectionCallbackActionDecorator.java:94)
at org.gradle.api.internal.collections.CollectionFilter$1.execute(CollectionFilter.java:59)
at org.gradle.internal.ImmutableActionSet$SingletonSet.execute(ImmutableActionSet.java:225)
at org.gradle.api.internal.DefaultDomainObjectCollection.doAdd(DefaultDomainObjectCollection.java:264)
at org.gradle.api.internal.DefaultDomainObjectCollection.add(DefaultDomainObjectCollection.java:253)
at org.gradle.api.internal.plugins.DefaultPluginContainer.pluginAdded(DefaultPluginContainer.java:49)
at org.gradle.api.internal.plugins.DefaultPluginManager.addPlugin(DefaultPluginManager.java:187)
at org.gradle.api.internal.plugins.DefaultPluginManager.access$300(DefaultPluginManager.java:51)
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
idesSetup.gradle :-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply plugin: 'idea'
subprojects {
plugins.withType(JavaPlugin) {
plugins.apply('idea')
plugins.apply('eclipse')
// Configure the IDEA plugin to (1) add the codegen as source dirs and (2) work around
// an apparent bug in the plugin which doesn't set the outputDir/testOutputDir as documented
idea.module {
// Gradle docs claim the two settings below are the default, but
// the actual defaults appear to be "out/production/$MODULE_NAME"
// and "out/test/$MODULE_NAME". Changing it so IDEA and gradle share
// the class output directory.
outputDir = sourceSets.main.output.classesDirs
testOutputDir = sourceSets.test.output.classesDirs
}
}
}
Build.gradle :-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
apply from: 'gradle/scripts/environment.gradle'
buildscript {
apply from: 'gradle/scripts/repositories.gradle'
apply from: 'gradle/scripts/defaultBuildProperties.gradle'
apply from: 'gradle/scripts/computeVersions.gradle'
apply from: file('gradle/scripts/buildscript.gradle'), to: buildscript
buildscript.repositories.addAll(project.repositories)
dependencies {
classpath 'org.apache.ant:ant:1.9.4'
classpath 'gradle.plugin.org.inferred:gradle-processors:3.3.0'
classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:1.0.2'
classpath 'io.spring.gradle:dependency-management-plugin:0.6.0.RELEASE'
classpath 'me.champeau.gradle:jmh-gradle-plugin:0.4.4'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.nl.javadude.gradle.plugins:license-gradle-plugin:0.14.0"
}
}
apply plugin: "com.github.hierynomus.license"
downloadLicenses {
includeProjectDependencies = true
ext.apacheTwo = license('Apache License, Version 2.0', 'http://opensource.org/licenses/Apache-2.0')
ext.bsd = license('BSD License', 'http://www.opensource.org/licenses/bsd-license.php')
ext.bsd3 = license('BSD 3-clause', 'https://opensource.org/licenses/BSD-3-Clause')
ext.cddlGplv2 = license('CDDL + GPLv2 with classpath exception', 'https://glassfish.dev.java.net/nonav/public/CDDL+GPL.html')
ext.spl = license('SPL', 'http://opensource.org/licenses/SPL-1.0');
ext.epl = license('Eclipse Public License - Version 1.0', 'https://opensource.org/licenses/EPL-1.0')
licenses = [
(group('com.linkedin.gobblin')) : apacheTwo,
// https://zookeeper.apache.org/
(group('org.apache.zookeeper')) : apacheTwo,
// http://testng.org/doc/
(group('org.testng:testng')) : apacheTwo,
// https://db.apache.org/jdo/index.html
(group('javax.jdo')) : apacheTwo,
// Based on other javax licenses
(group('javax.servlet.jsp')) : cddlGplv2,
(group('javax.servlet')) : cddlGplv2,
(group('javax.transaction')) : cddlGplv2,
// http://commons.apache.org/proper/commons-beanutils/
(group('commons-beanutils')) : apacheTwo,
// http://jakarta.apache.org/regexp/
(group('regexp')) : apacheTwo,
// http://forge.ow2.org/projects/asm/
(group('asm')) : bsd,
// https://github.com/codehaus/jettison/blob/master/pom.xml
(group('org.codehaus.jettison')) : apacheTwo,
// https://github.com/stephenc/jcip-annotations/blob/master/LICENSE.txt
(group('net.jcip')) : apacheTwo,
// https://github.com/google/re2j/blob/master/LICENSE
(group('com.google.re2j')) : bsd3,
// https://github.com/findbugsproject/findbugs/issues/128
(group('com.google.code.findbugs')) : bsd3,
// http://www.beanshell.org/license.html
(group('org.beanshell')) : spl,
// http://www.mchange.com/projects/c3p0/
(group('c3p0')) : epl,
'antlr-runtime-3.4.jar' : apacheTwo
]
aliases = [
(apacheTwo) : ['The Apache Software License, Version 2.0', 'Apache 2', 'Apache License Version 2.0',
'Apache License, Version 2.0', 'Apache License 2.0', 'Apache Version 2.0, January 2004',
license('Apache License', 'http://www.apache.org/licenses/LICENSE-2.0')],
(bsd) : ['BSD', license('New BSD License', 'http://www.opensource.org/licenses/bsd-license.php')]
]
dependencyConfiguration = 'compile'
excludeDependencies = [
'gobblin-throttling-service-client-data-template-*.jar',
'gobblin-throttling-service-api-data-template-*.jar',
'gobblin-flow-config-service-client-data-template-*.jar',
'gobblin-rest-api-data-template-*.jar',
'gobblin-throttling-service-server-data-template-*.jar',
'gobblin-flow-config-service-server-data-template-*.jar',
'gobblin-rest-server-data-template-*.jar',
'gobblin-flow-config-service-api-data-template-*.jar'
]
}
apply from: 'gradle/scripts/repositories.gradle'
apply plugin: 'org.inferred.processors'
apply plugin: 'io.spring.dependency-management'
apply from: 'gradle/scripts/configureSubprojects.gradle'
apply from: 'gradle/scripts/idesSetup.gradle'
apply from: 'gradle/scripts/jacoco-coveralls-support.gradle'
apply from: 'gradle/scripts/dependencyDefinitions.gradle'
apply from: 'gradle/scripts/restli.gradle'
apply from: 'gradle/scripts/testSetup.gradle'
apply from: 'gradle/scripts/globalDependencies.gradle'
apply from: 'gradle/scripts/javaPlugin.gradle'
apply from: 'gradle/scripts/utilities.gradle'
apply from: 'gradle/scripts/javadoc.gradle'
apply from: 'gradle/scripts/sourcesJar.gradle'
apply from: 'gradle/scripts/mavenPublishing.gradle'
apply from: 'gradle/scripts/nexusPublishing.gradle'
apply from: 'gradle/scripts/javaVersionCheck.gradle'
apply from: 'gradle/scripts/rat.gradle'
apply from: 'gradle/scripts/release.gradle'
task wrapper(type: Wrapper) { gradleVersion = '2.13' }
/*
* Hack for upgrading pegasus to version 11.0.0. For some reason, the gradle-plugins in
* that version fails to bring in "tools.jar" into the classpath. The rest.li team is actively
* seeking for a clean fix. This part will be removed later when the fix is ready
*/
allprojects {
tasks.matching { it.name == 'generateRestModel' }.all {
doFirst {
it.codegenClasspath += files("${System.getProperty('java.home')}/../lib/tools.jar")
}
}
}
rat {
excludes = [
'**/.git/**',
'**/.github/**',
'**/.gradle/**',
'**/.project',
'**/.factorypath',
'**/.settings/**',
'**/.classpath',
'**/*.iml',
'**/*.iws',
'**/*.ipr',
'**/.rubyversion',
'gradle/wrapper/**',
'gradlew',
'**/changes.md',
'**/README.md',
'**/.ruby-version',
'**/.DS_Store/**',
'**/.gitignore',
'**/build/**',
'**/target/**',
'**/bin/**',
'**/test-output/**',
'**/Gemfile.lock',
'**/*.tsv',
'**/*.csv',
'**/*.svg',
'**/*.groovy',
'**/*.yml',
'**/*.properties',
'**/*.conf',
'**/*.xml',
'**/*.md',
'**/*.json',
'**/*.avsc',
'**/*.ddl',
'**/*.dml',
'**/*.txt',
'**/*.pull',
'**/*.job',
'**/*.log',
'**/*.sql',
'**/*.zip',
'**/*.gz',
'**/*.tgz',
'**/*.tar',
'**/*.lck',
'**/*.ctrl',
'**/*.dat',
'**/*.pem',
'**/*.crc',
'**/*.jst',
'**/*.orc',
'**/*.rc',
'**/*.avro',
'**/*.avro.*',
'**/*.png',
'**/*.jpg',
'**/*.jpeg',
'**/*.eot',
'**/*.ttf',
'**/*.woff',
'**/*.woff2',
'**/Dockerfile',
'**/file*',
'**/*.epf',
'**/*.pdsc',
'**/*.yml',
'**/*.inc',
'**/*.py',
'**/*.gradle',
'**/*.css',
'**/*.sh',
'**/*.avro',
'**/*.txt.*',
'**/*.key',
'**/*.json.*',
'**/*.template',
'**/migrationConfig',
'**/testTable',
'**/encryption_provider_test_keystore',
'**/default_dataset_urn',
'**/metastore_db',
'**/grok/**',
'**/mock-couchbase/**',
'**/mainGeneratedRest/**',
'**/mainGeneratedDataTemplate/**',
'**/gen-java/**',
'**/META-INF/**',
'**/package-list',
'**/WebmasterPerformanceTuningMetrics',
'.reviewboardrc',
'CONTRIBUTORS',
'RELEASE.md',
'DISCLAIMER',
'NOTICE',
'LICENSE'
]
}
Unfortunately Gobblin doesn't build on Windows. Try to use Linux (WSL on Windows).

Android Studio - Execution failed for task ':app:compileDebugKotlin' - Failed to transform artifact 'x86_debug.jar

I've followed all instruction in this page: https://flutter.dev/docs/get-started/install/windows
but when I'm trying to run the "first_app" I get an error:
Android Studio - run first_app
main.dart
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
#override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: MyHomePage(title: 'Flutter Demo Home Page'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
#override
_MyHomePageState createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
int _counter = 0;
void _incrementCounter() {
setState(() {
_counter++;
});
}
#override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text(
'You have pushed the button this many times:',
),
Text(
'$_counter',
style: Theme.of(context).textTheme.display1,
),
],
),
),
floatingActionButton: FloatingActionButton(
onPressed: _incrementCounter,
tooltip: 'Increment',
child: Icon(Icons.add),
), // This trailing comma makes auto-formatting nicer for build methods.
);
}
}
ERROR
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Failed to transform artifact 'x86_debug.jar (io.flutter:x86_debug:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: C:\Users\m-err\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c\e05f5680b1bbc2a38b625423c4ab890a526847cc\x86_debug-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar.
> Failed to transform 'C:\Users\m-err\.gradle\caches\modules-2\files-2.1\io.flutter\x86_debug\1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c\e05f5680b1bbc2a38b625423c4ab890a526847cc\x86_debug-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar' using Jetifier. Reason: invalid stored block lengths. (Run with --stacktrace for more details.)
> Failed to transform artifact 'x86_64_debug.jar (io.flutter:x86_64_debug:1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c)' to match attributes {artifactType=android-classes, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: C:\Users\m-err\.gradle\caches\modules-2\files-2.1\io.flutter\x86_64_debug\1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c\35b1d03b15670cc489efdcf317faf29bfd904402\x86_64_debug-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar.
> Failed to transform 'C:\Users\m-err\.gradle\caches\modules-2\files-2.1\io.flutter\x86_64_debug\1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c\35b1d03b15670cc489efdcf317faf29bfd904402\x86_64_debug-1.0.0-e1e6ced81d029258d449bdec2ba3cddca9c2ca0c.jar' using Jetifier. Reason: invalid stored block lengths. (Run with --stacktrace for more details.)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
Finished with error: Gradle task assembleDebug failed with exit code 1
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Versione 10.0.18362.720], locale it-IT)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
build.gradle (android)*
buildscript {
ext.kotlin_version = '1.3.71'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (app/src)
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
android {
compileSdkVersion 29
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.first_app"
minSdkVersion 16
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
gradle-wrapper.properties
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
TESTS
updated kotlin version
flutter clean --> D:\Development\flutter\first_app
recreate the project after updates
LOGFILE
2020-04-01 15:38:00,597 [ 96871] INFO - rationStore.ComponentStoreImpl - Saving Project 'D:\Development\flutter\first_app' first_appKotlin2JvmCompilerArguments took 11 ms
2020-04-01 15:38:43,068 [ 139342] INFO - .flutter.run.daemon.FlutterApp - RunApp first_app (Run)
2020-04-01 15:38:43,068 [ 139342] INFO - .flutter.run.daemon.FlutterApp - D:\Programs\flutter\bin\flutter.bat [--no-color, run, --machine, --track-widget-creation, --device-id=emulator-5554, lib\main.dart]
2020-04-01 15:38:58,491 [ 154765] INFO - .FlutterAppDaemonEventListener - app shutdown took longer than 100ms
2020-04-01 15:38:58,516 [ 154790] INFO - .flutter.run.daemon.FlutterApp - StopApp first_app (Run)
2020-04-01 15:38:58,958 [ 155232] INFO - pl.ProjectRootManagerComponent - project roots have changed
2020-04-01 15:38:59,037 [ 155311] INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2ms; general responsiveness: ok; EDT responsiveness: ok
2020-04-01 15:38:59,073 [ 155347] INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 36ms; general responsiveness: ok; EDT responsiveness: ok
2020-04-01 15:38:59,073 [ 155347] INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 3 files to update
2020-04-01 15:38:59,112 [ 155386] INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 39ms; general responsiveness: ok; EDT responsiveness: ok
2020-04-01 15:39:48,894 [ 205168] WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
Command line: D:\Programs\Android\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_2_API_29
java.lang.Throwable: Process creation:
at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:33)
at com.android.tools.idea.avdmanager.EmulatorProcessHandler.<init>(EmulatorProcessHandler.java:45)
at com.android.tools.idea.avdmanager.EmulatorRunner.start(EmulatorRunner.java:57)
at com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:419)
at com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:358)
at com.android.tools.idea.avdmanager.RunAvdAction.actionPerformed(RunAvdAction.java:36)
at com.android.tools.idea.avdmanager.AvdUiAction.hyperlinkUpdate(AvdUiAction.java:127)
at com.intellij.ui.HyperlinkLabel.fireHyperlinkEvent(HyperlinkLabel.java:218)
at com.intellij.ui.HyperlinkLabel.processMouseEvent(HyperlinkLabel.java:141)
at java.awt.Component.processEvent(Component.java:6315)
at java.awt.Container.processEvent(Container.java:2239)
at java.awt.Component.dispatchEventImpl(Component.java:4899)
at java.awt.Container.dispatchEventImpl(Container.java:2297)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
at java.awt.Container.dispatchEventImpl(Container.java:2283)
at java.awt.Window.dispatchEventImpl(Window.java:2746)
at java.awt.Component.dispatchEvent(Component.java:4721)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
at java.awt.EventQueue$4.run(EventQueue.java:739)
at java.awt.EventQueue$4.run(EventQueue.java:737)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:823)
at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
2020-04-01 15:58:25,798 [1322072] WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'Project' content in TODO tool window to avoid focus-related problems.
2020-04-01 15:58:25,799 [1322073] WARN - j.openapi.wm.impl.IdeFrameImpl - Project tool window - parent container is hidden
2020-04-01 15:58:45,410 [1341684] WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in '' content in Dart Analysis tool window to avoid focus-related problems.
2020-04-01 15:58:45,410 [1341684] WARN - j.openapi.wm.impl.IdeFrameImpl - tool window - parent container is hidden
2020-04-01 15:58:47,751 [1344025] WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in '' content in Logcat tool window to avoid focus-related problems.
2020-04-01 15:58:47,751 [1344025] WARN - j.openapi.wm.impl.IdeFrameImpl - tool window - parent container is hidden
2020-04-01 15:58:47,837 [1344111] INFO - AndroidLogcatToolWindowFactory - Successfully obtained debug bridge
2020-04-01 15:58:59,615 [1355889] INFO - m.pty4j.windows.WindowsVersion - Windows version: 10.0.18362
2020-04-01 15:59:04,985 [1361259] WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'Project' content in TODO tool window to avoid focus-related problems.
2020-04-01 15:59:04,986 [1361260] WARN - j.openapi.wm.impl.IdeFrameImpl - Project tool window - parent container is hidden
2020-04-01 15:59:05,402 [1361676] WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'main.dart' content in Run tool window to avoid focus-related problems.
2020-04-01 15:59:05,402 [1361676] WARN - j.openapi.wm.impl.IdeFrameImpl - main.dart tool window - parent container is hidden
2020-04-01 15:59:12,685 [1368959] WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptInputsWatcher$Storage
2020-04-01 15:59:12,693 [1368967] WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.core.script.configuration.utils.ScriptClassRootsStorage
2020-04-01 15:59:13,373 [1369647] INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 734 ms
2020-04-01 16:00:37,197 [1453471] INFO - .flutter.run.daemon.FlutterApp - RunApp first_app (Run)
2020-04-01 16:00:37,197 [1453471] INFO - .flutter.run.daemon.FlutterApp - D:\Programs\flutter\bin\flutter.bat [--no-color, run, --machine, --track-widget-creation, --device-id=emulator-5554, lib\main.dart]
2020-04-01 16:00:43,092 [1459366] INFO - .FlutterAppDaemonEventListener - app shutdown took longer than 100ms
2020-04-01 16:00:43,121 [1459395] INFO - .flutter.run.daemon.FlutterApp - StopApp first_app (Run)
Please help me, I'm following a course but I cannot continue if I don't solve that.
\TIA
I'd suspect this to be the result of a broken download or an interrupted transform, because the error message invalid stored block lengths clearly hints for a corrupt ZIP/JAR file. Try to empty directory C:\Users\m-err\.gradle\caches and then rebuild the application.
And do not disable Lint checks, so that it would complain about eventual invalid packages:
lintOptions {
// disable 'InvalidPackage'
}
Also, when only using androidx dependencies, you don't need to use the Jetifier.

Spring Data: Connect to Cassandra via SSL

I want to connect to a Cassandra Cluster via SSL from a Java application using Spring Data. We have the following script which successfully connects to the cluster. Basically, it only enables SSL connection without specifying the SSL certificate.
mkdir .cassandra
echo "[ssl]" > .cassandra/cqlshrc
echo "validate = false" >> .cassandra/cqlshrc
cqlsh -u USER -p PASS -k KEYSPACE --debug --ssl HOSTNAME
I tried to set up the same connection options in a Spring #Configuration , via a CassandraClusterFactoryBean. Here is the snippet in question:
CassandraClusterFactoryBean factoryBean = new CassandraClusterFactoryBean();
factoryBean.setContactPoints(contactPoint);
factoryBean.setPort(9042);
factoryBean.setQueryOptions(queryOptions);
factoryBean.setAuthProvider(cassandraAuthentication());
factoryBean.setSslEnabled(true);
The cassandraAuthentication() method creates an AuthProvider with plaintext credentials. Upon trying to connect to the cluster I get the following exception:
Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: <hostname>:9042 (com.datastax.driver.core.exceptions.TransportException: [<hostname>:9042] Error writing))
at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:268) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:107) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.Cluster$Manager.negotiateProtocolVersionAndConnect(Cluster.java:1652) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1571) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.Cluster.init(Cluster.java:208) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:376) ~[cassandra-driver-core-3.6.0.jar!/:na]
at com.datastax.driver.core.Cluster.connect(Cluster.java:332) ~[cassandra-driver-core-3.6.0.jar!/:na]
at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.connect(CassandraCqlSessionFactoryBean.java:89) ~[spring-data-cassandra-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
at org.springframework.data.cassandra.config.CassandraCqlSessionFactoryBean.afterPropertiesSet(CassandraCqlSessionFactoryBean.java:82) ~[spring-data-cassandra-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
at org.springframework.data.cassandra.config.CassandraSessionFactoryBean.afterPropertiesSet(CassandraSessionFactoryBean.java:59) ~[spring-data-cassandra-2.1.3.RELEASE.jar!/:2.1.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.3.RELEASE.jar!/:5.1.3.RELEASE]
... 51 common frames omitted
What settings should I add in the cluster configuration to be able to connect to the database? Thanks
If you are using CassandraClusterFactoryBean use below code,
#Bean
#Override
public CassandraClusterFactoryBean cluster() {
CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean();
PlainTextAuthProvider sap = new PlainTextAuthProvider(env.getProperty("cassandra.username"), env.getProperty("cassandra.password"));
cluster.setContactPoints(env.getProperty("cassandra.contactpoints"));
cluster.setPort(Integer.parseInt(env.getProperty("cassandra.port")));
cluster.setAuthProvider(sap);
return cluster;
}
#Bean #Override public CassandraClusterFactoryBean cluster() {
CassandraClusterFactoryBean cluster = new CassandraClusterFactoryBean();
PlainTextAuthProvider sap = new PlainTextAuthProvider(env.getProperty("cassandra.username"), env.getProperty("cassandra.password"));
cluster.setContactPoints(env.getProperty("cassandra.contactpoints"));
cluster.setPort(Integer.parseInt(env.getProperty("cassandra.port")));
cluster.setAuthProvider(sap);
cluster.setSslEnabled(true);
return cluster; }
Quoted from the original answer by #soUvIk and added cluster.setSslEnabled(true);to try connecting with sssl.

Using Sparksql and SparkCSV with SparkJob Server

Am trying to JAR a simple scala application which make use of SparlCSV and spark sql to create a Data frame of the CSV file stored in HDFS and then just make a simple query to return the Max and Min of specific column in CSV file.
I am getting error when i use the sbt command to create the JAR which later i will curl to jobserver /jars folder and execute from remote machine
Code:
import com.typesafe.config.{Config, ConfigFactory}
import org.apache.spark.SparkContext._
import org.apache.spark._
import org.apache.spark.SparkConf
import org.apache.spark.SparkContext
import org.apache.spark.sql.SQLContext
object sparkSqlCSV extends SparkJob {
def main(args: Array[String]) {
val conf = new SparkConf().setMaster("local[4]").setAppName("sparkSqlCSV")
val sc = new SparkContext(conf)
val sqlContext = new org.apache.spark.sql.SQLContext(sc)
val config = ConfigFactory.parseString("")
val results = runJob(sc, config)
println("Result is " + results)
}
override def validate(sc: sqlContext, config: Config): SparkJobValidation = {
SparkJobValid
}
override def runJob(sc: sqlContext, config: Config): Any = {
val value = "com.databricks.spark.csv"
val ControlDF = sqlContext.load(value,Map("path"->"hdfs://mycluster/user/Test.csv","header"->"true"))
ControlDF.registerTempTable("Control")
val aggDF = sqlContext.sql("select max(DieX) from Control")
aggDF.collectAsList()
}
}
Error:
[hduser#ptfhadoop01v spark-jobserver]$ sbt ashesh-jobs/package
[info] Loading project definition from /usr/local/hadoop/spark-jobserver/project
Missing bintray credentials /home/hduser/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/hduser/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/hduser/.bintray/.credentials. Some bintray features depend on this.
Missing bintray credentials /home/hduser/.bintray/.credentials. Some bintray features depend on this.
[info] Set current project to root (in build file:/usr/local/hadoop/spark-jobserver/)
[info] scalastyle using config /usr/local/hadoop/spark-jobserver/scalastyle-config.xml
[info] Processed 2 file(s)
[info] Found 0 errors
[info] Found 0 warnings
[info] Found 0 infos
[info] Finished in 9 ms
[success] created output: /usr/local/hadoop/spark-jobserver/ashesh-jobs/target
[warn] Credentials file /home/hduser/.bintray/.credentials does not exist
[info] Updating {file:/usr/local/hadoop/spark-jobserver/}ashesh-jobs...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] scalastyle using config /usr/local/hadoop/spark-jobserver/scalastyle-config.xml
[info] Processed 5 file(s)
[info] Found 0 errors
[info] Found 0 warnings
[info] Found 0 infos
[info] Finished in 1 ms
[success] created output: /usr/local/hadoop/spark-jobserver/job-server-api/target
[info] Compiling 2 Scala sources and 1 Java source to /usr/local/hadoop/spark-jobserver/ashesh-jobs/target/scala-2.10/classes...
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:8: object sql is not a member of package org.apache.spark
[error] import org.apache.spark.sql.SQLContext
[error] ^
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:14: object sql is not a member of package org.apache.spark
[error] val sqlContext = new org.apache.spark.sql.SQLContext(sc)
[error] ^
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:25: not found: type sqlContext
[error] override def runJob(sc: sqlContext, config: Config): Any = {
[error] ^
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:21: not found: type sqlContext
[error] override def validate(sc: sqlContext, config: Config): SparkJobValidation = {
[error] ^
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:27: not found: value sqlContext
[error] val ControlDF = sqlContext.load(value,Map("path"->"hdfs://mycluster/user/Test.csv","header"->"true"))
[error] ^
[error] /usr/local/hadoop/spark-jobserver/ashesh-jobs/src/spark.jobserver/sparkSqlCSV.scala:29: not found: value sqlContext
[error] val aggDF = sqlContext.sql("select max(DieX) from Control")
[error] ^
[error] 6 errors found
[error] (ashesh-jobs/compile:compileIncremental) Compilation failed
[error] Total time: 10 s, completed May 26, 2016 4:42:52 PM
[hduser#ptfhadoop01v spark-jobserver]$
I guess the main issue being that its missing the dependencies for sparkCSV and sparkSQL , But i have no idea where to place the dependencies before compiling the code using sbt.
I am issuing the following command to package the application , The source codes are placed under "ashesh_jobs" directory
[hduser#ptfhadoop01v spark-jobserver]$ sbt ashesh-jobs/package
I hope someone can help me to resolve this issue.Can you specify me the file where i can specify the dependency and the format to input
The following link has more information in creating other contexts https://github.com/spark-jobserver/spark-jobserver/blob/master/doc/contexts.md
Also you need job-server-extras
add library dependency in buil.sbt
libraryDependencies += "org.apache.spark" %% "spark-sql" % "1.6.2"

Artifactory + Custom Gradle Plugin Programmatically

I am writing a custom plugin to eliminate the need for:
artifactory {
contextUrl = "${artifactory_contextUrl}" //The base Artifactory URL if not overridden by the publisher/resolver
publish {
repository {
contextUrl = "${artifactory_contextUrl}"
repoKey = 'android-dev'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
resolve {
repository {
contextUrl = "${artifactory_contextUrl}"
repoKey = 'android-dev-distributions'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
Here is how I am doing this programmatically:
DefaultExtraPropertiesExtension ext = (((DefaultExtraPropertiesExtension) project.property("ext")));
ext.setProperty("artifactory", new ArtifactoryDsl(contextUrl, publish, resolve));
This should work, correct? The ArtifactoryDsl object has all of the correct fields (contextUrl, publish, resolve with their respective inner fields).
This is the error:
14:46:49.752 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.IllegalStateException: Context URL cannot be empty
14:46:49.753 [ERROR] [org.gradle.BuildExceptionReporter] at org.jfrog.build.client.ArtifactoryClientConfiguration.getContextUrl(ArtifactoryClientConfiguration.java:111)
14:46:49.754 [ERROR] [org.gradle.BuildExceptionReporter] at org.jfrog.build.client.ArtifactoryClientConfiguration$PublisherHandler.getContextUrl(ArtifactoryClientConfiguration.java:225)
14:46:49.754 [ERROR] [org.gradle.BuildExceptionReporter] at org.jfrog.gradle.plugin.artifactory.extractor.BuildInfoTask.prepareAndDeploy(BuildInfoTask.java:526)
14:46:49.755 [ERROR] [org.gradle.BuildExceptionReporter] at org.jfrog.gradle.plugin.artifactory.extractor.BuildInfoTask.collectProjectBuildInfo(BuildInfoTask.java:440)
14:46:49.755 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:63)
14:46:49.755 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:219)
14:46:49.756 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:212)
14:46:49.756 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:201)
14:46:49.757 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:533)
14:46:49.757 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:516)
14:46:49.758 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
14:46:49.777 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
14:46:49.778 [ERROR] [org.gradle.BuildExceptionReporter] ... 66 more
No, this isn't going to work. Your plugin will have to apply the Artifactory plugin, then get the artifactory object using project.artifactory (Groovy) or project.getExtensions().getByName("artifactory") (Java), then configure that object.
For anyone who is curious how to achieve this, I had done it this way:
In your build.gradle ensure you can access Artifactory classes:
compile "org.jfrog.buildinfo:build-info-extractor-gradle:2.2.4"
Next in your custom plugin's apply() method:
// Set up plugins so we never need to add them to a build.gradle
project.getPlugins().apply(MAVEN);
project.getPlugins().apply(ARTIFACTORY);
project.setGroup(GROUP);
// Add Artifactory repo to the repositories
project.getRepositories().maven(new ArtifactoryAction(contextUrl + ARTIFACTORY_REPO_ENDPOINT, user, pass));
// We will define the plugin convention here so all of our libraries do not need to
// declare the artifactory closure manually
ArtifactoryPluginConvention pluginConvention =
ArtifactoryPluginUtil.getArtifactoryConvention(project);
pluginConvention.setContextUrl(contextUrl);
PublisherConfig publisherConfig = new PublisherConfig(pluginConvention);
publisherConfig.setContextUrl(contextUrl);
pluginConvention.setPublisherConfig(publisherConfig);
// Use reflection to access private field
PublisherConfig.Repository repository = null;
Field[] fields = PublisherConfig.class.getDeclaredFields();
for(Field field : fields) {
if(field.getName().equalsIgnoreCase("repository")) {
try {
field.setAccessible(true);
repository = (PublisherConfig.Repository) field.get(publisherConfig);
} catch (Exception e) {
e.printStackTrace();
}
}
}
if(repository != null) {
repository.setPassword(pass);
repository.setUsername(user);
repository.setRepoKey(PUBLISHER_REPO_KEY);
repository.setMavenCompatible(true);
}
GradleArtifactoryClientConfigUpdater.update(pluginConvention.getClientConfig(), project.getRootProject());
Thanks a lot #agrosner, i was looking for a very long time as well and your answer saved my day !
For anyone that wants to implement their plugin with groovy, here is my implementation based on the previous post:
PS: I'm using org.jfrog.buildinfo:build-info-extractor-gradle:4.9.8 and mave-publish
PS 2: For some reason it was necessary to apply maven to the root project as well as. otherwise you had the error Extension of type 'PublishingExtension' does not exist. Currently registered extension types: [ExtraPropertiesExtension]
class Plugin implements Plugin<Project> {
#Override
void apply(Project project) {
//Maven publication plugin needs to be applied to root also
project.rootProject.pluginManager.apply "maven-publish"
project.pluginManager.apply "maven-publish"
project.plugins.apply "com.jfrog.artifactory"
def artifactory_contextUrl = project.artifactory_contextUrl
def artifactory_writer_user = project.artifactory_writer_user
def artifactory_writer_password = project.artifactory_writer_password
// We will define the plugin convention here so all of our libraries do not need to
// declare the artifactory closure manually
ArtifactoryPluginConvention pluginConvention = ArtifactoryPluginUtil.getArtifactoryConvention(project)
//uses closures to set the configuration
pluginConvention.artifactory {
contextUrl = "${artifactory_contextUrl}"
publish{
repository {
repoKey = 'repo name here'
username = "${artifactory_writer_user}"
password = "${artifactory_writer_password}"
maven = true
}
defaults {
publications('plugin')
}
}
}
//commits changes
GradleArtifactoryClientConfigUpdater.update(pluginConvention.clientConfig, project.rootProject)
}
}

Resources