Struts 2.3.28.1 to 2.5 migration------support of jars in Struts 2.5 - struts

I am migrating my project from Struts 2.3.28.1 to 2.5 and could not find the below 3 jar files in Struts 2.5 bundle , which were present in Struts 2.3.28.1 bundle release.Can anyone let me know if Struts 2.5 still supports these 3 jars and if not, then any possible solution----xwork-core-2.3.28.1 , oro-2.0.8 , commons-validator-1.3.1.

xwork-core has been folded into struts2-core, thus there will no artifact for it with version 2.5.x.
XWork source was merged into Struts Core source, it means that there be no more xwork artifact nor dedicated jar
Check the release notes here

Related

What is the meaning of Manifest-Version, Bundle-ManifestVersion, Bundle-Version?

What impact will be happen if I change the Bundle-Version which present in Manifest.MF file?
Also I could not understand why we used Bundle-Version, Manifest-Version, Bundle-ManifestVersion into Manifest.MF file?
Manifest-Version is the version of the Java manifest specification that this manifest uses - normally always 1.0. You won't normally change this.
Bundle-ManifestVersion is the version of the OSGi manifest specification that this manifest uses. Again you won't normally change this.
Bundle-Version is the version of the plugin in the form 'major.minor.micro.qualifier'. 'qualifier' is usually some sort of build id. You will normally increment one of 'major', 'minor' or 'micro' each time you change the plugin.
OSGi uses the term 'Bundle' for what Eclipse calls a 'plug-in'.
Bundle-Version - The version of the OSGi bundle (in Eclipse bundles are also called plug-ins): bundles can define dependencies to other bundles in a version range
Manifest-Version - The version of the JAR Manifest format (up to now 1.0)
Bundle-ManifestVersion - The version of the OSGi Manifest format which extends the JAR Manifest format (2 since release 4)

IntelliJ does not detect struts 2 and tiles, can't create fileset

Today I created a new Maven multi-module project from scratch with IntelliJ 2016.2 and archetypes pom-root and apache-struts2-starter. I have been working on several Struts 2 projects with tiles now so I know about the struts 2 file sets, the auto detection of frameworks, etc.
Strange thing now with this new project: IntelliJ doesn't detect anything. I was waiting for this little pop up which says "Struts 2 detected, configure" where I can create a fileset with all struts xml files, but nothing happens. Also I can't create a fileset myself in the facet window in the settings. If I try, no files to add are shown.
On the other hand, IntelliJ does show me the Struts 2 facet, but I can't manage to configure it properly in IntelliJ. I don't understand why it works for another project, but not for this new one. So I'm not able to jump from one tiles result to its definition, or from a JSP with struts:action to its action definition in struts.xml...
I can build and run the project perfectly, but why does IntelliJ not configure it?
It seems that the problem had to do with the doctype (more exact: the dtd) in my struts.xml. Usually it is something like
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
But, because I selected the newest Struts-2-Version for this new project, I thought it had the be
<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.5//EN"
"http://struts.apache.org/dtds/struts-2.5.dtd">
corresponding to the struts-version 2.5.2 (general question: how do I know which doctype i have to use??). It seems that the Ijntellij-Struts-Plugin doesn't "recognize" this DTD-Version (although it does exist, see http://struts.apache.org/dtds/). If I change it to 2.3 or 2.1, the small popup "No file sets configured" immediately appears. Very strange.

I can not find for the source code repository for poi-ooxml-schemas

