How to get JSF (Mojarra) 1.2 working on TomEE 7 (Plus or PluME)? - jsf-1.2

I'm deploying a Java EE application using JSF (Mojarra) 1.2 and Seam 2.2.2.
It works on JBoss EAP 7.0.0 and Oracle WebLogic 12.2.1.
However I cannot get it working on TomEE 7.0.2 (Plus nor PluME).
Simple WEB application for problem reproduction is available here.
I will be very glad for any suggestion how to get Mojarra 1.2 working on TomEE 7 (any edition).

The problem is solved - JSF Mojarra 1.2 works on TomEE Plus 7.0.2 :)
What is done
Removal of the following libraries:
myfaces-api-2.2.11.jar
myfaces-impl-2.2.11.jar
openwebbeans-jsf-1.7.0.jar
tomee-mojarra-7.0.2.jar
tomee-myfaces-7.0.2.jar
Addition of the following libraries (from Maven repo):
jsf-api-1.2_12.jar
jsf-impl-1.2_12.jar
openwebbeans-jsf12-1.6.3.jar
openwebbeans-el10-1.6.3.jar
In addition some corrections of JSF pages were done to make them XHTML-compliant -- TomEE breaks rendering on incorrect XHTML (i.e. not closed tags) while other app servers don't have problem with that.

Related

Autotesting of business processes in Camuda 8

I am new to Camunda. I work as a QA for a company that is implementing version 8 of the system.
I have a problem with autotests. I found examples of writing autotests for version 7, but absolutely nothing for version 8. Maybe you have some information for a poorly understood autotester?
I do not use camunda 8 yet, but have you tried using the bpmn driven testing modeler plugin https://github.com/camunda-community-hub/bpmn-driven-testing?
If you mean "automated unit tests" by "autotest," this is possible in Java with Camunda 8 as well:
Spring Boot: https://github.com/camunda-community-hub/spring-zeebe#writing-test-cases
Plain Java: https://github.com/camunda/zeebe-process-test
See for example this test case using Java, Spring Boot and Camunda 8: https://github.com/camunda-community-hub/camunda-8-examples/blob/main/twitter-review-java-springboot/src/test/java/org/camunda/community/examples/twitter/TestTwitterProcess.java

What is dotnet5.4 and net451 in class library?

In aspnet 5 I created a project which came with dotnet5.4 and net451. Since it's a class library I assume it does not need the runtime so uses net451 instead of dnx451 (my wild guess). But what about dotnet5.4 what exactly is that for ?
UPDATE: With this announcement, the monikers will probably change again. This answer is only scoped to the release of RC1. Any release further than RC2 won't apply here.
Basically, dnxcore50 became dotnet5.4 and dnx451 became net451.
Those were temporary to begin with and were bound to change prior to the final release.
Most of this information can be found here:
https://github.com/aspnet/Announcements/issues/98
But what about dotnet5.4 what exactly is that for ?
From Announcing ASP.NET 5 Release Candidate 1:
With this version of ASP.NET 5 templates, the “Class Library (package)” project template will target “dotnet5.4” which has binary compatibility with .NET 4.6, .NET Core 5, and Mono.

Symfony2 FOSUserBundle deprecated SecurityContext

the Symfony2 service SecurityContext is deprecated since version 2.6. In a current project under developpment we frequently use user roles. Therefore, it make senses to
switch immediately to the new security services of 2.6.
On the other hand we use FOSUserBundle in the project as well. As far as I see, the latest version of this bundle is at the level of Symfony 2.3. Since in the dev-environment version 2.6 ist not 100% bc with 2.3 (for example if Xdebug is acivated) the usasge of the new services yields conflicts ...
Our questions:
does someone know whether the FOSUserBundle will be compatible wih 2.6 in the near future?
has someone encountered the same problem and can give hints to handle it?
Best wishes
The problem has been solved.
First of all it turned out that all the Deprecated-errors - which prevented a development in our current envirement/configuration - came from a Symfony 2.7-dev version.
It seems that Symfony 2.6 itself does not have such errors. In this sense the above comments were correct. Thus, for the moment one has to use Symfony 2.6 in order to rewrite the own app such that the usage of security aspects becomes compatible with version 2.6.
From a FOS-developer we got the feedback that there will be an 2.6 compatible update of the user bundle before the release of a stable Symfony 2.7 vesion. Therefor one can switch smoothly form 2.6 to 2.7.

How to upgrade the hibernate-validator 4.3.0.Final to the Glassfish 3.1.2?

At the moment, the Hibernate Validator has released the latest version as 4.3.0.Final here. I have tried to upgrade it to my Glassfish 3.1.2 as the following step: -
1. Remove the GLASSFISH/glassfish/modules/bean-validator.jar
2. Copying the hibernate-validator-4.3.0.Final.jar to GLASSFISH/glassfish/modules
3. Restart the Glassfish
4. The Glassfish cannot start. It seems hang.
After searching via the Google, I've found that the file named "bean-validator.jar" was created by the Glassfish team as an OSGi version. Sadly, I cannot find how to create it. Could you please help to advise further? Thank you very much for your help in advance. I'm looking forward to hearing from you soon.
A (slightly outdated) description of how to build Glassfish's bean-validator.jar can be found here.
What's needed in general is an OSGi bundle which includes Hibernate Validator itself and the Bean Validation API. With this bundle you should be able to replace the original bean-validator.jar. Additionally you need the JBoss Logging bundle, which is used since release 4.3 by Hibernate Validator as logging API and already comes in form of an OSGi bundle.
If you're building a web application, you could also package HV 4.3 within your WAR and turn off class loader delegation by providing the file WEB-INF/glassfish-web.xml with the following contents:
<!DOCTYPE glassfish-web-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 Servlet 3.0//EN" "http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd">
<glassfish-web-app>
<class-loader delegate="false" />
</glassfish-web-app>
That way the HV classes will be loaded from your application instead of from the module provided by Glassfish.
You might also be interested in the issue GLASSFISH-15648 which aims to provide a dedicated Glassfish update package for HV.
As my case was ear, rather than war, based on suggestion of Gunnar, I did a patched version of the module, that is deployable to Glassfish (My version is 3.1.1 OSE).
Someone might find it still useful, see my blog for my solution (including step-by-step approach): http://peter-butkovic.blogspot.de/2012/11/glassfish-311-oss-with-hibernate.html

Spring/Flex on Websphere

I have a simple hibernate/spring/flex project. The project was developed under apache tomcat6. Can anyone point me how to proceed to deploy it on IBM webshphere v6.1? thanks
In general it should work if you project is J2EE 1.4 and JDK 5 compatible.
The most important step is to wrap an EAR around your WAR.
And on think I remember (I have such a port some time ago), is that you will need to change the Class loader order of the WAR!! in WAS to "parent last" (else you will get a lot of strange errors do to not compatible classes.)
And then you need to go form one problem to the next (sorry).

Resources