Skip to content
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

When debug in idea cannot get the component's version. #40

Closed
bwangel opened this issue Jul 8, 2020 · 2 comments
Closed

When debug in idea cannot get the component's version. #40

bwangel opened this issue Jul 8, 2020 · 2 comments

Comments

@bwangel
Copy link

bwangel commented Jul 8, 2020

Describe the bug

run tigase-server in idea:

  =============================================================================
  ERROR! Component server (TigaseCustomAuth) schema version is not loaded in the database or it is old!
  Version in database: 8.1.0. Required version: 0.0.0
  Please upgrade the installation by running:
  	$ ./scripts/tigase.sh upgrade-schema etc/tigase.conf
  =============================================================================

To Reproduce
Steps to reproduce the behavior:

  1. change mysql schema version to 8.1.0
  2. copy the right config.tdsl to etc
  3. click idea's menu: Run/Run XMPPServer
  4. show the error above.

Expected behavior

I trace into the source and find the DataSource.java line 91 can not find the version number:
implementationVersion = repositoryVersionAware.getVersion();
the repositoryVersionAware object must be TigaseCustomAuth;
It's method getVersion() uses : this.getPackage().getImplementationVersion()) but returns null.
how can i get the TigaseCustomAuth version?
Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: windows 10 home edition
  • Browser :none
  • Version 8.1.0-SHAPSHOT

Additional context
the whole outputs:

"C:\Program Files\Java\jdk1.8.0_221\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\lib\idea_rt.jar=60346:C:\Program Files\JetBrains\IntelliJ IDEA 2019.2.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_221\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_221\jre\lib\rt.jar;D:\WellMessage\server\tigase-server\target\classes;D:\WellMessage\server\tigase-utils\target\classes;C:\Users\qq156\.m2\repository\tigase\tigase-xmltools\4.1.0-SNAPSHOT\tigase-xmltools-4.1.0-20200514.001826-327.jar;C:\Users\qq156\.m2\repository\mysql\mysql-connector-java\5.1.40\mysql-connector-java-5.1.40.jar;C:\Users\qq156\.m2\repository\javax\activation\activation\1.1.1\activation-1.1.1.jar" tigase.server.XMPPServer
componentInfo{Title=Tigase XML Tools, Version=4.1.0-SNAPSHOT-b285/b0c64df9, Class=tigase.xml.XMLUtils}
componentInfo{Class=tigase.util.ClassUtil}
componentInfo{Class=tigase.server.XMPPServer}
[2020-07-08 09:04:03:779] [FINEST  ] [                  main ] OldConfigHolder.detectPathAndFormat(): No property file not specified! Using default one etc/init.properties
[2020-07-08 09:04:03:804] [FINEST  ] [                  main ] OldConfigHolder.detectPathAndFormat(): Provided property file D:\WellMessage\server\tigase-server\etc\init.properties does NOT EXISTS! Trying to use default one etc/init.properties
[2020-07-08 09:04:03:813] [CONFIG  ] [                  main ] ConfigHolder.loadFromDSLFiles()  : Loading configuration from file: etc\config.tdsl
[2020-07-08 09:04:03:835] [CONFIG  ] [                  main ] ConfigHolder.loadConfiguration() : Loaded configuration:
admins = [ 'admin@wangjx-asus' ]
'config-type' = 'default'
debug = [ 'server' ]
'default-virtual-host' = 'wangjx-asus'
dataSource () {
    default () {
        uri = 'jdbc:mysql://localhost/tigasedb?user=tigase_user&password=tigase&useSSL=false&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true'
    }
}

http () {
    setup () {
        'admin-password' = 'tigase'
        'admin-user' = 'admin'
    }
}
pubsub () {
    trusted = [ 'http@{clusterNode}' ]
}

[2020-07-08 09:04:06:427] [WARNING ] [                  main ] DependencyManager.createBeanConfig(): Cannot create bean config 'status-report-generator', type=tigase.server.monitor.StatusReportGenerator. Bean requires unknown class Lgroovy/text/Template;
[2020-07-08 09:04:06:428] [WARNING ] [                  main ] BeanConfigBuilder.execWithoutInject(): Bean class tigase.server.monitor.StatusReportGenerator cannot be registered, because Kernel cannot create configuration for this bean.
[2020-07-08 09:04:06:428] [WARNING ] [                  main ] AbstractBeanConfigurator.registerBeans(): unknown class null for bean http, skipping registration of a bean
[2020-07-08 09:04:06:430] [WARNING ] [                  main ] AbstractBeanConfigurator.registerBeans(): unknown class null for bean pubsub, skipping registration of a bean
[2020-07-08 09:04:07:043] [WARNING ] [                  main ] DNSResolverDefault.<init>()      : Resolving default host name: wangjx-asus took: 7
[2020-07-08 09:04:07:055] [WARNING ] [                  main ] ComponentInfo.lambda$getImplementationVersion$1(): Problem obtaining current version information




  =============================================================================
  ERROR! Component server (TigaseCustomAuth) schema version is not loaded in the database or it is old!
  Version in database: 8.1.0. Required version: 0.0.0
  Please upgrade the installation by running:
  	$ ./scripts/tigase.sh upgrade-schema etc/tigase.conf
  =============================================================================





ShutdownThread started... 2020-07-08T09:04:07.141

Total number of threads: 63
No locked threads.

Save thread-dump to file: logs/thread-dump.log, size: 26240
ShutdownThread finished...

Process finished with exit code 1

@woj-tek
Copy link
Contributor

woj-tek commented Jul 8, 2020

This is because relevant information about build/version are not present. If you have schema loaded in the correct version, you can skip this check by with Option to ignore schema-version check added:

dataSource () {
    default () {
        'schema-management' = false
  }
}

@bwangel
Copy link
Author

bwangel commented Jul 8, 2020

i' try it again, thanks a lot!

@bwangel bwangel closed this as completed Jul 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants