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

Weblogic deployment #165

Open
fr0gs opened this issue Nov 10, 2016 · 8 comments
Open

Weblogic deployment #165

fr0gs opened this issue Nov 10, 2016 · 8 comments

Comments

@fr0gs
Copy link

fr0gs commented Nov 10, 2016

Hello, I am trying to deploy a Clojure/Luminus application in an Oracle Weblogic 12c server by creating a container via lein uberwar. After several tweaking I manage to run the war but I receive this cryptic message:

Nov 10, 2016 1:12:48 PM clojure.tools.logging$eval21$fn__26 invoke
SEVERE: #error {
 :cause No method in multimethod 'resource-data' for dispatch value: :zip
 :via
 [{:type java.lang.IllegalArgumentException
   :message No method in multimethod 'resource-data' for dispatch value: :zip
   :at [clojure.lang.MultiFn getFn MultiFn.java 156]}]
 :trace
 [[clojure.lang.MultiFn getFn MultiFn.java 156]
  [clojure.lang.MultiFn invoke MultiFn.java 229]
  [ring.util.response$url_response invokeStatic response.clj 279]
  [ring.util.response$url_response invoke response.clj 275]
  [ring.util.response$resource_response invokeStatic response.clj 297]
  [ring.util.response$resource_response doInvoke response.clj 284]
  [clojure.lang.RestFn invoke RestFn.java 423]
  [ring.middleware.resource$resource_request invokeStatic resource.clj 15]
  [ring.middleware.resource$resource_request doInvoke resource.clj 8]
  [clojure.lang.RestFn invoke RestFn.java 442]
  [ring.middleware.resource$wrap_resource$fn__7640 invoke resource.clj 27]
  [ring.middleware.content_type$wrap_content_type$fn__7691 invoke content_type.clj 30]
  [ring.middleware.default_charset$wrap_default_charset$fn__7705 invoke default_charset.clj 26]
  [ring.middleware.not_modified$wrap_not_modified$fn__7678 invoke not_modified.clj 52]
  [ring.middleware.x_headers$wrap_xss_protection$fn__6639 invoke x_headers.clj 71]
  [ring.middleware.x_headers$wrap_frame_options$fn__6627 invoke x_headers.clj 38]
  [ring.middleware.x_headers$wrap_content_type_options$fn__6633 invoke x_headers.clj 53]
  [mu_publisher.middleware$wrap_context$fn__7770 invoke middleware.clj 26]
  [mu_publisher.middleware$wrap_internal_error$fn__7776 invoke middleware.clj 31]
  [clojure.lang.Var invoke Var.java 379]
  [mu_publisher.listener$_contextInitialized$fn__11 invoke listener.clj 1]
  [ring.util.servlet$make_service_method$fn__91 invoke servlet.clj 129]
  [mu_publisher.servlet$_service invokeStatic servlet.clj 1]
  [mu_publisher.servlet$_service invoke servlet.clj 1]
  [mu_publisher.servlet service nil -1]
  [weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 280]
  [weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 254]
  [weblogic.servlet.internal.StubSecurityHelper invokeServlet StubSecurityHelper.java 136]
  [weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 346]
  [weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 243]
  [weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction wrapRun WebAppServletContext.java 3432]
  [weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction run WebAppServletContext.java 3402]
  [weblogic.security.acl.internal.AuthenticatedSubject doAs AuthenticatedSubject.java 321]
  [weblogic.security.service.SecurityManager runAs SecurityManager.java 120]
  [weblogic.servlet.provider.WlsSubjectHandle run WlsSubjectHandle.java 57]
  [weblogic.servlet.internal.WebAppServletContext doSecuredExecute WebAppServletContext.java 2285]
  [weblogic.servlet.internal.WebAppServletContext securedExecute WebAppServletContext.java 2201]
  [weblogic.servlet.internal.WebAppServletContext execute WebAppServletContext.java 2179]
  [weblogic.servlet.internal.ServletRequestImpl run ServletRequestImpl.java 1572]
  [weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor run ContainerSupportProviderImpl.java 255]
  [weblogic.work.ExecuteThread execute ExecuteThread.java 311]
  [weblogic.work.ExecuteThread run ExecuteThread.java 263]]}
