-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.NoSuchMethodError: org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.<init>(Ljava/util/Collection;)V #29
Comments
Hello @genuinefafa , thanks for suggesting this. Would you have time to do this? We are open to contributions :) |
Yes, that's what I did. I have a plain recently created app with a bunch of domain classes mapping a legacy SQL server db.
Not sure how to help here, but I'm willing! I've got an exception while starting just to have the plugin as dependency. Something related with the SessionFactory (not really strange since latest improvements in GORM and their dataSources)
Wanna see the full stack trace? I'm targeting 3.2 branch first since 3.3 is to early in the making.
… On Jun 1, 2017, at 11:16, Louis Grignon ***@***.***> wrote:
Hello @genuinefafa , thanks for suggesting this.
Actually I already gave a try when I converted this plugin for Grails 3 but when I tried to move to Grails 3.2.x, I encountered some errors at startup if I remember well. That being said, I tried on a project with a lot of external pollution, I think it would be worth testing on a clean fresh project in 3.2.x
Would you have time to do this? We are open to contributions :)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sure :) but I think datasources were introduced before 3.2. Anyway, now I'm interested, if I find the time I will take a look ;) |
after analyzing the domain classes Bean 'package.${domainClassName}DomainClass' of type [org.grails.core.DefaultGrailsDomainClass] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying), it throws an exception,
It seems that there is somethig with: |
Hey @genuinefafa. I just pushed a sample project for using Grails Hibernate Search with Grails 3.2 Please tell me if it works for you |
there is a lot of fine tuning there... isn't it? i'm checking here. |
Hey @genuinefafa, did you make it work? You just have to use the right hibernate / GORM / Hibernate Search versions in your build.gradle: dependencies {
// ....
compile "org.grails.plugins:hibernate5:6.1.4"
compile 'org.grails.plugins:cache'
compile "org.hibernate:hibernate-core:5.2.9.Final"
compile "org.hibernate:hibernate-ehcache:5.2.9.Final"
compile "org.grails.plugins:cors:1.1.6"
compile 'org.grails.plugins:mail:2.0.0.RC6'
//...
} Please tell me if something remains unclear |
It did not... same I'm leaning to elasticsearch, doh... |
Could you please provide your entire build.gradle / application.groovy and startup log please, I will try to take a look, because it should work now :) If you have a link to a git repo, it would be even better |
I managed to get this to work on grails 3 using your example, I just had to downgrade to the version 6.1.3 of hibernate5 since if I set the 6.1.4 it was trying to get the mongodb dependency 6.1.4 (which doesn't exist). I needed mongodb to work because some of my domains are mapped there. However, the ones that I want to search on are not on mongo. Other than that, I am only having an issue with building a named analyzer. I am trying to build a typeahead/autocomplete for a list of Categories with a name and a code.
Everything in
But when I try to use the analyzer in the class, like so:
I get this error on compile
If I don't use the analyzer: 'ngram'
There is no error. I was wondering if the issue is where I am importing the Analyzer's classes from or the version of grails I am using. |
I will take a look at it later tonight. Thanks for reporting ;) |
@betoesquivel Oops, I did not find time to step into it earlier but I am having a look now. @genuinefafa I will close this issue since another user succeeded in launching it, but please feel free to reopen if you want to try again and we will check this out Thanks for reporting anyway |
Just to clarify @betoesquivel and me managed to use the plugin and run the quick-start sample project with just 2 modifications:
grails --version ehauske@dito-dev-ehauske
| Grails Version: 3.2.9
| Groovy Version: 2.4.10
| JVM Version: 1.8.0_131 Still having other problems in our project, but looks like a race condition with another plugin |
Better late than ever, doesn't it? I'm geting a different error, i'm really shocked. The project i'm working on lean onto elasticsearch services, but this might help me out anyway. That's why i'm testing. The log looks like this
./grailsw --version
build.gradlebuildscript {
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
maven { url "http://idcapture.bintray.com/plugins" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
classpath "org.grails.plugins:views-gradle:1.1.6"
}
}
version "0.1"
group "xx.yy.z"
apply plugin:"eclipse"
apply plugin:"idea"
apply plugin:"war"
apply plugin:"org.grails.grails-web"
apply plugin:"org.grails.plugins.views-json"
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.grails:grails-core"
compile "org.springframework.boot:spring-boot-starter-actuator"
provided "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-web-boot"
compile "org.grails:grails-logging"
compile "org.grails:grails-plugin-rest"
compile "org.grails:grails-plugin-databinding"
compile "org.grails:grails-plugin-services"
compile "org.grails:grails-plugin-url-mappings"
compile "org.grails:grails-plugin-codecs"
compile "org.grails:grails-plugin-interceptors"
compile "org.grails:grails-plugin-datasource"
compile "org.grails.plugins:cache"
compile "org.grails:grails-plugin-async"
compile "org.grails.plugins:hibernate5:6.1.4"
compile "org.hibernate:hibernate-core:5.2.9.Final"
compile "org.hibernate:hibernate-ehcache:5.2.9.Final"
compile "org.grails.plugins:views-json"
compile "org.grails.plugins:views-json-templates"
console "org.grails:grails-console"
profile "org.grails.profiles:angular"
runtime "com.h2database:h2"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
testCompile "org.grails:grails-datastore-rest-client"
testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
// if uncomment next line, error
// compile("org.grails.plugins:hibernate-search:2.1.0")
runtime "net.sourceforge.jtds:jtds:1.3.1"
}
bootRun {
jvmArgs('-Dspring.output.ansi.enabled=always')
addResources = true
} application.yml---
grails:
profile: angular
codegen:
defaultPackage: xx.yy.zzz
spring:
transactionManagement:
proxies: false
gorm:
# Whether to autowire entities.
# Disabled by default for performance reasons.
autowire: false
reactor:
# Whether to translate GORM events into Reactor events
# Disabled by default for performance reasons
events: false
info:
app:
name: '@info.app.name@'
version: '@info.app.version@'
grailsVersion: '@info.app.grailsVersion@'
spring:
main:
banner-mode: "off"
groovy:
template:
check-template-location: false
# Spring Actuator Endpoints are Disabled by Default
endpoints:
enabled: false
jmx:
enabled: true
---
grails:
mime:
disable:
accept:
header:
userAgents:
- Gecko
- WebKit
- Presto
- Trident
types:
json:
- application/json
- text/json
hal:
- application/hal+json
- application/hal+xml
xml:
- text/xml
- application/xml
atom: application/atom+xml
css: text/css
csv: text/csv
js: text/javascript
rss: application/rss+xml
text: text/plain
all: '*/*'
urlmapping:
cache:
maxsize: 1000
controllers:
defaultScope: singleton
converters:
encoding: UTF-8
---
grails:
cors:
enabled: true
---
hibernate:
cache:
queries: false
use_second_level_cache: true
use_query_cache: false
region.factory_class: org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory
dataSource:
pooled: true
jmxExport: true
driverClassName: org.h2.Driver
username: sa
password:
environments:
development:
dataSource:
dbCreate: validate
pooled: true
driverClassName: net.sourceforge.jtds.jdbc.Driver
username: sa
password: pwd
readOnly: true
url: jdbc:jtds:sqlserver://192.168.1.99:1433;databaseName=db
dialect: org.hibernate.dialect.SQLServer2008Dialect
# dialect: org.hibernate.dialect.SQLServerDialect
# transactional: false
# hibernate.enable_lazy_load_no_trans: true
properties:
jmxEnabled: true
initialSize: 5
maxActive: 50
minIdle: 5
maxIdle: 25
maxWait: 10000
maxAge: 600000
timeBetweenEvictionRunsMillis: 5000
minEvictableIdleTimeMillis: 60000
validationQuery: SELECT 1
validationQueryTimeout: 3
validationInterval: 15000
testOnBorrow: true
testWhileIdle: true
testOnReturn: false
jdbcInterceptors: ConnectionState
defaultTransactionIsolation: 2 # TRANSACTION_READ_COMMITTED
/// ... |
@lgrignon Thank you! Still struggling with the race condition of the other issue :( |
@genuinefafa At a glance, I think your errors point to a discrepancy between your libraries' versions. There are so many libraries to stick together, it could be a mess. My guess would be an incompatible version of a hibernate jar included by another dependency. buildscript {
// ...
dependencies {
// ...
/* this line ! */ classpath "org.grails.plugins:hibernate5:${gormVersion-".RELEASE"}"
}
}
or adding the following: dependencyManagement {
imports { mavenBom "org.grails:grails-bom:$grailsVersion" }
applyMavenExclusions false
} Additionnaly, could you provide your gradle.properties please? |
sure thing @lgrignon... gradle.properties#Sat Jul 15 01:10:47 UTC 2017
grailsVersion=3.2.10
grailsWrapperVersion=1.0.0
gormVersion=6.0.10.RELEASE
gradleWrapperVersion=3.4.1 same issue when changing
I can do a small github project since this project ain't big... it is just a fresh startup with some domain classes. That's why I'm so confused. I'll get back to you on that. |
Hey @genuinefafa |
I'm starting a new project and would like to use full text search; hibernate search sounds quite all right, but I don't like the idea of starting a brand new project with an old release of the framework.
I did try to setup a grails 3.2.9 new app with the 2.0.3 version of the plugin without any luck. Probably due to changes in GORM, but not entirely sure.
The text was updated successfully, but these errors were encountered: