java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Matthew Broadhead-2
recently i have been getting this exception during development.
restarting the container allows me to proceed.  i am worried it might
start happening in production.

java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
     at
com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
     at
com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
     at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
     at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:498)
     at
org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
     at
org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
     at
org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
     at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
     at
org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Romain Manni-Bucau
Hi

Does it happen after some redeployment?
Is mysql in tomee lib or the app lib folder?


Le lun. 2 juil. 2018 13:07, Matthew Broadhead
<[hidden email]> a écrit :

> recently i have been getting this exception during development.
> restarting the container allows me to proceed.  i am worried it might
> start happening in production.
>
> java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
>      at
>
> com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
>      at
> com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
>      at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
>      at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>      at java.lang.reflect.Method.invoke(Method.java:498)
>      at
>
> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
>      at
>
> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
>      at
>
> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
>      at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
>      at
>
> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Matthew Broadhead-2
yes it normally happens after some code changes.
library is in tomee lib.  i am on 7.0.3

On 02/07/18 13:23, Romain Manni-Bucau wrote:

> Hi
>
> Does it happen after some redeployment?
> Is mysql in tomee lib or the app lib folder?
>
>
> Le lun. 2 juil. 2018 13:07, Matthew Broadhead
> <[hidden email]> a écrit :
>
>> recently i have been getting this exception during development.
>> restarting the container allows me to proceed.  i am worried it might
>> start happening in production.
>>
>> java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
>>       at
>>
>> com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
>>       at
>> com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
>>       at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
>>       at
>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>       at java.lang.reflect.Method.invoke(Method.java:498)
>>       at
>>
>> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
>>       at
>>
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
>>       at
>>
>> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
>>       at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
>>       at
>>
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)
>>

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Romain Manni-Bucau
Would be interesting to have the full stack and probably some logs around
this issue. But sounds more related to the dev setup than anything which
can happen in prod.

Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://rmannibucau.metawerx.net/> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
<https://www.packtpub.com/application-development/java-ee-8-high-performance>


Le lun. 2 juil. 2018 à 13:34, Matthew Broadhead
<[hidden email]> a écrit :

> yes it normally happens after some code changes.
> library is in tomee lib.  i am on 7.0.3
>
> On 02/07/18 13:23, Romain Manni-Bucau wrote:
> > Hi
> >
> > Does it happen after some redeployment?
> > Is mysql in tomee lib or the app lib folder?
> >
> >
> > Le lun. 2 juil. 2018 13:07, Matthew Broadhead
> > <[hidden email]> a écrit :
> >
> >> recently i have been getting this exception during development.
> >> restarting the container allows me to proceed.  i am worried it might
> >> start happening in production.
> >>
> >> java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
> >>       at
> >>
> >>
> com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
> >>       at
> >> com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
> >>       at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
> >>       at
> >>
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> >>       at java.lang.reflect.Method.invoke(Method.java:498)
> >>       at
> >>
> >>
> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
> >>       at
> >>
> >>
> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
> >>       at
> >>
> >>
> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
> >>       at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
> >>       at
> >>
> >>
> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)
> >>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings

Matthew Broadhead-2
sorry i should have come back to you on this one.
turns out during testing i added the mysql connector to the pom as
runtime.  using your advice i changed it to test scope and the problem
has gone away.  error must have been because it was in tomee/lib and in
the project pom

On 02/07/18 14:28, Romain Manni-Bucau wrote:

> Would be interesting to have the full stack and probably some logs around
> this issue. But sounds more related to the dev setup than anything which
> can happen in prod.
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le lun. 2 juil. 2018 à 13:34, Matthew Broadhead
> <[hidden email]> a écrit :
>
>> yes it normally happens after some code changes.
>> library is in tomee lib.  i am on 7.0.3
>>
>> On 02/07/18 13:23, Romain Manni-Bucau wrote:
>>> Hi
>>>
>>> Does it happen after some redeployment?
>>> Is mysql in tomee lib or the app lib folder?
>>>
>>>
>>> Le lun. 2 juil. 2018 13:07, Matthew Broadhead
>>> <[hidden email]> a écrit :
>>>
>>>> recently i have been getting this exception during development.
>>>> restarting the container allows me to proceed.  i am worried it might
>>>> start happening in production.
>>>>
>>>> java.lang.NoClassDefFoundError: com/mysql/jdbc/ParameterBindings
>>>>        at
>>>>
>>>>
>> com.mysql.jdbc.ConnectionImpl.clientPrepareStatement(ConnectionImpl.java:1450)
>>>>        at
>>>> com.mysql.jdbc.ConnectionImpl.prepareStatement(ConnectionImpl.java:4165)
>>>>        at sun.reflect.GeneratedMethodAccessor418.invoke(Unknown Source)
>>>>        at
>>>>
>>>>
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>        at java.lang.reflect.Method.invoke(Method.java:498)
>>>>        at
>>>>
>>>>
>> org.apache.tomcat.jdbc.pool.ProxyConnection.invoke(ProxyConnection.java:126)
>>>>        at
>>>>
>>>>
>> org.apache.tomcat.jdbc.pool.JdbcInterceptor.invoke(JdbcInterceptor.java:108)
>>>>        at
>>>>
>>>>
>> org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:81)
>>>>        at com.sun.proxy.$Proxy649.prepareStatement(Unknown Source)
>>>>        at
>>>>
>>>>
>> org.apache.openjpa.lib.jdbc.DelegatingConnection.prepareStatement(DelegatingConnection.java:135)
>>