MyFaces basic project won't start - java

I'm trying to launch a very basic project found here:
The HelloWorld example of JSF 2.2 with Myfaces
Just cloned the git from here.
Now, I've tried different approach but just can't amend the JSF Mojarra co-existence in my App Server, since I think that this problem:
<27-ott-2018 23.44.46,046 CEST> <Error> <Deployer> <BEA-149202> <Encountered an exception while attempting to commit the 9 task for the application "jsf_myfaces" on [partition-name: DOMAIN].>
<27-ott-2018 23.44.46,048 CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application "jsf_myfaces".>
<27-ott-2018 23.44.46,048 CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:140)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:233)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:228)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalStateException: Could not find backup for factory javax.faces.application.ApplicationFactory.
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:561)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:283)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getApplication(FacesContextImplBase.java:169)
at org.apache.myfaces.context.servlet.FacesContextImplBase.getELContext(FacesContextImplBase.java:231)
at javax.faces.component.UIViewRoot.setLocale(UIViewRoot.java:1488)
Truncated. see log file for complete stacktrace
Is just related to that.
Tried JBoss Wildfly 8.2 and Weblogic 12c R2, same story.

This was the correct way to start the project keeping myfaces dependencies jars in front of the ones in the server container:
weblogic-prefer-application-packages-not-working
Probably a simple deployment-descriptor for JBoss would accomplish the same task.

Related

Maven throwing SAML Statement error message

I am working on Maven and I get error as shown below. I tried checking deployment assembly and build path but I am not getting any hint on what the system is complaining about. I also made sure I cleaned tomcat directory and cleaned the project. I would appreciate any help on it
Jan 20, 2020 12:11:13 PM org.apache.catalina.core.StandardWrapperValve
invoke SEVERE: Servlet.service() for servlet [cas] in context with
path [/URL] threw exception [Request processing failed; nested
exception is
org.springframework.webflow.execution.ActionExecutionException:
Exception thrown executing
org.springframework.webflow.action.ViewFactoryActionAdapter#2def1006
in state 'viewServiceErrorView' of flow 'login' -- action execution
attributes were 'map[[empty]]'] with root cause
java.lang.ClassNotFoundException: org.opensaml.SAMLStatement at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1139)
at java.lang.Class.getDeclaredConstructors0(Native Method) at
java.lang.Class.privateGetDeclaredConstructors(Class.java:2671) at
java.lang.Class.getConstructor0(Class.java:3075) at
java.lang.Class.getDeclaredConstructor(Class.java:2178) at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.
As the system was complaining I was missing opensaml jar.
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>1.1</version>
</dependency>
System was unable to download the jar from maven repo. I manually updated the jar in my local and it worked fine.

Webapp deployment fails with interface not visible from class loader exception

I have a fresh weblogic 12c server where I was trying to deploy a spring hibernate based Webapp and the deployment is failing with following exception:
<Mar 13, 2019 12:58:51,096 PM IST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID "346350192983496" for task "0" on [partition-name: DOMAIN]. Error is: "weblogic.application.ModuleException: java.lang.IllegalArgumentException: interface javax.persistence.EntityManagerFactory is not visible from class loader"
weblogic.application.ModuleException: java.lang.IllegalArgumentException: interface javax.persistence.EntityManagerFactory is not visible from class loader
at weblogic.application.internal.ExtensibleModuleWrapper.prepare(ExtensibleModuleWrapper.java:114)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:100)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:192)
at weblogic.application.internal.flow.ModuleStateDriver$1.next(ModuleStateDriver.java:187)
at weblogic.application.utils.StateMachineDriver$ParallelChange.run(StateMachineDriver.java:83)
Truncated. see log file for complete stacktrace
Caused By: java.lang.IllegalArgumentException: interface javax.persistence.EntityManagerFactory is not visible from class loader
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:581)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Proxy.java:557)
at java.lang.reflect.WeakCache$Factory.get(WeakCache.java:230)
at java.lang.reflect.WeakCache.get(WeakCache.java:127)
at java.lang.reflect.Proxy.getProxyClass0(Proxy.java:419)
Truncated. see log file for complete stacktrace
I am using java 8 based web application, here are the versions of the different solutions/ libraries:
Weblogic : 12.2.1.3.0 spring: 5.0.6 hibernate: 5.1.0
weblogic.xml:
<weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<context-root>/iamws/adc</context-root>
<wls:container-descriptor>
<wls:prefer-web-inf-classes>false</wls:prefer-web-inf-classes>
<wls:prefer-application-packages>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>org.joda.*</wls:package-name>
<wls:package-name>com.sun.activation.*</wls:package-name>
<wls:package-name>javax.activation.*</wls:package-name>
<wls:package-name>com.sun.mail.*</wls:package-name>
<wls:package-name>javax.mail.*</wls:package-name>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>org.jboss.*</wls:package-name>
<wls:package-name>org.apache.log4j.*</wls:package-name>
<wls:package-name>javax.persistence.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
</weblogic-web-app>
I was able to solve this by adding following to weblogic.xml:
<wls:package-name>org.hibernate.*</wls:package-name>

