It keeps on getting started and shutsdown in few seconds and is keep on looping.
Below is the log of start and shutdown of routes continuously
2016-01-04 14:35:03,340 | INFO | Thread-207 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) is shutting down
2016-01-04 14:35:03,340 | INFO | Thread-207 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) uptime not started
2016-01-04 14:35:03,340 | INFO | Thread-207 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) is shutdown in 0.000 seconds
2016-01-04 14:35:03,527 | INFO | rint Extender: 3 | ClientRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.ClientRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,527 | INFO | rint Extender: 3 | ClientRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.ClientRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,527 | INFO | rint Extender: 3 | CoverageDefaultingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.CoverageDefaultingRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | CoverageDefaultingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.CoverageDefaultingRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | DocumentRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.DocumentRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | DocumentRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.DocumentRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | PolicyRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.PolicyRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | PolicyRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.PolicyRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | PricingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.PricingRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | PricingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.PricingRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | QuotConversionRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.QuotConversionRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | QuotConversionRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.QuotConversionRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | QuotCreationRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.QuotCreationRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | QuotCreationRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.QuotCreationRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:03,543 | INFO | rint Extender: 3 | UpdateAuthStatusRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.ncp.routes.UpdateAuthStatusRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:04,673 | INFO | rint Extender: 3 | UpdateAuthStatusRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.ncp.routes.UpdateAuthStatusRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:04,673 | INFO | rint Extender: 3 | NIPtoSBMTcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.NIPtoSBMTcDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:05,340 | INFO | rint Extender: 3 | NIPtoSBMTcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.NIPtoSBMTcDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:05,340 | INFO | rint Extender: 3 | TaxIdDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.TaxIdDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:06,471 | INFO | rint Extender: 3 | TaxIdDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.TaxIdDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:06,471 | INFO | rint Extender: 3 | TcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.TcDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:06,974 | INFO | rint Extender: 3 | TcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.TcDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:06,974 | INFO | rint Extender: 3 | CustomerSearchRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.ws.routes.CustomerSearchRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,483 | INFO | rint Extender: 3 | CustomerSearchRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.ws.routes.CustomerSearchRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,498 | INFO | rint Extender: 3 | BlueprintContainerImpl | 19 - org.apache.aries.blueprint.core - 1.4.2 | Bundle com.ndfs.nip.interfaces.nip-interfaces is waiting for dependencies [(&(component=http)(objectClass=org.apache.camel.spi.ComponentResolver)), (&(component=https)(objectClass=org.apache.camel.spi.ComponentResolver))]
2016-01-04 14:35:07,498 | INFO | Thread-209 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) is shutting down
2016-01-04 14:35:07,498 | INFO | Thread-209 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) uptime not started
2016-01-04 14:35:07,498 | INFO | Thread-209 | BlueprintCamelContext | 117 - org.apache.camel.camel-core - 2.14.1 | Apache Camel 2.14.1 (CamelContext: NIP_Interfaces_Context) is shutdown in 0.000 seconds
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | ClientRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.ClientRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | ClientRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.ClientRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | CoverageDefaultingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.CoverageDefaultingRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | CoverageDefaultingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.CoverageDefaultingRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | DocumentRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.DocumentRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | DocumentRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.DocumentRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | PolicyRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.PolicyRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | PolicyRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.PolicyRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | PricingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.PricingRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | PricingRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.PricingRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | QuotConversionRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.QuotConversionRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | QuotConversionRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.QuotConversionRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | QuotCreationRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.as400.routes.QuotCreationRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | QuotCreationRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.as400.routes.QuotCreationRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:07,592 | INFO | rint Extender: 2 | UpdateAuthStatusRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.ncp.routes.UpdateAuthStatusRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:08,592 | INFO | rint Extender: 2 | UpdateAuthStatusRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.ncp.routes.UpdateAuthStatusRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:08,592 | INFO | rint Extender: 2 | NIPtoSBMTcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.NIPtoSBMTcDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:09,108 | INFO | rint Extender: 2 | NIPtoSBMTcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.NIPtoSBMTcDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:09,108 | INFO | rint Extender: 2 | TaxIdDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.TaxIdDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:10,162 | INFO | rint Extender: 2 | TaxIdDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.TaxIdDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:10,162 | INFO | rint Extender: 2 | TcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.sbm.routes.TcDetailsRouteBuilder in container NIP_Interfaces_Context
2016-01-04 14:35:10,708 | INFO | rint Extender: 2 | TcDetailsRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Route (class com.ndfs.nip.hdi.sbm.routes.TcDetailsRouteBuilder) started successfully in container NIP_Interfaces_Context
2016-01-04 14:35:10,708 | INFO | rint Extender: 2 | CustomerSearchRouteBuilder | 8 - com.ndfs.nip.framework.nip-framework - 0.0.1.SNAPSHOT | Starting the route class com.ndfs.nip.hdi.ws.routes.CustomerSearchRouteBuilder in container NIP_Interfaces_Context
Also the blueprint extender: 1, blueprint extender: 2 keeps on coming. Checked the log level in debug mode, there are no unusual errors. Can someone help me deal with such issue please?
This line
BlueprintContainerImpl | 19 - org.apache.aries.blueprint.core - 1.4.2 | Bundle com.ndfs.nip.interfaces.nip-interfaces is waiting for dependencies [(&(component=http)(objectClass=org.apache.camel.spi.ComponentResolver)), (&(component=https)(objectClass=org.apache.camel.spi.ComponentResolver))]
indicates that you need to install camel-http component that has the http component. In the JBoss Fuse shell type: features:install camel-http to install it.
Related
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 have written a small Camel application (https://github.com/bhushantimilsina/camel-simple-app) that reads file from inbox directory, calls a processor to change its case and write output to a file in outbox directory. When I run the main class (using IDE or using run.cmd script), everything works as expected but when I run the application using executable JAR, only message content is null.
To do this test, I copied \inbox\inputFile.txt in \target so that input file is there. Then I run the JAR using 'java -jar camel-simple-app-1.0-jar-with-dependencies.jar' from target directory.
Output log when running as executable JAR:
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2980 | Routes startup summary (total:4 started:4)
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2985 | Started inputFileRoute (file://inbox)
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2985 | Started multicastRoute (direct://inputChannel)
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2985 | Started upperCaseTransformRoute (direct://upperCaseTransformInputChannel)
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2985 | Started lowerCaseTransformRoute (direct://lowerCaseTransformInputChannel)
2021-03-04 20:04:46.581| INFO | AbstractCamelContext.java 2997 | Apache Camel 3.8.0 (camelContext) started in 234ms (build:31ms init:172ms start:31ms)
2021-03-04 20:04:46.612| INFO | AbstractCamelContext.java 2980 | Routes startup summary (total:0 started:0)
2021-03-04 20:04:46.612| INFO | AbstractCamelContext.java 2997 | Apache Camel 3.8.0 (camel-1) started in 15ms (build:0ms init:15ms start:0ms)
2021-03-04 20:04:47.581| INFO | CamelLogger.java 166 | *** Input message read from file: C:\SpringPractice\camel-simple-app\target\inbox\inputFile.txt**
2021-03-04 20:04:47.581| INFO | CamelLogger.java 166 | *** Message:
2021-03-04 20:04:47.581| INFO | CamelLogger.java 166 | *** Multicasting the file content to different processors ...
2021-03-04 20:04:47.628| INFO | CamelLogger.java 166 | *** Transforming the message to upper case
2021-03-04 20:04:47.628| INFO | CamelLogger.java 166 | *** Transforming the message to lower case
2021-03-04 20:04:47.628| ERROR | CamelLogger.java 205 | Failed delivery for (MessageId: F89B7EA52A14215-0000000000000001 on ExchangeId: F89B7EA52A14215-0000000000000001). Exhausted after delivery attempt: 1 caught: java.lang.NullPointerException
Here in the log the Message: is empty.
When running from IDE or using run.cmd script I can see the Message: print message in the file.
2021-03-04 20:12:44.320| INFO | AbstractCamelContext.java 2980 | Routes startup summary (total:4 started:4)
2021-03-04 20:12:44.336| INFO | AbstractCamelContext.java 2985 | Started inputFileRoute (file://inbox)
2021-03-04 20:12:44.336| INFO | AbstractCamelContext.java 2985 | Started multicastRoute (direct://inputChannel)
2021-03-04 20:12:44.336| INFO | AbstractCamelContext.java 2985 | Started upperCaseTransformRoute (direct://upperCaseTransformInputChannel)
2021-03-04 20:12:44.336| INFO | AbstractCamelContext.java 2985 | Started lowerCaseTransformRoute (direct://lowerCaseTransformInputChannel)
2021-03-04 20:12:44.336| INFO | AbstractCamelContext.java 2997 | Apache Camel 3.8.0 (camelContext) started in 422ms (build:78ms init:312ms start:32ms)
2021-03-04 20:12:44.383| INFO | AbstractCamelContext.java 2980 | Routes startup summary (total:0 started:0)
2021-03-04 20:12:44.383| INFO | AbstractCamelContext.java 2997 | Apache Camel 3.8.0 (camel-1) started in 16ms (build:0ms init:16ms start:0ms)
2021-03-04 20:12:45.351| INFO | CamelLogger.java 166 | *** Input message read from file: C:\SpringPractice\camel-simple-app\inbox\inputFile.txt
2021-03-04 20:12:45.351| INFO | CamelLogger.java 166 | *** Message: SoMe meESSage GOes HERe
2021-03-04 20:12:45.351| INFO | CamelLogger.java 166 | *** Multicasting the file content to different processors ...
2021-03-04 20:12:45.398| INFO | CamelLogger.java 166 | *** Transforming the message to lower case
2021-03-04 20:12:45.398| INFO | CamelLogger.java 166 | *** Transforming the message to upper case
2021-03-04 20:12:46.383| INFO | AbstractCamelContext.java 3174 | Apache Camel 3.8.0 (camel-1) shutting down (timeout:45s)
2021-03-04 20:12:46.383| INFO | AbstractCamelContext.java 3368 | Routes shutdown summary (total:0 stopped:0)
2021-03-04 20:12:46.383| INFO | AbstractCamelContext.java 3313 | Apache Camel 3.8.0 (camel-1) shutdown in 0ms (uptime:2s)
I'm really stuck with a problem
I have built an Axis 2 client running against an API using a .WSDL file. I have used a local jetty server when I have developed, but I need to move it over to a local tomcat server. When I moved my .war file to the local Tomcat, I get the following error. Can someone please give me some advice so I'm going in the right direction
SLL debug in tomcat:
http-nio-8080-exec-1, WRITE: TLSv1.2 Handshake, length = 189
http-nio-8080-exec-1, handling exception: java.net.SocketException: Connection reset
http-nio-8080-exec-1, SEND TLSv1.2 ALERT: fatal, description = unexpected_message
http-nio-8080-exec-1, WRITE: TLSv1.2 Alert, length = 2
http-nio-8080-exec-1, Exception sending alert: java.net.SocketException: Connection reset by peer: socket write error
http-nio-8080-exec-1, called closeSocket()
http-nio-8080-exec-1, called close()
http-nio-8080-exec-1, called closeInternal(true)
A
INFO | jvm 1 | 2016/12/21 13:28:59.193 | Unable to sendViaPost to url[https://someurl.com/Service.svc]
INFO | jvm 1 | 2016/12/21 13:28:59.194 | org.apache.axis2.AxisFault: Connection reset
INFO | jvm 1 | 2016/12/21 13:28:59.196 | at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
INFO | jvm 1 | 2016/12/21 13:28:59.197 | at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:99)
INFO | jvm 1 | 2016/12/21 13:28:59.198 | at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
INFO | jvm 1 | 2016/12/21 13:28:59.199 | at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
INFO | jvm 1 | 2016/12/21 13:28:59.201 | at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
INFO | jvm 1 | 2016/12/21 13:28:59.204 | at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
INFO | jvm 1 | 2016/12/21 13:28:59.205 | at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
INFO | jvm 1 | 2016/12/21 13:28:59.206 | at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
INFO | jvm 1 | 2016/12/21 13:28:59.207 | at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.executeMethod(HTTPSenderImpl.java:900)
INFO | jvm 1 | 2016/12/21 13:28:59.209 | at org.apache.axis2.transport.http.impl.httpclient3.HTTPSenderImpl.sendViaPost(HTTPSenderImpl.java:212)
INFO | jvm 1 | 2016/12/21 13:28:59.213 | at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:121)
INFO | jvm 1 | 2016/12/21 13:28:59.215 | at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:403)
INFO | jvm 1 | 2016/12/21 13:28:59.218 | at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:234)
INFO | jvm 1 | 2016/12/21 13:28:59.220 | at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:431)
INFO | jvm 1 | 2016/12/21 13:28:59.222 | at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:399)
INFO | jvm 1 | 2016/12/21 13:28:59.224 | at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
INFO | jvm 1 | 2016/12/21 13:28:59.227 | at org.apache.axis2.client.OperationClient.execute(OperationClient.java:150)
INFO | jvm 1 | 2016/12/21 13:28:59.229 | at se.docpub.documentfolderservice.DocumentFolderServiceStub.loadFolder(DocumentFolderServiceStub.java:769)
INFO | jvm 1 | 2016/12/21 13:28:59.231 | at se.soleilit.document_api.resources.DocumentResource.getPublishedFolder(DocumentResource.java:96)
INFO | jvm 1 | 2016/12/21 13:28:59.233 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 1 | 2016/12/21 13:28:59.235 | at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.236 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.237 | at java.lang.reflect.Method.invoke(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:28:59.239 | at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
INFO | jvm 1 | 2016/12/21 13:28:59.246 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:144)
INFO | jvm 1 | 2016/12/21 13:28:59.250 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:161)
INFO | jvm 1 | 2016/12/21 13:28:59.255 | at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:205)
INFO | jvm 1 | 2016/12/21 13:28:59.265 | at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:99)
INFO | jvm 1 | 2016/12/21 13:28:59.270 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:389)
INFO | jvm 1 | 2016/12/21 13:28:59.279 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:347)
INFO | jvm 1 | 2016/12/21 13:28:59.283 | at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:102)
INFO | jvm 1 | 2016/12/21 13:28:59.290 | at org.glassfish.jersey.server.ServerRuntime$2.run(ServerRuntime.java:326)
INFO | jvm 1 | 2016/12/21 13:28:59.298 | at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
INFO | jvm 1 | 2016/12/21 13:28:59.302 | at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
INFO | jvm 1 | 2016/12/21 13:28:59.304 | at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
INFO | jvm 1 | 2016/12/21 13:28:59.306 | at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
INFO | jvm 1 | 2016/12/21 13:28:59.308 | at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
INFO | jvm 1 | 2016/12/21 13:28:59.314 | at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)
INFO | jvm 1 | 2016/12/21 13:28:59.316 | at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:305)
INFO | jvm 1 | 2016/12/21 13:28:59.324 | at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1154)
INFO | jvm 1 | 2016/12/21 13:28:59.330 | at org.glassfish.jersey.servlet.WebComponent.serviceImpl(WebComponent.java:473)
INFO | jvm 1 | 2016/12/21 13:28:59.333 | at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:427)
INFO | jvm 1 | 2016/12/21 13:28:59.336 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:388)
INFO | jvm 1 | 2016/12/21 13:28:59.339 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:341)
INFO | jvm 1 | 2016/12/21 13:28:59.345 | at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:228)
INFO | jvm 1 | 2016/12/21 13:28:59.348 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
INFO | jvm 1 | 2016/12/21 13:28:59.352 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
INFO | jvm 1 | 2016/12/21 13:28:59.354 | at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
INFO | jvm 1 | 2016/12/21 13:28:59.356 | at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
INFO | jvm 1 | 2016/12/21 13:28:59.357 | at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
INFO | jvm 1 | 2016/12/21 13:28:59.363 | at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
INFO | jvm 1 | 2016/12/21 13:28:59.365 | at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
INFO | jvm 1 | 2016/12/21 13:28:59.367 | at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
INFO | jvm 1 | 2016/12/21 13:28:59.369 | at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
INFO | jvm 1 | 2016/12/21 13:28:59.371 | at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
INFO | jvm 1 | 2016/12/21 13:28:59.373 | at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
INFO | jvm 1 | 2016/12/21 13:28:59.375 | at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
INFO | jvm 1 | 2016/12/21 13:28:59.376 | at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
INFO | jvm 1 | 2016/12/21 13:29:00.224 | at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
INFO | jvm 1 | 2016/12/21 13:29:00.532 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
INFO | jvm 1 | 2016/12/21 13:29:00.534 | at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
INFO | jvm 1 | 2016/12/21 13:29:00.535 | at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.537 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.539 | at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
INFO | jvm 1 | 2016/12/21 13:29:00.541 | at java.lang.Thread.run(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.542 | Caused by: java.net.SocketException: Connection reset
INFO | jvm 1 | 2016/12/21 13:29:00.543 | at java.net.SocketInputStream.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.555 | at java.net.SocketInputStream.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.558 | at sun.security.ssl.InputRecord.readFully(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.560 | at sun.security.ssl.InputRecord.readV3Record(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.573 | at sun.security.ssl.InputRecord.read(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.590 | at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.593 | at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.618 | at sun.security.ssl.SSLSocketImpl.writeRecord(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.621 | at sun.security.ssl.AppOutputStream.write(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.656 | at java.io.BufferedOutputStream.flushBuffer(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.659 | at java.io.BufferedOutputStream.flush(Unknown Source)
INFO | jvm 1 | 2016/12/21 13:29:00.726 | at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:95)
INFO | jvm 1 | 2016/12/21 13:29:00.738 | ... 63 more
I am using Spring boot for my tomcat deploy of my webapp. On my mac, and on a fellow developers linux install (not sure of his distro), the catalina.out file has just one instance of the spring ascii art indicating that it booted up just once as expected.
On our development and production servers, both centOS and mirrors of one another, the catalina.out file has five instances of the Spring ascii art indicating that it is "booting" 5 times! I have code that runs in the onStartup method of my RestApplication that extends SpringBootServletInitializer and that code runs 5 times verifying that spring is booting up 5 times. Why is this happening on our production machines but not on our development machines? War files are deployed to tomcat 8 in all instances.
It takes many minutes before the webapp is ready as a result.
At first I thought maybe it was linked the number of clases tagged #RestController since that seemed about 5, but it turns out we have 7 classes with this tag. So, I can't find anything that would match up with this number of 5 boots.
Any thoughts? Cheers.
UPDATE
Here is my log file with an exception stack trace in the onStartup method. It is looking for a file of the name servletContext.getContextPath() + "_init.properties". As you can see we are alternating between a DeployWar with the name of "wildbook" (correct name of my war file) and a StartChild with the name of "". Except the last DeployWar does not seem to trigger a StartChild.
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:40:53 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:40:53 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:40:53 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:40:53 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:40:53 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:40:53 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:40:53 |
INFO | jvm 1 | 2015/09/30 19:41:02 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:02 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:02 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:03 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:17 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:17 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:17 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:17 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:17 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:17 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:17 |
INFO | jvm 1 | 2015/09/30 19:41:24 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:24 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:24 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:25 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:34 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:34 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:34 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:34 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:34 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:34 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:34 |
INFO | jvm 1 | 2015/09/30 19:41:40 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:40 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:40 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:41 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:50 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:41:50 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:41:50 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:41:50 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:41:50 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:41:50 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:41:50 |
INFO | jvm 1 | 2015/09/30 19:41:55 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:41:55 | java.io.FileNotFoundException: /opt/tomcat8/conf/_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:55 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:41:56 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:05 | . ____ _ __ _ _
INFO | jvm 1 | 2015/09/30 19:42:05 | /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
INFO | jvm 1 | 2015/09/30 19:42:05 | \\/ ___)| |_)| | | | | || (_| | ) ) ) )
INFO | jvm 1 | 2015/09/30 19:42:05 | ' |____| .__|_| |_|_| |_\__, | / / / /
INFO | jvm 1 | 2015/09/30 19:42:05 | =========|_|==============|___/=/_/_/_/
INFO | jvm 1 | 2015/09/30 19:42:05 | :: Spring Boot :: (v1.2.1.RELEASE)
INFO | jvm 1 | 2015/09/30 19:42:05 |
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] org.ecocean.rest.RestApplication - Can't read init property file, building simple props from init params.
INFO | jvm 1 | 2015/09/30 19:42:13 | java.io.FileNotFoundException: /opt/tomcat8/conf/wildbook_init.properties (No such file or directory)
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.open(Native Method) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.io.FileInputStream.<init>(FileInputStream.java:131) ~[na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at com.samsix.util.io.ResourceReaderImpl.addSource(ResourceReaderImpl.java:1182) ~[s6-util-1.0.6.jar:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.ecocean.rest.RestApplication.onStartup(RestApplication.java:98) ~[RestApplication.class:na]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [spring-web-4.1.4.RELEASE.jar:4.1.4.RELEASE]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5143) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:917) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1701) [catalina.jar:8.0.18]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | at java.lang.Thread.run(Thread.java:745) [na:1.8.0_11]
INFO | jvm 1 | 2015/09/30 19:42:13 | [WARN] o.f.core.internal.command.DbMigrate - outOfOrder mode is active. Migration of schema "public" may not be reproducible.
Second Update
Here is my SpringBootServletInitializer in it's entirety as requested.
package org.ecocean.rest;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import org.ecocean.ShepherdPMF;
import org.flywaydb.core.Flyway;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.samsix.database.ConnectionInfo;
#Configuration
#EnableAutoConfiguration
#ComponentScan
public class RestApplication extends SpringBootServletInitializer {
/**
* This method should allow you to start up the rest service from a compiled jar rather
* than having to make a war and stick it in tomcat.
*/
public static void main(final String[] args) {
SpringApplication.run(RestApplication.class, args);
}
#Override
protected final SpringApplicationBuilder configure(final SpringApplicationBuilder application) {
// ObjectMapper mapper = new ObjectMapper();
// mapper.registerModule(new JodaModule());
return application.sources(RestApplication.class);
}
#Override
public void onStartup(final ServletContext servletContext) throws ServletException
{
super.onStartup(servletContext);
//
// Uses default location of db/migration on classpath. You will find it in the src/main/resources folder.
// OutOfOrder = true makes it so that if two developers create SQL in a different order and one somehow
// gets applied to the database, the other's should too. This should only be an issue on development
// databases and allows me to get other developers sql patches even if I've applied a newer one myself
// locally. In production, everything should be fine.
//
ConnectionInfo connectionInfo = ShepherdPMF.getConnectionInfo();
Flyway flyway = new Flyway();
flyway.setOutOfOrder(true);
flyway.setSqlMigrationPrefix("");
flyway.setDataSource(connectionInfo.getUrl(), connectionInfo.getUserName(), connectionInfo.getPassword());
flyway.migrate();
}
#Bean
public ServletRegistrationBean servletRegistrationBean(){
return new ServletRegistrationBean(new MediaUploadServlet(),"/mediaupload");
}
}
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.