Patching JBoss EAP 6.4 fails - java

I'm trying to patch my jboss eap 6.4 with the following command:
jboss-cli.bat "patch apply jboss-eap-6.4.6-patch.zip
--preserve=[org.jboss.resteasy.resteasy-atom-
provider:main,org.jboss.resteasy.resteasy-cdi:main,
org.jboss.resteasy.resteasy-hibernatevalidator-provider.main,
org.jboss.resteasy.resteasy-jackson-provider:main,
org.jboss.resteasy.resteasy-jaxb-provider:main,
org.jboss.resteasy.resteasy-jaxrs:main,
org.jboss.resteasy.resteasy-jettison-provider:main,
org.jboss.resteasy.resteasy-jsapi:main,
org.jboss.resteasy.resteasy-multipart-provider:main,
org.jboss.resteasy.resteasy-yaml-provider:main]"
But it fails with the below error:
Use the --override-all, --override=[] or --preserve=[] arguments in order to resolve the conflict.
According to https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/6.2/html/Installation_Guide/sect-Install_Patches_in_Zip_Form.html I should use:
--preserve=path(,path)</code>
Am I maybe interpreting the line above incorrectly?

You cannot patch a 6.2 version to 6.4.6 with the patch command. Patch command is intended for cumulative patching, not upgrading from 6.2 to 6.4. You will need to first install the base JBoss EAP 6.4.0 and then apply the CP06 patch. If the patching is successful, then restart your JBoss instance and you should see a log message that indicates the version of JBoss EAP 6.4.6.
Hope this helps.

Have you tried to remove the "[]" around the list? The quote you specified about the syntax does not include the brackets:
--preserve=path(,path)

Related

Problem with oracle.ucp.jdbc.UCPServletContextListener

