Tomcat8 & waffle integeration - java

We are currently using waffle for authenticating our web based application build using java/j2ee. We are in the process of migrating the application to use Tomcat 8.We were initially using java 6 & tomcat 6 and the authentication worked fine. Now after the migration to java 8 & tomcat 8, We are unable to load the login page of the application. Im getting the below error.
org.apache.tomcat.util.digester.Digester startElement
SEVERE: Begin event threw error
java.lang.NoSuchFieldError: FQN
at waffle.apache.WaffleAuthenticatorBase.<init>(WaffleAuthenticatorBase.java:44)
at waffle.apache.MixedAuthenticator.<init>(MixedAuthenticator.java:45)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
Im currently using waffle-tomcat8-1.7.3.jar file for the authentication.Please help us in resolving this issue. Any help on this is much appreciated.

Make sure you include all dependencies for Waffle:
Package Waffle JARs, including waffle-jna.jar, guava-18.0.jar,
jna-4.1.0.jar, jna-platform-4.1.0.jar, slf4j*.jar and
waffle-tomcat-6.jar in the application's lib directory or copy them to
Tomcat's lib.
https://github.com/dblock/waffle/blob/master/Docs/tomcat/TomcatSingleSignOnValve.md
Did you try also the newer 1.8 release?
http://mvnrepository.com/artifact/com.github.dblock.waffle/waffle-tomcat8/1.8.0

Related

ClassNotFoundException: com.sun.faces.config.ConfigureListener [duplicate]

This question already has an answer here:
java.lang.ClassNotFoundException : com.sun.faces.config.ConfigureListener
(1 answer)
Closed 5 years ago.
I have an error when run my spring mvc web application.
org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [com.sun.faces.config.ConfigureListener]
java.lang.ClassNotFoundException: com.sun.faces.config.ConfigureListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1291)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:544)
...
My jdk version is : jdk1.8.0_151
Application Server : Apache Tomcat 8.5.24
IDE : IntelliJ IDEA
I dont know this error come from where.
web.xml? faces-config.xml? spring framework version? Tomcat version? jdk version?
Seems you need to add JSF libraries to your classpath, as bare-bone tomcat don't provide it like other application servers.
Similar question is also posted here

Migration from WebSphere to WebLogic

I have an webapplication running on WebSphere using JDK 1.6, Spring 2.5.6 and iceFaces 1.8.2. I need to migrate that webapp to WebLogic. So I updated JDK to 1.8 and Spring to 4.2. The iceFaces framework I dont change because of the number of change on my source code.
When I deploy the application I got the following:
com.sun.faces.config.ConfigurationException: Factory 'javax.faces.lifecycle.ClientWindowFactory' was not configured properly.
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:330)
at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:236)
at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:439)
at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:705)
Truncated. see log file for complete stacktrace
Caused By: javax.faces.FacesException: com.sun.faces.lifecycle.ClientWindowFactoryImpl
at javax.faces.FactoryFinderInstance.getImplGivenPreviousImpl(FactoryFinderInstance.java:409)
at javax.faces.FactoryFinderInstance.getImplementationInstance(FactoryFinderInstance.java:253)
at javax.faces.FactoryFinderInstance.getFactory(FactoryFinderInstance.java:549)
at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:283)
at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:328)
Truncated. see log file for complete stacktrace
Caused By: java.lang.UnsupportedOperationException
at javax.faces.application.Application.subscribeToEvent(Application.java:1797)
at com.sun.faces.lifecycle.ClientWindowFactoryImpl.<init>(ClientWindowFactoryImpl.java:62)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
Truncated. see log file for complete stacktrace
Are there some way to resolve that or I need to change my iceFaces version?
I think i resolved that including jsf 1.2 libs on my war file.
Still getting another errors, soon I update the answer if it worked or not.
UPDATE:
Yes, this solved my problem... Now webapplication is deployed sucessful. (Still getting httpError 500 when open my login page...)

Tomcat7 on Linux Server Not Connecting to MySQL DB [duplicate]

This question already has answers here:
Why am I getting a NoClassDefFoundError in Java?
(31 answers)
Closed last year.
I'm having an issue getting a servlet to connect to a MySQL database on Linux (Ubuntu) server running Tomcat 7.
I have the code running perfectly fine on the dev environment (Windows 7, Tomcat 7). I make the WAR file in Eclipse with mysql-connector-java-5.1.34-bin.jar in WEB-INT/lib directory then deploy on Tomcat / Linux environment.
The WAR file unpacks fine and the static content is served without issue to the browser but, when initiating a task to interact with the database, I get an error code 500 internal server error and the localhost.2015-03-24.log gives the following error:
java.lang.NoClassDefFoundError: javax/websocket/Endpoint
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2944)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1208)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1688)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
at websocket.drawboard.DrawboardContextListener.contextDestroyed(DrawboardContextListener.java:32)
at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5014)
at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5659)
at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1575)
at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1564)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: java.lang.ClassNotFoundException: javax.websocket.Endpoint
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1718)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1569)
... 17 more
I would also like to know how I can view the 17 other exceptions that are not being listed.
Make sure you set the WebSocketServlet dependency as provided.
<dependency>
<groupId>javax.websocket</groupId>
<artifactId>javax.websocket-api</artifactId>
<version>1.1</version>
<scope>provided</scope>
</dependency>
Thanks Arpit for your answer. However, adding the Maven dependenciy did not solve the problem. (On my Windows installation of Tomcat it worked all the time, on my Linux Tomcat not.)
As it turns out, the Debian (Ubuntu) version of Tomcat comes without the corresponding .jar (on Windows and normal Linux Tomcats it's included). Thus I tried adding the dependency with scope 'compile' to really add the .jar to my. war. No success either.
Finally the solution was to manually add the jars from the download of Tomcat from their website to Tomcat lib folder of the server.

ClassNotFoundException of NIO using Tomcat 7 and Java 7

I build a web project in Eclipse Kepler with Apache Tomcat 7.0.47.
While running on server, it causes java.lang.ClassNotFoundException: java.nio.file.Paths as below.
java.lang.NoClassDefFoundError: java/nio/file/Paths
at ...
Caused by: java.lang.ClassNotFoundException: java.nio.file.Paths
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 12 more
It worked well before I invite this new feature of Java 7. Could anyone give me some suggest to figure out what's going on here please?
Uninstalling older version is not required.
But it is obvious that your Tomcat 7.0 still uses the jdk 6. There are two paths system path and user path. Check both of them.

Error running ADF Morena application?

I develop an application in ADF. Scanning documents using Morena 6. When I test on my PC everything works ok but when I switch on the GlassFish application server and start scanning the document I receive an error.
Caused by: java.lang.UnsatisfiedLinkError: SK.gnome.twain.TwainManager.listSources()[LSK/gnome/twain/TwainSource;
at SK.gnome.twain.TwainManager.listSources(Native Method)
at SK.gnome.twain.TwainManager.selectSource(TwainManager.java:163)
at beans.ImageBean.skenirajDokument(ImageBean.java:571)
Could it be that your Morena jar file is not cross platform? http://docs.oracle.com/javase/7/docs/api/java/lang/UnsatisfiedLinkError.html

Categories