update javax json from 1.0.2 to 1.1

I'm developing a project that uses Tomcat7 and uses javax.json. Until now everything worked, but now I updated the javax.json from 1.0.2 to 1.1 and when I start the tomcat gives me the following error:

jun 27, 2017 10:12:13 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/projectx/projectxFull/Apache%20Software%20Foundation/Tomcat%207.0/webapps/standard/WEB-INF/lib/javax.json-1.1.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
    at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:133)
    at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2134)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:2010)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1976)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1961)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1319)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)

jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://example.com/custom_tags is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
jun 27, 2017 10:12:14 PM org.apache.catalina.startup.TaglibUriRule body
INFO: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/D:/ProjectX/projectxFull/Apache%20Software%20Foundation/Tomcat%207.0/webapps/standard/WEB-INF/lib/com.springsource.slf4j.log4j-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/ProjectX/projectxFull/Apache%20Software%20Foundation/Tomcat%207.0/webapps/standard/WEB-INF/lib/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
jun 27, 2017 10:12:14 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
log4j:WARN Error during default initialization
java.lang.NoClassDefFoundError: com/sun/mail/util/MailLogger
    at javax.mail.Session.initLogger(Session.java:230)
    at javax.mail.Session.<init>(Session.java:214)
    at javax.mail.Session.getInstance(Session.java:251)
    at org.apache.log4j.net.SMTPAppender.createSession(SMTPAppender.java:225)
    at org.apache.log4j.net.SMTPAppender.activateOptions(SMTPAppender.java:137)
    at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
    at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
    at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:809)
    at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:735)
    at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:615)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:502)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:547)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:483)
    at org.apache.log4j.LogManager.<clinit>(LogManager.java:127)
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:156)
    at org.apache.commons.logging.impl.SLF4JLogFactory.getInstance(SLF4JLogFactory.java:132)
    at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:272)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:301)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)
Caused by: java.lang.ClassNotFoundException: com.sun.mail.util.MailLogger
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
    ... 35 more
jun 27, 2017 10:12:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
jun 27, 2017 10:12:15 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: You cannot use a spring-security-2.0.xsd or spring-security-3.0.xsd or spring-security-3.1.xsd schema or spring-security-3.2.xsd schema or spring-security-4.0.xsd schema with Spring Security 4.2. Please update your schema declarations to the 4.2 schema.
Offending resource: ServletContext resource [/WEB-INF/spring-security.xml]
    at org.springframework.beans.factory.parsing.FailFastProblemReporter.fatal(FailFastProblemReporter.java:60)
    at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:68)
    at org.springframework.beans.factory.parsing.ReaderContext.fatal(ReaderContext.java:55)
    at org.springframework.security.config.SecurityNamespaceHandler.parse(SecurityNamespaceHandler.java:88)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1411)
    at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1401)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:172)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.doRegisterBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:142)
    at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:94)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:508)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:392)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:614)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:515)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)

jun 27, 2017 10:12:15 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error listenerStart
jun 27, 2017 10:12:15 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/standard] startup failed due to previous errors
jun 27, 2017 10:12:15 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
jun 27, 2017 10:12:15 PM org.apache.catalina.core.StandardContext listenerStop
SEVERE: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
    at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1030)
    at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1006)
    at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:958)
    at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:583)
    at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:116)
    at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4980)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5626)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
    at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
    at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    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)

What I can do now?

Thank you


Thanks tigger, for pointing that out. This was causing an Exception for me in Wildfly-10.1.0.Final when I deployed: "Could not index class module-info.class"

I didn't want to go back versions, so I "fixed" the jar:

Move the jar to its own directory

cd that directory

explode the javax.json-1.1.jar file:

jar xvf javax.json-1.1.jar

deleting module-info.class

rm module-info.class

Get rid of the jar itself

rm javax.json-1.1.jar

Put everything back in the jar:

jar cvf javax.json-jdk8-1.1.jar .

Move the jar back to where you need it to build from.

note: since I added "jdk8" to the name of the jar to distinguish it from the maven repo version, I also had to update my build paths everywhere that uses it.

Rebuild, re-deploy, voila! No more Wildfly errors! :)

