I'm getting error using struts2 in weblogic server - java

I'm getting the below error # weblogic server. Can anyone please help me?
<BEA-101020> <[weblogic.servlet.internal.WebAppServletContext#3c6542 - appName: 'goutattack', name: 'goutattack', context-path: '', spec-version: '2.5'] Servlet failed with Exception
java.lang.NullPointerException
at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:643)
at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:852)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:534)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:432)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3502)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2186)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2092)
at weblogic.servlet.internal.ServletRequestImpl.run(Unknown Source)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

This is a known major issue, fixed in Struts v2.3.7. See: https://issues.apache.org/jira/browse/WW-3373
Also may be related to an issue with the Jasper plugin:
When using mentioned plugin in Weblogic 11g you can get NullPointerException within Struts 2. To solve the problem you must enable the "Archived Real Path" global property in Weblogic admin console > configuration > Web Applications. It's because JasperReportsResult determines the report directory base on servletContext.getRealPath(finalLocation).
https://cwiki.apache.org/confluence/display/WW/WebLogic

Related

Http error 500 with GWT web application

I've read tons of materials but I can't figure out what's happening. I'm doing a simple web application with Eclipse Oxygen, GWT 2.8, MapDB3, when I try to launch the web app through Run as --> GWT development mode with Jetty I obtain the error above. I'm going mad.
Problem accessing /asteonlineing/greet. Reason:
HTTP 500 Server Error
Caused by: java.lang.NoClassDefFoundError: kotlin/jvm/internal/Intrinsics
at org.mapdb.DBMaker.fileDB(DBMaker.kt)
at com.google.asteonlineing.server.AoLServiceImpl.<init>(AoLServiceImpl.java:26)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) [...a lot more]
I tried to add the kotlin's jar to my project's lib directory but the error slightly changes and it's alway http error 500 but about:
java.lang.NoClassDefFoundError: org/eclipse/collections/impl/list/mutable/primitive/LongArrayList
Finally I've figured out that MapDB 3.0.5 has a long list of dependencies.
I've installed all of them and that error disappeared but others are coming, but code related.
Finally I've figured out that MapDB 3.0.5 has a long list of dependencies, when I've installed all of them that error disappeared.
You can find them in
https://mvnrepository.com/artifact/org.mapdb/mapdb/3.0.5

Java weblogic error with Caused by: java.lang.IllegalArgumentException

We are facing below error when trying to push some of bulk-upload using sftp from Source server to destination servers.
Back-end of this application running on weblogic.
Caused by: java.lang.IllegalArgumentException: No Configuration was registered that can handle the configuration named com.sun.security.jgss.krb5.initiate
at com.bea.common.security.jdkutils.JAASConfiguration.getAppConfigurationEntry(JAASConfiguration.java:124)
at sun.security.jgss.LoginConfigImpl.getAppConfigurationEntry(LoginConfigImpl.java:139)
at javax.security.auth.login.LoginContext.init(LoginContext.java:243)
at javax.security.auth.login.LoginContext.<init>(LoginContext.java:499)
at sun.security.jgss.GSSUtil.login(GSSUtil.java:244)
at sun.security.jgss.krb5.Krb5Util.getTicket(Krb5Util.java:136)
at sun.security.jgss.krb5.Krb5InitCredential$1.run(Krb5InitCredential.java:328)
at java.security.AccessController.doPrivileged(Native Method)
at sun.security.jgss.krb5.Krb5InitCredential.getTgt(Krb5InitCredential.java:325)
at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Krb5InitCredential.java:128)
at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Krb5MechFactory.java:106)
at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Krb5MechFactory.java:172)
at sun.security.jgss.GSSManagerImpl.getMechanismContext(GSSManagerImpl.java:209)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:195)
at sun.security.jgss.GSSContextImpl.initSecContext(GSSContextImpl.java:162)
at com.jcraft.jsch.jgss.GSSContextKrb5.init(GSSContextKrb5.java:129)
at com.jcraft.jsch.UserAuthGSSAPIWithMIC.start(UserAuthGSSAPIWithMIC.java:135)
at com.jcraft.jsch.Session.connect(Session.java:419)
at com.jcraft.jsch.Session.connect(Session.java:150)
at org.apache.commons.vfs.provider.sftp.SftpClientFactory.createConnection(SftpClientFactory.java:210)
Do you have JAAS configuration file? If you do, then you probably have old format of "initiate" section - com.sun.security.jgss.initiate, note that it's missing ".krb5". It should be com.sun.security.jgss.krb5.initiate.
Or maybe the path to configuration file is incorrect in your server startup command line.

Oracle ADF: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'

