Java Dynamic Web ServletConfig Class Not Found - java

Export Intellij Project Folder to Eclipse
I am not very familiar to Java. Currently I was given a IntelliJ project folder but have no access to IntelliJ IDE. How to properly import the project into Eclipse without errors? This application is running on Weblogic Server R12 and is using struts too (not sure if any special configuration needed).
UPDATE
Manage to port to Eclipse with direction from Confused Kangaroo. But it just wont deploy to Oracle Weblogic Server 12.1.2.0. Can someone guide me how to resolve this error? Am I missing some configuration?
Error is: "weblogic.application.ModuleException: java.lang.ClassNotFoundException: ServletConfig"
weblogic.application.ModuleException: java.lang.ClassNotFoundException: ServletConfig
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.ClassNotFoundException: ServletConfig
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:1026)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:987)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:83)
at weblogic.utils.classloaders.GenericClassLoader.doFindClass(GenericClassLoader.java:608)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:540)
Truncated. see log file for complete stacktrace

Please refer to here : How to convert IntelliJ project to Eclipse?

Related

Error: NoClassDefFoundError When Using Eclipse To Run COMSOL Model

I am trying to use Eclipse to run a COMSOL model and I have read the guide from programming reference manual. However, Eclipse always report the error as follows,
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter at com.comsol.client.interfaces.b.(SourceFile:60) at com.comsol.client.interfaces.b.(SourceFile:39) at com.comsol.clientapi.engine.APIEngine$c.b(SourceFile:497) at com.comsol.clientapi.engine.APIEngine.a(SourceFile:115) at com.comsol.clientapi.engine.APIEngine.connect(SourceFile:98) at com.comsol.clientapi.engine.APIEngine.connect(SourceFile:87) at com.comsol.clientapi.engine.ClientModelUtil.connect(SourceFile:145) at com.comsol.clientapi.engine.ClientModelUtil.connect(SourceFile:133) at com.comsol.model.util.ModelUtil.connect(SourceFile:248) at PFCZM_3PBending_QuasiBrittle.main(PFCZM_3PBending_QuasiBrittle.java:16750) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.DatatypeConverter at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:636) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:182) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:519) ... 10 more
I believe I have imported the JAR files correctly and set the path for the project and it seems that the error is due to lack of source file for COMSOL API JAR files. I have checked those JAR file and found they are indeed all class files without definition. How can I solve this problem? Thanks!

Grails: Exception with RestBuilder only while running in production tomcat server

I created the war file and deployed into tomcat server but while submitting the registration page(having recaptcha) this error is happening, but not in the local machine and app running in the local machine using the GGTS IDE.
Following is the error happening in the production server
errors.GrailsExceptionResolver - ClassNotFoundException occurred when processing request: [POST] /IFP/signup/completeSignUp
grails.plugins.rest.client.RestBuilder. Stacktrace follows:
java.lang.ClassNotFoundException: grails.plugins.rest.client.RestBuilder
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.codehaus.groovy.util.LazyReference.getLocked(LazyReference.java:46)
at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:33)
at com.megatome.grails.recaptcha.ReCaptcha.checkAnswer(ReCaptcha.groovy:171)
at com.megatome.grails.RecaptchaService.verifyAnswer(RecaptchaService.groovy:147)
at com.controllers.portal.SignupController.completeSignUp(SignupController.groovy:42)
at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:198)
at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
at grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter.doFilter(GrailsAnonymousAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.RequestHolderAuthenticationFilter.doFilter(RequestHolderAuthenticationFilter.java:53)
at grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter.doFilter(MutableLogoutFilter.java:62)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
From my view this exception is happening after the implementation of recaptcha.
Please help me for resolving this issue.
java.lang.ClassNotFoundException: grails.plugins.rest.client.RestBuilder
states clearly that this class is missing in your production war or Tomcat.
Make sure you are setting proper dependencies in your gradle config as per plugin ref-doc:
compile "org.grails.plugins:rest-client-builder:2.1.1"
Check that those jars are also present in your war or Tomcat's classpath
Copying the file grails-datastore-rest-client-3.1.4.RELEASE.jar into the tomcat lib folder resolved the problem.
You can download the jar file from here.
If someone is still looking for the answer: Please add the line below to build.gradle and it should work (pulls in a necessary dependency):
implementation 'org.grails:grails-datastore-rest-client:6.1.9.RELEASE'

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...)