Alright, this is a little bit wierd. I've checkout apache-poi version 3.9 source code from
http://archive.apache.org/dist/poi/release/src/
But I can not find the source code for poi-xml-schemas. I have been googling but to no avail. Where is the code repository for these project? Is it a separate project from the poi source code or it is from some other project used as a library, but where is the code repository?
This is covered in the Apache POI FAQ (#14), from which I quote:
14. I can't seem to find the source for the OOXML CT.. classes, where do they come from?
The OOXML support in Apache POI is built on top of the file format XML Schemas, as compiled into Java using XMLBeans. Currently, the compilation is done with XMLBeans 2.3, for maximum compatibility with installations. (You can use the resulting classes on the XMLBeans 2.3 runtime, or any later version of XMLBeans. If you are currently using XMLBeans 2.2 or earlier, you will unfortunately have to upgrade, but this isn't common any more).
All of the org.openxmlformats.schemas.spreadsheetml.x2006 CT... classes are auto-generated by XMLBeans. The resulting generated Java goes in the ooxml-schemas-src jar, and the compiled version into the ooxml-schemas jar.
The full ooxml-schemas jar is distributed with Apache POI, along with the cut-down poi-ooxml-schemas jar containing just the common parts. The source jar isn't normally distributed with POI. It is, however, available from Maven Central - ask your favourite Maven mirror for the ooxml-schemas-src jar. Alternately, if you download the POI source distribution (or checkout from SVN) and build, Ant will automatically download the specification XML Schema, and compile it for you to generate the source and binary ooxml-schemas jars.
https://repo1.maven.org/maven2/org/apache/poi/ooxml-schemas/1.0/
has the ooxml schema ----- CTArray jar files.

ActiveMQ version conflict with jre 1.5

I am using Axway server which runs on jre 1.5 . So it accepts all classed builded below 1.6 . But problem is I read THIS LINK and I got this line as guide
Environment:
* Java Developer Kit (JDK) 1.4.x or greater for deployment and 1.5.x (Java 5) for compiling/building. As of AMQ 5.5.0 you need JDK 1.6.0 to**
Which says I can use ActiveMQs below version 5.5 for jre 1.5.
when I use ActiveMQ 5.4.3 am getting bad class version error.Please help me.
This is the line where am getting this error
Object o = Class.forName("org.apache.activemq.ActiveMQConnectionFactory",
true,ConnFactory.class.getClassLoader())
.newInstance();
You could extract the jar as a zip file, and then look inside the folder and check inside the META-INF directory. The MANIFEST.MF file will tell you what version of the jvm the jar was compiled with. I just grabbed the 5.4.3 version of the activemq jar and it said this:
Manifest-Version: 1.0
Archiver-Version: Plexus Archiver
Created-By: Apache Maven
Built-By: chirino
**Build-Jdk: 1.6.0_26**
Specification-Title: ActiveMQ :: Jar Bundle
Specification-Version: 5.4.3
Specification-Vendor: The Apache Software Foundation
Implementation-Title: ActiveMQ :: Jar Bundle
Implementation-Version: 5.4.3
Implementation-Vendor-Id: org.apache.activemq
Implementation-Vendor: The Apache Software Foundation
which clearly shows that it was built with the 1.6 jvm. Might need to download the source and build it on 1.5 manually.
In maven repository the last version of activemq built on jdk 1.5 is 5.4.2.
Problem is due to the jvm config file entry for jar newly added.
I don't know and I am not responsible and I don't have permission to do any Admin related privileges.
I put the jar in CLASSPATH exactly.So its ok for all the classes to access that.
But problem is in JVM config file I have to put the entry, I mean I have to give name of the jar with CLASSPATH in jvm.config file of axway.Though I put my jar in class path without put entry in jvm.config, it is worthless.Because while jvm get initialized it checks the config file first to add jar with it.

How to find the Struts version being used in a project

How to find the Struts version being used in a Web Application project in Eclipse?
My struts-config.xml says
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts
Configuration 1.2//EN"
"http://struts.apache.org/dtds/struts-config_1_2.dtd">
Thanks.
Open struts jar and read version in MANIFEST file, inside META-INF folder.
We can find out the struts version by observing the doctype of the Struts-config file.
For Example if your struts config file contains the below DTD then we can say that it is Struts 1.1 version.
<!DOCTYPE struts-config PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
"http://jakarta.apache.org/struts/dtds/**struts-config_1_1.dtd**">
On a Windows system:
Open file explorer, search for struts*.jar
Open struts-core.jar with a unzip tool (e.g. IZArc2Go)
Open META-INF folder and open MANIFEST.MF file with a text editor
There you will find Specification-Version: with the version number
Some additional release info:
Latest Struts 2 version is 2.5.2
Struts 1 is EOL with version 1.3.10 in December 2008
and the property to look at in manifest.mf is 'Specification-Version'
Dont refer to the Manifest-version. instead you refer to the "Specification-Version"
Eg:
Specification-Version: 1.2.4
That means the struts verison is 1.2.4