I have developed a web application using Oracle ADF Essantials. I am able to run this application on tomcat 6.x in my local system. I have the same tomcat 6.x environment on our server . There everything is same(tomcat environment). But when I am trying to run this application on server environment it is giving the following error.
HTTP Status 500 - oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'
type Exception report
message oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'
javax.faces.webapp.FacesServlet.service(FacesServlet.java:606)
oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:192)
oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:105)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:503)
oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:503)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:327)
org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:229)
org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
root cause
javax.faces.FacesException: oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'
oracle.adfinternal.controller.util.Utils.createAndLogFacesException(Utils.java:198)
oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:189)
oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:875)
oracle.adfinternal.controller.state.ScopeMap.get(ScopeMap.java:82)
javax.el.MapELResolver.getValue(MapELResolver.java:51)
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
org.apache.el.parser.AstValue.getValue(AstValue.java:123)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:182)
com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
and the following is the root cause..
root cause
oracle.adf.controller.ControllerException: ADFC-10001: cannot instantiate class 'com.wip.view.backing.Index'
oracle.adfinternal.controller.util.Utils.createAndLogFacesException(Utils.java:190)
oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(ManagedBeanFactory.java:189)
oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBean(ManagedBeanFactory.java:875)
oracle.adfinternal.controller.state.ScopeMap.get(ScopeMap.java:82)
javax.el.MapELResolver.getValue(MapELResolver.java:51)
com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
org.apache.el.parser.AstValue.getValue(AstValue.java:123)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:182)
com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations(ApplicationImpl.java:1941)
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:1144)
com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.createComponent(ComponentTagHandlerDelegateImpl.java:518)
com.sun.faces.facelets.tag.jsf.ComponentTagHandlerDelegateImpl.apply(ComponentTagHandlerDelegateImpl.java:168)
javax.faces.view.facelets.DelegatingMetaTagHandler.apply(DelegatingMetaTagHandler.java:120)
com.sun.faces.facelets.tag.jsf.core.ViewHandler.apply(ViewHandler.java:182)
I tried a lot fixing this isssue. But did not getting anyting. Finally I have made my local tomcat 6.x as .zip file and pasted this on server and run my app from this new environment but getting same error.
I observed the following difference between the urls in the browsers
In local browser
This is my URL: http://localhost:7777/EasyRUN/faces/index
after typing the url when I press enter am getting the same
http://localhost:7777/EasyRUN/faces/index
On server :
This is my URL: http://localhost:7777/EasyRUN/faces/index
after typing this url when I press enter am getting the below
http://localhost:7777/EasyRUN/faces/index;jsessionid=06186FB6D5EE4A1243224059F76C1A84?_afrLoop=105719567151&_afrWindowMode=2&Adf-Window-Id=w0
And I also tried with a test app that have only one page a.jsf. Same problem with this app. It is running on local environment and not running on server.
Please help.
Thanks in advance. Thank you very much. Please help.
Thanks for you help. I found the solution. The problem was I have jdk1.7 on my local system and on server I have 1.6. Thats why I faced that problem. Now on server also I have installed 1.7 my application is running successfully.
Thanks a lot for your help. Thank you very much.

Solr on Websphere 8.5.5 : Linkage Error with org.slf4j.LoggerFactory

I am installing solr ( 4.10.2 ) on WAS 8.5.5 with IBM jdk 7. <br>
I deployed the `solr` as a `war` and added `solr.data.dir` and `solr.solr.home` to the application custom properties.
<br>
Upon accessing the url: http://localhost:9080/solr, <br>
I see the 'Linkage Error' in the logs.
4/03/15 06:50:58:277 GMT] 000000ae webapp E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor]: java.lang.NoClassDefFoundError: org.apache.solr.servlet.SolrDispatchFilter (initialization failure)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
at java.lang.J9VMInternals.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1600)
..........................<br>
...........................<br>
used by: **java.lang.LinkageError: org.slf4j.LoggerFactory**
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:295)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
I modified the lib of the downloaded solr.war. On the top of the jars already present in the solr.war/WEB-INF/lib, I added an additional set of jars from the downloaded solr package
All the jars from \solr-4.10.2\solr-4.10.2\dist
All the jars from \solr-4.10.2\solr-4.10.2\dist\solrj-lib
All the jars from \solr-4.10.2\solr-4.10.2\example\lib\ext
Modified the application Class Loading to 'PARENT_LAST'.
Have been scratching my head for over 16 hours.
Even tried removing the all the slf4j*.jars from the solr.war\WEB-INF\lib but the same error persists.
Some help is highly solicited.
Finally was able to make SOLR up and running on Websphere 8.5.5
I have enumerated the different steps on my blog.
Solr 4.10.2 Deployment on WebSphere855

Why is tomcat looking for JSF classes?

I am trying to get my development environment up and running, and I am having trouble with Tomcat trying to load JSF classes for some reason. My application does not use JSF; in fact, I haven't even deployed my application to tomcat yet. I am getting a number of stack traces in the startup logs and I cannot load the default tomcat homepage when I try to open http://localhost:8080 (I just get the tomcat 404 page).
Here is what the first stack trace is:
SEVERE: Error configuring application listener of class com.sun.faces.util.ReflectionUtils$ReflectionUtilsListener
java.lang.ClassNotFoundException: com.sun.faces.util.ReflectionUtils$ReflectionUtilsListener
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1386)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1232)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3712)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
I also get similar stack traces for the following other classes:
com.sun.faces.config.ConfigureListener
com.sun.faces.application.WebappLifecycleListener
I'm not sure if this is relevant, but I am running Tomcat 5.5.27 with the 1.4 compatibility pack installed, with Java 1.4.2, on Mas OS 10.5.
Thanks for any ideas!
EDIT: It seems that each of the default applications that come with Tomcat (host-manager, balancer, tomcat-docs, jsp-examples, etc) was relying on these JSF classes. I removed these default applications, and everything seems to be working.
So, my question is now:
Why does tomcat come with applications that don't include their dependencies, and what do I need to do to make those default applicaitons work?
Is your tomcat installation totally clean, or is it one you have inherited?
Check if the webapps contains existing wars/directories which may be referencing JSF classes?
UPDATE: Ah -- I see you found this was the case :-)
Not sure why tomcat doesn't include all its dependencies. Perhaps you downloaded a developer release instead of a stable one?
You might have to clean the Tomcat work directory.

Categories

Resources