I am working on a web application and I have been facing this issue for a while after looking at multiple post I still was unable to solve this issue. I'm using tomcat 7.0.23 which provides el-api which i believe is the jar thought to be missing. I have not included any jar files in the WEB-INF/lib folder at all I am adding all of my dependencies through pom.xml because of maven. I have attempted all of the possible quick fixes i could think of including maven clean/install server clean(multiple times), project clean, adding tomcat to the targeted runtimes. in my build path is tomcat, jdk1.6, and maven)
The pom.xml and web.xml files that I am using are identical my other team members and they are currently working so i don't believe the issue is there.
Here is the error I am getting when starting the server
SEVERE: Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.NoClassDefFoundError: javax/el/ELException
at org.apache.myfaces.webapp.AbstractFacesInitializer._createFacesContext(AbstractFacesInitializer.java:403)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initStartupFacesContext(AbstractFacesInitializer.java:376)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:105)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1525)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1515)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ClassNotFoundException: javax.el.ELException
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 13 more
these are the dependices after a maven clean/ install
activation-1.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.1.jar
captcha-0.0.1-SNAPSHOT.jar
cmu_time_awb-0.0.1-SNAPSHOT.jar
cmu_us_kal-0.0.1-SNAPSHOT.jar
cmudict04-0.0.1-SNAPSHOT.jar
cmulex-0.0.1-SNAPSHOT.jar
cmutimelex-0.0.1-SNAPSHOT.jar
commons-beanutils-1.8.3.jar
commons-cli-1.2.jar
commons-codec-1.3.jar
commons-collections-3.2.1.jar
commons-digester-1.8.1.jar
commons-el-1.0.jar
commons-fileupload-1.2.1.jar
commons-io-1.3.1.jar
commons-lang-2.6.jar
commons-logging-1.1.1.jar
commons-pool-1.5.4.jar
commons-validator-1.3.1.jar
cxf-api-2.7.0.jar
cxf-rt-bindings-soap-2.7.0.jar
cxf-rt-bindings-xml-2.7.0.jar
cxf-rt-core-2.7.0.jar
cxf-rt-databinding-jaxb-2.7.0.jar
cxf-rt-frontend-jaxrs-2.7.0.jar
cxf-rt-frontend-jaxws-2.7.0.jar
cxf-rt-frontend-simple-2.7.0.jar
cxf-rt-transports-http-2.7.0.jar
cxf-rt-ws-addr-2.7.0.jar
cxf-rt-ws-policy-2.7.0.jar
dom4j-1.6.1.jar
ejb3-persistence-1.0.2.GA.jar
en_us-0.0.1-SNAPSHOT.jar
freemarker-2.3.9.jar
freetts-0.0.1-SNAPSHOT.jar
freetts-jsapi10-0.0.1-SNAPSHOT.jar
geronimo-javamail_1.4_spec-1.7.1.jar
hibernate-annotations-3.4.0.GA.jar
hibernate-commons-annotations-3.1.0.GA.jar
hibernate-core-3.3.1.GA.jar
javassist-3.4.GA.jar
javax.ws.rs-api-2.0-m10.jar
jaxb-impl-2.1.13.jar
jcaptcha-1.0-mod-0.0.1-SNAPSHOT.jar
jdom-1.1.jar
jettison-1.0.jar
jsf-facelets-1.1.6.jar
jta-1.1.jar
jtds-1.2.4.jar
junit-4.7.jar
jxl-2.6.12.jar
log4j-1.2.17.jar
mail-1.4.5.jar
myfaces-api-2.1.0.jar
myfaces-impl-2.1.0.jar
neethi-3.0.2.jar
oro-2.0.8.jar
primefaces-3.3.jar
slf4j-api-1.6.6.jar
slf4j-log4j12-1.6.6.jar
spring-aop-3.0.6.RELEASE.jar
spring-asm-3.0.6.RELEASE.jar
spring-batch-core-2.0.3.RELEASE.jar
spring-batch-infrastructure-2.0.3.RELEASE.jar
spring-beans-3.0.6.RELEASE.jar
spring-context-3.0.6.RELEASE.jar
spring-context-support-3.0.6.RELEASE.jar
spring-core-3.0.6.RELEASE.jar
spring-expression-3.0.6.RELEASE.jar
spring-jdbc-3.0.6.RELEASE.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-ldap-core-tiger-1.3.1.RELEASE.jar
spring-ldap-ldif-batch-1.3.1.RELEASE.jar
spring-ldap-ldif-core-1.3.1.RELEASE.jar
spring-ldap-odm-1.3.1.RELEASE.jar
spring-orm-3.0.6.RELEASE.jar
spring-test-3.0.6.RELEASE.jar
spring-tx-3.0.6.RELEASE.jar
spring-web-3.0.6.RELEASE.jar
stax2-api-3.1.1.jar
tomahawk-1.1.6.jar
velocity-1.6.2.jar
woodstox-core-asl-4.1.4.jar
wsdl4j-1.6.2.jar
xml-apis-1.0.b2.jar
xml-resolver-1.2.jar
xmlschema-core-2.0.3.jar
xpp3_min-1.1.4c.jar
xstream-1.3.jar
The “javax.el.ExpressionFactory” class belongs to the “el-api.jar” library, you can download it from Maven central repository.
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>el-impl</artifactId>
<version>2.2</version>
</dependency>
and place it in tomcat/lib directory.
Alternative Solution
Related
I am using the latest version of Apache POI at this moment which is 4.1.1. Every thing is working fine for xls file. Even for xlsx file in development environment Windows. But I am getting exception in live environment Red Hat Linux.
I have already searched for solutions mostly said to use proper xmlbeans dependency. I am using xml-beans-3.1.0.jar.
I am exporting the war file from eclipse and publishing in oracle web-logic 12c.
Here's the stack trace:
org.apache.poi.ooxml.POIXMLException: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:66)
at org.apache.poi.ooxml.POIXMLDocumentPart.read(POIXMLDocumentPart.java:657)
at org.apache.poi.ooxml.POIXMLDocument.load(POIXMLDocument.java:180)
at org.apache.poi.xssf.usermodel.XSSFWorkbook.<init>(XSSFWorkbook.java:282)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:88)
at org.apache.poi.xssf.usermodel.XSSFWorkbookFactory.createWorkbook(XSSFWorkbookFactory.java:135)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.poi.ss.usermodel.WorkbookFactory.createWorkbook(WorkbookFactory.java:341)
at org.apache.poi.ss.usermodel.WorkbookFactory.createXSSFWorkbook(WorkbookFactory.java:316)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:234)
at org.apache.poi.ss.usermodel.WorkbookFactory.create(WorkbookFactory.java:200)
...............................................................................
...............................................................................
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.apache.poi.xssf.usermodel.XSSFFactory.createDocumentPart(XSSFFactory.java:56)
at org.apache.poi.ooxml.POIXMLFactory.createDocumentPart(POIXMLFactory.java:63)
... 181 more
Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
at org.apache.poi.ooxml.POIXMLTypeLoader.<clinit>(POIXMLTypeLoader.java:43)
at org.apache.poi.xssf.model.ThemesTable.<init>(ThemesTable.java:86)
... 187 more
Here is the full library list I have used:
activation-1.1.1.jar
antlr-2.7.7.jar
aopalliance-1.0.jar
asm-3.3.jar
asm-commons-3.3.jar
asm-tree-3.3.jar
axis.jar
commons-beanutils-1.9.2.jar
commons-codec-1.13.jar
commons-collections-3.2.2.jar
commons-collections4-4.4.jar
commons-compress-1.19.jar
commons-dbcp-1.3.jar
commons-digester-2.1.jar
commons-discovery.jar
commons-fileupload-1.3.1.jar
commons-io-2.4.jar
commons-lang-2.4.jar
commons-lang3-3.9.jar
commons-logging-1.1.3.jar
commons-math3-3.6.1.jar
commons-pool-1.5.6.jar
commons-validator-1.4.0.jar
core-3.1.0.jar
curvesapi-1.06.jar
datatables-core-0.9.3.jar
datatables-jsp-0.9.3.jar
datatables-servlet2-0.9.3.jar
displaytag-1.2.jar
dom4j-1.6.1.jar
dynaHandlers.jar
freemarker-2.3.23.jar
gson-2.6.2.jar
hamcrest-core-1.1.jar
hibernate-commons-annotations-4.0.5.Final.jar
hibernate-core-4.3.11.Final.jar
hibernate-entitymanager-4.3.11.Final.jar
hibernate-jpa-2.1-api-1.0.0.Final.jar
httpclient-4.5.2.jar
httpcore-4.4.4.jar
iText-5.0.4.jar
jackson-core-asl-1.8.3.jar
jackson-jaxrs-1.8.3.jar
jackson-mapper-asl-1.8.3.jar
jackson-xc-1.8.3.jar
jandex-1.1.0.Final.jar
java-json.jar
javase-3.1.0.jar
javassist-3.20.0-GA.jar
javax.servlet-api-3.1.0.jar
javax.servlet.jsp-api-2.3.1.jar
javax.wsdl.jar
jaxrpc-api.jar
jboss-logging-3.1.3.GA.jar
jcl-over-slf4j-1.7.6.jar
jersey-client-1.9.jar
jersey-core-1.9.jar
jersey-json-1.9.jar
jersey-multipart-1.9.jar
jersey-server-1.9.jar
jsch-0.1.53.jar
json-lib-2.3-jdk15.jar
json-simple-1.1.1.jar
jstl-1.0.6.jar
jta-1.1.jar
juli-6.0.18.jar
junit-4.10.jar
log4j-api-2.3.jar
log4j-core-2.3.jar
log4j-web-2.3.jar
mail.jar
ognl-3.1.4.jar
ojdbc6.jar
opencsv-2.3.jar
org.apache.felix.framework-4.0.3.jar
org.apache.felix.main-4.0.3.jar
org.apache.felix.shell-1.4.3.jar
org.apache.felix.shell.tui-1.4.1.jar
org.osgi.compendium-4.0.0.jar
org.osgi.core-4.1.0.jar
oval-1.31.jar
plexus-container-default-1.0-alpha-10.jar
plexus-utils-1.2.jar
poi-4.1.1.jar
poi-excelant-4.1.1.jar
poi-ooxml-4.1.1.jar
poi-ooxml-schemas-4.1.1.jar
poi-scratchpad-4.1.1.jar
servlet-api-2.5.jar
sitemesh-2.4.2.jar
slf4j-api-1.7.12.jar
SMSClient.jar
spring-aop-4.1.6.RELEASE.jar
spring-beans-4.1.6.RELEASE.jar
spring-context-4.1.6.RELEASE.jar
spring-core-4.1.6.RELEASE.jar
spring-expression-4.1.6.RELEASE.jar
spring-jdbc-4.1.6.RELEASE.jar
spring-orm-4.1.6.RELEASE.jar
spring-test-4.1.6.RELEASE.jar
spring-tx-4.1.6.RELEASE.jar
spring-web-4.1.6.RELEASE.jar
standard-1.0.6.jar
standard.jar
struts-menu-2.4.3.jar
struts2-core-2.5.jar
struts2-jquery-plugin-3.7.1.jar
struts2-jquery-tree-plugin-3.7.1.jar
struts2-json-plugin-2.5.jar
struts2-sitemesh-plugin-2.5.jar
tiles-api-3.0.5.jar
tiles-core-3.0.5.jar
tiles-jsp-3.0.5.jar
validation-api-1.1.0.Final.jar
velocity-1.4.jar
velocity-tools-view-1.0.jar
xml-apis-1.0.b2.jar
xmlbeans-3.1.0.jar
xmlpserver.jar
xmlpull-1.1.3.1.jar
xpp3_min-1.1.4c.jar
xstream-1.4.8.jar
I got around this error by setting this in weblogic.xml:
<container-descriptor>
<prefer-application-packages>
<package-name>org.apache.*</package-name>
</prefer-application-packages>
</container-descriptor>
Weblogic 12c has an old version(2.0) of XMLBeans!
According to
Caused by: java.lang.NoSuchMethodError: org.apache.xmlbeans.XmlOptions.setEntityExpansionLimit(I)Lorg/apache/xmlbeans/XmlOptions;
I suspect your class org.apache.xmlbeans.XmlOptions came not really from xmlbeans-3.1.0.jar but from any other library which possibly includes an old version of org.apache.xmlbeans.*.
You could detect where the class came from using folowing code:
ClassLoader classloader =
org.apache.xmlbeans.XmlOptions.class.getClassLoader();
java.net.URL res = classloader.getResource(
"org/apache/xmlbeans/XmlOptions.class");
String path = res.getPath();
System.out.println("XmlOptions came from " + path);
I am receiving this error on running my project and the result is 404 ultimately. The project is made on Spring framework.
I read a lot of posts and found that there is either a mix up of jars or extra jars. Following which I tried to organize my jars. The following list is what I have in my build path:
antlr-2.7.6.jar
asm.jar
asm-attrs.jar
cglib-2.2.jar
commons-beanutils-1.7.0.jar
commons-collections-3.1.jar
commons-digester-1.8.jar
commons-email-1.0.jar
commons-fileupload-1.1.1.jar
commons-io-1.2.jar
commons-lang-2.5.jar
commons-logging-1.1.1.jar
displaytag-1.0-b3.jar
dom4j-1.6.1.jar
ehcache-1.1.jar
hibernate3.jar
hibernate-jpa-2.0-api-1.0.0.Final.jar
hibernate-validator-4.0.2.GA.jar
hsqldb.jar
itext-2.1.3.jar
javassist-3.12.0.GA.jar
jdom.jar
jstl-1.2.jar
jta-1.1.jar
log4j-1.2.14.jar
msbase.jar
mssqlserver4v65.jar
msutil.jar
mysql.jar
mysql-connector-java-5.1.15-bin.jar
ojdbc14.jar
persistence-api-1.0.jar
poi-3.0-alpha2.jar
servlet-2.3.jar
slf4j-api-1.6.6.jar
slf4j-log4j12-1.5.6.jar
slf4j-simple-1.6.6.jar
spring-asm-3.0.3.RELEASE.jar
spring-beans-3.0.3.RELEASE.jar
spring-context-3.0.3.RELEASE.jar
spring-core-3.0.3.RELEASE.jar
spring-expression-3.0.3.RELEASE.jar
spring-hibernate3-2.0.8.jar
spring-web-3.0.3.RELEASE.jar
spring-webmvc-3.0.3.RELEASE.jar
sqljdbc4.jar
standard.jar
tree.jar
validation-api-1.0.0.GA.jar
wloracle.jar
wlsqlserver.jar
Here goes the stacktrace
SEVERE: Error loading WebappClassLoader
delegate: false
repositories:
/WEB-INF/classes/
----------> Parent Classloader:
org.apache.catalina.loader.StandardClassLoader#ca2dce
org.springframework.web.servlet.DispatcherServlet
java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1360)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1206)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1083)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:981)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4058)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4364)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
at org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
at org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:420)
at org.apache.jasper.compiler.Parser.parseDirective(Parser.java:483)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:1433)
at org.apache.jasper.compiler.Parser.parse(Parser.java:133)
at org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:153)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:314)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
I have deleted many jars, which I thought, are repetitive.
My question is whether all these jars are exactly enough or are there duplicates?
Please help, this 404 is killing me...
You have a lot of duplicated jars there:
antlr
jta
mysql-connector
javassist
mssqlserver
I would make sure you only have one of each before continuing, work out which version you need and include that one.
If you are not sure how to do this, let us know how you are importing your dependencies.
It would also be helpful to see the stacktrace you are seeing and a simplified Spring context that causes the error.
If you look at this question: JasperException: absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved
You need to make sure you have the right version of JSTL, maybe once you remove the duplicate JSTL it may fix that error.
My guess would be deleting spring.jar and spring-1.2.6.jar ; they conflict with spring*3.0.3.RELEASE.jars
And my two cents would be using maven when working with spring framework.
I am trying to migrate an application from WebLogic Server 10.3 to 12.1.1. When starting the application I get the following Error.
javax.xml.bind.JAXBException: 24
with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: 24]
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:832)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:143)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:142)
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:180)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:211)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:185)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:184)
at com.sun.xml.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:109)
at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:321)
at com.sun.xml.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:99)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:74)
at com.sun.xml.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:58)
at com.sun.xml.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:130)
at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:411)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:232)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:546)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:525)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:601)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.getEndpoint(JAXWSDeployedServlet.java:183)
at weblogic.wsee.jaxws.JAXWSServlet.registerEndpoint(JAXWSServlet.java:139)
at weblogic.wsee.jaxws.JAXWSServlet.init(JAXWSServlet.java:68)
at weblogic.wsee.jaxws.JAXWSDeployedServlet.init(JAXWSDeployedServlet.java:54)
at javax.servlet.GenericServlet.init(GenericServlet.java:240)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:299)
at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:250)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at weblogic.servlet.internal.StubSecurityHelper.initServletInstance(StubSecurityHelper.java:94)
at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:82)
at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:74)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:60)
at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:34)
at weblogic.servlet.internal.ServletStubImpl.initStubLifecycleHelper(ServletStubImpl.java:624)
at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:565)
at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1874)
at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1848)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1738)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:212)
at weblogic.application.internal.ExtensibleModuleWrapper.start(ExtensibleModuleWrapper.java:111)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:124)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:24)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:729)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:258)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:61)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:165)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:582)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:148)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:114)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:149)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:335)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:545)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 24
at org.eclipse.persistence.internal.libraries.asm.Type.getType(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.Type.getArgumentTypes(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClass(MappingsGenerator.java:1546)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClassAndDescriptor(MappingsGenerator.java:1484)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapMapping(MappingsGenerator.java:1459)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapping(MappingsGenerator.java:477)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:2033)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMappings(MappingsGenerator.java:1994)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateProject(MappingsGenerator.java:195)
at org.eclipse.persistence.jaxb.compiler.Generator.generateProject(Generator.java:174)
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:837)<24.06.2014 16:42 Uhr MESZ> <Error> <HTTP> <BEA-101216> <Servlet: "xy" failed to preload on startup in Web application: "report.server".
com.sun.xml.ws.spi.db.DatabindingException: 24
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:185)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:211)
at com.sun.xml.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:185)
at java.security.AccessController.doPrivileged(Native Method)
Truncated. see log file for complete stacktrace
Caused By: javax.xml.bind.JAXBException: 24
- with linked exception:
[java.lang.ArrayIndexOutOfBoundsException: 24]
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:832)
at org.eclipse.persistence.jaxb.JAXBContext.<init>(JAXBContext.java:143)
at org.eclipse.persistence.jaxb.JAXBContextFactory.createContext(JAXBContextFactory.java:142)
at com.sun.xml.ws.db.toplink.JAXBContextFactory.newContext(JAXBContextFactory.java:180)
at com.sun.xml.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:179)
Truncated. see log file for complete stacktrace
Caused By: java.lang.ArrayIndexOutOfBoundsException: 24
at org.eclipse.persistence.internal.libraries.asm.Type.getType(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.Type.getArgumentTypes(Unknown Source)
at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClass(MappingsGenerator.java:1546)
at org.eclipse.persistence.jaxb.compiler.MappingsGenerator.generateMapEntryClassAndDescriptor(MappingsGenerator.java:1484)
Truncated. see log file for complete stacktrace
>
at org.eclipse.persistence.jaxb.JAXBContext$TypeMappingInfoInput.createContextState(JAXBContext.java:830)
... 75 more
Additional Information:
The unmodified code works just fine in WebLogic Server 12.1.2.
Unfortunately I have to use WLS 12.1.1.
We are using JAX-WS
We are using JDK 7
If any additional information is required let me know.
Thank you for your help!
I am facing the same problem and the bug was supposed to be fixed in the Eclipselink ASM module in version 2.6.0 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=429992).
I upgrade the eclipselink JARs in weblogic, I packaged the JARs but the bug doesn't seem to be fixed. The only way I got my webservices back working after upgrading to Weblogic 12 is by not using MOXy at all.
You can do this by either loading databinding.override_1.2.0.0.jar in the weblogic classpath (system wide fix) or to define the services in your own EAR and tell weblogic to use the resources in the EAR.
In short, add a file named "com.sun.xml.ws.spi.db.BindingContextFactory" to src/main/resources/META-INF/services in your ear project and add the following line in it
com.sun.xml.ws.db.glassfish.JAXBRIContextFactory
and a file named javax.xml.bind.JAXBContext with the following content
com.sun.xml.bind.v2.ContextFactory
Add the following lines to your weblogic-application.xml:
<prefer-application-resources>
<resource-name>META-INF/services/com.sun.xml.ws.spi.db.BindingContextFactory</resource-name>
<resource-name>META-INF/services/javax.xml.bind.JAXBContext</resource-name>
</prefer-application-resources>
And package jaxb in your application:
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
If maven doesn't add your xml files to the EAR, make sure to add this to the configuration of the maven-ear-plugin:
<earSourceDirectory>${basedir}/src/main/resources</earSourceDirectory>
I had a similar trouble with WLS 12c and i followed the instruction to add the changes in my ear package. The details is in this link.
Is similar to the solution gave by #P_W999 and there is a solution for the server scope or the application scope.
I'm using websocket function of tomcat 7.0.39, so I have to include catalina.jar into my classpath. But when I deploy my project, if I deploy the jar files into WEB-INF/lib, I get the following exception:
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
and when catalina.jar is not deployed, I get ClassNotFoundException:
java.lang.ClassNotFoundException: org.apache.catalina.websocket.MessageInbound
Someone please help me.
StackTrace:
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addServlet
at org.apache.tomcat.util.IntrospectionUtils.callMethod1(IntrospectionUtils.java:802)
at org.apache.tomcat.util.digester.SetNextRule.end(SetNextRule.java:201)
at org.apache.tomcat.util.digester.Digester.endElement(Digester.java:1057)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:819)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:748)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1543)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1694)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1197)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
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:616)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
The web socket support in 7.0.x is experiemental (and will soon be deprecated and replaced with a port of the JSR 356 implementation from Tomcat 8).
A side-effect of this is that the API can and does change between point releases. Therefore, you must compile your code againt the Tomcat JARs from the Tomcat version you intend to deploy on. There errors you are seeing are an indication of a version mis-match.
There is no need to package any Tomcat JARs in your web application.
Do you really need to put the catalina.jar in your classpath. Catalina.jar should already be present in tomcat/lib directory. Tomcat class loader will load the jar from its own lib directory and hence it is the parent class loader so your classpath or application catalina.jar will not picked. Hope you will be able to resolve your problem with this information.
You are getting NoSuchMethodDefinition error, which means the jar which you are using for compiling has that method but the jar, which is loaded for execution does not have that method definition. Check with replacing the catalina.jar in tomcat/lib with the jar that you are using for compiling your code.
im trying to migrate my JBOSS 5.1 application to JBOSS 7.0.2. In admin console i select deployments -> add content and my .war and try to enable it.
I already resolved some problems, but cant figure out this one: (in short, in long at the end)
Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.ZaprogsProject.war:main" from Servic
e Module Loader]
I copied to JBOSS7\standalone\lib\ the following files:
spring-aop-3.0.5.RELEASE.jar
spring-asm-3.0.5.RELEASE.jar
spring-beans-3.0.5.RELEASE.jar
spring-context-3.0.5.RELEASE.jar
spring-context-support-3.0.5.RELEASE.jar
spring-core-3.0.5.RELEASE.jar
spring-expression-3.0.5.RELEASE.jar
spring-jdbc-3.0.5.RELEASE.jar
spring-orm-3.0.5.RELEASE.jar
spring-test-3.0.5.RELEASE.jar
spring-tx-3.0.5.RELEASE.jar
spring-web-3.0.5.RELEASE.jar
spring-webmvc-3.0.5.RELEASE.jar
I have read this: https://docs.jboss.org/author/display/AS7/How+do+I+migrate+my+application+from+AS5+or+AS6+to+AS7 (Debug and resolve ClassNotFoundExceptions and NoClassDefFoundErrors) but cant find a solution for me and still getting the same error. Can anyone help?
22:19:12,091 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC00001: Failed to start service jboss.deployment.unit."ZaprogsProject.war".INSTALL: o
rg.jboss.msc.service.StartException in service jboss.deployment.unit."ZaprogsProject.war".INSTALL: Failed to process phase INSTALL of deployment "ZaprogsProject
.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.7.0]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.7.0]
at java.lang.Thread.run(Thread.java:722) [:1.7.0]
Caused by: java.lang.RuntimeException: Failed to load class org.springframework.web.context.ContextLoaderListener
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:141)
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:122)
at org.jboss.as.ee.component.LazyValue.get(LazyValue.java:40)
at org.jboss.as.ee.component.EEApplicationDescription.getClassConfiguration(EEApplicationDescription.java:183)
at org.jboss.as.ee.component.ComponentDescription.createConfiguration(ComponentDescription.java:153)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:70)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115) [jboss-as-server-7.0.2.Final.jar:7.0.2.Final]
... 5 more
Caused by: java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener from [Module "deployment.ZaprogsProject.war:main" from Servic
e Module Loader]
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:361)
at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:333)
at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:310)
at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:103)
at java.lang.Class.forName0(Native Method) [:1.7.0]
at java.lang.Class.forName(Class.java:264) [:1.7.0]
at org.jboss.as.ee.component.deployers.EEClassConfigurationProcessor$1.compute(EEClassConfigurationProcessor.java:139)
... 11 more
JBoss AS 7 does class-loading in a diff way.
All classes in the WAR are loaded with the same class loader. This means classes packaged in the WEB-INF/lib are treated the same as classes in WEB-INF/classes.
Hence it works for you.
But as you have said correctly your WEB-INF/lib is bloated.This would not be the correct way.
You would need to make a module :
Goto modules folder, make folder structure with main folder and put your jar and modules.xml with entries in it.
Something like :
<main-class name="org.jboss.msc.Version"/>
<resources>
<resource-root path="jboss-msc-1.0.1.GA.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="org.jboss.logging"/>
<module name="org.jboss.modules"/>
<!-- Optional deps -->
<module name="javax.inject.api" optional="true"/>
<module name="org.jboss.threads" optional="true"/>
<module name="org.jboss.vfs" optional="true"/>
</dependencies>
You would also need to update MANIFEST as well.
Details are here :
https://docs.jboss.org/author/display/MODULES/Module+descriptors
I would not put those JARs in that directory. Try them in your WAR file's WEB-INF/lib. The class loader will find them there.
You need to understand that all Java EE app servers use a hierarchy of class loaders: bootstrap, server, application. JBoss wasn't finding that class when it needed to.
There is a major change Jboss 7 when compared to previous versions.If you want to access any libraries outside your war file, it should be installed as module.
Check https://docs.jboss.org/author/display/MODULES/Introduction
In this case you should install Spring as module and specify the name of the module as dependency in your application's manifest file(check Manifest module information)
In case the issue started occurring all of a sudden(just like in my case), deleting the application (MyApp) physically from #JBOSS_HOME#\standalone\deployments\ MyApp.war worked for me.