I'm running a small java application on TomCat 9.0.56 for class that has to connect to a database. I'm using jdbc (ojdbc8 - 19.3.0.0). It was working fine untill it started displaying the following error:
16-Jan-2022 21:03:42.631 SEVERE [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener [oracle.ucp.jdbc.UCPServletContextListener] java.lang.NoSuchMethodException: oracle.ucp.jdbc.UCPServletContextListener.<init>()
I'm new to tomcat and I'm not sure how to fix this. I have re-installed everything but it hasn't worked again. Any idea?
IDE - IntelliJ 2021.2.3
JDK - 17.0.1
I am sure you must be using Oracle JDBC and UCP binaries from 21.1 release instead of 19.3 release. You can check and validate the ojdbc and ucp jar version using below command:
java -jar ucp.jar
java -jar ojdbc8.jar
The issue you have described above is a known issue with ucp 21.1 release jars. In order to fix the issue, you can simply switch to ucp/jdbc 21.3 release. Please make sure to upgrade both ucp.jar and ojdbc8.jar to 21.3, not just one. Also, make sure to remove all duplicate jars(if any) from the class-path.
Here is a related thread for the same issue:
Ojdbc8 jars upgrade to 21.1.0.0 throws Nosuchmethod exception UCPservletContextListener init
Weirdly, uninstalling and deleting all tomcat versions previously used and installing a new one and setting up a new configuration made the error stop happening and the app is running nicely again.
I had done this before with no results, but this time it did work.

Error accessing env properties with Camel in JBoss Fuse 6.3 on JBoss EAP 6.4

I'm working with Apache Camel and JBoss Fuse 6.3 on JBoss EAP 6.4. I'd like to access environment properties via Spring DSL (like for example the JBoss Fuse home location) but I'm getting an error: with the following code
<camel:setProperty id="_setProperty1" propertyName="provaProp">
<camel:simple>${env:JBOSS_FUSE_HOME}</camel:simple>
</camel:setProperty>
I'm getting this error
Caused by: org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: Unknown function: env:JBOSS_FUSE_HOME at location 0
Changing JBOSS_FUSE_HOME in JBOSS_EAP home doens't solve
<camel:setProperty id="_setProperty1" propertyName="provaProp">
<camel:simple>${env:JBOSS_EAP_HOME}</camel:simple>
</camel:setProperty>
Caused by: org.apache.camel.language.simple.types.SimpleIllegalSyntaxException: Unknown function: env:JBOSS_EAP_HOME at location 0
What is the problem?
I must admit I'm answering from the top of my head, have you tried with:
<camel:setProperty id="_setProperty1" propertyName="provaProp">
<camel:simple>{{env:JBOSS_FUSE_HOME}}</camel:simple>
</camel:setProperty>
The simple language function for ENV variables was unfortunately created as sysenv.XXX style, so use
<camel:simple>${sysenv.JBOSS_FUSE_HOME}</camel:simple>
http://camel.apache.org/simple
The property placeholders, on the other hand (not the same as simple), supports env, which you can do via {{env:xxx}} style:
<camel:simple>{{env:JBOSS_FUSE_HOME}}</camel:simple>
And since it can be looked up just once, you can use a constant if you will:
<camel:constant>{{env:JBOSS_FUSE_HOME}}</camel:constant>
http://camel.apache.org/using-propertyplaceholder.html

weblogic.ejbc compiler is deprecated : EJB Application deployment in WebLogic 12c

I'm using EJB 2.1, jdk 1.6 with Weblogic 11g for application development. Latest I have been process of deploying application in WebLogic 12c.
As I understood from online source, I need to have jdk 1.7 and higher to run application in weblogic 12c. I also getting below error, when I compile EJB 2.1 with JDK 1.7 or higher.
DEPRECATED: The weblogic.ejbc compiler is deprecated and will be removed in a future version of WebLogic Server. Please use weblogic.appc instead.
java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
at weblogic.ejbc20.runBody(ejbc20.java:455)
at weblogic.utils.compiler.Tool.run(Tool.java:159)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.ejbc.main(ejbc.java:36)
at BuildEjbs.main(BuildEjbs.java:97)
Exception in thread "main" java.lang.NoSuchMethodError: weblogic.xml.babel.baseparser.BaseParser.setMaxAttrsPerElement(I)V
at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:89)
at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:148)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:322)
at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:54)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:96)
at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:114)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:79)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:63)
at weblogic.application.descriptor.VersionMunger.<init>(VersionMunger.java:45)
at weblogic.ejb.container.metadata.EjbJarReader.<init>(EjbJarReader.java:46)
at weblogic.ejb.container.metadata.EjbJarLoader.createXMLStreamReader(EjbJarLoader.java:49)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:438)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:832)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:841)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.processEjbJarXML(EjbDescriptorReaderImpl.java:440)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:263)
at weblogic.ejb.container.metadata.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:250)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:92)
at weblogic.ejbc20.getDescriptorFromJar(ejbc20.java:683)
at weblogic.ejbc20.runBody(ejbc20.java:455)
at weblogic.utils.compiler.Tool.run(Tool.java:159)
at weblogic.utils.compiler.Tool.run(Tool.java:116)
at weblogic.ejbc.main(ejbc.java:36)
at BuildEjbs.main(BuildEjbs.java:97)
Going to the <application> build directory
Deleting JAR files
*****FINISHED JAR AND EJBC FOR ALL THE EJBS*****
Is it possible to compile EJB 2.1 with JDK 1.6 or least version through deprecated way?
we are using ejb 3.0 compiled on jdk1.6 and deployed on weblogic 12c jdk 1.7.We have not faced any issue like this.It is working perfectly fine.I think you will require to do changes in your deployment descriptor.
You can try using descriptors defined in weblogic documentation.
https://docs.oracle.com/cd/E13222_01/wls/docs103/ejb/DDreference-ejb-jar.html

Error when starting JBoss 5.1.0.GA / AttachmentStore

I'm getting this error when starting the JBoss server in Eclipse.
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed.
DEPLOYMENTS IN ERROR
Deployment "AttachmentStore" is in error due to: java.lang.IllegalArgumentException: wrong arguments. new for taget java.land.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
I've googled the AttachementStore error and most suggested modifying the profile.xml (conf/bootstrap/profile.xml) file by adding a class to the constructor parameter node like this...
constructor parameter class="java.io.File"
Adding the class="java.io.File" seems to be the accepted solution everywhere since it's a known bug in JBoss but it didn't work for me.
I know I added the class correctly, I checked, rechecked and rechecked again the profile.xml file but JBoss is still throwing the same error when starting. I'm completely baffled. Anyone have any other ideas?
Error mainly occurred due to upgrade java 6 to java 7 or 8. Previously I used jdk 6u10 and it is changed to jdk 7u45.
Run the projects using java release of jdk 6u10 or Sun JDK 1.6.0_13. JBOSS runs with these JDK version successfully.

