You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Viswanath <vi...@gmail.com> on 2015/11/03 20:00:52 UTC

xercesImpl-xsd11-2.12-beta-r1667115 compatible with IBM WAS 8.0.0.9

Hello,
I've used xercesImpl-xsd11-2.12-beta-r1667115.jar and wrote a standalone
parser for XSD1.1,which was working fine with JRE7. my intension is to parse
xsd1.1 and get all restrictions and assert values for each simple and
complex type elements.

when i tried to integrate with IBM WAS 8.0.0.9 which have java6, i.e
xercesImpl-xsd11-2.12-beta-r1667115.jar been added as external library in my
application. 
when trying to start the application in WAS throws the following error.
Exception in thread "main" java.lang.UnsupportedClassVersionError:
JVMCFRE003 bad major version;
class=org/apache/xerces/jaxp/validation/XMLSchema11Factory, offset=6
	at java.lang.ClassLoader.defineClassImpl(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
	at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
	at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
	at java.security.AccessController.doPrivileged(AccessController.java:362)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
	at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:682)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:665)
	at javax.xml.validation.SchemaFactoryFinder.newInstance(Unknown Source)
	at javax.xml.validation.SchemaFactoryFinder.findJarServiceProvider(Unknown
Source)
	at javax.xml.validation.SchemaFactoryFinder.find(Unknown Source)
	at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
	at JaxpParserXSD.loadSchema(JaxpParserXSD.java:469)
	at JaxpParserXSD.getXSDElements(JaxpParserXSD.java:227)
	at JaxpParserXSD.main(JaxpParserXSD.java:60)

Following options been tried, which doesnt help resolving the issue
1. included these four jar under
C:\opt\IBM\WebSphere\AppServer\java\jre\lib\endorsed\
org.eclipse.wst.xml.xpath2.processor-2.1.100.jar;xercesImpl-xsd11-2.12-betar1667115.jar;
xml-apis-1.4.01.jar;xml-resolver-1.2.jar and tried to set java -Xbootpath
2.Tried Parent_LAST options in WAS ie. in server, applicaiton and module.
3. Tried setting the system property like below.
System.setProperty("javax.xml.validation.SchemaFactory:http://www.w3.org/XML/XMLSchema/v1.1",
"org.apache.xerces.jaxp.validation.XMLSchema11Factory");

Parser.java

String language = "http://www.w3.org/XML/XMLSchema/v1.0";
SchemaFactory factory = SchemaFactory.newInstance(language);
schema = factory.newSchema("XSD File");

Any help/suggestions would help me to solve this issue.

Thanks
Viswanth



--
View this message in context: http://apache-xml-project.6118.n7.nabble.com/xercesImpl-xsd11-2-12-beta-r1667115-compatible-with-IBM-WAS-8-0-0-9-tp42329.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xercesImpl-xsd11-2.12-beta-r1667115 compatible with IBM WAS 8.0.0.9

Posted by Viswanath <vi...@gmail.com>.
Hello,
I took the Jar from this link
http://grepcode.com/snapshot/repo1.maven.org/maven2/org.opengis.cite.xerces/xercesImpl-xsd11/2.12-beta-r1667115
Your'e right, this Jar is build with JDK1.7 and that's why i get that error
because IBM WAS 8.0.0.9 inbuild had JDK1.6
I used the xerces 2.11 beta binary  and it resolved my issue.

Also i had to change the PARENT_LAST settings in WAS for module to make it
work.

Thanks.



--
View this message in context: http://apache-xml-project.6118.n7.nabble.com/xercesImpl-xsd11-2-12-beta-r1667115-not-compatible-with-IBM-WAS-8-0-0-9-tp42329p42340.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: xercesImpl-xsd11-2.12-beta-r1667115 compatible with IBM WAS 8.0.0.9

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hello,

I'm not sure where you got that jar from but it was probably built with 
Java 7+ and isn't compatible with earlier versions of Java.

If you want to use the XML Schema 1.1 support with Java 6, I'd suggest 
that you use an official Xerces-J release (2.11) or build a jar from the 
latest XML Schema 1.1 branch in SVN.

Thanks.

Michael Glavassevich
XML Technologies and WAS Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Viswanath <vi...@gmail.com> wrote on 11/03/2015 02:00:52 PM:

> Hello,
> I've used xercesImpl-xsd11-2.12-beta-r1667115.jar and wrote a standalone
> parser for XSD1.1,which was working fine with JRE7. my intension is to 
parse
> xsd1.1 and get all restrictions and assert values for each simple and
> complex type elements.
> 
> when i tried to integrate with IBM WAS 8.0.0.9 which have java6, i.e
> xercesImpl-xsd11-2.12-beta-r1667115.jar been added as external library 
in my
> application. 
> when trying to start the application in WAS throws the following error.
> Exception in thread "main" java.lang.UnsupportedClassVersionError:
> JVMCFRE003 bad major version;
> class=org/apache/xerces/jaxp/validation/XMLSchema11Factory, offset=6
>    at java.lang.ClassLoader.defineClassImpl(Native Method)
>    at java.lang.ClassLoader.defineClass(ClassLoader.java:275)
>    at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:74)
>    at java.net.URLClassLoader.defineClass(URLClassLoader.java:540)
>    at java.net.URLClassLoader.defineClass(URLClassLoader.java:451)
>    at java.net.URLClassLoader.access$300(URLClassLoader.java:79)
>    at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1038)
>    at 
java.security.AccessController.doPrivileged(AccessController.java:362)
>    at java.net.URLClassLoader.findClass(URLClassLoader.java:429)
>    at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:703)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:682)
>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
>    at java.lang.ClassLoader.loadClass(ClassLoader.java:665)
>    at javax.xml.validation.SchemaFactoryFinder.newInstance(Unknown 
Source)
>    at 
javax.xml.validation.SchemaFactoryFinder.findJarServiceProvider(Unknown
> Source)
>    at javax.xml.validation.SchemaFactoryFinder.find(Unknown Source)
>    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
>    at JaxpParserXSD.loadSchema(JaxpParserXSD.java:469)
>    at JaxpParserXSD.getXSDElements(JaxpParserXSD.java:227)
>    at JaxpParserXSD.main(JaxpParserXSD.java:60)
> 
> Following options been tried, which doesnt help resolving the issue
> 1. included these four jar under
> C:\opt\IBM\WebSphere\AppServer\java\jre\lib\endorsed\
> org.eclipse.wst.xml.xpath2.processor-2.1.100.jar;xercesImpl-xsd11-2.
> 12-betar1667115.jar;
> xml-apis-1.4.01.jar;xml-resolver-1.2.jar and tried to set java 
-Xbootpath
> 2.Tried Parent_LAST options in WAS ie. in server, applicaiton and 
module.
> 3. Tried setting the system property like below.
> System.setProperty("javax.xml.validation.SchemaFactory:http://
> www.w3.org/XML/XMLSchema/v1.1",
> "org.apache.xerces.jaxp.validation.XMLSchema11Factory");
> 
> Parser.java
> 
> String language = "http://www.w3.org/XML/XMLSchema/v1.0";
> SchemaFactory factory = SchemaFactory.newInstance(language);
> schema = factory.newSchema("XSD File");
> 
> Any help/suggestions would help me to solve this issue.
> 
> Thanks
> Viswanth
> 
> 
> 
> --
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org