Project

General

Profile

Tigase 8.0.0 server start error

Laslo Horvat
Added 10 months ago

Hi,

I'm working in some project where I will manipulate user data and users will communicate through Tigase. Project currently works with 7.1.4-SNAPSHOT Tigase jar. I decided to move to 8.0.0 because mam support.

I puling Tigase jar like maven dependency i starting it like this from my main class

        XMPPServer.main(new String[]{
                "--property-file",
                configuration.getTmpPropertyFilePath().toAbsolutePath().toString()
        });

After I switched to 8.0.0 and changed my pom to pull 8.0.0-SNAPSHOT but now server will not start I get:

2018-07-19 09:55:32.651 [main]             Kernel.getInstance()                    SEVERE:   Exception getting instance
java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
    at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
    at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
    at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
    at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
    at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
    at java.lang.Class.createAnnotationData(Class.java:3521)
    at java.lang.Class.annotationData(Class.java:3510)
    at java.lang.Class.getDeclaredAnnotation(Class.java:3458)
    at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassShouldRegister(AbstractBeanConfigurator.java:185)
    at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassGetBeansToRegister(AbstractBeanConfigurator.java:152)
    at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClass(AbstractBeanConfigurator.java:137)
    at tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClass(AbstractBeanConfigurator.java:133)
    at tigase.kernel.core.Kernel.initBean(Kernel.java:128)
    at tigase.kernel.core.Kernel.getInstance(Kernel.java:938)
    at tigase.kernel.core.Kernel.getInstance(Kernel.java:274)
    at tigase.server.Bootstrap.start(Bootstrap.java:143)
    at tigase.server.XMPPServer.start(XMPPServer.java:185)
    at tigase.server.XMPPServer.main(XMPPServer.java:139)

properties file

config-type=--gen-config-def

--admins=admin@osc01.com

#! Database Connection
--user-db=mysql
--user-db-uri=jdbc:mysql://127.0.0.1:3306/tigase?user=tigase&password=tigase1234

#! Host
--virt-hosts=test.net

#! Debug
--debug=server

#! Logback
basic-conf/logging/handlers=org.slf4j.bridge.SLF4JBridgeHandler

generated config.tdsl

admins = [ 'admin@test.net' ]
'config-type' = 'default'
debug = [ 'server' ]
dataSource {
    default () {
        uri = 'jdbc:mysql://127.0.0.1:3306/tigase?user=tigase&password=tigase1234'
    }
}
userRepository {
    default () {}
}
authRepository {
    default () {}
}
logging {
    rootHandlers = [ 'org.slf4j.bridge.SLF4JBridgeHandler' ]
}
'sess-man' () {}
'virtual-hosts' {
    'test.net' {
        anonymous = true
        'domain-filter' = ALL
        enabled = true
        'max-users' = 0L
        register = true
        's2s-secret' = '74fe6334-5311-4c5d-ba9d-49c41328fd3a'
    }
}

Kind regards,
Laslo


Replies (5)

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 10 months ago

It looks like the issue with dependencies - missing class/interface for the annotation which is used by Tigase XMPP Server. In version 7.1.x Tigase had tigase-utils and tigase-xmltools embedded but we decided to separate them and now they need to be added to dependencies.

Added by Laslo Horvat 10 months ago

Thank you for your quick replay

I added, where the versions are 4.0.0-SNAPSHOT

        <dependency>
            <groupId>tigase</groupId>
            <artifactId>tigase-utils</artifactId>
            <version>${tigase.utils.version}</version>
        </dependency>
        <dependency>
            <groupId>tigase</groupId>
            <artifactId>tigase-xmltools</artifactId>
            <version>${tigase.xmltools.version}</version>
        </dependency>

but getting still the same error

Added by Laslo Horvat 10 months ago

I think I found the reason

I have spring boot project and

AbstractBeanConfigurator.registerBeansForBeanOfClass
Set<Class<?>> classes = ClassUtilBean.getInstance().getAllClasses();

is pulling also classes from org.springframework.boot.autoconfigure and the startup is crashing when it start to process some of them here:

tigase.kernel.beans.config.AbstractBeanConfigurator.registerBeansForBeanOfClassShouldRegister(AbstractBeanConfigurator.java:185)

I manage to run it when I added in ClassUtilBean DEFAULT_PACKAGES_TO_SKIP list the "org.springframework.boot.autoconfigure" package, and run my project with that custom build jar.

Added by 连生 张 2 months ago

Tigase8.0 didn't start when I tried to deploy it on the server, and it worked fine when I started it on the machine

002.png (78.6 KB) 002.png
config.tdsl (2.42 KB) config.tdsl

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam 2 months ago

Please create new threads for new questions.

    (1-5/5)