I want to find an email server implementation, convert the code to a war file like all my other apps.
The JAMES project seems so ... finished. But for years I couldn't even started it.
Milestones:
i have extracted james-server-jpa-guice.zip file from https://james.apache.org/download.cgi and run:
D:\james>java -classpath 'james-server-jpa-app.lib/*' -javaagent:james-server-jpa-app.lib/openjpa-3.2.0.jar -Dlogback.configurationFile=conf/logback.xml -Dworking.directory=. org.apache.james.JPAJamesServerMain
Some product derivations are being skipped. For information about product derivation status, run:
java org.apache.openjpa.lib.conf.ProductDerivations
org.apache.openjpa.persistence.PersistenceProductDerivation:java.lang.NoClassDefFoundError: javax/persistence/spi/PersistenceUnitInfo
Error: Could not find or load main class org.apache.james.JPAJamesServerMain
Caused by: java.lang.ClassNotFoundException: org.apache.james.JPAJamesServerMain
no luck.
Even though i don't understand Spring, I extracted james-server-app-3.7.0-app.zip from https://james.apache.org/download.cgi and run in admin mode:
D:\james\bin>james console
wrapper | --> Wrapper Started as Console
wrapper | Launching a JVM...
jvm 1 | Wrapper (Version 3.2.3) http://wrapper.tanukisoftware.org
jvm 1 | Copyright 1999-2006 Tanuki Software, Inc. All Rights Reserved.
jvm 1 |
jvm 1 | 2022-04-24 15:52:29,840 main ERROR Unable to create file ${sys:app.home}/log/springframework.log java.io.IOException: Dosya ad², dizin ad² veya birim etiketi s÷zdizimi hatal²
jvm 1 | at java.base/java.io.WinNTFileSystem.canonicalize0(Native Method)
jvm 1 | at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:417)
jvm 1 | at java.base/java.io.File.getCanonicalPath(File.java:626)
jvm 1 | at java.base/java.io.File.getCanonicalFile(File.java:651)
jvm 1 | at org.apache.logging.log4j.core.util.FileUtils.makeParentDirs(FileUtils.java:135)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:732)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:716)
jvm 1 | at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114)
jvm 1 | at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
jvm 1 | at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
jvm 1 | at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1 | at java.base/java.lang.Class.forName0(Native Method)
jvm 1 | at java.base/java.lang.Class.forName(Class.java:375)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:485)
jvm 1 |
jvm 1 | 2022-04-24 15:52:29,843 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory#44a59da3] unable to create manager for [${sys:app.home}/log/springframework.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData#27e47833[pattern=${sys:app.home}/log/springframework.%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d{dd-MMM-yyyy HH:mm:ss.SSS} %level [%t] %C.%M:%L - %msg%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory#44a59da3] unable to create manager for [${sys:app.home}/log/springframework.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData#27e47833[pattern=${sys:app.home}/log/springframework.%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d{dd-MMM-yyyy HH:mm:ss.SSS} %level [%t] %C.%M:%L - %msg%n, filePermissions=null, fileOwner=null]]
jvm 1 | at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:116)
jvm 1 | at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
jvm 1 | at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
jvm 1 | at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1 | at java.base/java.lang.Class.forName0(Native Method)
jvm 1 | at java.base/java.lang.Class.forName(Class.java:375)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:485)
jvm 1 |
jvm 1 | 2022-04-24 15:52:29,947 main ERROR Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender java.lang.IllegalStateException: No factory method found for class org.apache.logging.log4j.core.appender.RollingFileAppender
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:236)
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
jvm 1 | at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
jvm 1 | at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1 | at java.base/java.lang.Class.forName0(Native Method)
jvm 1 | at java.base/java.lang.Class.forName(Class.java:375)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:485)
jvm 1 |
jvm 1 | 2022-04-24 15:52:29,954 main ERROR Unable to create file ${sys:app.home}/log/openjpa.log java.io.IOException: Dosya ad², dizin ad² veya birim etiketi s÷zdizimi hatal²
jvm 1 | at java.base/java.io.WinNTFileSystem.canonicalize0(Native Method)
jvm 1 | at java.base/java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:417)
jvm 1 | at java.base/java.io.File.getCanonicalPath(File.java:626)
jvm 1 | at java.base/java.io.File.getCanonicalFile(File.java:651)
jvm 1 | at org.apache.logging.log4j.core.util.FileUtils.makeParentDirs(FileUtils.java:135)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:732)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory.createManager(RollingFileManager.java:716)
jvm 1 | at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:114)
jvm 1 | at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
jvm 1 | at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
jvm 1 | at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1 | at java.base/java.lang.Class.forName0(Native Method)
jvm 1 | at java.base/java.lang.Class.forName(Class.java:375)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.main(WrapperSimpleApp.java:485)
jvm 1 |
jvm 1 | 2022-04-24 15:52:29,966 main ERROR Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element RollingFile: java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory#44a59da3] unable to create manager for [${sys:app.home}/log/openjpa.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData#6c61a903[pattern=${sys:app.home}/log/openjpa.%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d{dd-MMM-yyyy HH:mm:ss.SSS} %level [%t] %C.%M:%L - %msg%n, filePermissions=null, fileOwner=null]] java.lang.IllegalStateException: ManagerFactory [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$RollingFileManagerFactory#44a59da3] unable to create manager for [${sys:app.home}/log/openjpa.log] with data [org.apache.logging.log4j.core.appender.rolling.RollingFileManager$FactoryData#6c61a903[pattern=${sys:app.home}/log/openjpa.%d{yyyy-MM-dd}-%i.log.gz, append=true, bufferedIO=true, bufferSize=8192, policy=CompositeTriggeringPolicy(policies=[]), strategy=DefaultRolloverStrategy(min=1, max=7, useMax=true), advertiseURI=null, layout=%d{dd-MMM-yyyy HH:mm:ss.SSS} %level [%t] %C.%M:%L - %msg%n, filePermissions=null, fileOwner=null]]
jvm 1 | at org.apache.logging.log4j.core.appender.AbstractManager.getManager(AbstractManager.java:116)
jvm 1 | at org.apache.logging.log4j.core.appender.OutputStreamManager.getManager(OutputStreamManager.java:100)
jvm 1 | at org.apache.logging.log4j.core.appender.rolling.RollingFileManager.getFileManager(RollingFileManager.java:217)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:146)
jvm 1 | at org.apache.logging.log4j.core.appender.RollingFileAppender$Builder.build(RollingFileAppender.java:62)
jvm 1 | at org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:122)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1120)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1045)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.createConfiguration(AbstractConfiguration.java:1037)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.doConfigure(AbstractConfiguration.java:651)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.initialize(AbstractConfiguration.java:247)
jvm 1 | at org.apache.logging.log4j.core.config.AbstractConfiguration.start(AbstractConfiguration.java:293)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.setConfiguration(LoggerContext.java:626)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:699)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.reconfigure(LoggerContext.java:716)
jvm 1 | at org.apache.logging.log4j.core.LoggerContext.start(LoggerContext.java:270)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:155)
jvm 1 | at org.apache.logging.log4j.core.impl.Log4jContextFactory.getContext(Log4jContextFactory.java:47)
jvm 1 | at org.apache.logging.log4j.LogManager.getContext(LogManager.java:196)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getContext(AbstractLoggerAdapter.java:137)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getContext(Log4jLoggerFactory.java:55)
jvm 1 | at org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:47)
jvm 1 | at org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:33)
jvm 1 | at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)
jvm 1 | at org.apache.james.app.spring.JamesAppSpringMain.<clinit>(JamesAppSpringMain.java:34)
jvm 1 | at java.base/java.lang.Class.forName0(Native Method)
jvm 1 | at java.base/java.lang.Class.forName(Class.java:375)
jvm 1 | at org.tanukisoftware.wrapper.WrapperSimpleApp.<init>(WrapperSimpleApp.java:147)
jvm 1 | at
.........
jvm 1 | 24-Nis-2022 15:52:37.034 INFO [WrapperSimpleAppMain] org.springframework.jmx.export.MBeanExporter.registerBeanInstance:672 - Located MBean 'org.apache.james:type=component,name=mailboxcopier': registering with JMX server as MBean [org.apache.james:type=component,name=mailboxcopier]
jvm 1 | 24-Nis-2022 15:52:37.034 INFO [WrapperSimpleAppMain] org.springframework.jmx.export.MBeanExporter.registerBeanInstance:672 - Located MBean 'org.apache.james:type=component,name=quotamanagerbean': registering with JMX server as MBean [org.apache.james:type=component,name=quotamanagerbean]
jvm 1 | 24-Nis-2022 15:52:37.035 INFO [WrapperSimpleAppMain] org.springframework.jmx.export.MBeanExporter.registerBeanInstance:672 - Located MBean 'org.apache.james:type=component,name=reindexerbean': registering with JMX server as MBean [org.apache.james:type=component,name=reindexerbean]
jvm 1 | 24-Nis-2022 15:52:37.035 INFO [WrapperSimpleAppMain] org.springframework.jmx.export.MBeanExporter.registerBeanInstance:672 - Located MBean 'org.apache.james:type=component,name=sievemanagerbean': registering with JMX server as MBean [org.apache.james:type=component,name=sievemanagerbean]
jvm 1 | 24-Nis-2022 15:52:37.040 INFO [WrapperSimpleAppMain] org.apache.james.app.spring.JamesAppSpringMain.main:46 - Apache James Server is successfully started in 6214 milliseconds.
It says server started, there are so many error messages that i am doubtfull.\
Anyway, I tried to add a user as below; but i did not worked again
D:\james\bin>james-cli.bat adduser user#localhost myPass
24-Nis-2022 15:59:13.194 ERROR [main] org.apache.james.cli.ServerCmd.main:101 - Error while playing command
java.lang.Exception: Unexpected exception
at org.apache.james.user.lib.UsersRepositoryManagement.addUser(UsersRepositoryManagement.java:57) ~[james-server-data-library-3.7.0.jar:3.7.0]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:72) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:262) ~[?:?]
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) ~[?:?]
at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) ~[?:?]
at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) ~[?:?]
at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) ~[?:?]
at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) ~[?:?]
at javax.management.StandardMBean.invoke(StandardMBean.java:405) ~[?:?]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:814) ~[?:?]
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:802) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1472) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1310) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1405) ~[?:?]
at javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:829) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:360) ~[?:?]
at sun.rmi.transport.Transport$1.run(Transport.java:200) ~[?:?]
at sun.rmi.transport.Transport$1.run(Transport.java:197) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:712) ~[?:?]
at sun.rmi.transport.Transport.serviceCall(Transport.java:196) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705) ~[?:?]
at java.security.AccessController.doPrivileged(AccessController.java:399) ~[?:?]
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Error class java.lang.Exception while executing command:Unexpected exception
usage: java org.apache.james.cli.ServerCmd --host <arg> <command>
-h,--host <arg> node hostname or ip address
-p,--port <arg> remote jmx agent port number
AddUser <username> <password>
RemoveUser <username>
ListUsers
AddDomain <domainName>
RemoveDomain <domainName>
ContainsDomain <domainName>
ListDomains
ListMappings
ListUserDomainMappings <user> <domain>
AddAddressMapping <fromUser> <fromDomain> <toAddress>
RemoveAddressMapping <fromUser> <fromDomain> <toAddress>
AddRegexMapping <user> <domain> <regex>
RemoveRegexMapping <user> <domain> <regex>
SetPassword <username> <password>
CopyMailbox <srcBean> <dstBean>
DeleteUserMailboxes <user>
CreateMailbox <namespace> <user> <name>
ListUserMailboxes <user>
DeleteMailbox <namespace> <user> <name>
ImportEml <namespace> <user> <name> <path>
GetStorageQuota <quotaroot>
GetMessageCountQuota <quotaroot>
GetQuotaroot <namespace> <user> <name>
GetMaxStorageQuota <quotaroot>
GetMaxMessageCountQuota <quotaroot>
SetMaxStorageQuota <quotaroot> <maxMessageCount>
SetMaxMessageCountQuota <quotaroot> <maxStorage>
SetGlobalMaxStorageQuota <maxStorage>
SetGlobalMaxMessageCountQuota <maxMessageCount>
GetGlobalMaxStorageQuota
GetGlobalMaxMessageCountQuota
ReindexMailbox <namespace> <user> <name>
ReindexAll
GetSieveQuota
SetSieveQuota <quota>
RemoveSieveQuota
GetSieveUserQuota <username>
SetSieveUserQuota <username> <quota>
RemoveSieveUserQuota <username>
AddActiveSieveScript <username> <scriptname> <path>
Could you put me in the right track.
Use
cd james-server-spring-app-3.7.3\bin
run.bat
If the windows firewall pops up and asks to allow the opening of the port, please allow the opening of the relevant port for Apache James Mail Server to use.
Do not use
james console
run.bat - log
C:\Users\IEUser\Downloads\james-server-spring-app-3.7.3\bin>run.bat
24-Jan-2023 04:55:15.525 INFO [main] org.springframework.context.support.AbstractApplicationContext.prepareRefresh:583 - Refreshing org.apache.james.container.spring.context.JamesServerApplicationContext#7c098bb3: startup date [Tue Jan 24 04:55:15 PST 2023]; root of context hierarchy
24-Jan-2023 04:55:15.610 INFO [main] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions:317 - Loading XML bean definitions from class path resource [META-INF/org/apache/james/spring-server.xml]
...
24-Jan-2023 04:55:25.995 INFO [main] org.apache.activemq.transport.TransportServerThreadSupport.doStart:69 - Listening for connections at: tcp://127.0.0.1:50043
24-Jan-2023 04:55:25.995 INFO [main] org.apache.activemq.broker.TransportConnector.start:267 - Connector tcp://127.0.0.1:50043 started
24-Jan-2023 04:55:26.010 INFO [main] org.apache.activemq.broker.BrokerService.doStartBroker:759 - Apache ActiveMQ 5.17.2 (james, broker) started
...
24-Jan-2023 04:55:27.678 INFO [main] org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.configure:199 - SMTP Service bound to: 0.0.0.0:25
...
24-Jan-2023 04:55:27.992 INFO [main] org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.configure:199 - POP3 Service bound to: 0.0.0.0:110
...
24-Jan-2023 04:55:28.239 INFO [main] org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.configure:199 - IMAP Service bound to: 0.0.0.0:143
...
24-Jan-2023 04:55:28.378 INFO [main] org.springframework.remoting.rmi.RmiRegistryFactoryBean.getRegistry:217 - Looking for RMI registry at port '9999', using custom socket factory
...
24-Jan-2023 04:55:29.997 INFO [main] org.apache.james.app.spring.JamesAppSpringMain.main:46 - Apache James Server is successfully started in 14534 milliseconds.
james-cli.bat - log
C:\Users\IEUser\Downloads\james-server-spring-app-3.7.3\bin>james-cli.bat adduser user#localhost myPass
AddUser command executed sucessfully in 573 ms.
My Env:
Windows 10,
OpenJDK11U-jdk_x64_windows_hotspot_11.0.18_10.msi
james-server-spring-app-3.7.3-app.zip
JDK install
(1) Remove Environment Variavle: JAVA_HOME, And Remove JDK Path from Environment Variavle: PATH
(2) install adoptium Open JDK 11
(2-1) Download JDK msi file - https://adoptium.net/temurin/releases/
Operating System: Windows
Architecture: x64
Package Type: JDK
Version: 11
install Type: .msi
(2-2) click OpenJDK11U-jdk_x64_windows_hotspot_11.0.18_10.msi
(2-3) GUI: Welcome to ..., Click Next
(2-4) GUI: Custom Setup,
(2-4-1) Set JAVA_HOME variale, drop down, select Entire feacture will be installed on local hard drive
(2-4-2) JavaSoft(Oracle) registry keys, drop down, select Entire feacture will be installed on local hard drive
(2-4-3) Click Next
(2-5) GUI: Ready to install ..., click Install
(2-6) Windows: User Account Control, Do you want to allow..., clock Yes
(2-7) GUI: Completed the Eclipse ..., click Finish
Ive got a springboot application that when bundled into a docker image and published to Amazon ECS fails to start
The error message is:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| timestamp | message |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1645724032287 | . ____ _ __ _ _ |
| 1645724032287 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ |
| 1645724032287 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ |
| 1645724032287 | \\/ ___)| |_)| | | | | || (_| | ) ) ) ) |
| 1645724032287 | ' |____| .__|_| |_|_| |_\__, | / / / / |
| 1645724032287 | =========|_|==============|___/=/_/_/_/ |
| 1645724032290 | :: Spring Boot :: |
| 1645724033092 | 17:33:53.090 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - Starting Application using Java 11.0.14.1 on ip-172-31-20-189.eu-west-1.compute.internal with PID 1 (/app.jar started by root in /) |
| 1645724033093 | 17:33:53.093 [main] DEBUG com.jtmaxwell.Microservice.DocumentGenerator.Application - Running with Spring Boot, Spring |
| 1645724033093 | 17:33:53.093 [main] INFO com.jtmaxwell.Microservice.DocumentGenerator.Application - No active profile set, falling back to default profiles: default |
| 1645724033095 | 17:33:53.095 [main] DEBUG org.springframework.boot.SpringApplication - Loading source class com.jtmaxwell.Microservice.DocumentGenerator.Application |
| 1645724033893 | 17:33:53.893 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1 |
| 1645724034087 | 17:33:54.087 [main] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' |
| 1645724034591 | 17:33:54.590 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/config/MessagingConfig.class] |
| 1645724034601 | 17:33:54.599 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/consumer/User.class] |
| 1645724034697 | 17:33:54.693 [main] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: URL [jar:file:/app.jar!/com/jtmaxwell/Microservice/DocumentGenerator/publisher/OrderPublisher.class] |
| 1645724035094 | 17:33:55.094 [main] ERROR org.springframework.boot.SpringApplication - Application run failed |
| 1645724035094 | java.lang.IllegalArgumentException: No auto configuration classes found in META-INF/spring.factories. If you are using a custom packaging, make sure that file is correct. |
| 1645724035094 | at org.springframework.util.Assert.notEmpty(Assert.java:470) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getCandidateConfigurations(AutoConfigurationImportSelector.java:180) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector.getAutoConfigurationEntry(AutoConfigurationImportSelector.java:123) |
| 1645724035094 | at org.springframework.boot.autoconfigure.AutoConfigurationImportSelector$AutoConfigurationGroup.process(AutoConfigurationImportSelector.java:434) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGrouping.getImports(ConfigurationClassParser.java:879) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:331) |
| 1645724035094 | at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:247) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:311) |
| 1645724035094 | at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:112) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:746) |
| 1645724035094 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:564) |
| 1645724035094 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:730) |
| 1645724035094 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) |
| 1645724035094 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1290) |
| 1645724035094 | at com.jtmaxwell.Microservice.DocumentGenerator.Application.main(Application.java:18) |
| 1645724035293 | 17:33:55.290 [main] DEBUG org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext - Closing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext#13acb0d1, started on Thu Feb 24 17:33:53 UTC 2022 |
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The pom.xml is
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.6.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.jtmaxwell</groupId>
<artifactId>microservice.documentgenerator</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>Microservice.DocumentGenerator</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>11</java.version>
</properties>
<repositories>
<repository>
<id>clojars.org</id>
<url>https://repo.clojars.org</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.github.erdos</groupId>
<artifactId>stencil-core</artifactId>
<version>0.3.29</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Can you please check first the docker images run outside of ECS? Seem there are some libs not got bundled as part of the docker build.
Also i assume your spring boot app runs locally
The answer here was as others highlighted. The image was missing dependencies due to the jar file from Visual Code being used for the docker build.
I ran the supplied
mvnw package
Then used the resulting jar file to build the docker image
The Java 9 application I am building compiles and works well from IntelliJ IDE. On IDE, I have tried configuring as both Spring Boot application as well as plain Application and both configuration work well.
While executing maven build, I encounter RuntimeException with below stacktrace.
Caused by: java.lang.RuntimeException
at org.springframework.asm.ClassVisitor.visitModule(ClassVisitor.java:148)
at org.springframework.asm.ClassReader.readModule(ClassReader.java:762)
at org.springframework.asm.ClassReader.accept(ClassReader.java:663)
at org.springframework.asm.ClassReader.accept(ClassReader.java:527)
at org.springframework.boot.loader.tools.MainClassFinder.createClassDescriptor(MainClassFinder.java:267)
at org.springframework.boot.loader.tools.MainClassFinder.doWithMainClasses(MainClassFinder.java:223)
at org.springframework.boot.loader.tools.MainClassFinder.findSingleMainClass(MainClassFinder.java:203)
at org.springframework.boot.loader.tools.Repackager.findMainMethod(Repackager.java:365)
at org.springframework.boot.loader.tools.Repackager.findMainMethodWithTimeoutWarning(Repackager.java:354)
at org.springframework.boot.loader.tools.Repackager.buildManifest(Repackager.java:325)
at org.springframework.boot.loader.tools.Repackager.repackage(Repackager.java:255)
at org.springframework.boot.loader.tools.Repackager.repackage(Repackager.java:248)
at org.springframework.boot.loader.tools.Repackager.repackage(Repackager.java:193)
at org.springframework.boot.maven.RepackageMojo.repackage(RepackageMojo.java:221)
at org.springframework.boot.maven.RepackageMojo.execute(RepackageMojo.java:208)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
... 22 more
On analyzing, its being caused because of the ASM api level provided. With direct execution, it is org.springframework.asm.Opcodes#ASM6, but when using maven build it is Opcodes#ASM4 which is causing the issue.
Further analysis reveals that the instances are created as below -
Maven Build - https://github.com/spring-projects/spring-boot/blob/d3c34ee3d1bfd3db4a98678c524e145ef9bca51c/spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/MainClassFinder.java#L301
IDE Execution - https://github.com/spring-projects/spring-framework/blob/43b5e21947f3ad9682ae39cd8b8b5ae4b8f72c14/spring-core/src/main/java/org/springframework/core/type/classreading/ClassMetadataReadingVisitor.java#L71
Let me know if I need to report this as an issue with Spring Framework or if any workarounds exist.
Maven Version: 3.5.0
Spring Boot: 2.0.0.M5
Its a modular build and POM files are here: https://gist.github.com/techpavan/faa81d46321004cd50e7403b03d70a2e
A simpler reproducer is available here - https://github.com/techpavan/java9-maven-spring-boot
With this reproducer, you can find that maven build fails readily. But when put a breakpoint at org.springframework.asm.ClassVisitor > line 78 (Constructor) and update the api value during execution to 393216 (ASM6), you'll find that the build completes successfully. By default the value is set to 262144 (ASM4) which fails at line 147.
Update: The issue is accepted as bug by Spring community and should be fixed in Milestone 6 release - https://github.com/spring-projects/spring-boot/issues/10647
Update: The issue is fixed in the spring-boot master branch on Oct 17, 2017. Should be a part of M6 release.
Your mvn dependency:tree describes it as follows:-
➜[main] [INFO] +- org.springframework.boot:spring-boot-starter-jetty:jar:2.0.0.M5:compile
[main] [INFO] | +- org.eclipse.jetty:jetty-servlets:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty:jetty-http:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty:jetty-util:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- org.eclipse.jetty:jetty-io:jar:9.4.7.v20170914:compile
[main] [INFO] | +- org.eclipse.jetty:jetty-webapp:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty:jetty-xml:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- org.eclipse.jetty:jetty-security:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- org.eclipse.jetty:jetty-server:jar:9.4.7.v20170914:compile
[main] [INFO] | +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.7.v20170914:compile
[main] [INFO] | | | \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty.websocket:websocket-client:jar:9.4.7.v20170914:compile
[main] [INFO] | | | \- org.eclipse.jetty:jetty-client:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.7.v20170914:compile
[main] [INFO] | | \- javax.servlet:javax.servlet-api:jar:3.1.0:compile
[main] [INFO] | +- org.eclipse.jetty.websocket:javax-websocket-server-impl:jar:9.4.7.v20170914:compile
[main] [INFO] | | +- org.eclipse.jetty:jetty-annotations:jar:9.4.7.v20170914:compile
[main] [INFO] | | | +- org.eclipse.jetty:jetty-plus:jar:9.4.7.v20170914:compile
➜[main] [INFO] | | | +- org.ow2.asm:asm:jar:5.1:compile
[main] [INFO] | | | \- org.ow2.asm:asm-commons:jar:5.1:compile
[main] [INFO] | | | \- org.ow2.asm:asm-tree:jar:5.1:compile
This clearly reflects that the dependency on spring-boot-starter-jetty for your project relies on asm:5.1 and the version of asm is not compatible with the latest Java release. You can try upgrading to 6.0_BETA version of it.
To what I got to know from this issue, jetty didn't upgrade to the latest version because of its incompatibility with OSGI version number. I'd faced that issue while trying to make vaadin8 application work with Java 9 wherein the solution I could achieve was to build jetty locally and then use a custom version in my project as stated in the answer -
This was attained after overcoming the #jetty.project/1758 by
upgrading to the 6.0_BETA of asm and asm-commons libraries and using
the custom 9.4.7-SNAPSHOT built on my local used in the project(commit
- #e34415.)
Update: This indeed is a bug in spring-boot milestone as confirmed in the edited question as well.
Thanks to wilkinsona on GitHub whose workaround helped me on this issue. Just adding a spring-boot-maven-plugin configuration with mainClass entry can solve this problem on M5 release. Expected to have a proper fix on M6.
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
+ <configuration>
+ <mainClass>com.test.TestMain</mainClass>
+ </configuration>
</plugin>
I'm trying to make a simple JMS client application for Websphere MQ 7.5
I already have ".bindings" file with connection factory and destination, which I'm trying to connecto to.
This is my simple Java code, that I'm trying to run on mac:
package com.company;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.naming.Context;
import javax.naming.directory.InitialDirContext;
import java.util.Hashtable;
public class Main {
public static final String cfLookup = "TEST12";
public static final String icf = "com.sun.jndi.fscontext.RefFSContextFactory";
static String url = "file:///tmp/JNDI";
public static void main(String[] args) {
InitialDirContext ctx = null;
Destination myDest = null;
ConnectionFactory connFactory = null;
Hashtable environment = new Hashtable();
try {
environment.put(Context.INITIAL_CONTEXT_FACTORY, icf);
environment.put(Context.PROVIDER_URL, url);
ctx = new InitialDirContext( environment );
connFactory = (ConnectionFactory)ctx.lookup( cfLookup );
} catch (Exception e) {
e.printStackTrace();
}
}
}
And this is the exception:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/disthub2/impl/client/SessionConfig
at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.setupDistHubTracing(WMQFactoryFactory.java:335)
at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.<init>(WMQFactoryFactory.java:305)
at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.getInstance(WMQFactoryFactory.java:186)
at com.ibm.msg.client.wmq.factories.WMQComponent.getFactoryInstance(WMQComponent.java:140)
at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:157)
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.setProviderFactory(JmsConnectionFactoryImpl.java:168)
at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:293)
at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:77)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
at javax.naming.InitialContext.lookup(InitialContext.java:417)
at com.company.Main.main(Main.java:20)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
It's pretty obvious, that some other libraries are required, but none of those JAR file I got copying from Websphere MQ client installation seem to work. And also it feels kinda strange that some provider specific class is needed to make a query against JNDI.
I already read a lot of topics at IBM and mqseries, but nothing helps. Any assistance would by higly appreciated.
Also with every run there is also a newly generated FDC file with more detailed information
----------------------------------START FFST------------------------------------
/Users/***/IdeaProjects/JmsSample/FFDC/JMSCC0001.FDC PID:640
JMS Common Client First Failure Symptom Report
Product :- IBM WebSphere MQ classes for JMS
Date/Time :- Sat Feb 06 16:56:23 MSK 2016
System time :- 1454766983855
Operating System :- Mac OS X
UserID :- ***
Java Vendor :- Oracle Corporation
Java Version :- 25.72-b15
Source Class :- JmsFactoryFactory
Source Method :- getIntance(int)
ProbeID :- XI001005
Thread :- name=main priority=5 group=main ccl=sun.misc.Launcher$AppClassLoader#372f7a8d
Data
----
| connectionTypeName :- com.ibm.msg.client.wmq
| exception :- ExceptionDepth is 4
| exception :-
| | Cause:1 :- java.lang.reflect.InvocationTargetException
| | Cause:2 :- java.lang.NoClassDefFoundError: com/ibm/disthub2/impl/client/SessionConfig
| | Cause:3 :- java.lang.ClassNotFoundException: com.ibm.disthub2.impl.client.SessionConfig
| | Message:2 :- com/ibm/disthub2/impl/client/SessionConfig
| | Message:3 :- com.ibm.disthub2.impl.client.SessionConfig
| | StackTrace:1 :- java.lang.reflect.InvocationTargetException
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:182)
| | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
| | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
| | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
| | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:77)
| | at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
| | at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
| | at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
| | at javax.naming.InitialContext.lookup(InitialContext.java:417)
| | at com.company.Main.main(Main.java:31)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
| | Caused by: java.lang.NoClassDefFoundError: com/ibm/disthub2/impl/client/SessionConfig
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.setupDistHubTracing(WMQFactoryFactory.java:335)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.<init>(WMQFactoryFactory.java:305)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.getInstance(WMQFactoryFactory.java:186)
| | at com.ibm.msg.client.wmq.factories.WMQComponent.getFactoryInstance(WMQComponent.java:140)
| | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:157)
| | ... 19 more
| | Caused by: java.lang.ClassNotFoundException: com.ibm.disthub2.impl.client.SessionConfig
| | at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| | ... 24 more
| |
| | StackTrace:2 :- java.lang.NoClassDefFoundError: com/ibm/disthub2/impl/client/SessionConfig
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.setupDistHubTracing(WMQFactoryFactory.java:335)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.<init>(WMQFactoryFactory.java:305)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.getInstance(WMQFactoryFactory.java:186)
| | at com.ibm.msg.client.wmq.factories.WMQComponent.getFactoryInstance(WMQComponent.java:140)
| | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:157)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:182)
| | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
| | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
| | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
| | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:77)
| | at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
| | at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
| | at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
| | at javax.naming.InitialContext.lookup(InitialContext.java:417)
| | at com.company.Main.main(Main.java:31)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
| | Caused by: java.lang.ClassNotFoundException: com.ibm.disthub2.impl.client.SessionConfig
| | at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| | ... 24 more
| |
| | StackTrace:3 :- java.lang.ClassNotFoundException: com.ibm.disthub2.impl.client.SessionConfig
| | at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
| | at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
| | at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.setupDistHubTracing(WMQFactoryFactory.java:335)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.<init>(WMQFactoryFactory.java:305)
| | at com.ibm.msg.client.wmq.factories.WMQFactoryFactory.getInstance(WMQFactoryFactory.java:186)
| | at com.ibm.msg.client.wmq.factories.WMQComponent.getFactoryInstance(WMQComponent.java:140)
| | at com.ibm.msg.client.jms.internal.JmsFactoryFactoryImpl.getInstance(JmsFactoryFactoryImpl.java:157)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:182)
| | at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
| | at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
| | at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
| | at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:77)
| | at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
| | at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
| | at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
| | at javax.naming.InitialContext.lookup(InitialContext.java:417)
| | at com.company.Main.main(Main.java:31)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| | at java.lang.reflect.Method.invoke(Method.java:498)
| | at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
| |
Version information
-------------------
IBM WebSphere MQ JMS Provider
7.5.0.3
p750-003-140123
Production
Common Services for Java Platform, Standard Edition
7.5.0.3
p750-003-140123
Production
Java Message Service Client
7.5.0.3
p750-003-140123
Production
WebSphere MQ classes for Java Message Service
7.5.0.3
p750-003-140123
Production
Stack trace
-----------
Stack trace to show the location of the FFST call
| FFST Location :- java.lang.Exception
| at com.ibm.msg.client.commonservices.trace.Trace.getCurrentPosition(Trace.java:1959)
| at com.ibm.msg.client.commonservices.trace.Trace.createFFSTString(Trace.java:1898)
| at com.ibm.msg.client.commonservices.trace.Trace.ffstInternal(Trace.java:1787)
| at com.ibm.msg.client.commonservices.trace.Trace.ffst(Trace.java:1660)
| at com.ibm.msg.client.jms.JmsFactoryFactory.getInstance(JmsFactoryFactory.java:214)
| at com.ibm.mq.jms.MQConnectionFactory.initialiseMQConnectionFactory(MQConnectionFactory.java:3314)
| at com.ibm.mq.jms.MQConnectionFactory.<init>(MQConnectionFactory.java:283)
| at com.ibm.mq.jms.MQQueueConnectionFactory.<init>(MQQueueConnectionFactory.java:81)
| at com.ibm.mq.jms.MQQueueConnectionFactoryFactory.getObjectInstance(MQQueueConnectionFactoryFactory.java:77)
| at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
| at com.sun.jndi.fscontext.RefFSContext.lookup(RefFSContext.java:146)
| at com.sun.jndi.fscontext.FSContext.lookup(FSContext.java:127)
| at javax.naming.InitialContext.lookup(InitialContext.java:417)
| at com.company.Main.main(Main.java:31)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
| at java.lang.reflect.Method.invoke(Method.java:498)
| at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
|
Property Store Contents
-----------------------
All currently set properties
| awt.toolkit :- sun.lwawt.macosx.LWCToolkit
| file.encoding :- UTF-8
| file.encoding.pkg :- sun.io
| file.separator :- /
| ftp.nonProxyHosts :- local|*.local|169.254/16|*.169.254/16
| gopherProxySet :- false
| http.nonProxyHosts :- local|*.local|169.254/16|*.169.254/16
| idea.launcher.bin.path :- /Applications/IntelliJ IDEA 15 CE.app/Contents/bin
| idea.launcher.port :- 7533
| java.awt.graphicsenv :- sun.awt.CGraphicsEnvironment
| java.awt.printerjob :- sun.lwawt.macosx.CPrinterJob
| java.class.path :- /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/lib/tools.jar:/Users/vladimirpopov/IdeaProjects/JmsSample/out/production/JmsSample:/Users/vladimirpopov/IdeaProjects/JmsSample/com.ibm.mq.jar:/Users/vladimirpopov/IdeaProjects/JmsSample/com.ibm.mqjms.jar:/Users/vladimirpopov/Downloads/jar/jms.jar:/Users/vladimirpopov/Downloads/jar/jndi.jar:/Users/vladimirpopov/Downloads/jar/fscontext.jar:/Users/vladimirpopov/Downloads/jar/com.ibm.mq.commonservices.jar:/Users/vladimirpopov/Downloads/jar/com.ibm.mq.defaultconfig.jar:/Users/vladimirpopov/Downloads/jar/providerutil.jar:/Applications/IntelliJ IDEA 15 CE.app/Contents/lib/idea_rt.jar
| java.class.version :- 52.0
| java.endorsed.dirs :- /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/endorsed
| java.ext.dirs :- /Users/vladimirpopov/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
| java.home :- /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre
| java.io.tmpdir :- /var/folders/v0/vk3bz2wn79q5_9qggqqf_ynh0000gn/T/
| java.library.path :- /Users/vladimirpopov/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
| java.runtime.name :- Java(TM) SE Runtime Environment
| java.runtime.version :- 1.8.0_72-b15
| java.specification.name :- Java Platform API Specification
| java.specification.vendor :- Oracle Corporation
| java.specification.version :- 1.8
| java.vendor :- Oracle Corporation
| java.vendor.url :- http://java.oracle.com/
| java.vendor.url.bug :- http://bugreport.sun.com/bugreport/
| java.version :- 1.8.0_72
| java.vm.info :- mixed mode
| java.vm.name :- Java HotSpot(TM) 64-Bit Server VM
| java.vm.specification.name :- Java Virtual Machine Specification
| java.vm.specification.vendor :- Oracle Corporation
| java.vm.specification.version :- 1.8
| java.vm.vendor :- Oracle Corporation
| java.vm.version :- 25.72-b15
| line.separator :-
|
| os.arch :- x86_64
| os.name :- Mac OS X
| os.version :- 10.10.5
| path.separator :- :
| socksNonProxyHosts :- local|*.local|169.254/16|*.169.254/16
| sun.arch.data.model :- 64
| sun.boot.class.path :- /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/sunrsasign.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/classes
| sun.boot.library.path :- /Library/Java/JavaVirtualMachines/jdk1.8.0_72.jdk/Contents/Home/jre/lib
| sun.cpu.endian :- little
| sun.cpu.isalist :-
| sun.io.unicode.encoding :- UnicodeBig
| sun.java.command :- com.intellij.rt.execution.application.AppMain com.company.Main
| sun.java.launcher :- SUN_STANDARD
| sun.jnu.encoding :- UTF-8
| sun.management.compiler :- HotSpot 64-Bit Tiered Compilers
| sun.os.patch.level :- unknown
| user.country :- US
| user.dir :- /Users/vladimirpopov/IdeaProjects/JmsSample
| user.home :- /Users/vladimirpopov
| user.language :- en
| user.name :- vladimirpopov
| user.timezone :-
WorkQueueMananger Contents
--------------------------
| Current ThreadPool size :- 0
| Maintain ThreadPool size :- false
| Maximum ThreadPool size :- -1
| ThreadPool inactive timeout :- 0
Runtime properties
------------------
| Available processors :- 4
| Free memory in bytes (now) :- 107069912
| Max memory in bytes :- 1908932608
| Total memory in bytes (now) :- 128974848
Component Manager Contents
--------------------------
Common Services Components:
| CMVC :- p750-003-140123
| Class Name :- class com.ibm.msg.client.commonservices.j2se.J2SEComponent
| Component Name :- com.ibm.msg.client.commonservices.j2se
| Component Title :- Common Services for Java Platform, Standard Edition
| Factory Class :- class com.ibm.msg.client.commonservices.j2se.CommonServicesImplementation
| Version :- 7.5.0.3
| inPreferenceTo[0] :- com.ibm.msg.client.commonservices.j2me
Messaging Provider Components:
| CMVC :- p750-003-140123
| Class Name :- class com.ibm.msg.client.wmq.factories.WMQComponent
| Component Name :- com.ibm.msg.client.wmq
| Component Title :- IBM WebSphere MQ JMS Provider
| Factory Class :- class com.ibm.msg.client.wmq.factories.WMQFactoryFactory
| Version :- 7.5.0.3
You do realize that you can look inside the JAR files? The MQ Java JAR file with that class is 'dhbcore.jar'.
Instead of selectively copying then using certain MQ JAR files (which is not supported by IBM), why don't you follow the supported path IBM has laid out?
Add dhbcore.jar in class path and you should be good.
I'm working with WAS8 but I believe that the answer will be similar.
You'll have to reference the libs located in the ${was8Path}/installedConnectors/wmq.jmsra.rar/ path.
I had a similar exception **Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/msg/client/commonservices/trace/Trace** and I solved it by referencing the ${was8Path}/installedConnectors/wmq.jmsra.rar/com.ibm.msg.client.commonservices.jar library to the project.
I was using ANT to deploy my stuff to Tomcat. But I had trouble with missing dependencies and I wanted to add Ivy, cause it was reccomended.
Now I added this to my build.xml file:
<!-- Ivy settings start-->
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<!-- download Ivy from web site so that it can be used even without any special installation -->
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy">
<!-- try to load ivy here from ivy home, in case the user has not already dropped
it into ant's lib dir (note that the latter copy will always take precedence).
We will not fail as long as local lib dir exists (it may be empty) and
ivy is in at least one of ant's lib dir or the local lib dir. -->
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<target name="go" depends="init-ivy" description="--> resolve dependencies, compile and run the project">
<echo message="using ivy to resolve commons-lang 2.1..."/>
<!--
here comes the magic line: asks ivy to resolve a dependency on commons-lang 2.1 and to build an ant path with it from its cache
-->
<ivy:cachepath organisation="commons-lang" module="commons-lang" revision="2.1" pathid="lib.path.id" inline="true"/>
</target>
<!-- Ivy settings end-->
With this I am trying to add common-lang JAR file to my project.
This is what I get as output:
Buildfile: C:\Users\Jansu\workspace\HelloWorld\build.xml
build:
deploywar:
download-ivy:
[get] Getting: http://repo2.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
[get] To: C:\Users\Jansu\.ant\lib\ivy-2.2.0.jar
[get] Not modified - so not downloaded
init-ivy:
go:
[echo] using ivy to resolve commons-lang 2.1...
[ivy:cachepath] :: Ivy 2.2.0 - 20100923230623 :: http://ant.apache.org/ivy/ ::
[ivy:cachepath] :: loading settings :: url = jar:file:/C:/Users/Jansu/.ant/lib/ivy-2.2.0.jar!/org/apache/ivy/core/settings/ivysettings.xml
[ivy:cachepath] :: resolving dependencies :: commons-lang#commons-lang-caller;working
[ivy:cachepath] confs: [default, master, compile, provided, runtime, system, sources, javadoc, optional]
[ivy:cachepath] found commons-lang#commons-lang;2.1 in public
[ivy:cachepath] :: resolution report :: resolve 151ms :: artifacts dl 10ms
---------------------------------------------------------------------
| | modules || artifacts |
| conf | number| search|dwnlded|evicted|| number|dwnlded|
---------------------------------------------------------------------
| default | 1 | 0 | 0 | 0 || 1 | 0 |
| master | 1 | 0 | 0 | 0 || 1 | 0 |
| compile | 1 | 0 | 0 | 0 || 0 | 0 |
| provided | 1 | 0 | 0 | 0 || 0 | 0 |
| runtime | 1 | 0 | 0 | 0 || 0 | 0 |
| system | 1 | 0 | 0 | 0 || 0 | 0 |
| sources | 1 | 0 | 0 | 0 || 1 | 0 |
| javadoc | 1 | 0 | 0 | 0 || 1 | 0 |
| optional | 1 | 0 | 0 | 0 || 0 | 0 |
---------------------------------------------------------------------
BUILD SUCCESSFUL
Total time: 2 seconds
I guess it works..
now 2 questions:
1) where do those JAR files appear in my project?
2) how would I add other JAR files, such as Spring framework files?
This:
<ivy:cachepath organisation="commons-lang" module="commons-lang" revision="2.1" pathid="lib.path.id" inline="true"/>
</target>
is called an inline retrieval and tells Ivy to build an ant-path with pathid="lib.path.id" from the ivy cache the jars will not be copied to your project. The cache is in $ {user.home}/.ivy2.
If you want to download artifacts to your project you will have to use the retrieve task and define an ivy.xml for your project.