What are the java 8 features supported web service frame works.
I tried with axis2 latest version, but it shows the below error,
org.apache.axis2.deployment.DeploymentException: The following error occurred during schema generation: Error looking for paramter names in bytecode: unexpected bytes in file
at org.apache.axis2.deployment.ServiceBuilder.populateService(ServiceBuilder.java:441)
at org.apache.axis2.deployment.repository.util.ArchiveReader.buildServiceGroup(ArchiveReader.java:109)
at org.apache.axis2.deployment.repository.util.ArchiveReader.processServiceGroup(ArchiveReader.java:232)
at org.apache.axis2.deployment.ServiceDeployer.deploy(ServiceDeployer.java:154)
Related
After migrating to Java 8 you may see this error:
javax.servlet.ServletException: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model
The XPathFactory.newInstance() method from Java8 with an older release of Saxon (< 9.5.1.5) on the classpath will cause this failure. To fix the issue you need to upgrade to a newer version of Saxon. The current version is 9.9 and is available in the Maven Repository and the Saxon website.
For more info on Java 8 for Google App Engine, see
Migrating to Java 8.
I have a strange problem.
I have configured our Websphere Application Server to run Java 5. Its a really old application that I have migrated from Java 4.
If I in the jsp page print
System.getProperty("java.version")
System.getProperty("java.specification.version")
System.getProperty("java.vm.name")
I get
Java version: 1.5.0
java.specification.version: 1.5
java.vm.name: IBM J9 VM
However, If I in the jsp change the code from List to List<Object> I get the following exception:
The type ArrayList is not generic; it cannot be parameterized with arguments <Object>
JSPG0091E: An error occurred at line: 79 in the file: /jsp/archive/archiveoverview.jsp
JSPG0093E: Generated servlet error from file: /jsp/archive/archiveoverview.jsp
C:\SDP75\runtimes\base_v61\profiles\was61profile1\temp\CR122599Node01\server1\myifEAR\myif.war\jsp\archive\_archiveoverview.java : 199 : Syntax error, parameterized types are only available if source level is 5.0
How can this be???
The JVM used to run WebSphere Application Server is different from the compiler compliance level used to compile JSPs running within the server. See this technote: Using Java 5 language feature in a JSP targeting WebSphere Application Server v6.1.
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 am trying to compile and run WebDav example project supplied as part of examples of Apache Wink project. I have successfully deployed the project into JBoss and can reach it throw http. However, when i try to use Total Commander with WebDav plug in, i get the following exception:
15:13:41,595 ERROR [[restSdkService]] Servlet.service() for servlet restSdkService threw exception
java.io.UnsupportedEncodingException: "utf-8"
at java.lang.StringCoding.decode(StringCoding.java:170)
at java.lang.String.(String.java:443)
at java.lang.String.(String.java:515)
etc...
Using windows WebDav network folders, produces no results at all. Jboss server version 5.1.0 GA.
Does anybody succeeded in running this example using WebDav client?
I believe that the encoding name should be uppercase; i.e. "UTF-8".