How to deploy an adf web application that contains j2ee components on tomee? - oracle-adf

Firstly, I installed tomcat 7, then i could deploy adf application acc to following url: https://blogs.oracle.com/adfthoughts/entry/running_adf_essentials_in_tomcat
But i want server to run a j2ee application which has model project with jpa and hibernate etc, so i need to TomEE for that. I installed TomEE 1.5.2 version on my win7 system, i applied the same steps that already done for tomcat 7, result is failure.
Plz help me, I am getting following errors:
Caused by: org.apache.tomee.catalina.TomEERuntimeException: org.apache.openejb.OpenEJBException: Cannot unmarshall the JSP tag library definition file: jar:file:/u02/RTE/apache-tomee-plus-1.5.2/webapps/rcf-dvt-demo/WEB-INF/lib/adf-richclient-impl-12-abrams-SNAPSHOT.jar!/META-INF/afu.tld: unexpected element (uri:"http://java.sun.com/xml/ns/javaee", local:"code"). Expected elements are <{^#}text>
at org.apache.tomee.catalina.TomcatWebAppBuilder.loadApplication(TomcatWebAppBuilder.java:1903)
at org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:1073)
at org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:1033)
at org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:124)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more

I believe the problem is not in ADF, your problem is in the implementation that Tomee is using for EJB (JPA) which is openEJB, see if you configured your EJB Layer correctly?

Related

Cannot find Azure.Core, Version=1.20.0.0 in startup.cs of MVC setup on .net 5

My ASP.NET Core MVC application with React front end and .NET Core backend ran fine when published through vs2019. But when I try to do the CICD way (build pipeline, release pipeline through vso tasks), I am getting the below in the event log from Azure Portal.
CoreCLR Version: 5.0.921.35908
.NET Version: 5.0.9
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.FileNotFoundException: Could not load file or assembly 'Azure.Core, Version=1.20.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. The system cannot find the file specified.
File name: 'Azure.Core, Version=1.20.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'
at xxxxPortal.Program.<>c.b__1_0(HostBuilderContext context, IConfigurationBuilder config)
at Microsoft.Extensions.Hosting.HostBuilder.BuildAppConfiguration()
at Microsoft.Extensions.Hosting.HostBuilder.Build()
at xxxxPortal.Program.Main(String[] args) in D:\a\1\s\Odyssey Portal\xxxxPortal\Program.cs:line 16
My portal solution has a web app (react) project along with 4 others projects (.NET Core). They are controller/modal/repository/tests. All of them are setup to have .NET5 as the target.
In the Nuget restore task in VSO, I can see the dependency of Azure.Core are brought in from different projects. They range from 1.14 to 1.04. There is no presence of .NET Core 1.20.0
My portal project already setup with this
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<PreserveCompilationContext>false</PreserveCompilationContext>
How should I add to my solution/projects to fix this problem so my release pipeline can fix this "Azure.Core, Version=1.20.0.0 missing file" problem at runtime?
** Issue was due to there was another solution later on in the same pipeline having .net core 3.1 mix with .net framework. To see this error show up in the build, I added a .net core 5 install in the build pipeline.
final working pipeline

JBoss Fuse 6.1: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl could not be instantiated

Environment: JBoss Fuse 6.1 Fabric.
I have a Camel processor where I am trying to instantiate a DocumentBuilderFactory within my java code using
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
And for some reason, I am getting the following error:
Caused by: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl could not be instantiated: java.lang.IllegalStateException: Bundle is uninstalled
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:110)
at com.cigna.dom.util.DocumentUtils.getDocumentBuilder(DocumentUtils.java:464)
at com.cigna.dom.util.DocumentUtils.createDocument(DocumentUtils.java:489)
at com.cigna.commons.schema.XmlSchemaUtil.documentFromSchema(XmlSchemaUtil.java:70)
at com.cigna.camel.processor.response.DOMResponseProcessor.process(DOMResponseProcessor.java:75)
at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
I am not sure which bundle is uninstalled here. I tried adding the following bundle to features.xml but of no use.
<bundle dependency="true" start-level="30">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xerces/2.11.0_1</bundle>
This error is not happening all the time. It is very sporadic and sometimes it goes away after restarting the Fuse container.
Any help would be really appreciated. Thanks.

Jenkins-Artifactory plugin on WAS 8.5 class load errors

I am running Cloudbees Jenkins (1.554.2.2) on WebSphere 8.5 with Java 7 on RedHat Linux. I loaded the Artifactory plugin into Jenkins, but when I hit test connection, I receive the following error:
org.apache.commons.logging.LogConfigurationException:
org.apache.commons.logging.LogConfigurationException: Class
org.apache.commons.logging.impl.Jdk14Logger does not implement Log
It appears that the WebSphere JARs are being loaded first which contain a different version of the commons-logging JAR. I am seeing this as well with some other plugins.
I do have the classpath for the Jenkins in WebSphere set to be Parent Last. Also, Jenkins.war directory contains the commons-logging-1.1.3.jar and log4j-1.2.9.jar files.
Has anyone using artifactory plugin on Websphere 8.5 has encountered the issue.
This question has been asked before here

appcfg.cmd java version; 1.7 installed; 1.6 in path; tells me it needs 1.6 ti yokiad

I try to use this command to deploy my application to
appspot.google.com:
c:\a\appeng\bin\appcfg.cmd --use_java7 update c:\a\u3e
Generates the error messsage.
C:\a>c:\a\appeng\bin\appcfg.cmd --use_java7 update c:\a\u3e
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.7', but '1.6' is required.
Error: could not find java.dll
Error: could not find Java SE Runtime Environment.
I tried setting the path to use the Java 1.6 SDK we downloaded
but that did not help or change any thing.
The web resources talk about what version of Java is used
by the application once it appears on Google's servers; I
did not see anything about the Java version for the upload
process including developers.google.com/appengine/docs/java/gettingstarted/uploading and developers.google.com/appengine/docs/java/tools/uploadinganapp#Command_Line_Arguments as well as searching this site specifically and checking google.
Can I deploy
an application from the computer in my house without
deinstalling the Java 1.7 I use for other purposes?
Thank you for looking at this question. I resolved the problem. It was not related to Google Application Development
Server. It was a difficult-to-resolve path problem to the directory where the Java executables were kept.

WSDL2Java tool error Apache CXF

We get the following error when we use WSDL2Java tool to generate stubs. The webservice is up and running.
WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: Fail to create wsd
l definition from : http://scheduler.heartbeatsoftware.com/scheduler/WebServices
/SampleSNMWebService?wsdl
Caused by : WSDLException: faultCode=PARSER_ERROR: java.lang.IllegalArgumentExce
ption: InputSource must have a ByteStream or CharacterStream
If we donwload the wsdl and generate stubs from that wsdl, they are generated. But the java client using those stubs throws the same exception as above
Strangely when we deploy the same webservice on our LAN such a problem is not encountered stubs are generated sucessfully and the subsequent java client works well.
The webservice is created using apache cxf version 2.2.5 and hosted on tomcat 6
Any pointers would be appreciated
regards
Sameer
Found solution. Just need to modify the wsdl.java.bat to include proxy settings
-Dhttp.proxyHost= -Dhttp.proxyPort=8080

Resources