org.glassfish » javax.json » 1.0.2, Top Categories · Home » org.glassfish » javax.json » 1.0.2 Provider » 1.0.2. Default provider for JSR 374:Java API for Processing JSON. License, CDDL 1.1​GPL 2.0 Category/License, Group / Artifact, Version, Updates  Home » org.glassfish » javax.json » 1.0.2. Default provider for JSR 374:Java API for Processing JSON Updates; Java Spec CDDL 1.1 GPL 2.0: javax.json


I have encountered the same problem. In my case, the javax.json 1.1 is build with JDK9 ea; the tell-tale sign is [module-info.class]. After changing to the older version, my war file is deployed by Tomcat without complain.

Overview (JSR 374 (JSON Processing) API 1.1.4 API), The Java API for JSON Processing provides portable APIs to parse, generate, transform, The Streaming API provides a way to parsing and generation of JSON in a streaming fashion. JSON Pointer, JSON Patch, and JSON Merge Patch. API module of JSR 374:Java API for Processing JSON License: CDDL 1.1 GPL 2.0: Categories: Java Specifications: HomePage: https://javaee.github.io/jsonp


  1. Downloaded Jersey compliant to javax.ws.rs-api-2.1
  2. Below jars were downloaded with corrupt module-info.class

    javax.json.bind-api-1.0

    javax.json-1.1

    javax.json-api-1.1

    yasson-1.0

  1. Added these jars (among other Jersey jars) to build path of RESTful Web App

    Used JAVAEE6

    Tried JDK 1.7 and 1.8 both

  2. Deployed using NetBeans in Tomcat 8.0.27.0
  3. Got this error

    09-May-2018 18:17:06.298 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/***/build/web/WEB-INF/lib/javax.json-api-1.1.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19

    09-May-2018 18:17:06.361 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/***/build/web/WEB-INF/lib/javax.json-1.1.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19

    09-May-2018 18:17:06.892 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/***/build/web/WEB-INF/lib/javax.json.bind-api-1.0.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19

    09-May-2018 18:17:07.233 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [jar:file:/D:/***/build/web/WEB-INF/lib/yasson-1.0.jar!/] for annotations org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19

Now i am downloading above jars separately to get error free jars

javax.json (JSR 374 (JSON Processing) Default Provider 1.1 API), Factory to create JsonObjectBuilder and JsonArrayBuilder instances. JsonMergePatch. This interface represents an implementation of a JSON Merge Patch as  Default provider for JSR 374:Java API for Processing JSON


I too faced the same problem when I was using java 1.8 with JAXRS-RI 2.27 and Tomcat 8.5 Version. Then i have removed those old 2.27 jars from /WEB-INF/lib folder and removed from buildpath as well. Then replaced with jaxrs-ri-2.6 jars in lib and project buildpath. This solution helped me.

Download this: jaxrs-ri-2.6.zip from this Link.

javax.json org.glassfish, Download all versions of javax.json JAR files with all dependencies javax.json from group org.glassfish (version 1.1.4) Last update 06. Version 1.0.2 javax.json javax.json.spi javax.json.stream 2.8 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of? No. 2.9 Are there any security issues that cannot be addressed by the current security model? No. 2.10 Are there any internationalization or localization issues?


TDLIoT/build.gradle at master · IPVS-AS/TDLIoT · GitHub, compile group: 'javax.json', name: 'javax.json-api', version: '1.1.2'. compile implementation 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.0.2'. Download javax.json-1.0.jar. javax.json/javax.json-1.0.jar.zip( 68 k) The download jar file contains the following class files or Java source files.


jakarta.json.bind : jakarta.json.bind-api : 1.0.2, JSON-B API - Jakarta JSON Binding is a standard binding layer for converting Java objects to/from JSON documents. If the project file contains <RuntimeFrameworkVersion>1.{sub-version}</RuntimeFrameworkVersion>, see this GitHub issue.. Update .NET Core SDK version in global.json. If your solution relies upon a global.json file to target a specific .NET Core SDK version, update its version property to use the 2.0 version installed on your machine:


Java JSON Example, We can have nested JSON objects too and it provides an easy way to represent arrays also. Table of Contents [hide]. 1 Java JSON. 1.1 Java JSON Read Example  19.2 JSON Processing in the Java EE Platform. Java EE includes support for JSR 353, which provides an API to parse, transform, and query JSON data using the object model or the streaming model described in Generating and Parsing JSON Data.