Upgrading from Griffon 2.9.1 to anything higher

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgrading from Griffon 2.9.1 to anything higher

mecorusfc
Back in 2016, I upgraded from a very early Griffon to 2.9.1.  It took several months and I had actually tried and failed back in 2015 and 2014.  However, I eventually got most things in my app to work with 2.9.1 (with the help on this list).  However, IntelliJ always lit up the ArtifactProviderFor class.  After a recent IntelliJ update, it not only lit it up red, but it stopped allowing me to run unit tests because it couldn't compile in IntelliJ even though the Gradle compile worked.  I fought it for a couple days the last couple weekends but I'm giving up again.  Upgrading Griffon has always been very difficult.

I tried to see if I could use Lazybones to create a new sample app so I could copy things over but Lazybones 0.8.3 stopped working on my Windows 10 PC.  If I do a lazybones list, it gets a "can't connect to xyz templates: connection reset" on both the griffon and pledbrook templates so I'm giving up on that route.

I'm trying to go up a little at a time.  How can I upgrade from 2.9.1 to either 2.11.0 or 2.15.0?  I was hoping that I could change things in my build.gradle (like I do for all my work projects) and just have it magically work (again, like all other projects do) but it seems to be getting worse rather than better.  The current error is that a compile fails on griffon.metadata.ArtifactProviderFor.  I've made sure that I turned on annotation processing in IntelliJ but I don't know what other magic I need to do to make it work.  

Any help would be most appreciated.

Thanks, Mike
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from Griffon 2.9.1 to anything higher

mecorusfc
I manually downloaded the lazybones template zip file and put it in the cache.  Then I was able to create a foo project like mine to compare with.  I then made my build.gradle and settings look as much as possible like the generated one.  However, my gradle build is getting problems trying to even download the plugin for griffon as below.  Is this a Java version issue?  Do I have to upgrade to Java8 or Java10 to use Griffon 2.15.0?

Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve org.codehaus.griffon:gradle-griffon-plugin:2.15.0.
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:96)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.process(ComponentMetaDataResolveState.java:66)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ComponentMetaDataResolveState.resolve(ComponentMetaDataResolveState.java:58)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:116)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.findBestMatch(RepositoryChainComponentMetaDataResolver.java:99)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:72)
        ... 93 more
Caused by: org.gradle.api.resources.ResourceException: Could not get resource 'https://jcenter.bintray.com/org/codehaus/griffon/gradle-griffon-plugin/2.15.0/gradle-griffon-plugin-2.15.0.pom'.
        at org.gradle.internal.resource.ResourceExceptions.failure(ResourceExceptions.java:69)
        at org.gradle.internal.resource.ResourceExceptions.getFailed(ResourceExceptions.java:52)
        at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:106)
        at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.resolveArtifact(DefaultExternalResourceArtifactResolver.java:65)
        at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.parseMetaDataFromArtifact(ExternalResourceResolver.java:198)
        at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver.resolveStaticDependency(ExternalResourceResolver.java:175)
        at org.gradle.api.internal.artifacts.repositories.resolver.MavenResolver.doResolveComponentMetaData(MavenResolver.java:110)
        at org.gradle.api.internal.artifacts.repositories.resolver.ExternalResourceResolver$RemoteRepositoryAccess.resolveComponentMetaData(ExternalResourceResolver.java:455)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess$2.run(CacheLockReleasingModuleComponentsRepository.java:78)
        at org.gradle.internal.Factories$1.create(Factories.java:25)
        at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:239)
        at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:310)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:137)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.longRunningOperation(DefaultCacheFactory.java:183)
        at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.longRunningOperation(DefaultCacheLockingManager.java:48)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CacheLockReleasingModuleComponentsRepository$LockReleasingRepositoryAccess.resolveComponentMetaData(CacheLockReleasingModuleComponentsRepository.java:76)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleComponentRepository$ResolveAndCacheRepositoryAccess.resolveComponentMetaData(CachingModuleComponentRepository.java:312)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.BaseModuleComponentRepositoryAccess.resolveComponentMetaData(BaseModuleComponentRepositoryAccess.java:49)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.memcache.InMemoryCachedModuleComponentRepository$CachedAccess.resolveComponentMetaData(InMemoryCachedModuleComponentRepository.java:82)
        at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ErrorHandlingModuleComponentRepository$ErrorHandlingModuleComponentRepositoryAccess.resolveComponentMetaData(ErrorHandlingModuleComponentRepository.java:94)
        ... 98 more
Caused by: org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://jcenter.bintray.com/org/codehaus/griffon/gradle-griffon-plugin/2.15.0/gradle-griffon-plugin-2.15.0.pom'.
        at org.gradle.internal.resource.transport.http.HttpClientHelper.performRequest(HttpClientHelper.java:82)
        at org.gradle.internal.resource.transport.http.HttpClientHelper.performRawGet(HttpClientHelper.java:66)
        at org.gradle.internal.resource.transport.http.HttpClientHelper.performGet(HttpClientHelper.java:70)
        at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:43)
        at org.gradle.internal.resource.transport.http.HttpResourceAccessor.openResource(HttpResourceAccessor.java:29)
        at org.gradle.internal.resource.transfer.DefaultExternalResourceConnector.openResource(DefaultExternalResourceConnector.java:56)
        at org.gradle.internal.resource.transfer.ProgressLoggingExternalResourceAccessor.openResource(ProgressLoggingExternalResourceAccessor.java:36)
        at org.gradle.internal.resource.transport.DefaultExternalResourceRepository.getResource(DefaultExternalResourceRepository.java:63)
        at org.gradle.internal.resource.transfer.DefaultCacheAwareExternalResourceAccessor.getResource(DefaultCacheAwareExternalResourceAccessor.java:76)
        at org.gradle.api.internal.artifacts.repositories.resolver.DefaultExternalResourceArtifactResolver.downloadStaticResource(DefaultExternalResourceArtifactResolver.java:97)
        ... 115 more
Caused by: java.net.SocketException: Connection reset
        at java.net.SocketInputStream.read(SocketInputStream.java:196)
        at java.net.SocketInputStream.read(SocketInputStream.java:122)
        at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
        at sun.security.ssl.InputRecord.read(InputRecord.java:480)
        at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:934)
        at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
        at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:394)
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from Griffon 2.9.1 to anything higher

mecorusfc
I installed Java 8_181 and that fixed my new foo project generated from the lazybones template.  However, even after invalidating all caches, I still get the same error (can't get the plugin with SSL problems) on my main project (and that includes switching it to Java 8_181 just like the other one that worked).  I may have to delete all my gradle/mvn caches and start from scratch.
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from Griffon 2.9.1 to anything higher

mecorusfc
Ignore me for now.  More trickery in IntelliJ this time.  One place had the right JRE and the other had an old one.  It was selecting the old one.  Finally have it working with 2.15.0.  Still wondering about Lazybones but at least I can do that part manually.   Thanks, Mike
Reply | Threaded
Open this post in threaded view
|

Re: Upgrading from Griffon 2.9.1 to anything higher

aalmiray
Administrator
Hi Mike,

Just in case the Lazybones templates continue to fail for you, know that you can also create new projects using Maven archetypes (if you're into Maven). Also, the templates and the artifacts work as guidelines, you can create a Griffon project by hand as demonstrated at http://griffon-framework.org/tutorials/6_minimalistic_build.html

Cheers,
Andres