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

Missing Apache CXF files within the fat JAR #23618

Closed
dbutragueno opened this issue Sep 13, 2024 · 1 comment
Closed

Missing Apache CXF files within the fat JAR #23618

dbutragueno opened this issue Sep 13, 2024 · 1 comment
Labels
team-Rules-Java Issues for Java rules type: bug

Comments

@dbutragueno
Copy link

dbutragueno commented Sep 13, 2024

Description of the bug:

The java_binary rule isn't including certain Apache CXF files when generating the fat JAR. Specifically, the files located under the path META-INF/cxf are being excluded. As a result, when the application is deployed within a container, it encounters an error for those missing files.

I propose modifying the DefaultJarEntryFilter implementation to ensure that the META-INF/cxf directory is correctly included in the generated fat JAR.

Which category does this issue belong to?

Java Rules

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Develop an application that creates a web service using Apache CXF, and package it into a containerized environment. Utilize the java_binary rule to generate a fat JAR for deployment.

Which operating system are you running Bazel on?

macOs Sonoma Version 14.5

What is the output of bazel info release?

release 6.3.2

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

What's the output of git remote get-url origin; git rev-parse HEAD ?

git@github.com:bazelbuild/bazel.git
e0e678f7d361e61b5bc510af25c5c682fe5a0682

If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.

No response

Have you found anything relevant by searching the web?

Ticket in Apache CXF Jira
https://issues.apache.org/jira/browse/CXF-9053

Any other information, logs, or outputs that you want to share?

Log when deploying the application

java.lang.NullPointerException: null at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.generatedWrapperBeanClass(JaxWsServiceFactoryBean.java:670) ~[service_deploy.jar:?] at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.getExtraClass(JaxWsServiceFactoryBean.java:642) ~[service_deploy.jar:?] at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:463) ~[service_deploy.jar:?] at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.buildServiceFromClass(JaxWsServiceFactoryBean.java:693) ~[service_deploy.jar:?] at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:529) ~[service_deploy.jar:?] at org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:262) ~[service_deploy.jar:?] at org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:199) ~[service_deploy.jar:?] at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:103) ~[service_deploy.jar:?] at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91) ~[service_deploy.jar:?] at org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:158) ~[service_deploy.jar:?] at org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:142) ~[service_deploy.jar:?]

@hvadehra
Copy link
Member

I propose modifying the DefaultJarEntryFilter implementation

Aside, the java implementation of singlejar is no longer used. Changes if any will be to the cpp implementation here: https://github.com/bazelbuild/bazel/tree/master/src/tools/singlejar

This looks like a special case of #7330, and is something we're looking to fix in a general fashion. Closing this as a dupe, please use #7330 as the canonical issue for this.

@hvadehra hvadehra closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-Rules-Java Issues for Java rules type: bug
Projects
None yet
Development

No branches or pull requests

5 participants