You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Vishal-sh Sharma <vi...@db.com> on 2013/01/24 14:47:15 UTC

Unexpected poller error

Hi ,

I get the following error in catalina.log when i connect the tomcat server over http. However https works fine.

24-Jan-2013 13:06:48.505 SEVERE [http-apr-11831-Poller-0] org.apache.tomcat.util.net.AprEndpoint$Poller.run Unexpected poller error
 java.lang.NoSuchMethodError: org.apache.tomcat.jni.Poll.addWithTimeout(JJIJ)I
    at org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1287)

24-Jan-2013 13:06:52.237 SEVERE [http-apr-11831-Poller-0] org.apache.tomcat.util.net.AprEndpoint$Poller.run Unexpected poller error
 java.lang.NoSuchMethodError: org.apache.tomcat.jni.Poll.addWithTimeout(JJIJ)I
    at org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1287)

24-Jan-2013 13:06:52.777 SEVERE [http-apr-11831-Poller-0] org.apache.tomcat.util.net.AprEndpoint$Poller.run Unexpected poller error
 java.lang.NoSuchMethodError: org.apache.tomcat.jni.Poll.addWithTimeout(JJIJ)I
    at org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1287)

Problem exists with both tomcat-7.0.35 and tomcat-7.0.33 version. I am using the "TC-Native-1.1.24". I do get the log message of library getting properly loaded as

24-Jan-2013 13:05:58.788 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.24 using APR version 1.4.6.
24-Jan-2013 13:05:58.790 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
24-Jan-2013 13:05:58.952 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1c 10 May 2012)

Any ideas

Thanks,
Vishal





---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Unexpected poller error

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 1/29/13 5:34 AM, Vishal-sh Sharma wrote:
> Hi Christopher,
> 
> It worked!! Thanks a ton!!
> 
> We were trying to use(compile) the java code in the tcnative 
> distribution and hence the issue. Everything worked to a T , i.e
> the http calls that were failing earlier, when we ignored the java
> code provided with the native distribution.
> 
> Thanks once again..you saved me (my team as well ) lot of pain..

Glad to help... I'm sorry that the Java code in the tcnative
distribution was confusing. There is a discussion on the development
list right now about removing that Java code to prevent such confusion.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEIAWUACgkQ9CaO5/Lv0PCigwCfZDB7gT4HSJ39yotX00HeIo7o
GbgAnRPI3ERqPK9+lXSOJdIDP/PVuXOR
=WBR+
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Unexpected poller error

Posted by Vishal-sh Sharma <vi...@db.com>.
Hi Christopher,

It worked!! Thanks a ton!!

We were trying to use(compile) the java code in the tcnative distribution and hence the issue.
Everything worked to a T , i.e the http calls that were failing earlier, when we ignored the java code provided with the native distribution.

Thanks once again..you saved me (my team as well ) lot of pain..

Thanks,
Vishal


________________________________________
From: Christopher Schultz [chris@christopherschultz.net]
Sent: Friday, January 25, 2013 7:36 PM
To: Tomcat Users List
Subject: Re: Unexpected poller error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 1/25/13 6:11 AM, Vishal-sh Sharma wrote:
> Thanks for prompt reply. I am no java developer so gave me good
> lead.
>
> I compared the Poll.java in  tomcat source ( 7.0.35 src ) with
> tomcat-native-1.1.24-src
>
> diff apache-tomcat-7.0.35-src/java/org/apache/tomcat/jni/Poll.java
> tomcat-native-1.1.24-src/jni/java/org/apache/tomcat/jni/Poll.java