weblogic 12.1.3 ,deployement exception,cannot inherit from final class

I have a ATG application on version 10.2,I am trying to deploy the appplication on weblogic 12.1.3 and facing this exception while server startup
Here is the logs snippet:
<Dec 22, 2017 3:51:04 PM IST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application "vsi_store".
weblogic.management.DeploymentException: java.lang.VerifyError: Cannot inherit from final class at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:123) at weblog
ic.application.internal.BaseDeployment.activate(BaseDeployment.java:260)
at
weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at
weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:16)
at
weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:80)
Truncated. see log file for complete stacktrace
Caused By: java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
2)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericCla
ssLoader.java:412)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(Generic
ClassLoader.java:366)
This issue was happening because of inbuild guava classes in 12.1.3 version of weblogic.They were interfaring with my application guava classes
I solved it by using version 12.1.2.
or you can solve it in 12.1.3 by changing entries of weblogic-application.xml as below:
<wls:prefer-application-packages>
<wls:package-name>com.fasterxml.jackson.*</wls:package-name>
<wls:package-name>com.github.fge.*</wls:package-name>
<wls:package-name>org.joda.*</wls:package-name>
<wls:package-name>com.google.common.*</wls:package-name>
<wls:package-name>com.sun.jersey.*</wls:package-name>
<wls:package-name>org.glassfish.jersey.*</wls:package-name>
<wls:package-name>org.glassfish.hk2.*</wls:package-name>
<wls:package-name>org.jvnet.hk2.*</wls:package-name>
<wls:package-name>jersey.repackaged.org.objectweb.asm.*</wls:package-name>
<wls:package-name>com.sun.research.ws.wadl.*</wls:package-name>
<wls:package-name>com.sun.ws.rs.ext.*</wls:package-name>
<wls:package-name>org.codehaus.jackson.*</wls:package-name>
<wls:package-name>com.fasterxml.jackson.*</wls:package-name>
<wls:package-name>org.codehaus.jettison.*</wls:package-name>
<wls:package-name>javax.ws.rs.*</wls:package-name>
<wls:package-name>org.objectweb.asm.*</wls:package-name>
<wls:package-name>antlr.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>

IntelliJ IDEA + Tomee 1.7.1 - Bean Manager not found error

I'm getting a strange error when starting up tomee in IntelliJ and deploying my web app (as war). I'm not referencing any bean manager or weld classes in my pom.xml file and so far this is just a "bare bones" web application that I'm using to try out TomEE and do a bit of fun stuff with it (hopefully) - but this error is blocking me - any help would be appreciated. Thanks
Mar 24, 2015 10:55:32 PM org.apache.tomee.catalina.TomcatResourceFactory create
SEVERE: Can't create resource BeanManager
java.lang.ClassNotFoundException: org.jboss.weld.resources.ManagerObjectFactory
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
at org.apache.tomee.catalina.LazyStopWebappClassLoader.loadClass(LazyStopWebappClassLoader.java:129)
at org.apache.tomee.catalina.TomcatResourceFactory.create(TomcatResourceFactory.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

how to install missing jars in eclipse for aws sdk with SES service

I added maven set up to my eclipse project and I am able to see the lib in my target folder,
I referred the AWS SES docs to send mail using API . I wont see any complation error but when I try to send mail usig AWS SES API I am getting class not found exception .
java.lang.ClassNotFoundException: org.apache.http.pool.ConnPoolControl
After searching on google I added jars (both with mavan and Java build path ) ,Both of the ways doesnt work out.
I am unable to find out the exact problem .
my maven code includes .
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.8.9.1</version>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-hal-client-java</artifactId>
<version>1.1.1</version>
</dependency>
I can able import all class specified in doc,but whenever i call email sending method I getting class not found exception .
I have
1.Eclipse Helios
2. Spring-hibernate project
3.Maven 2
and I have access and secret key for AWS set up
Please some one help me out .
I encountered the following error:
Sep 01, 2014 4:18:30 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [spring] in context with path [/peer] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/apache/http/pool/ConnPoolControl] with root cause
java.lang.ClassNotFoundException: org.apache.http.pool.ConnPoolControl
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1713)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:792)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2888)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1172)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1558)
at com.amazonaws.http.ConnectionManagerFactory.createPoolingClientConnManager(ConnectionManagerFactory.java:29)
at com.amazonaws.http.HttpClientFactory.createHttpClient(HttpClientFactory.java:97)
at com.amazonaws.http.AmazonHttpClient.<init>(AmazonHttpClient.java:181)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:119)
at com.amazonaws.AmazonWebServiceClient.<init>(AmazonWebServiceClient.java:103)
at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.<init>(AmazonSimpleEmailServiceClient.java:142)
at com.amazonaws.services.simpleemail.AmazonSimpleEmailServiceClient.<init>(AmazonSimpleEmailServiceClient.java:123)

Categories

Resources