Java client with code to publish messages to pubsub gcp topic. This code works fine in my localhost but when I try runnnig my jar on linux and with proxy this error is shown:
INFO | jvm 1 | 2022/10/25 12:28:38 | WARNING: [Channel<1>: (pubsub.googleapis.com:443)] Failed to resolve name. status=Status{code=UNAVAILABLE, description=Unable to resolve host pubsub.googleapis.com, cause=java.lang.RuntimeException: java.net.UnknownHostException: pubsub.googleapis.com: Name or service not known
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:223)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.doResolve(DnsNameResolver.java:282)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.grpclb.GrpclbNameResolver.doResolve(GrpclbNameResolver.java:63)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver$Resolve.run(DnsNameResolver.java:318)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.lang.Thread.run(Thread.java:750)
INFO | jvm 1 | 2022/10/25 12:28:38 | Caused by: java.net.UnknownHostException: pubsub.googleapis.com: Name or service not known
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.Inet4AddressImpl.lookupAllHostAddr(Native Method)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:929)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1324)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName0(InetAddress.java:1277)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName(InetAddress.java:1193)
INFO | jvm 1 | 2022/10/25 12:28:38 | at java.net.InetAddress.getAllByName(InetAddress.java:1127)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver$JdkAddressResolver.resolveAddress(DnsNameResolver.java:631)
INFO | jvm 1 | 2022/10/25 12:28:38 | at io.grpc.internal.DnsNameResolver.resolveAddresses(DnsNameResolver.java:219)
INFO | jvm 1 | 2022/10/25 12:28:38 | ... 6 more`
This is my code:
public HttpTransportFactory getHttpTranpostFactory(String proxy, String puerto) {
Proxy prox = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxy, Integer.parseInt(puerto)));
HttpTransport httpTransport = new NetHttpTransport.Builder().setProxy(prox).build();
return new HttpTransportFactory() {
#Override
public HttpTransport create() {
return httpTransport;
}
};
}`
In main class:
HttpTransportFactory httpTransport = getHttpTranpostFactory("myvalidproxy.com", "8080");
credentialsProvider = FixedCredentialsProvider.create(
ServiceAccountCredentials.fromStream(new FileInputStream("/path/to/accountservice"), httpTransport));
TopicName topicName = TopicName.of("avalidgcpproject","avalidtopic");
Publisher publisher = Publisher.newBuilder(topicName)
.setEnableCompression(true)
.setCompressionBytesThreshold(100000L)
.setCredentialsProvider(credentialsProvider)
.build();
ByteString data = ByteString.copyFromUtf8("Hello World!");
PubsubMessage pubsubMessage = PubsubMessage.newBuilder()
.setData(data)
.build();
ApiFuture<String> messageIdFuture = publisher.publish(pubsubMessage); //Error is in this line
System.out.println(messageIdFuture.get());`
Maven dependencies:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-pubsub</artifactId>
<version>1.120.16</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.cloud/google-cloud-core -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-core</artifactId>
<version>2.8.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.json/json -->
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20220320</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.postgresql/postgresql -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.3.7</version>
</dependency>
Error is on ApiFuture messageIdFuture = publisher.publish(pubsubMessage); line
When I generate the jar, I have to change the io.grpc.LoadBalancerProvider inside META-INF/services file with content: io.grpc.internal.PickFirstLoadBalancerProvider because if I dont do that, jar thrown another exception.
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
I am using Spring-security-web-3.2.5 jar and Java 8 and Spring-web-mvc 4.1.7 in hybris 6 Platform.
I am getting Nullpointer Exception in ApplicationFilterProxy and in class
AbstractRememberMeServices.
When I debug this class I observed that the logger object is null and when code is trying to perform the following operation , throws NullPointer Exception
this.logger.debug("Interactive login attempt was unsuccessful.");
Exception StackTrace :
SEVERE: Servlet.service() for servlet [DispatcherServlet] in context with path [] threw exception [Error while processing internal filterchain. Exception occurred at chain position: 9 of 16. Current filter: 'FilterChainProxy[Filter Chains: [[ Ant [pattern='/_ui/**'], []], [ Ant [pattern='/checkout/**'], [org.springframework.security.web.access.channel.ChannelProcessingFilter#f6a714c, org.springframework.security.web.context.SecurityContextPersistenceFilter#3aa9c43e, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#148b51b7, org.springframework.security.web.authentication.logout.LogoutFilter#7dc977d4, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#21759930, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#55893114, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#1bc1c4fb, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#2d007780, org.springframework.security.web.access.ExceptionTranslationFilter#20b1d709, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#3c2c439a]], [ com.example.storefront.security.ExcludeUrlRequestMatcher#3a6c99ce, [org.springframework.security.web.access.channel.ChannelProcessingFilter#31cb980a, org.springframework.security.web.context.SecurityContextPersistenceFilter#3ef9fc3c, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter#28aef10c, org.springframework.security.web.authentication.logout.LogoutFilter#7652af3e, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter#1bb47236, org.springframework.security.web.savedrequest.RequestCacheAwareFilter#6add7560, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter#3524cfa6, org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter#566cad63, org.springframework.security.web.authentication.AnonymousAuthenticationFilter#6ef1505a, org.springframework.security.web.access.ExceptionTranslationFilter#6f065e91, org.springframework.security.web.access.intercept.FilterSecurityInterceptor#7ccce528]]]]'!; nested exception is java.lang.NullPointerException] with root cause
INFO | jvm 1 | main | 2016/09/22 15:23:01.365 | java.lang.NullPointerException
INFO | jvm 1 | main | 2016/09/22 15:23:01.366 | at org.springframework.security.web.authentication.rememberme.AbstractRememberMeServices.loginFail(AbstractRememberMeServices.java:239)
INFO | jvm 1 | main | 2016/09/22 15:23:01.369 | at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.unsuccessfulAuthentication(AbstractAuthenticationProcessingFilter.java:353)
INFO | jvm 1 | main | 2016/09/22 15:23:01.369 | at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:225)
INFO | jvm 1 | main | 2016/09/22 15:23:01.370 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.371 | at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)
INFO | jvm 1 | main | 2016/09/22 15:23:01.372 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.378 | at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)
INFO | jvm 1 | main | 2016/09/22 15:23:01.379 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.380 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.383 | at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
INFO | jvm 1 | main | 2016/09/22 15:23:01.391 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.392 | at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:144)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
INFO | jvm 1 | main | 2016/09/22 15:23:01.393 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.394 | at com.example.storefront.filters.SiteMinderFilter.doFilter(SiteMinderFilter.java:119)
INFO | jvm 1 | main | 2016/09/22 15:23:01.394 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.395 | at com.example.storefront.filters.UrlEncoderFilter.doFilterInternal(UrlEncoderFilter.java:87)
INFO | jvm 1 | main | 2016/09/22 15:23:01.395 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at com.example.storefront.filters.StorefrontFilter.doFilter(StorefrontFilter.java:74)
INFO | jvm 1 | main | 2016/09/22 15:23:01.396 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.397 | at com.example.storefront.filters.cms.CMSSiteFilter.doFilterInternal(CMSSiteFilter.java:100)
INFO | jvm 1 | main | 2016/09/22 15:23:01.397 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.398 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at com.example.storefront.filters.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:89)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at com.example.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
INFO | jvm 1 | main | 2016/09/22 15:23:01.399 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.406 | at de.hybris.platform.servicelayer.web.SessionFilter.doFilter(SessionFilter.java:71)
INFO | jvm 1 | main | 2016/09/22 15:23:01.407 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.408 | at de.hybris.platform.servicelayer.web.Log4JFilter.doFilter(Log4JFilter.java:45)
INFO | jvm 1 | main | 2016/09/22 15:23:01.408 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain$InternalFilterChain.doFilter(AbstractPlatformFilterChain.java:224)
INFO | jvm 1 | main | 2016/09/22 15:23:01.409 | at de.hybris.platform.servicelayer.web.AbstractPlatformFilterChain.doFilterInternal(AbstractPlatformFilterChain.java:154)
INFO | jvm 1 | main | 2016/09/22 15:23:01.410 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.410 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
INFO | jvm 1 | main | 2016/09/22 15:23:01.411 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
INFO | jvm 1 | main | 2016/09/22 15:23:01.411 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.412 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.413 | at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:85)
INFO | jvm 1 | main | 2016/09/22 15:23:01.414 | at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
INFO | jvm 1 | main | 2016/09/22 15:23:01.414 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.415 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.415 | at com.example.storefront.filters.AcceleratorAddOnFilter.doFilter(AcceleratorAddOnFilter.java:92)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
INFO | jvm 1 | main | 2016/09/22 15:23:01.416 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.417 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.417 | at de.hybris.platform.servicelayer.web.XSSFilter.processPatternsAndDoFilter(XSSFilter.java:293)
INFO | jvm 1 | main | 2016/09/22 15:23:01.419 | at de.hybris.platform.servicelayer.web.XSSFilter.doFilter(XSSFilter.java:247)
INFO | jvm 1 | main | 2016/09/22 15:23:01.419 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
INFO | jvm 1 | main | 2016/09/22 15:23:01.420 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
INFO | jvm 1 | main | 2016/09/22 15:23:01.420 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
INFO | jvm 1 | main | 2016/09/22 15:23:01.423 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
INFO | jvm 1 | main | 2016/09/22 15:23:01.424 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
INFO | jvm 1 | main | 2016/09/22 15:23:01.425 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
INFO | jvm 1 | main | 2016/09/22 15:23:01.426 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
INFO | jvm 1 | main | 2016/09/22 15:23:01.427 | at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
INFO | jvm 1 | main | 2016/09/22 15:23:01.428 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
INFO | jvm 1 | main | 2016/09/22 15:23:01.428 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
INFO | jvm 1 | main | 2016/09/22 15:23:01.429 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
INFO | jvm 1 | main | 2016/09/22 15:23:01.430 | at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
INFO | jvm 1 | main | 2016/09/22 15:23:01.430 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
INFO | jvm 1 | main | 2016/09/22 15:23:01.431 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
INFO | jvm 1 | main | 2016/09/22 15:23:01.433 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | main | 2016/09/22 15:23:01.448 | at java.lang.Thread.run(Thread.java:745)
I am unable to figure out why this is happening , Any help is greatly appreciated.
I'm using Netbeans IDE.
INFO | jvm 1 | 2015/12/29 23:27:18 | Java Runtime: Oracle Corporation 1.7.0_51 C:\Program Files (x86)\Java\jre7
INFO | jvm 1 | 2015/12/29 23:27:18 | Heap sizes: current=15872k free=12594k max=506816k.
INFO | jvm 1 | 2015/12/29 23:27:18 | JVM args: -Dactivemq.home=./. -Dactivemq.base=./. -Djavax.net.ssl.keyStorePassword=password -Djavax.net.ssl.trustStorePassword=password -Djavax.net.ssl.keyStore=././conf/broker.ks -Djavax.net.ssl.trustStore=././conf/broker.ts -Dcom.sun.management.jmxremote -Dorg.apache.activemq.UseDedicatedTaskRunner=true -DJava.util.logging.config.file=logging.properties -Xmx512m -DJava.library.path=././bin/win32 -Dwrapper.key=nnnVAsNERmehemBP -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=632 -Dwrapper.version=3.2.3 -Dwrapper.native_library=wrapper -Dwrapper.cpu.timeout=10 -Dwrapper.jvmid=1.
INFO | jvm 1 | 2015/12/29 23:27:18 | ACTIVEMQ_HOME:..
INFO | jvm 1 | 2015/12/29 23:27:18 | ACTIVEMQ_BASE:..
INFO | jvm 1 | 2015/12/29 23:27:18 | Loading message broker from: xbean:activemq.xml.
INFO | jvm 1 | 2015/12/29 23:27:19 | INFO CamelNamespaceHandler - camel-osgi.jar not detected in classpath.
INFO | jvm 1 | 2015/12/29 23:27:19 | ERROR: Java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | Java.lang.RuntimeException: Failed to execute start task. Reason: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.runTask (StartCommand.java:98)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.AbstractCommand.execute (AbstractCommand.java:57)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.ShellCommand.runTask (ShellCommand.java:129)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.AbstractCommand.execute (AbstractCommand.java:57)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.ShellCommand.main (ShellCommand.java:79)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.reflect.Method.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.Main.runTaskClass (Main.java:251)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.Main.main (Main.java:107)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.reflect.Method.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run (WrapperSimpleApp.java:240)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.Thread.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo (XBeanQNameHelper.java:75)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.coerceNamespaceAwarePropertyValues (XBeanQNameHelper.java:54)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parseBeanDefinitionElement (XBeanBeanDefinitionParserDelegate.java:59)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement (BeanDefinitionParserDelegate.java:389)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement (BeanDefinitionParserDelegate.java:358)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.processBeanDefinition (XBeanBeanDefinitionDocumentReader.java:174)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement (XBeanBeanDefinitionDocumentReader.java:101)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions (XBeanBeanDefinitionDocumentReader.java:81)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions (DefaultBeanDefinitionDocumentReader.java:92)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions (XmlBeanDefinitionReader.java:507)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions (XBeanXmlBeanDefinitionReader.java:79)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions (XmlBeanDefinitionReader.java:398)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:342)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:310)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions (ResourceXmlApplicationContext.java:111)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions (ResourceXmlApplicationContext.java:104)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory (AbstractRefreshableApplicationContext.java:123)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory (AbstractApplicationContext.java:422)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:352)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext (XBeanBrokerFactory.java:96)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker (XBeanBrokerFactory.java:52)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.broker.BrokerFactory.createBroker (BrokerFactory.java:71)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.broker.BrokerFactory.createBroker (BrokerFactory.java:54)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.startBroker (StartCommand.java:115)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.runTask (StartCommand.java:74)
INFO | jvm 1 | 2015/12/29 23:27:19 |. 16 more.
INFO | jvm 1 | 2015/12/29 23:27:19 | Caused by: Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader$1.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader$1.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.security.AccessController.doPrivileged (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader.findClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.ClassLoader.loadClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.ClassLoader.loadClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass (XBeanQNameHelper.java:107)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo (XBeanQNameHelper.java:72)
INFO | jvm 1 | 2015/12/29 23:27:19 |. 42 more.
INFO | jvm 1 | 2015/12/29 23:27:19 | ERROR: Java.lang.Exception: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | Java.lang.Exception: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.runTask (StartCommand.java:99)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.AbstractCommand.execute (AbstractCommand.java:57)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.ShellCommand.runTask (ShellCommand.java:129)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.AbstractCommand.execute (AbstractCommand.java:57)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.ShellCommand.main (ShellCommand.java:79)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.reflect.Method.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.Main.runTaskClass (Main.java:251)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.Main.main (Main.java:107)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.NativeMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at sun.reflect.DelegatingMethodAccessorImpl.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.reflect.Method.invoke (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run (WrapperSimpleApp.java:240)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.Thread.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to load type: processing.XslProcessor. Reason: Java.lang.ClassNotFoundException: processing.XslProcessor; nested exception is Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo (XBeanQNameHelper.java:75)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.coerceNamespaceAwarePropertyValues (XBeanQNameHelper.java:54)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanBeanDefinitionParserDelegate.parseBeanDefinitionElement (XBeanBeanDefinitionParserDelegate.java:59)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement (BeanDefinitionParserDelegate.java:389)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseBeanDefinitionElement (BeanDefinitionParserDelegate.java:358)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.processBeanDefinition (XBeanBeanDefinitionDocumentReader.java:174)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseDefaultElement (XBeanBeanDefinitionDocumentReader.java:101)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanBeanDefinitionDocumentReader.parseBeanDefinitions (XBeanBeanDefinitionDocumentReader.java:81)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions (DefaultBeanDefinitionDocumentReader.java:92)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions (XmlBeanDefinitionReader.java:507)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2.XBeanXmlBeanDefinitionReader.registerBeanDefinitions (XBeanXmlBeanDefinitionReader.java:79)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions (XmlBeanDefinitionReader.java:398)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:342)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions (XmlBeanDefinitionReader.java:310)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions (ResourceXmlApplicationContext.java:111)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.loadBeanDefinitions (ResourceXmlApplicationContext.java:104)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory (AbstractRefreshableApplicationContext.java:123)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory (AbstractApplicationContext.java:422)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.springframework.context.support.AbstractApplicationContext.refresh (AbstractApplicationContext.java:352)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:64)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.ResourceXmlApplicationContext.(ResourceXmlApplicationContext.java:52)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.xbean.XBeanBrokerFactory.createApplicationContext (XBeanBrokerFactory.java:96)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.xbean.XBeanBrokerFactory.createBroker (XBeanBrokerFactory.java:52)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.broker.BrokerFactory.createBroker (BrokerFactory.java:71)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.broker.BrokerFactory.createBroker (BrokerFactory.java:54)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.startBroker (StartCommand.java:115)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.activemq.console.command.StartCommand.runTask (StartCommand.java:74)
INFO | jvm 1 | 2015/12/29 23:27:19 |. 16 more.
INFO | jvm 1 | 2015/12/29 23:27:19 | Caused by: Java.lang.ClassNotFoundException: processing.XslProcessor.
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader$1.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader$1.run (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.security.AccessController.doPrivileged (Native Method)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.net.URLClassLoader.findClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.ClassLoader.loadClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at Java.lang.ClassLoader.loadClass (Unknown Source)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.loadClass (XBeanQNameHelper.java:107)
INFO | jvm 1 | 2015/12/29 23:27:19 | at org.apache.xbean.spring.context.v2c.XBeanQNameHelper.getBeanInfo (XBeanQNameHelper.java:72)
INFO | jvm 1 | 2015/12/29 23:27:19 |. 42 more.
Activemq.xml:
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://activemq.apache.org/schema/core
http://activemq.apache.org/schema/core/activemq-core.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost" dataDirectory="${activemq.base}/data">
<plugins>
<authorizationPlugin>
<map>
<authorizationMap>
<authorizationEntries>
<authorizationEntry queue=">" read="admins,users" write="admins,users" admin="admins,users"/>
<authorizationEntry topic="ActiveMQ.Advisory.>" read="guests,users" write="guests,users" admin="guests,users"/>
</authorizationEntries>
</authorizationMap>
</map>
</authorizationPlugin>
<simpleAuthenticationPlugin>
<users>
<authenticationUser username="test" password="test" groups="users"/>
<authenticationUser username="system" password="manager" groups="admins,users"/>
</users>
</simpleAuthenticationPlugin>
</plugins>
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" memoryLimit="5mb"/>
<policyEntry topic=">" memoryLimit="5mb">
<dispatchPolicy>
<strictOrderDispatchPolicy/>
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy/>
</subscriptionRecoveryPolicy>
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector name="default-nc" uri="multicast://default" userName="system" password="manager"/>
<networkConnector name="localhost" uri="static://(tcp://127.0.0.1:61616)" userName="system" password="manager"/>
</networkConnectors>
<persistenceAdapter>
<amqPersistenceAdapter syncOnWrite="false" directory="${activemq.base}/data" maxFileLength="20 mb"/>
</persistenceAdapter>
<sslContext>
<sslContext keyStore="file:${activemq.base}/conf/broker.ks" keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts" trustStorePassword="password"/>
</sslContext>
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="20 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="1 gb" name="foo"/>
</storeUsage>
<tempUsage>
<tempUsage limit="100 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616" discoveryUri="multicast://default" />
<transportConnector name="ssl" uri="ssl://0.0.0.0:61617" />
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613" />
<transportConnector name="xmpp" uri="xmpp://0.0.0.0:61222" />
</transportConnectors>
</broker>
<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
<package>processing</package>
<route>
<from uri="activemq:test"/>
<multicast>
<to uri="activemq:toStdOut"/>
<to uri="activemq:toStdOut2"/>
<to uri="activemq:routeError"/>
</multicast>
</route>
<!-- Contr1 inbound route -->
<route>
<from uri="activemq:contr1In"/>
<to uri="activemq:contr1InTransform"/>
<bean ref="contr1InProcessor" method="process"/>
<multicast>
<to uri="activemq:oneCIn"/>
</multicast>
</route>
<!-- Contr1 outbound route -->
<route>
<from uri="activemq:contr1OutTransform"/>
<bean ref="contr1OutProcessor" method="process"/>
<to uri="activemq:contr1Out"/>
</route>
<!-- OneC outbound route -->
<route>
<from uri="activemq:oneCOut"/>
<choice>
<when>
<xpath>//contr-id = '1'</xpath>
<to uri="activemq:contr1OutTransform"/>
</when>
<otherwise>
<to uri="activemq:routeError"/>
</otherwise>
</choice>
</route>
</camelContext>
<bean id="contr1InProcessor" class="processing.XslProcessor">
<property name="xslName" value="PrepareRequest.xsl"/>
<property name="contrId" value="1"/>
</bean>
<bean id="contr1OutProcessor" class="processing.XslProcessor">
<property name="xslName" value="PrepareResponse.xsl"/>
<property name="contrId" value="1"/>
</bean>
<bean id="errorConsumerBean" class="processing.ErrorConsumer" lazy-init="false">
<property name="destinationDir" value="D:\1c-jms\1c-jms\errors"/>
</bean>
<bean id="testBean" class="processing.Test" lazy-init="false"/>
<!-- configure the camel activemq component to use the current broker -->
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://localhost?create=false&waitForStart=10000" />
<property name="userName" value="system"/>
<property name="password" value="manager"/>
</bean>
</property>
</bean>
<!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic -->
<!--
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost" username="${activemq.username}" password="${activemq.password}"/>
-->
<!-- An embedded servlet engine for serving up the Admin console -->
<jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
<connectors>
<nioConnector port="8161"/>
</connectors>
<handlers>
<webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
<webAppContext contextPath="/camel" resourceBase="${activemq.base}/webapps/camel" logUrlOnStart="true"/>
<webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
<webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
</handlers>
</jetty>
Class:
public class XslProcessor implements Processor
{
private String xslName = null;
private String contrId = null;
#EndpointInject(uri="activemq:error")
private ProducerTemplate errorProducer = null;
public ProducerTemplate getErrorProducer()
{
return errorProducer;
}
public void setErrorProducer(ProducerTemplate errorProducer)
{
this.errorProducer = errorProducer;
}
public static class MyErrorListener implements ErrorListener
{
private Throwable lastException = null;
public Throwable getLastException()
{
return lastException;
}
public void setLastException(Throwable lastException)
{
this.lastException = lastException;
}
public void error(TransformerException exception) throws TransformerException
{
lastException = exception;
}
public void fatalError(TransformerException exception) throws TransformerException
{
lastException = exception;
}
public void warning(TransformerException exception) throws TransformerException
{
lastException = exception;
}
}
public String getXslName()
{
return xslName;
}
public void setXslName(String xslName)
{
this.xslName = xslName;
}
public String getContrId()
{
return contrId;
}
public void setContrId(String contrId)
{
this.contrId = contrId;
}
public void process(Exchange _exchange) throws Exception
{
byte[] buf = _exchange.getIn().getBody(byte[].class);
ByteArrayInputStream xmlStream = new ByteArrayInputStream(buf);
try
{
StreamSource xmlSource = new StreamSource(xmlStream);
InputStream xslStream = this.getClass().getResourceAsStream(xslName);
MyErrorListener errorListener = new MyErrorListener();
try
{
StreamSource xslSource = new StreamSource(xslStream);
TransformerFactory factory = TransformerFactory.newInstance();
factory.setErrorListener(errorListener);
Transformer t = factory.newTransformer(xslSource);
ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
try
{
StreamResult result = new StreamResult(resultStream);
t.setParameter("contrId", contrId);
t.transform(xmlSource, result);
if (errorListener.lastException != null)
{
throw new Exception("Exception in xslt: ",errorListener.lastException);
}
resultStream.flush();
_exchange.getOut().setBody(resultStream.toByteArray(), byte[].class);
}
finally
{
resultStream.close();
}
}
finally
{
xslStream.close();
}
}
catch (Throwable _t)
{
errorProducer.sendBody(buf);
}
finally
{
xmlStream.close();
}
}
}
I have a single class application
#Configuration
#ComponentScan
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class);
}
}
It's works pretty well (doing nothing) with the following dependencies (Ivy notation used)
<dependency org="org.springframework.boot" name="spring-boot-starter" rev="1.1.7.RELEASE"/>
<dependency org="org.springframework" name="spring-context" rev="4.1.0.RELEASE"/>
<dependency org="org.springframework" name="spring-beans" rev="4.1.1.RELEASE"/>
But when I add <dependency org="org.springframework.boot" name="spring-boot" rev="1.1.7.RELEASE"/> I get the following exception.
org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:124)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:952)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:941)
INFO | jvm 1 | 2014/10/10 17:45:49 | at one.video.streaming.Main.main(Main.java:48)
INFO | jvm 1 | 2014/10/10 17:45:49 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2014/10/10 17:45:49 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO | jvm 1 | 2014/10/10 17:45:49 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 1 | 2014/10/10 17:45:49 | at java.lang.reflect.Method.invoke(Method.java:483)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:136)
INFO | jvm 1 | 2014/10/10 17:45:49 | at java.lang.Thread.run(Thread.java:745)
INFO | jvm 1 | 2014/10/10 17:45:49 | Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:174)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:147)
INFO | jvm 1 | 2014/10/10 17:45:49 | at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:121)
INFO | jvm 1 | 2014/10/10 17:45:49 | ... 13 common frames omitted
My goal is not to add spring-boot library, I don't need it, but I want to understand how does Spring work and why it starts to trying to use some web stuff for my app.