What is the jar file for oracle.dmt.op.re.base.DataItem?

I tried to deploy a web app using ADF & BC by Jdev 11.1.1.1.0 & wls 10.3.1.0. The web app builds, but when I try to deploy the war file I get the following exception:
<Oct 24, 2011 10:37:44 AM EDT> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
java.lang.ClassNotFoundException: oracle.dmt.op.re.base.DataItem
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: oracle.dmt.op.re.base.DataItem
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:296)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:269)
at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:55)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
Truncated. see log file for complete stacktrace
What is the jar file for oracle.dmt.op.re.base.DataItem?
It looks like the Weblogic domain the app is deployed on doesn't have the Application Development Runtime installed. Take a look at this guide for information on how to extend your current domain or create a new one to support ADF: Upgrading an Oracle ADF Environment.
Here is another guide that can help you configure your Weblogic server: Extending WebLogic Server for ADF Applications
Alternatively, you can try to include the JAR's specified in this very similar question's answer: error appears in jdeveloper 11g 11112. These jars are probably included in your JDeveloper version.

Jars in my grails project not being picked up when deployed to tomcat 5.5

I am running a grails test run-app all day with my application and it is fine. I type "grails prod war" to get a war, and dump it in the webapps folder of my tomcat install. Now i get the message like so:
11.11.2010 16:35:11 *ERROR* GrailsExceptionResolver: Executing action [index] of controller [ResumeController] caused e
xception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context (GrailsExceptionResolver.ja
va, line 72)
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executing action [index] of controll
er [ResumeController] caused exception: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Cont
ext
at org.jsecurity.web.servlet.JSecurityFilter.doFilterInternal(JSecurityFilter.java:382)
at org.jsecurity.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:180)
at java.lang.Thread.run(Unknown Source)
Caused by: org.codehaus.groovy.runtime.InvokerInvocationException: java.lang.NoClassDefFoundError: Could not initialize
class org.docx4j.jaxb.Context
... 3 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.docx4j.jaxb.Context
at org.docx4j.openpackaging.contenttype.ContentTypeManager.parseContentTypesFile(ContentTypeManager.java:599)
at org.docx4j.openpackaging.io.LoadFromZipNG.process(LoadFromZipNG.java:199)
at org.docx4j.openpackaging.io.LoadFromZipNG.get(LoadFromZipNG.java:188)
at org.docx4j.openpackaging.packages.OpcPackage.load(OpcPackage.java:188)
at org.docx4j.openpackaging.packages.WordprocessingMLPackage.load(WordprocessingMLPackage.java:169)
at com.iai.skillsdb.DocxHelpers.DocxParser.openDocx4j(DocxParser.java:70)
at ResumeController$_closure8.doCall(ResumeController.groovy:164)
at ResumeController$_closure8.doCall(ResumeController.groovy)
at ResumeController.invokeMethod(ResumeController.groovy)
at ResumeController$_closure1.doCall(ResumeController.groovy:41)
at ResumeController$_closure1.doCall(ResumeController.groovy)
... 3 more
What is causing this? I have the docx4j jar in my WAR for sure, and it is there in the web-inf lib folder as well.
You're getting a java.lang.NoClassDefFoundError, not a java.lang.ClassNotFoundException. The class is being loaded, but a class that it depends on (directly or indirectly via another class) isn't there. You're most likely missing a jar that docx4j requires as a dependency.
Make sure that you have the correct version of docx4j and that there is absolutely no other version of docx4j in your classpath, there may be a version of this lib that did not have the 'Content' class implemented.

Categories