Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shading of jdbc #196

Closed
ihabsoliman opened this issue Aug 3, 2016 · 9 comments · Fixed by #202
Closed

Shading of jdbc #196

ihabsoliman opened this issue Aug 3, 2016 · 9 comments · Fixed by #202

Comments

@ihabsoliman
Copy link

In my project am getting

Caused by: java.lang.ArrayStoreException: org.apache.http.impl.cookie.BasicPathHandler
    at org.apache.http.impl.cookie.RFC6265CookieSpecProvider.create(RFC6265CookieSpecProvider.java:108) ~[httpclient-4.5.2.jar:4.5.2]
    at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:152) ~[jdbc-1.1.2.jar:na]
    at org.apache.http.protocol.ImmutableHttpProcessor.process(ImmutableHttpProcessor.java:132) ~[httpcore-4.4.4.jar:4.4.4]
    at org.apache.http.impl.nio.client.MainClientExec.prepareRequest(MainClientExec.java:520) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.MainClientExec.prepare(MainClientExec.java:146) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.DefaultClientExchangeHandlerImpl.start(DefaultClientExchangeHandlerImpl.java:124) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.InternalHttpAsyncClient.execute(InternalHttpAsyncClient.java:141) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:74) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:107) ~[httpasyncclient-4.1.1.jar:4.1.1]
    at org.apache.http.impl.nio.client.CloseableHttpAsyncClient.execute(CloseableHttpAsyncClient.java:91) ~[httpasyncclient-4.1.1.jar:4.1.1]

and if we look closer it's a conflict of library's hence this

    at org.apache.http.client.protocol.RequestAddCookies.process(RequestAddCookies.java:152) ~[jdbc-1.1.2.jar:na]

I think if we shade jdbc it will help

@ihabsoliman
Copy link
Author

I guess shading org.apache.http but I can see it's already shaded so I really don't know what is happening

@ihabsoliman
Copy link
Author

ihabsoliman commented Aug 10, 2016

So I was testing today and I got this too

java.lang.NoSuchMethodError: org.glassfish.jersey.model.internal.RankedProvider.getContractTypes()Ljava/util/Set;
    at org.glassfish.jersey.server.ApplicationHandler.filterNameBound(ApplicationHandler.java:837) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler.getProcessingProviders(ApplicationHandler.java:726) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler.initialize(ApplicationHandler.java:510) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler.access$500(ApplicationHandler.java:166) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler$3.run(ApplicationHandler.java:327) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.internal.Errors$2.call(Errors.java:289) ~[jdbc-1.1.3.jar:na]
    at org.glassfish.jersey.internal.Errors$2.call(Errors.java:286) ~[jdbc-1.1.3.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:315) ~[jdbc-1.1.3.jar:na]
    at org.glassfish.jersey.internal.Errors.process(Errors.java:297) ~[jdbc-1.1.3.jar:na]
    at org.glassfish.jersey.internal.Errors.processWithException(Errors.java:286) ~[jdbc-1.1.3.jar:na]
    at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:324) ~[jersey-server-2.17.jar:na]
    at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:338) ~[jersey-container-servlet-core-2.17.jar:na]
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:171) ~[jersey-container-servlet-core-2.17.jar:na]
    at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:363) ~[jersey-container-servlet-core-2.17.jar:na]
    at javax.servlet.GenericServlet.init(GenericServlet.java:244) ~[javax.servlet-api-3.1.0.jar:3.1.0]
    at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612) ~[jetty-servlet-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395) ~[jetty-servlet-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871) ~[jetty-servlet-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298) ~[jetty-servlet-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:741) ~[jetty-server-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68) [jetty-util-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:132) [jetty-util-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114) [jetty-util-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61) [jetty-server-9.2.10.v20150310.jar:9.2.10.v20150310]
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:163) [jetty-server-9.2.10.v20150310.jar:9.2.10.v20150310]

the jdbc library is always in the middle of everything

@kunickiaj
Copy link

It looks like the jdbc jar is including both shaded and non-shaded jersey classes.

@ihabsoliman
Copy link
Author

Is there a way to solve this??

On Aug 15, 2016 4:53 PM, "Adam Kunicki" notifications@github.com wrote:

It looks like the jdbc jar is including both shaded and non-shaded jersey
classes.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#196 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AB9VCgypx8Mm6N-DEnUafa6KMqUerETEks5qgO3XgaJpZM4Jb4xd
.

You received this message because you are subscribed to the Google Groups
"Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to dev+unsubscribe@ihabsoliman.net.
To post to this group, send email to dev@ihabsoliman.net.
To view this discussion on the web visit https://groups.google.com/a/
ihabsoliman.net/d/msgid/dev/testcontainers/testcontainers-
java/issues/196/239953318%40git.luolix.top
https://groups.google.com/a/ihabsoliman.net/d/msgid/dev/testcontainers/testcontainers-java/issues/196/239953318%40git.luolix.top?utm_medium=email&utm_source=footer
.

@kunickiaj
Copy link

I've got a small patch that resolved it for me... running the test suite and will open a pull request.

@rnorth
Copy link
Member

rnorth commented Aug 16, 2016

Thanks Adam
On Tue, 16 Aug 2016 at 00:07 Adam Kunicki notifications@github.com wrote:

I've got a small patch that resolved it for me... running the test suite
and will open a pull request.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#196 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIET661NGwpQN_XaRFJUI1odFV5TOwAks5qgPE-gaJpZM4Jb4xd
.

Richard

@ihabsoliman
Copy link
Author

@rnorth is there a way to get this merged and released with the next version :)

@rnorth
Copy link
Member

rnorth commented Aug 16, 2016

Will try tonight ;)
On Tue, 16 Aug 2016 at 18:09 Ihab Soliman notifications@github.com wrote:

@rnorth https://github.com/rnorth is there a way to get this merged and
released with the next version :)


You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub
#196 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAIET9LGZB4vXDjTMW32MZ4-tLDLdWKxks5qge7WgaJpZM4Jb4xd
.

Richard

@ihabsoliman
Copy link
Author

Super thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants