We recently migrated from WAS6 to WAS7. One of our application, which was working perfectly fine in WAS6 is not working in WAS7 with following error.
java.lang.NoSuchMethodError: com/sun/faces/util/Util.verifyFactoriesAndInitDefaultRenderKit(Ljavax/servlet/ServletContext;)V
at com.ibm.faces.context.MultipartFacesContextFactoryImpl.getFacesContext(MultipartFacesContextFactoryImpl.java:73)
The piece of code, which is giving that error is
FacesContextFactory contextFactory = (FacesContextFactory)
FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
facesContext = contextFactory.getFacesContext(
request.getSession().getServletContext(), request, response, lifecycle);
Found these info while debugging the app in WAS6 vs WAS7
contextfactory: com.ibm.faces.context.MultipartFacesContextFactoryImpl - JSF-IBM.jar - WAS7
contextfactory: com.icesoft.faces.context.FacesContextFactoryImpl - icefaces.jar - WAS6
I tried some suggestions like creating a Shared Lib and associating that to the EAR and changing the class loader schemes from "Parent Last" to "Parent First".
But no matter what I do, In WAS7 I am getting MultipartFacesContextFactoryImpl as the value of contextFactory.
I tried to replace 1.7.2 with 1.8 version of icefaces.jar and icefaces-comps.jar. But still the same result.
Please help. Please let me know if you need more details.
It could be that WAS6 used Java 5 as native and WAS7 uses Java 6. Try recompiling your classes with Java 6.
Related
I am attempting to create/deploy an application onto the Redhat OpenShift Express platform, and am attempting to do this via eclipse using the JBoss OpenShift plugins.
I am following the instructions here: https://www.redhat.com/openshift/community/blogs/getting-started-with-the-openshift-eclipse-plug-in-for-java-applications-on-the-cloud
But when entering my user credentials I get an error preventing me getting any further:
Could not check user credentials: Could not unmarshall response "
{"data":
{"user_info":
{"env_vars":null,
"max_gears":5,
"system_ssh_keys":null,
"uuid":"5a81de3405fe4ac6b5718dbb8540736f",
"rhc_domain":"rhcloud.com",
"rhlogin":"robert.hinds#accenture.com",
"ssh_keys":
{"laptop":{"type":"ssh-rsa","key":"AAAAB3NzaC1yc2EAAAABIwAAAQEAw5GIjtI+B42SBv2kmV32OHI5tCBO7JWmlhF7w9dNy2Tp7MNtK8nE7nLUKYyXSZRzK0i4azPuMDDmmJ4jFpcyAwRdzBM43xZLo/6MlMFneT3t66ukNMNOgYptiRH7Zy8Tmjquwu2dXpui77tRQaEpq4Ms/JxHvanD+YMDNTXlrv8gIDwOjhtetuyeKbf/sr+UK1Bit8eDTgai01UmjXm+u/0Hi1tD6oG/GwNviQKb/2gmrmEs0uPhcJ9Olzrn67Gyu7c2PFOjTEvOXMQHjSUrVp905t8SzffiJ7uWzVnvufrweC5gXlR/v1tp3FrFgRcZVmZX6QlhyOiy5Tr1cLD8pw=="}},
"consumed_gears":0,
"vip":false,
"namespace":"star",
"ssh_key":null,
"ssh_type":null
},
"app_info":{}
},
"api_c":["placeholder"],
"messages":"",
"broker_c":["namespace","rhlogin","ssh","app_uuid","debug","alter","cartridge","cart_type","action","app_name","api"],
"exit_code":0,
"debug":"",
"api":"1.1.3",
"result":""
}
has anyone come across this previously? I am on Win7 Eclipse Indigo on JDK7
Update:
I get this problem using the following versions/steps
Using Eclipse: Eclipse Java EE IDE for Web Developers. Version: Indigo Service Release 2 Build id: 20120216-1857
Installed the OpenShift express tools from the JBoss software update site here: http://download.jboss.org/jbosstools/updates/development/indigo/ today (the current version that is downloaded today!)
Then simply file > new > openshift aplication, then enter my username and password (created today with OpenShift Express) and I get the error.
hope thats helpful - will wait for the update to the software.
this is a "known" issue in the sense that you're not the first that reported this:
https://issues.jboss.org/browse/JBIDE-11431
The "interesting" part is that unmarshalling the response fails because of the following 2 properties with null values:
"ssh_key":null,
"ssh_type":null
This error occurrs since OpenShift added support for several keys. We fixed the unmarhslling issue but still dont know how to reproduce it. If you can we'd be very happy to get your instructions.
The fixed version of our client plugin will make it to our nightly update site in a few days. Stay tuned!
When I try to fill a JasperReport in my Servlet running on Websphere 6.1 I get an UnsupportedClassVersionError: Bad major version at offset=6.
I guess that the compiled JasperReport has a different version (java 6?) than the jre on websphere can execute (which would be java 5), but I can not figure out why. Compiling the reports with maven or in the application (in the servlet) both leads to the error.
According to the demo which was provided with JasperReports, which also shows how to use it with Java 1.5, I added following config to the jasperreports.properties:
org.eclipse.jdt.core.compiler.source=1.5
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.codegen.TargetPlatform=1.5
But the error still exists.
The language used in the report is Java, so which compiler is the correct one to use? net.sf.jasperreports.engine.design.JRJdtCompiler or net.sf.jasperreports.engine.design.JRJavacCompiler?
Unfortunately, the documentation does not explain the difference between those two compilers...
Edit: so fare I have been using the JRJavacCompiler. With the JRJdtCompiler I get a NullPointer Exception:
java.lang.NullPointerException
at java.lang.Class.isAssignableFrom(Native Method)
at net.sf.jasperreports.engine.fill.JRFillTextField.getFormat(JRFillTextField.java:706)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluateText(JRFillTextField.java:394)
at net.sf.jasperreports.engine.fill.JRFillTextField.evaluate(JRFillTextField.java:368)
at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:258)
at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:499)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2036)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:760)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:270)
at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:946)
at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:864)
at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:540)
at com.swissre.sod.jone.web.server.FileStreamingServlet.doGet(FileStreamingServlet.java:48)
It might be that you are using libraries in you application that are compiled in java 6.
You could check the MANIFEST information of your dependencies to find out more.
please take a look to my problem below i deployed my website (java) on my app engine account the url it work to show html and jsp pages but the servlet pages it make error rather than show it correctly this is what appear:
Error: Server Error The server encountered an error and could
not complete your request. If the problem persists, please report your
problem and mention this error message and the query that caused it.
notice :: that all work on localhost server but on app engine !! what can i
do to avoid this problem !!!!
web/ASS2webServlet : Unsupported major.minor version 51.0, java.lang.UnsupportedClassVersionError
Indicates that you are using a higher version of Java than GAE supports. Quoting from documentation of GAE:
"App Engine runs Java applications using the Java 6 virtual machine (JVM). The App Engine SDK supports Java 5 and later, and the Java 6 JVM can use classes compiled with any version of the Java compiler up to Java 6"
So can you check what version are you using on local Eclipse to compile your classes?
I'm getting this error when starting the JBoss server in Eclipse.
Failed to boot JBoss:
java.lang.IllegalStateException: Incompletely deployed.
DEPLOYMENTS IN ERROR
Deployment "AttachmentStore" is in error due to: java.lang.IllegalArgumentException: wrong arguments. new for taget java.land.reflect.Constructor expected=[java.net.URI] actual=[java.io.File]
I've googled the AttachementStore error and most suggested modifying the profile.xml (conf/bootstrap/profile.xml) file by adding a class to the constructor parameter node like this...
constructor parameter class="java.io.File"
Adding the class="java.io.File" seems to be the accepted solution everywhere since it's a known bug in JBoss but it didn't work for me.
I know I added the class correctly, I checked, rechecked and rechecked again the profile.xml file but JBoss is still throwing the same error when starting. I'm completely baffled. Anyone have any other ideas?
Error mainly occurred due to upgrade java 6 to java 7 or 8. Previously I used jdk 6u10 and it is changed to jdk 7u45.
Run the projects using java release of jdk 6u10 or Sun JDK 1.6.0_13. JBOSS runs with these JDK version successfully.
When I try to debug any project in Java EE INDIGO (64 bit) in win 7 and place a breakpoint somewhere the program acts as expected but when I hit f6 or f5 to go further eclipse throws an error which reads (I have Spring installed):
An internal error occurred during: "JDI Event Dispatch".
com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
(No typo, "Z" does appear)
Now I can't debug any program because it always gives this error. Can anyone help?
From the eclipse error log:
!MESSAGE com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
!STACK 0
java.lang.AbstractMethodError: com.springsource.sts.groovy.debug.core.GroovyDebugProvider.isAlwaysInteretingLaunch()Z
at org.eclipse.contribution.jdt.debug.DebugHooksAspect.isInterestingLaunch(DebugHooksAspect.aj:253)
at org.eclipse.contribution.jdt.debug.DebugHooksAspect.ajc$inlineAccessMethod$org_eclipse_contribution_jdt_debug_DebugHooksAspect$org_eclipse_contribution_jdt_debug_DebugHooksAspect$isInterestingLaunch(DebugHooksAspect.aj:1)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters_aroundBody1$advice(JDIDebugTarget.java:195)
at org.eclipse.jdt.internal.debug.core.model.JDIDebugTarget.getStepFilters(JDIDebugTarget.java:1)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.attachFiltersToStepRequest(JDIThread.java:2154)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2065)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.createStepRequest(JDIThread.java:2040)
at org.eclipse.jdt.internal.debug.core.model.JDIThread$StepHandler.step(JDIThread.java:1989)
at org.eclipse.jdt.internal.debug.core.model.JDIThread.stepOver(JDIThread.java:1412)
at org.eclipse.jdt.internal.debug.core.model.JDIStackFrame.stepOver(JDIStackFrame.java:418)
at org.eclipse.debug.internal.core.commands.StepOverCommand.step(StepOverCommand.java:27)
at org.eclipse.debug.internal.core.commands.StepCommand.doExecute(StepCommand.java:34)
at org.eclipse.debug.core.commands.AbstractDebugCommand$1.run(AbstractDebugCommand.java:213)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
This seems to be a similar bug to this bug in codehaus jira (see comments section). I was able to switch back to an older eclipse installation (from two weeks ago) to get rid of the current problem and will upgrade to Eclipse 3.7 as soon as time permits.
As crazy as this sounds, I too was getting this error when debugging an Android App and trying to step into a specific method, and resolved it by renaming the method I was trying to step into.
I had tried:
completely reinstalling the app
cleaning in Eclipse
reboot of device (phone), OS, and restart of Eclipse
increasing debug timeouts in Preferences | Java | Debug
My method was called "getMessageInfoFromDb"... and was in a class that didn't extend anything, but implemented Serializable ;-)
Try disabling simple step filtering, especially filtering of simple getters.
delete the Temp folder from yourlocalpath\domainfolder\server\AdminServer
domains\base_domain\servers\AdminServer
Have you done any DB import twice or more time on the same DB that you use for the application in which you are running in debug mode. Because I am also getting similar error with the caption JDI while starting Application Server with deployed .ear in Eclipse based IDE as a popup.
When db is imported twice user created tables gets imported if it's been tried in the same kind of databases. But Oracle App & System Specific tables throws error in process of importing. And some crash in that....
I hope this is what scenario yours as well....
In my scenario I had imported Oracle db from UNIX environment to Oracle XE in Windows environment.