JAX-WS and version conflicts

As test project I've create a very simple WebService using wsdl and jax-ws. The client runs very well if it is deployed as web application in GlassFish but if I start the same (WebService-)Code in Eclipse directly, I get the following error:
WARNUNG: Input Action on WSDL operation AddNumbers and #Action on its associated Web Method addNumbers did not match and will cause problems in dispatching the requests
Exception in thread "main" java.lang.NoClassDefFoundError: org/glassfish/ha/store/api/BackingStoreException
at com.sun.xml.ws.rx.mc.runtime.McConfigurationFactory.createInstance(McConfigurationFactory.java:66)
at com.sun.xml.ws.rx.mc.runtime.McTubeFactory.createTube(McTubeFactory.java:68)
at com.sun.xml.ws.assembler.TubeCreator.createTube(TubeCreator.java:84)
at com.sun.xml.ws.assembler.TubelineAssemblerFactoryImpl$MetroTubelineAssembler.createClient(TubelineAssemblerFactoryImpl.java:130)
at com.sun.xml.ws.client.Stub.createPipeline(Stub.java:228)
at com.sun.xml.ws.client.Stub.<init>(Stub.java:205)
at com.sun.xml.ws.client.Stub.<init>(Stub.java:178)
at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:85)
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:608)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:348)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:330)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:312)
at javax.xml.ws.Service.getPort(Service.java:134)
at mnm.namedesdienstes.webservice.service.NameDesDienstesService.getNameDesDienstesPortTypePort(NameDesDienstesService.java:56)
at webserviceClient.NameDesDienstesClient.myTest(NameDesDienstesClient.java:12)
at webserviceClient.NameDesDienstesClient.main(NameDesDienstesClient.java:25)
Caused by: java.lang.ClassNotFoundException: org.glassfish.ha.store.api.BackingStoreException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 16 more
After some research I found out that it must have something to do with different versions of some library files. So now my question is, how can I "fix" my eclipse java execution to run my webservice client correctly? I've found some tips to copy some jar to an endorsed-directory, but which jars into which directory :-)
I'm using Max OS 10.6.8, Eclipse Project uses JVM 1.6. My Mac Java Version is
xmacbook:~ cstraube$ java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
UPDATE: My first try (thanks to the link from remipod) I performed the following steps:
Get the directory of endorsed lirbaries with System.out.println(System.getProperty("java.endorsed.dirs"));
Next, I copied the two files JAXWS2.1.7-20090419.jar and JAXB2_20080513.jar (both Version 2.1.7) into this directory
Unfortunately I get still the same error
I have similar problem with yours when deploying web service (JAX-WS) in tomcat 7.
The missing class definition could be found in ha-api.jar.
org/glassfish/ha/store/api/BackingStoreException
You should add the ha-api.jar (From JAX-WS distribution) into server lib. For my case, the eclipse run tomcat 7, so the location is (Tomcat 7.0\lib).
You have to copy the fitting versions of jaxws-api.jar and jaxb-api.jar into the directory /Library/Java/Home/lib/endorsed (Mac).
Have a look at this link JAX WS with WS 2.1.1. You will need to give precedence to your version of jaxws to the provided jaxws from the jre 1.6.
Edit:
Glassfish already includes some libraries, as well as java 6. I had to track down version conflicts with jaxws in glassfish 3.1 / 3.1.1 and java 6 / 7. You might check the exact java runtime eclipse uses to start the application and look for duplicate jars on the effective classpath.
The endorsed mechanism just provides an easy and error prone way to override the included jaxws distribution. Error prone, because your colleague will suffer from the same problem.
I havn't seen the exception org.glassfish.ha.store.api.BackingStoreException in the context of jaxws. Your version conflict could be created by another library than jaxws...
I experienced the exact same exception
org.glassfish.ha.store.api.BackingStoreException
And after ensuring my JAX-WS and JAX-B jars were all the same version the issue was still occurring.
THE FIX: I then added the ha-api.jar to the WEB-INF\lib directory and this solved the issue.
The clue here was the "ha" package in the exceptions class path as seen above. Hope this helps!

Categories