NONCONFIDENTIAL // EXTERNAL
Hi Coty,
I got exactly the same error. Did you try to run it in windows? Do you need
other MS dlls other than tcnative-1.dll? Also I down load the link and got as
below. I updated tomcat to 8.5.20, below error is gone, but the no apr error
came back.
Caused by: java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
at
org.apache.catalina.core.AprLifecycleListener.<clinit>(AprLifecycleListener.java:49)
Thanks!
Jennifer
-----Original Message-----
From: Coty Sutherland [mailto:[email protected]]
Sent: Friday, September 29, 2017 8:43 AM
To: Tomcat Users List
Subject: [External] Re: Re: how to set Http11AprProtocol with embedded tomcat
Here is a working quickstart (that I forgot to link yesterday) for APR in
Spring Boot:
https://github.com/csutherl/tomcat-embedded-quickstarts/tree/master/springboot-apr-example
On Thu, Sep 28, 2017 at 3:34 PM, Coty Sutherland <[email protected]> wrote:
> On Thu, Sep 28, 2017 at 12:27 PM, Wang, Jennifer
> <[email protected]> wrote:
>> NONCONFIDENTIAL // EXTERNAL
>> Hi Coty,
>>
>> I download tcnative-1.dll from tomcat site. I am running on windows 7. I did
>> set " java.library.path" as below.
>>
>>
>>
>>
>> @SpringBootApplication
>> public class Application {
>>
>> public static void main(String[] args) {
>>
>> //try both of below
>> System.setProperty("java.library.path",
>> "C:\\Temp\\tomcat-native-1.2.14-win32-bin\\bin\\x64\\tcnative-1.dll");
>> //System.setProperty("java.library.path",
>> "C:\\Temp\\tomcat-native-1.2.14-win32-bin\\bin\\x64");
>
> I think trying to set the library path in code is too late as the JVM
> has already initialized. You'll need to set it in the JVM arguments
> that start the Application. I got it working using the following
> config snippet:
>
> <plugin>
> <groupId>org.springframework.boot</groupId>
> <artifactId>spring-boot-maven-plugin</artifactId>
> <configuration>
> <jvmArguments>
> -Djava.library.path=/path/to/tomcat-native/
> </jvmArguments>
> </configuration>
>
> and starting with `mvn spring-boot:run`. I also configured that the
> System.setProperty call didn't work.
>
> HTH
>
>>
>> SpringApplication.run(Application.class, args);
>> }
>> }
>>
>> Thanks!
>>
>> Jennifer
>>
>> -----Original Message-----
>> From: Coty Sutherland [mailto:[email protected]]
>> Sent: Thursday, September 28, 2017 12:16 PM
>> To: Tomcat Users List
>> Subject: [External] Re: how to set Http11AprProtocol with embedded
>> tomcat
>>
>> On Thu, Sep 28, 2017 at 11:32 AM, Wang, Jennifer <[email protected]>
>> wrote:
>>> NONCONFIDENTIAL // EXTERNAL
>>> How to set Http11AprProtocol with embedded tomcat in java spring boot app?
>>>
>>> I keep get below error.
>>
>> You don't have tomcat-native installed. Resolving the problem should be as
>> simple as installing tomcat-native (which deps on APR) via RPM (assuming
>> you're on linux) so that it's on your library path or updating your JVM's
>> -Djava.library.path system property to point to APR and tomcat-native so
>> that tomcat can use it.
>>
>>> org.apache.catalina.LifecycleException: Failed to initialize component
>>> [Connector[org.apache.coyote.http11.Http11AprProtocol-8443]]
>>> at
>>> org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:112)
>>> at
>>> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:140)
>>> at
>>> org.apache.catalina.core.StandardService.addConnector(StandardService.java:225)
>>> at
>>> org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.addPreviouslyRemovedConnectors(TomcatEmbeddedServletContainer.java:250)
>>> at
>>> org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer.start(TomcatEmbeddedServletContainer.java:193)
>>> at
>>> org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:297)
>>> at
>>> org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:145)
>>> at
>>> org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546)
>>> at
>>> org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
>>> at
>>> org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
>>> at
>>> org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
>>> at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
>>> at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:1118)
>>> at
>>> org.springframework.boot.SpringApplication.run(SpringApplication.java:1107)
>>> at hello.Application.main(Application.java:13)
>>> Caused by: org.apache.catalina.LifecycleException: The configured
>>> protocol [org.apache.coyote.http11.Http11AprProtocol] requires the
>>> APR/native library which is not available
>>>
>>> Thanks!
>>>
>>> Jennifer
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]