This is an automated email from the ASF dual-hosted git repository.
mridulpathak pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git
The following commit(s) were added to refs/heads/trunk by this push:
new 99f578d7a3 Upgrade Axis2 to 2.0.1
99f578d7a3 is described below
commit 99f578d7a3098188a9a67c704fb7ac73f6ebc545
Author: Mridul Pathak <[email protected]>
AuthorDate: Sun Oct 25 15:51:54 2026 +0530
Upgrade Axis2 to 2.0.1
Axis2 2 is on Jakarta EE, Axiom 2 and HttpClient 5, and depends on
commons-fileupload2 2.0.0-M5, so OFBiz moves from commons-fileupload2-jakarta
2.0.0-M1 to commons-fileupload2-jakarta-servlet6 2.0.0-M5, the module Axis2
uses. The rest-api classes now use jakarta.ws.rs instead of javax.ws.rs, which
until now was only on the classpath through Axis2 1.8.2.
In axis2.xml the HttpClient 4 transport sender, removed in Axis2 2, is
replaced by the HttpClient 5 one, and the clustering section, a feature removed
in Axis2 2, is deleted. Two problems left over from the earlier Axis2 upgrades
are fixed too: the message formatters now point to
org.apache.axis2.kernel.http, where Axis2 1.8 had already moved them, so the
soap engine no longer fails on every call, and the JAX-WS deployers,
dispatchers and settings are removed because axis2-jaxws was n [...]
---
.../content/content/UploadContentAndImage.java | 7 +-
.../ofbiz/content/data/DataResourceWorker.java | 35 ++--
.../apache/ofbiz/content/layout/LayoutWorker.java | 17 +-
dependencies.gradle | 2 +-
.../java/org/apache/ofbiz/base/util/UtilHttp.java | 8 +-
.../ofbiz/ws/rs/openapi/OFBizOpenApiReader.java | 2 +-
.../org/apache/ofbiz/ws/rs/util/OpenApiUtil.java | 2 +-
.../apache/ofbiz/ws/rs/util/RestServiceUtil.java | 2 +-
framework/service/config/axis2/conf/axis2.xml | 209 +--------------------
.../ofbiz/webtools/secret/SecretManagerEvents.java | 11 +-
gradle/libs.versions.toml | 6 +-
11 files changed, 66 insertions(+), 235 deletions(-)
diff --git
a/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java
b/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java
index fbb58ef45b..b593df64a6 100644
---
a/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java
+++
b/applications/content/src/main/java/org/apache/ofbiz/content/content/UploadContentAndImage.java
@@ -18,6 +18,7 @@
*******************************************************************************/
package org.apache.ofbiz.content.content;
+import java.io.IOException;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
@@ -32,7 +33,7 @@ import org.apache.commons.fileupload2.core.DiskFileItem;
import org.apache.commons.fileupload2.core.DiskFileItemFactory;
import org.apache.commons.fileupload2.core.FileItem;
import org.apache.commons.fileupload2.core.FileUploadException;
-import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
+import
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.StringUtil;
@@ -322,7 +323,7 @@ public class UploadContentAndImage {
request.setAttribute("nodeTrailCsv", newTrail);
request.setAttribute("passedParams", passedParams);
TransactionUtil.commit();
- } catch (GenericEntityException | GenericServiceException e) {
+ } catch (GenericEntityException | GenericServiceException |
IOException e) {
Debug.logError(e, "[UploadContentAndImage]", MODULE);
request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
try {
@@ -407,7 +408,7 @@ public class UploadContentAndImage {
}
}
TransactionUtil.commit();
- } catch (GenericTransactionException | GenericServiceException e) {
+ } catch (GenericTransactionException | GenericServiceException |
IOException e) {
Debug.logError(e, "[UploadContentAndImage]", MODULE);
request.setAttribute("_ERROR_MESSAGE_", e.getMessage());
try {
diff --git
a/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
b/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
index 80f18c1d00..368e1f94e8 100644
---
a/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
+++
b/applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
@@ -58,7 +58,7 @@ import org.apache.commons.fileupload2.core.DiskFileItem;
import org.apache.commons.fileupload2.core.DiskFileItemFactory;
import org.apache.commons.fileupload2.core.FileItem;
import org.apache.commons.fileupload2.core.FileUploadException;
-import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
+import
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.BoundedInputStream;
@@ -255,22 +255,27 @@ public class DataResourceWorker implements
org.apache.ofbiz.widget.content.DataR
GenericValue userLogin = (GenericValue)
session.getAttribute("userLogin");
passedParams.put("userLogin", userLogin);
byte[] imageBytes = null;
- for (FileItem<DiskFileItem> fileItem : lst) {
- fi = fileItem;
- String fieldName = fi.getFieldName();
- if (fi.isFormField()) {
- String fieldStr = fi.getString();
- passedParams.put(fieldName, fieldStr);
- } else if (fieldName.startsWith("imageData")) {
- imageFi = fi;
- imageBytes = imageFi.get();
- passedParams.put(fieldName, imageBytes);
- imageFileName = imageFi.getName();
- passedParams.put("drObjectInfo", imageFileName);
- if (Debug.infoOn()) {
- Debug.logInfo("[UploadContentAndImage]imageData: " +
imageBytes.length, MODULE);
+ try {
+ for (FileItem<DiskFileItem> fileItem : lst) {
+ fi = fileItem;
+ String fieldName = fi.getFieldName();
+ if (fi.isFormField()) {
+ String fieldStr = fi.getString();
+ passedParams.put(fieldName, fieldStr);
+ } else if (fieldName.startsWith("imageData")) {
+ imageFi = fi;
+ imageBytes = imageFi.get();
+ passedParams.put(fieldName, imageBytes);
+ imageFileName = imageFi.getName();
+ passedParams.put("drObjectInfo", imageFileName);
+ if (Debug.infoOn()) {
+ Debug.logInfo("[UploadContentAndImage]imageData: " +
imageBytes.length, MODULE);
+ }
}
}
+ } catch (IOException e) {
+ request.setAttribute("_ERROR_MESSAGE_", e.toString());
+ return "error";
}
if (imageBytes != null && imageBytes.length > 0) {
diff --git
a/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java
b/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java
index 971c15f3d8..46aade9207 100644
---
a/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java
+++
b/applications/content/src/main/java/org/apache/ofbiz/content/layout/LayoutWorker.java
@@ -18,6 +18,7 @@
*******************************************************************************/
package org.apache.ofbiz.content.layout;
+import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.HashMap;
import java.util.List;
@@ -30,7 +31,7 @@ import org.apache.commons.fileupload2.core.DiskFileItem;
import org.apache.commons.fileupload2.core.DiskFileItemFactory;
import org.apache.commons.fileupload2.core.FileItem;
import org.apache.commons.fileupload2.core.FileUploadException;
-import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
+import
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
import org.apache.ofbiz.base.util.UtilGenerics;
import org.apache.ofbiz.base.util.UtilHttp;
@@ -87,7 +88,12 @@ public final class LayoutWorker {
for (FileItem<DiskFileItem> fileItem : lst) {
fi = fileItem;
String fieldName = fi.getFieldName();
- String fieldStr = fi.getString();
+ String fieldStr;
+ try {
+ fieldStr = fi.getString();
+ } catch (IOException e) {
+ return ServiceUtil.returnError(e.getMessage());
+ }
if (fi.isFormField()) {
formInput.put(fieldName, fieldStr);
request.setAttribute(fieldName, fieldStr);
@@ -106,7 +112,12 @@ public final class LayoutWorker {
return null;
}
- byte[] imageBytes = imageFi.get();
+ byte[] imageBytes;
+ try {
+ imageBytes = imageFi.get();
+ } catch (IOException e) {
+ return ServiceUtil.returnError(e.getMessage());
+ }
ByteBuffer byteWrap = ByteBuffer.wrap(imageBytes);
results.put("imageData", byteWrap);
results.put("imageFileName", imageFi.getName());
diff --git a/dependencies.gradle b/dependencies.gradle
index a5f2ef780c..0d2ca0d893 100644
--- a/dependencies.gradle
+++ b/dependencies.gradle
@@ -43,7 +43,7 @@ dependencies {
implementation libs.commons.collections4
implementation libs.commons.csv
implementation libs.tomcat.dbcp
- implementation libs.commons.fileupload2.jakarta
+ implementation libs.commons.fileupload2.jakarta.servlet6
implementation libs.commons.text
implementation libs.geronimo.transaction
implementation libs.geronimo.jms.spec
diff --git
a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
index 565122cb20..16f6218c31 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
@@ -65,7 +65,7 @@ import org.apache.commons.fileupload2.core.DiskFileItem;
import org.apache.commons.fileupload2.core.DiskFileItemFactory;
import org.apache.commons.fileupload2.core.FileItem;
import org.apache.commons.fileupload2.core.FileUploadException;
-import org.apache.commons.fileupload2.jakarta.JakartaServletFileUpload;
+import
org.apache.commons.fileupload2.jakarta.servlet6.JakartaServletFileUpload;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.util.EntityUtilProperties;
import org.apache.ofbiz.webapp.control.ConfigXMLReader;
@@ -156,7 +156,7 @@ public final class UtilHttp {
Map<String, Object> multiPartMap = null;
try {
multiPartMap = params.isEmpty() ? getMultiPartParameterMap(req) :
Collections.emptyMap();
- } catch (FileUploadException e) {
+ } catch (IOException e) {
throw new RuntimeException(e);
}
params.putAll(multiPartMap);
@@ -191,11 +191,11 @@ public final class UtilHttp {
.setPath(tmpUploadRepository.getPath())
.get();
JakartaServletFileUpload<DiskFileItem, DiskFileItemFactory> upload =
new JakartaServletFileUpload<>(factory);
- upload.setSizeMax(maxUploadSize);
+ upload.setMaxSize(maxUploadSize);
return upload;
}
- public static Map<String, Object>
getMultiPartParameterMap(HttpServletRequest request) throws FileUploadException
{
+ public static Map<String, Object>
getMultiPartParameterMap(HttpServletRequest request) throws IOException {
Map<String, Object> multiPartMap = new HashMap<>();
Delegator delegator = (Delegator) request.getAttribute("delegator");
HttpSession session = request.getSession();
diff --git
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
index 6e578f3edf..ca5961aa56 100644
---
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
+++
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/openapi/OFBizOpenApiReader.java
@@ -354,7 +354,7 @@ public final class OFBizOpenApiReader extends Reader
implements OpenApiReader {
ApiResponse response = new ApiResponse()
.description(statusType.getReasonPhrase())
.content(new Content()
-
.addMediaType(javax.ws.rs.core.MediaType.APPLICATION_JSON, new MediaType()
+
.addMediaType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON, new MediaType()
.schema(new
Schema<>().$ref("#/components/schemas/" + schemaName))
.example(op.getExampleObject("response",
String.valueOf(statusType.getStatusCode())))));
apiResponsesObjectCopy.addApiResponse(statusCode,
response);
diff --git
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
index 627a8515c7..ae2f8e9bca 100644
---
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
+++
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/OpenApiUtil.java
@@ -634,6 +634,6 @@ public final class OpenApiUtil {
return new ApiResponse()
.description("Success response for the API call.")
.content(new Content()
-
.addMediaType(javax.ws.rs.core.MediaType.APPLICATION_JSON, mediaType));
+
.addMediaType(jakarta.ws.rs.core.MediaType.APPLICATION_JSON, mediaType));
}
}
diff --git
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/RestServiceUtil.java
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/RestServiceUtil.java
index cf5a30c3ea..10c70e30de 100644
---
a/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/RestServiceUtil.java
+++
b/framework/rest-api/src/main/java/org/apache/ofbiz/ws/rs/util/RestServiceUtil.java
@@ -20,7 +20,7 @@ package org.apache.ofbiz.ws.rs.util;
import java.util.Map;
-import javax.ws.rs.core.Response;
+import jakarta.ws.rs.core.Response;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.service.ModelService;
diff --git a/framework/service/config/axis2/conf/axis2.xml
b/framework/service/config/axis2/conf/axis2.xml
index 1427be2b07..cc84e0ce00 100644
--- a/framework/service/config/axis2/conf/axis2.xml
+++ b/framework/service/config/axis2/conf/axis2.xml
@@ -105,14 +105,11 @@
<!--Service deployer , this will alow users to deploy AAR or exploded AAR
as axis2 services-->
<deployer extension=".aar" directory="services"
class="org.apache.axis2.deployment.ServiceDeployer">
- <serviceBuilderExtension name ="jwsbuilderExt"
class="org.apache.axis2.jaxws.framework.JAXWSServiceBuilderExtension"/>
<serviceBuilderExtension name ="wsdlbuilderExt"
class="org.apache.axis2.deployment.WSDLServiceBuilderExtension"/>
</deployer>
<!--POJO deployer , this will alow users to drop .class file and make that
into a service-->
<deployer extension=".class" directory="pojo"
class="org.apache.axis2.deployment.POJODeployer"/>
- <deployer extension=".jar" directory="servicejars"
- class="org.apache.axis2.jaxws.framework.JAXWSDeployer"/>
<deployer extension=".jar" directory="transports"
class="org.apache.axis2.deployment.TransportDeployer"/>
@@ -129,23 +126,11 @@
<!-- use this parameter to override autodetected url -->
<!--<parameter
name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
- <!--By default, JAXWS services are created by reading annotations. WSDL
and schema are generated-->
- <!--using a separate WSDL generator only when ?wsdl is called. Therefore,
even if you engage-->
- <!--policies etc.. to AxisService, it doesn't appear in the WSDL. By
setting the following property-->
- <!--to true, you can create the AxisService using the generated WSDL and
remove the need for a-->
- <!--WSDL generator. When ?wsdl is called, WSDL is generated in the normal
way.-->
- <parameter name="useGeneratedWSDLinJAXWS">false</parameter>
-
<!-- The way of adding listener to the system-->
<!-- <listener class="org.apache.axis2.ObserverIMPL">-->
<!-- <parameter name="RSS_URL">http://127.0.0.1/rss</parameter>-->
<!-- </listener>-->
- <threadContextMigrators>
- <threadContextMigrator listId="JAXWS-ThreadContextMigrator-List"
-
class="org.apache.axis2.jaxws.addressing.migrator.EndpointContextMapMigrator"/>
- </threadContextMigrators>
-
<!-- ================================================= -->
<!-- Message Receivers -->
<!-- ================================================= -->
@@ -167,15 +152,15 @@
<!--format serialization in Axis2. These message formats are expected to
be resolved based on the content type. -->
<messageFormatters>
<messageFormatter contentType="application/x-www-form-urlencoded"
-
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+
class="org.apache.axis2.kernel.http.XFormURLEncodedFormatter"/>
<messageFormatter contentType="multipart/form-data"
-
class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+
class="org.apache.axis2.kernel.http.MultipartFormDataFormatter"/>
<messageFormatter contentType="application/xml"
-
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+
class="org.apache.axis2.kernel.http.ApplicationXMLFormatter"/>
<messageFormatter contentType="text/xml"
-
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+
class="org.apache.axis2.kernel.http.SOAPMessageFormatter"/>
<messageFormatter contentType="application/soap+xml"
-
class="org.apache.axis2.transport.http.SOAPMessageFormatter"/>
+
class="org.apache.axis2.kernel.http.SOAPMessageFormatter"/>
</messageFormatters>
<!-- ================================================= -->
@@ -232,7 +217,7 @@
<transportSender name="local"
class="org.apache.axis2.transport.local.LocalTransportSender"/>
<transportSender name="http"
-
class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
+
class="org.apache.axis2.transport.http.impl.httpclient5.HTTPClient5TransportSender">
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
@@ -241,7 +226,7 @@
</transportSender>
<transportSender name="https"
-
class="org.apache.axis2.transport.http.impl.httpclient4.HTTPClient4TransportSender">
+
class="org.apache.axis2.transport.http.impl.httpclient5.HTTPClient5TransportSender">
<parameter name="PROTOCOL">HTTP/1.1</parameter>
<parameter name="Transfer-Encoding">chunked</parameter>
</transportSender>
@@ -261,171 +246,6 @@
<!--<parameter name="addressingPara">N/A</parameter>-->
<!--</moduleConfig>-->
- <!-- ================================================= -->
- <!-- Clustering -->
- <!-- ================================================= -->
- <!--
- To enable clustering for this node, set the value of "enable" attribute
of the "clustering"
- element to "true". The initialization of a node in the cluster is handled
by the class
- corresponding to the "class" attribute of the "clustering" element. It is
also responsible for
- getting this node to join the cluster.
- -->
- <clustering
class="org.apache.axis2.clustering.tribes.TribesClusteringAgent" enable="false">
-
- <!--
- This parameter indicates whether the cluster has to be
automatically initalized
- when the AxisConfiguration is built. If set to "true" the
initialization will not be
- done at that stage, and some other party will have to explictly
initialize the cluster.
- -->
- <parameter name="AvoidInitiation">true</parameter>
-
- <!--
- The membership scheme used in this setup. The only values supported
at the moment are
- "multicast" and "wka"
-
- 1. multicast - membership is automatically discovered using
multicasting
- 2. wka - Well-Known Address based multicasting. Membership is
discovered with the help
- of one or more nodes running at a Well-Known Address. New
members joining a
- cluster will first connect to a well-known node, register
with the well-known node
- and get the membership list from it. When new members
join, one of the well-known
- nodes will notify the others in the group. When a member
leaves the cluster or
- is deemed to have left the cluster, it will be detected by
the Group Membership
- Service (GMS) using a TCP ping mechanism.
- -->
- <parameter name="membershipScheme">multicast</parameter>
-
- <!--
- The clustering domain/group. Nodes in the same group will belong to
the same multicast
- domain. There will not be interference between nodes in different
groups.
- -->
- <parameter name="domain">wso2.carbon.domain</parameter>
-
- <!--
- When a Web service request is received, and processed, before the
response is sent to the
- client, should we update the states of all members in the cluster?
If the value of
- this parameter is set to "true", the response to the client will be
sent only after
- all the members have been updated. Obviously, this can be time
consuming. In some cases,
- such this overhead may not be acceptable, in which case the value
of this parameter
- should be set to "false"
- -->
- <parameter name="synchronizeAll">true</parameter>
-
- <!--
- The maximum number of times we need to retry to send a message to a
particular node
- before giving up and considering that node to be faulty
- -->
- <parameter name="maxRetries">10</parameter>
-
- <!-- The multicast address to be used -->
- <parameter name="mcastAddress">228.0.0.4</parameter>
-
- <!-- The multicast port to be used -->
- <parameter name="mcastPort">45564</parameter>
-
- <!-- The frequency of sending membership multicast messages (in ms) -->
- <parameter name="mcastFrequency">500</parameter>
-
- <!-- The time interval within which if a member does not respond, the
member will be
- deemed to have left the group (in ms)
- -->
- <parameter name="memberDropTime">3000</parameter>
-
- <!--
- The IP address of the network interface to which the multicasting
has to be bound to.
- Multicasting would be done using this interface.
- -->
- <parameter name="mcastBindAddress">127.0.0.1</parameter>
-
- <!-- The host name or IP address of this member -->
- <parameter name="localMemberHost">127.0.0.1</parameter>
-
- <!--
- The TCP port used by this member. This is the port through which other
nodes will
- contact this member
- -->
- <parameter name="localMemberPort">4000</parameter>
-
- <!--
- Preserve message ordering. This will be done according to sender order.
- -->
- <parameter name="preserveMessageOrder">true</parameter>
-
- <!--
- Maintain atmost-once message processing semantics
- -->
- <parameter name="atmostOnceMessageSemantics">true</parameter>
-
- <!--
- Properties specific to this member
- -->
- <parameter name="properties">
- <property name="backendServerURL"
value="https://${hostName}:${httpsPort}/services/"/>
- <property name="mgtConsoleURL"
value="https://${hostName}:${httpsPort}/"/>
- </parameter>
-
- <!--
- The list of static or well-known members. These entries will only
be valid if the
- "membershipScheme" above is set to "wka"
- -->
- <members>
- <member>
- <hostName>127.0.0.1</hostName>
- <port>4000</port>
- </member>
- <member>
- <hostName>127.0.0.1</hostName>
- <port>4001</port>
- </member>
- </members>
-
- <!--
- Enable the groupManagement entry if you need to run this node as a
cluster manager.
- Multiple application domains with different GroupManagementAgent
implementations
- can be defined in this section.
- -->
- <groupManagement enable="false">
- <applicationDomain name="apache.axis2.application.domain"
- description="Axis2 group"
-
agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent"/>
- </groupManagement>
-
- <!--
- This interface is responsible for handling management of a specific
node in the cluster
- The "enable" attribute indicates whether Node management has been
enabled
- -->
- <nodeManager
class="org.apache.axis2.clustering.management.DefaultNodeManager"
- enable="true"/>
-
- <!--
- This interface is responsible for handling state replication. The
property changes in
- the Axis2 context hierarchy in this node, are propagated to all
other nodes in the cluster.
-
- The "excludes" patterns can be used to specify the prefixes (e.g.
local_*) or
- suffixes (e.g. *_local) of the properties to be excluded from
replication. The pattern
- "*" indicates that all properties in a particular context should
not be replicated.
-
- The "enable" attribute indicates whether context replication has
been enabled
- -->
- <stateManager
class="org.apache.axis2.clustering.state.DefaultStateManager"
- enable="true">
- <replication>
- <defaults>
- <exclude name="local_*"/>
- <exclude name="LOCAL_*"/>
- </defaults>
- <context class="org.apache.axis2.context.ConfigurationContext">
- <exclude name="local_*"/>
- </context>
- <context class="org.apache.axis2.context.ServiceGroupContext">
- <exclude name="local_*"/>
- </context>
- <context class="org.apache.axis2.context.ServiceContext">
- <exclude name="local_*"/>
- </context>
- </replication>
- </stateManager>
- </clustering>
-
<!-- ================================================= -->
<!-- Phases -->
<!-- ================================================= -->
@@ -460,20 +280,11 @@
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher"
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
- <handler name="GenericProviderDispatcher"
-
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
- <handler name="MustUnderstandValidationDispatcher"
-
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- System predefined phases -->
<!-- After Postdispatch phase module author or service author can
add any phase he want -->
- <phase name="OperationInPhase">
- <handler name="MustUnderstandChecker"
-
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandChecker">
- <order phase="OperationInPhase"/>
- </handler>
- </phase>
+ <phase name="OperationInPhase"/>
<phase name="soapmonitorPhase"/>
</phaseOrder>
<phaseOrder type="OutFlow">
@@ -507,10 +318,6 @@
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
<handler name="HTTPLocationBasedDispatcher"
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
- <handler name="GenericProviderDispatcher"
-
class="org.apache.axis2.jaxws.dispatchers.GenericProviderDispatcher"/>
- <handler name="MustUnderstandValidationDispatcher"
-
class="org.apache.axis2.jaxws.dispatchers.MustUnderstandValidationDispatcher"/>
</phase>
<phase name="RMPhase"/>
<!-- user can add his own phases to this area -->
diff --git
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/secret/SecretManagerEvents.java
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/secret/SecretManagerEvents.java
index e790c0de32..7df10d6846 100644
---
a/framework/webtools/src/main/java/org/apache/ofbiz/webtools/secret/SecretManagerEvents.java
+++
b/framework/webtools/src/main/java/org/apache/ofbiz/webtools/secret/SecretManagerEvents.java
@@ -92,7 +92,14 @@ public final class SecretManagerEvents {
return "error";
}
- byte[] csvBytes = getUploadedFileBytes(request);
+ byte[] csvBytes;
+ try {
+ csvBytes = getUploadedFileBytes(request);
+ } catch (IOException e) {
+ Debug.logError(e, MODULE);
+ request.setAttribute("_ERROR_MESSAGE_", "Error reading CSV file: "
+ e.getMessage());
+ return "error";
+ }
if (csvBytes == null || csvBytes.length == 0) {
request.setAttribute("_ERROR_MESSAGE_", "No CSV file was
uploaded");
return "error";
@@ -433,7 +440,7 @@ public final class SecretManagerEvents {
* parsed {@link FileItem}s in the {@code fileItems} request attribute -
the underlying request
* input stream can not be re-parsed here.
*/
- private static byte[] getUploadedFileBytes(HttpServletRequest request) {
+ private static byte[] getUploadedFileBytes(HttpServletRequest request)
throws IOException {
List<FileItem<DiskFileItem>> items =
UtilGenerics.cast(request.getAttribute("fileItems"));
if (items == null) {
return null;
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index da38b8d182..1c5f561afb 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -41,7 +41,7 @@ zip4j = "2.11.6"
activiti-juel-jakarta = "8.1.0"
commons-collections4 = "4.6.0"
commons-csv = "1.14.1"
-commons-fileupload2-jakarta = "2.0.0-M1"
+commons-fileupload2-jakarta-servlet6 = "2.0.0-M5"
commons-text = "1.15.0"
geronimo-transaction = "4.0.0"
geronimo-jms-spec = "1.1.1"
@@ -62,7 +62,7 @@ cxf-rt-frontend-jaxrs = "4.2.4"
# tomcat-catalina-ha, tomcat-dbcp, tomcat-jasper.
tomcat = "11.0.27"
# Shared by axis2-kernel, axis2-transport-http, axis2-transport-local.
-axis2 = "1.8.2"
+axis2 = "2.0.1"
# Shared by batik-anim, batik-util, batik-bridge.
batik = "1.20"
fop = "2.12"
@@ -133,7 +133,7 @@ activiti-juel-jakarta = { module =
"org.activiti:activiti-juel-jakarta", version
commons-collections4 = { module = "org.apache.commons:commons-collections4",
version.ref = "commons-collections4" }
commons-csv = { module = "org.apache.commons:commons-csv", version.ref =
"commons-csv" }
tomcat-dbcp = { module = "org.apache.tomcat:tomcat-dbcp", version.ref =
"tomcat" }
-commons-fileupload2-jakarta = { module =
"org.apache.commons:commons-fileupload2-jakarta", version.ref =
"commons-fileupload2-jakarta" }
+commons-fileupload2-jakarta-servlet6 = { module =
"org.apache.commons:commons-fileupload2-jakarta-servlet6", version.ref =
"commons-fileupload2-jakarta-servlet6" }
commons-text = { module = "org.apache.commons:commons-text", version.ref =
"commons-text" }
geronimo-transaction = { module =
"org.apache.geronimo.components:geronimo-transaction", version.ref =
"geronimo-transaction" }
geronimo-jms-spec = { module =
"org.apache.geronimo.specs:geronimo-jms_1.1_spec", version.ref =
"geronimo-jms-spec" }