That's not a valid comparison, unfortunately. For some reason, Java code
remains tucked-away in the tcnative project but it is no longer used (or
shouldn't be). Tomcat includes in its standard distribution everything
you need to use tcnative.

Did you manually compile the Java portion of tcnative? If so, please
remove whatever JAR file you produced from that procedure and re-run
your tests.

> Looks like that in latest version of  native library , the
> "addWithTimeout" function is missing. The "C" counterpart indeed
> is present in the native library.
>
> Does it make sense to copy the Poll.java from the tomcat src to
> native library and build the native library??

No, you should simply ignore all the Java code in the tcnative
distribution.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEC3tcACgkQ9CaO5/Lv0PDiZACfQIeeJflrmyB3/oJVwAtN9lA+
grUAn2LP8TrFL7iAIh0ftldIilaIZCFT
=JdKl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Unexpected poller error

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 1/25/13 6:11 AM, Vishal-sh Sharma wrote:
> Thanks for prompt reply. I am no java developer so gave me good 
> lead.
> 
> I compared the Poll.java in  tomcat source ( 7.0.35 src ) with 
> tomcat-native-1.1.24-src
> 
> diff apache-tomcat-7.0.35-src/java/org/apache/tomcat/jni/Poll.java 
> tomcat-native-1.1.24-src/jni/java/org/apache/tomcat/jni/Poll.java

That's not a valid comparison, unfortunately. For some reason, Java code
remains tucked-away in the tcnative project but it is no longer used (or
shouldn't be). Tomcat includes in its standard distribution everything
you need to use tcnative.

Did you manually compile the Java portion of tcnative? If so, please
remove whatever JAR file you produced from that procedure and re-run
your tests.

> Looks like that in latest version of  native library , the 
> "addWithTimeout" function is missing. The "C" counterpart indeed
> is present in the native library.
> 
> Does it make sense to copy the Poll.java from the tomcat src to 
> native library and build the native library??

No, you should simply ignore all the Java code in the tcnative
distribution.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEC3tcACgkQ9CaO5/Lv0PDiZACfQIeeJflrmyB3/oJVwAtN9lA+
grUAn2LP8TrFL7iAIh0ftldIilaIZCFT
=JdKl
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Unexpected poller error

Posted by Vishal-sh Sharma <vi...@db.com>.
Hi Chris,

Thanks for prompt reply. I am no java developer so gave me good lead.

I compared the Poll.java in  tomcat source ( 7.0.35 src ) with tomcat-native-1.1.24-src

diff apache-tomcat-7.0.35-src/java/org/apache/tomcat/jni/Poll.java           tomcat-native-1.1.24-src/jni/java/org/apache/tomcat/jni/Poll.java

23c23
<  * @version $Id: Poll.java 1349932 2012-06-13 15:59:02Z markt $
---
>  * @version $Revision: 1144906 $, $Date: 2011-07-10 19:12:19 +0200 (Sun, 10 Jul 2011) $
76,77c76,80
<      * Add a socket to a pollset with the default timeout.
<      * @param pollset The pollset to which to add the socket
---
>      * Add a socket or to a pollset
>      * If you set client_data in the descriptor, that value
>      * will be returned in the client_data field whenever this
>      * descriptor is signaled in apr_pollset_poll().
>      * @param pollset The pollset to which to add the descriptor
83,92d85
<
<     /**
<      * Add a socket to a pollset with a specific timeout.
<      * @param pollset The pollset to which to add the socket
<      * @param sock The sockets to add
<      * @param reqevents requested events
<      * @param timeout requested timeout in microseconds (-1 for infinite)
<      */
<     public static native int addWithTimeout(long pollset, long sock,
<                                             int reqevents, long timeout);



Looks like that in latest version of  native library , the "addWithTimeout" function is missing.
The "C" counterpart indeed is present in the native library.

Does it make sense to copy the Poll.java from the tomcat src to native library and build the native library??

Thanks,
Vishal






________________________________________
From: Christopher Schultz [chris@christopherschultz.net]
Sent: Thursday, January 24, 2013 7:00 PM
To: Tomcat Users List
Subject: Re: Unexpected poller error

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 1/24/13 8:47 AM, Vishal-sh Sharma wrote:
> I get the following error in catalina.log when i connect the
> tomcat server over http. However https works fine.
>
> 24-Jan-2013 13:06:48.505 SEVERE [http-apr-11831-Poller-0]
> org.apache.tomcat.util.net.AprEndpoint$Poller.run Unexpected poller
> error java.lang.NoSuchMethodError:
> org.apache.tomcat.jni.Poll.addWithTimeout(JJIJ)I at
> org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1287)

That
>
method certainly is defined in Poll.java:91 in Tomcat 7.0.x trunk:

    public static native int addWithTimeout(long pollset, long sock,
                                            int reqevents, long timeout);

native/src/poll.c has it, too:

TCN_IMPLEMENT_CALL(jint, Poll, addWithTimeout)(TCN_STDARGS, jlong pollset,
                                               jlong socket, jint
reqevents,
                                               jlong socket_timeout)

Since you aren't getting a linkage error of some kind, this seems to
be a Java-related problem (and not a native problem). If the method
was missing from the native library, you'd get UnsatisfiedLinkError.

Are you sure you have a clean Tomcat install?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEBhLoACgkQ9CaO5/Lv0PC+4ACfcp2sNSbR82N81AKQIFgBT5E5
jmYAoIcK7r49ZrK98Bqns3LNdG9SKSy3
=sa47
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


---
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional EU corporate and regulatory disclosures.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Unexpected poller error

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Vishal,

On 1/24/13 8:47 AM, Vishal-sh Sharma wrote:
> I get the following error in catalina.log when i connect the
> tomcat server over http. However https works fine.
> 
> 24-Jan-2013 13:06:48.505 SEVERE [http-apr-11831-Poller-0]
> org.apache.tomcat.util.net.AprEndpoint$Poller.run Unexpected poller
> error java.lang.NoSuchMethodError:
> org.apache.tomcat.jni.Poll.addWithTimeout(JJIJ)I at
> org.apache.tomcat.util.net.AprEndpoint$Poller.run(AprEndpoint.java:1287)

That
> 
method certainly is defined in Poll.java:91 in Tomcat 7.0.x trunk:

    public static native int addWithTimeout(long pollset, long sock,
                                            int reqevents, long timeout);

native/src/poll.c has it, too:

TCN_IMPLEMENT_CALL(jint, Poll, addWithTimeout)(TCN_STDARGS, jlong pollset,
                                               jlong socket, jint
reqevents,
                                               jlong socket_timeout)

Since you aren't getting a linkage error of some kind, this seems to
be a Java-related problem (and not a native problem). If the method
was missing from the native library, you'd get UnsatisfiedLinkError.

Are you sure you have a clean Tomcat install?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEAREIAAYFAlEBhLoACgkQ9CaO5/Lv0PC+4ACfcp2sNSbR82N81AKQIFgBT5E5
jmYAoIcK7r49ZrK98Bqns3LNdG9SKSy3
=sa47
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org