Topic
  • No replies
SystemAdmin
SystemAdmin
590 Posts

Pinned topic java.lang.ClassFormatError OSGi App on Liberty Profile

‏2012-12-02T09:38:58Z |
Hi. I'm getting java.lang.ClassFormatError from my enterprise OSGi app on liberty profile.

I have found bug report https://issues.apache.org/jira/browse/KARAF-1905 describing the same issue and the fix described there worked.
I have added

-Dorg.apache.aries.proxy.weaving.disabled=org.objectweb.asm.*,org.slf4j.*,org.apache.log4j.*,javax.*,org.apache.xerces.*

to jvm.options file and the problem disappeared but I'm writing here to let the others know and to report issue.

Stack trace bellow.

javax.faces.FacesException: java.lang.ClassFormatError: Illegal UTF8 string in constant pool in 

class file org/apache/xerces/impl/xpath/regex/ParserForXMLSchema at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.wrap(ExceptionHandlerImpl.java:241) at org.apache.myfaces.shared_impl.context.ExceptionHandlerImpl.handle(ExceptionHandlerImpl.java:156) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:258) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191) at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1234) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:757) at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:440) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppFilterChain.java:127) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:88) at com.ibm.ws.app.manager.wab.internal.OsgiDirectoryProtectionFilter.doFilter(OsgiDirectoryProtectionFilter.java:96) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:192) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:85) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:940) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:1037) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:4239) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:302) at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.handleRequest(DynamicVirtualHost.java:317) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:1006) at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost$2.run(DynamicVirtualHost.java:274) at com.ibm.ws.http.dispatcher.internal.channel.HttpDispatcherLink$TaskWrapper.run(HttpDispatcherLink.java:529) at com.ibm.ws.threading.internal.Worker.executeWork(Worker.java:398) at com.ibm.ws.threading.internal.Worker.run(Worker.java:380) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.ClassFormatError: Illegal UTF8 string in constant pool in 

class file org/apache/xerces/impl/xpath/regex/ParserForXMLSchema at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:791) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:188) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClassHoldingLock(ClasspathManager.java:626) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:601) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:562) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:486) at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:459) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400) at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:476) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417) at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets(Unknown Source) at org.apache.xerces.impl.dv.xs.XSSimpleTypeDecl.applyFacets1(Unknown Source) at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.createBuiltInTypes(Unknown Source) at org.apache.xerces.impl.dv.xs.SchemaDVFactoryImpl.<clinit>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:372) at java.lang.Class.newInstance(Class.java:325) at org.apache.xerces.impl.dv.ObjectFactory.newInstance(Unknown Source) at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source) at org.apache.xerces.impl.dv.SchemaDVFactory.getInstance(Unknown Source) at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<init>(XSDDatatype.java:210) at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<init>(XSDDatatype.java:222) at com.hp.hpl.jena.datatypes.xsd.impl.XSDFloat.<init>(XSDFloat.java:44) at com.hp.hpl.jena.datatypes.xsd.XSDDatatype.<clinit>(XSDDatatype.java:55) at com.hp.hpl.jena.datatypes.TypeMapper.<clinit>(TypeMapper.java:59) at com.hp.hpl.jena.graph.Node.getType(Node.java:42) at org.openjena.riot.ParserProfileBase.create(ParserProfileBase.java:154) at org.openjena.riot.lang.LangNQuads.tokenAsNode(LangNQuads.java:92) at org.openjena.riot.lang.LangNQuads.parseOne(LangNQuads.java:79) at org.openjena.riot.lang.LangNQuads.parseOne(LangNQuads.java:22) at org.openjena.riot.lang.LangNTuple.runParser(LangNTuple.java:58) at org.openjena.riot.lang.LangBase.parse(LangBase.java:75) at org.openjena.riot.RiotLoader.read(RiotLoader.java:97) at org.openjena.riot.RiotLoader.read(RiotLoader.java:88) at com.ibm.rdf.store.internal.hashing.GraphColoringHashingFamily.loadDataset(Unknown Source) at com.ibm.rdf.store.StoreManager.connectStore(Unknown Source) at com.ibm.lp.royalty.data.rdf.DataManagerImpl.query(DataManagerImpl.java:112) at com.ibm.lp.royalty.data.rdf.DataManagerImpl.query(DataManagerImpl.java:128) at com.ibm.lp.royalty.data.rdf.PersonDaoImpl.getPerson(PersonDaoImpl.java:145) at com.ibm.lp.royalty.data.rdf.PersonDaoImpl.getPerson(PersonDaoImpl.java:159) at com.ibm.lp.royalty.data.rdf.PersonDaoImpl.getPerson(PersonDaoImpl.java:159) at Proxybbfa2633_d2c0_44d4_90a2_67f144749d51.getPerson(Unknown Source) at com.ibm.lp.royalty.faces.Show.getPerson(Show.java:66) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at javax.el.BeanELResolver.getValue(BeanELResolver.java:91) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:55) at org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:142) at org.apache.el.parser.AstValue.getValue(AstValue.java:173) at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:283) at org.apache.myfaces.view.facelets.el.TagValueExpression.getValue(TagValueExpression.java:85) at javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:243) at javax.faces.component.UIParameter.getValue(UIParameter.java:67) at org.apache.myfaces.renderkit.html.HtmlFormatRenderer.getOutputFormatText(HtmlFormatRenderer.java:99) at org.apache.myfaces.renderkit.html.HtmlFormatRenderer.encodeEnd(HtmlFormatRenderer.java:70) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:535) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:626) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:622) at org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1320) at org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:263) at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85) at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239) ... 20 more