<Nov 10, 2016 1:12:48 PM UTC> <Error> <mu-publisher.middleware> <BEA-000000> <#error {
 :cause No method in multimethod 'resource-data' for dispatch value: :zip
 :via
 [{:type java.lang.IllegalArgumentException
   :message No method in multimethod 'resource-data' for dispatch value: :zip
   :at [clojure.lang.MultiFn getFn MultiFn.java 156]}]
 :trace
 [[clojure.lang.MultiFn getFn MultiFn.java 156]
  [clojure.lang.MultiFn invoke MultiFn.java 229]
  [ring.util.response$url_response invokeStatic response.clj 279]
  [ring.util.response$url_response invoke response.clj 275]
  [ring.util.response$resource_response invokeStatic response.clj 297]
  [ring.util.response$resource_response doInvoke response.clj 284]
  [clojure.lang.RestFn invoke RestFn.java 423]
  [ring.middleware.resource$resource_request invokeStatic resource.clj 15]
  [ring.middleware.resource$resource_request doInvoke resource.clj 8]
  [clojure.lang.RestFn invoke RestFn.java 442]
  [ring.middleware.resource$wrap_resource$fn__7640 invoke resource.clj 27]
  [ring.middleware.content_type$wrap_content_type$fn__7691 invoke content_type.clj 30]
  [ring.middleware.default_charset$wrap_default_charset$fn__7705 invoke default_charset.clj 26]
  [ring.middleware.not_modified$wrap_not_modified$fn__7678 invoke not_modified.clj 52]
  [ring.middleware.x_headers$wrap_xss_protection$fn__6639 invoke x_headers.clj 71]
  [ring.middleware.x_headers$wrap_frame_options$fn__6627 invoke x_headers.clj 38]
  [ring.middleware.x_headers$wrap_content_type_options$fn__6633 invoke x_headers.clj 53]
  [mu_publisher.middleware$wrap_context$fn__7770 invoke middleware.clj 26]
  [mu_publisher.middleware$wrap_internal_error$fn__7776 invoke middleware.clj 31]
  [clojure.lang.Var invoke Var.java 379]
  [mu_publisher.listener$_contextInitialized$fn__11 invoke listener.clj 1]
  [ring.util.servlet$make_service_method$fn__91 invoke servlet.clj 129]
  [mu_publisher.servlet$_service invokeStatic servlet.clj 1]
  [mu_publisher.servlet$_service invoke servlet.clj 1]
  [mu_publisher.servlet service nil -1]
  [weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 280]
  [weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction run StubSecurityHelper.java 254]
  [weblogic.servlet.internal.StubSecurityHelper invokeServlet StubSecurityHelper.java 136]
  [weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 346]
  [weblogic.servlet.internal.ServletStubImpl execute ServletStubImpl.java 243]
  [weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction wrapRun WebAppServletContext.java 3432]
  [weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction run WebAppServletContext.java 3402]
  [weblogic.security.acl.internal.AuthenticatedSubject doAs AuthenticatedSubject.java 321]
  [weblogic.security.service.SecurityManager runAs SecurityManager.java 120]
  [weblogic.servlet.provider.WlsSubjectHandle run WlsSubjectHandle.java 57]
  [weblogic.servlet.internal.WebAppServletContext doSecuredExecute WebAppServletContext.java 2285]
  [weblogic.servlet.internal.WebAppServletContext securedExecute WebAppServletContext.java 2201]
  [weblogic.servlet.internal.WebAppServletContext execute WebAppServletContext.java 2179]
  [weblogic.servlet.internal.ServletRequestImpl run ServletRequestImpl.java 1572]
  [weblogic.servlet.provider.ContainerSupportProviderImpl$WlsRequestExecutor run ContainerSupportProviderImpl.java 255]
  [weblogic.work.ExecuteThread execute ExecuteThread.java 311]
  [weblogic.work.ExecuteThread run ExecuteThread.java 263]]}> 
@fr0gs fr0gs closed this as completed Nov 10, 2016
@fr0gs fr0gs reopened this Nov 10, 2016
@fr0gs
Copy link
Author

fr0gs commented Nov 10, 2016

I don't know where else to place this Issue sorry.

@yogthos
Copy link
Member

yogthos commented Nov 10, 2016

The error says that Ring has no implementation for reading a resource from a zip. The multimethod is found here. Unfortunately, I'm not too familiar with Weblogic, so I'm not sure what exactly is happening. You might want to take a look at the route and see how you're reading the resource with it. If you wish to return a zip file as a result, then your route should look something like this:

(GET "/file/:filename" [filename]
  (-> (clojure.java.io/input-stream filename)
      response
      (content-type "application/zip, application/octet-stream")))

@ouvanous
Copy link

Hi,
I have the same problem and could not find a solution.
@fr0gs did you find a solution ?
Many thanks,
Samuel

@fr0gs
Copy link
Author

fr0gs commented Dec 12, 2016

Hello.

No, not really. Later versions of Weblogic apparently do not suffer from this problem.

@ouvanous
Copy link

Many thanks @fr0gs
Unfortunately i have to deal with this version ...
Have a nice day

@fr0gs
Copy link
Author

fr0gs commented Dec 14, 2016

I really feel your pain. But it seems the only way out is to create a PR in Ring to read zip resources..

@jvtrigueros
Copy link

@fr0gs you're saying that later versions of Weblogic don't have this problem? I'm running 12.2.1 and I'm seeing this error. This is also the latest version available on the Oracle website. Did you mean something else or is that what you meant?

@conan
Copy link

conan commented Apr 3, 2019

In case it helps, I'm seeing the same problem but I'm not using Luminus. I think it's a problem related to routing and resources, as @fr0gs has suggested. Check that the app is listening on the correct host and has its base directory set correctly. I'm using bidi and aleph so the problem is likely related to one of these.

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

No branches or pull requests

5 participants