Just curious, did you upgrade jdk versions?

On Tue, Jul 18, 2023 at 1:18 PM Richard Zowalla <[email protected]> wrote:

> Hi,
>
> maybe adding a small reproducer to GitHub would help in identifying any
> issue?
>
> Gruß
> Richard
>
>
> Am Dienstag, dem 18.07.2023 um 17:56 +0200 schrieb [email protected]:
> > Hi,
> >
> > I ported our war file from TomEE 8.0.15 to TomEE 9.1.0.
> >
> > The deployment works fine with some new infos[1] where I think they
> > are not a serious issue.
> >
> > The application uses a SOAP interface and the WSDL will be retrieved.
> >
> > The server is using JAAS [2][3][4]. I think at the moment I
> > configured the TomEE system correctly.
> >
> > Now I'm observing that the SOAP messages are not deserialized and an
> > exception will be thrown.
> >
> > 18-Jul-2023 17:19:49.419 WARNING [http-nio-8080-exec-1]
> > org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging
> > Interceptor for {http://company.com/wssession/}WSSession has thrown
> > exc
> > eption, unwinding now
> >         org.apache.cxf.binding.soap.SoapFault: Error reading
> > XMLStreamReader.
> >                 at
> > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInIntercept
> > or.handleMessage(SAAJInInterceptor.java:145)
> >                 at
> > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInIntercept
> > or.handleMessage(SAAJInInterceptor.java:107)
> >                 at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercept
> > orChain.java:307)
> >         [...]
> >         Caused by: jakarta.xml.soap.SOAPException: Unable to create
> > message factory for SOAP: Error while searching for service
> > [jakarta.xml.soap.MessageFactory]
> >                 at
> > jakarta.xml.soap.MessageFactory.newInstance(MessageFactory.java:90)
> >                 at
> > org.apache.cxf.binding.soap.saaj.SAAJFactoryResolver.createMessageFac
> > tory(SAAJFactoryResolver.java:56)
> >                 at
> > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInIntercept
> > or.getFactory(SAAJInInterceptor.java:151)
> >                 at
> > org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInIntercept
> > or.handleMessage(SAAJInInterceptor.java:133)
> >                 ... 36 more
> >
> >
> > In the resources.xml the WSS4J is configured where the onterceptor is
> > invoked [5] ...
> >
> > Does anybody have an idea how TomEE is not finding a
> > SoapMessageFactory? What can I do? My assumption was that a lib is
> > inside the library folder? [6]
> >
> > Thanks,
> > Markus
> >
> >
> >
> > [1]
> > 18-Jul-2023 17:17:48.929 INFO [main]
> > org.apache.cxf.jaxb.JAXBContextInitializer.addClass Class
> > jakarta.xml.bind.JAXBElement does not have a default constructor
> > which JAXB requires.
> > 18-Jul-2023 17:17:48.983 INFO [main]
> > org.apache.cxf.common.jaxb.JAXBUtils.createEscapeHandler Failed to
> > create MinimumEscapeHandler
> >
> > [2]
> > less conf/login.config
> > jaasContext  {
> >     org.apache.openejb.core.security.jaas.ServiceProviderLoginModule
> > required;
> > };
> >
> > [3]
> > less conf/server.xml
> >     <Engine name="Catalina" defaultHost="localhost">
> >
> >       <!--For clustering, please take a look at documentation at:
> >           /docs/cluster-howto.html  (simple how to)
> >           /docs/config/cluster.html (reference documentation) -->
> >       <!--
> >       <Cluster
> > className="org.apache.catalina.ha.tcp.SimpleTcpCluster"/>
> >       -->
> >
> >       <!-- Use the LockOutRealm to prevent attempts to guess user
> > passwords
> >            via a brute-force attack -->
> >       <Realm className="org.apache.catalina.realm.JAASRealm"
> > appName="jaasContext"
> >
> > userClassNames="org.apache.openejb.core.security.jaas.UserPrincipal"
> >
> > roleClassNames="org.apache.openejb.core.security.jaas.GroupPrincipal"
> > >
> >       </Realm>
> >
> > [4]
> > less bin/setenv.sh
> > export CATALINA_OPTS="$CATALINA_OPTS -
> > Djava.security.auth.login.config=/opt/tomee/current/conf/login.config
> > "
> >
> > [5]
> > <resources>
> >     <!-- In interceptors -->
> >     <Service id="wss4j" class-
> > name="org.apache.openejb.server.cxf.config.WSS4JInInterceptorFactory"
> > factory-name="create">
> >         action = UsernameToken
> >         passwordCallbackClass = com.company.PasswordHandler
> >     </Service>
> > </resources>
> >
> > [6]
> > /opt/tomee/apache-tomee-plus-9.1.0/lib$ find -name "*cxf*"
> > ./cxf-rt-rs-mp-client-shade-9.1.0.jar
> > ./openejb-cxf-transport-9.1.0.jar
> > ./openejb-cxf-rs-9.1.0.jar
> > ./cxf-shade-9.1.0.jar
> > ./openejb-cxf-9.1.0.jar
> > /opt/tomee/apache-tomee-plus-9.1.0/lib$ find -name "*soap*"
> > ./opensaml-soap-api-4.2.0.jar
> > /opt/tomee/apache-tomee-plus-9.1.0/lib$ find -name "*xml*"
> > ./opensaml-xmlsec-impl-4.2.0.jar
> > ./opensaml-xmlsec-api-4.2.0.jar
> > ./xmlsec-3.0.1.jar
> > ./xmlschema-core-2.2.5.jar
> >
> >
> >
> >
> >
> >
>
>

-- 
Jonathan | [email protected]
Pessimists, see a jar as half empty. Optimists, in contrast, see it as half
full.
Engineers, of course, understand the glass is twice as big as it needs to
be.

Reply via email to