Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am developing a project which accesses the database but im having some problems. I try to use hibernate 3.2 and 4.52 but it doesn't work.
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLogger.translate(Log4jLogger.java:60)
at org.jboss.logging.Log4jLogger.isEnabled(Log4jLogger.java:35)
at org.jboss.logging.Logger.logv(Logger.java:1953)
at org.jboss.logging.DelegatingBasicLogger.tracev(DelegatingBasicLogger.java:89)
at org.hibernate.cfg.EJB3DTDEntityResolver.resolveEntity(EJB3DTDEntityResolver.java:59)
at com.sun.org.apache.xerces.internal.util.EntityResolverWrapper.resolveEntity(EntityResolverWrapper.java:110)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.resolveEntityAsPerStax(XMLEntityManager.java:994)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.dispatch(XMLDocumentScannerImpl.java:1154)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$DTDDriver.next(XMLDocumentScannerImpl.java:1050)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:964)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2157)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2077)
at org.hibernate.cfg.Configuration.configure(Configuration.java:2056)
at aucas.Aucas.<init>(Aucas.java:38)
at aucas.Aucas.main(Aucas.java:45)
the exception is in this lines of code
public Aucas() {
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Session session = sessionFactory.openSession();
LoginDialog d = new LoginDialog(null,false,this);
}
You need to check for conflicting version of class org.apache.log4j.Level in your classpath and resolve it. The TRACE level is available in the log4j jar of version 1.2.12 or higher.
Related
This question already has answers here:
Jersey stopped working with InjectionManagerFactory not found
(7 answers)
Closed 12 months ago.
I am having troubles trying to hook up jersey3 with jetty11 embedded server.
My code is
ServletContextHandler servletContextHandler = new ServletContextHandler(ServletContextHandler.SESSIONS);
servletContextHandler.setContextPath("/");
ResourceConfig resourceCfg = new ResourceConfig();
resourceCfg.packages(TestResource.class.getPackage().getName());
ServletContainer servletContainer = new ServletContainer(resourceCfg);
ServletHolder servletHolder = new ServletHolder(servletContainer);
servletContextHandler.addServlet(servletHolder, "/api/*");
this.setHandler(servletContextHandler);
This code exactly throws an error
Exception in thread "main" jakarta.servlet.ServletException: org.glassfish.jersey.servlet.ServletContainer-22356acd==org.glassfish.jersey.servlet.ServletContainer#d1f8ecbc{jsp=null,order=-1,inst=true,async=true,src=EMBEDDED:null,STARTED}
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:651)
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:690)
at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:510)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:310)
at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:762)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:714)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:896)
at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
at org.eclipse.jetty.server.Server.start(Server.java:469)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
at org.eclipse.jetty.server.Server.doStart(Server.java:414)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
at org.projectsanatan.restsanatan.RestSanatan.start(RestSanatan.java:27)
at org.projectsanatan.restsanatan.Main.main(Main.java:21)
Caused by: java.lang.IllegalStateException: InjectionManagerFactory not found.
at org.glassfish.jersey.internal.inject.Injections.lambda$lookupInjectionManagerFactory$0(Injections.java:74)
at java.base/java.util.Optional.orElseThrow(Optional.java:403)
at org.glassfish.jersey.internal.inject.Injections.lookupInjectionManagerFactory(Injections.java:74)
at org.glassfish.jersey.internal.inject.Injections.createInjectionManager(Injections.java:69)
at org.glassfish.jersey.server.ApplicationHandler.<init>(ApplicationHandler.java:261)
at org.glassfish.jersey.servlet.WebComponent.<init>(WebComponent.java:311)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:154)
at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:339)
at jakarta.servlet.GenericServlet.init(GenericServlet.java:178)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633)
... 21 more
However, adding this.setHandler(new HandlerList()), doesn't cause that error. I think this is because .setHandler method overwrites the other handlers. I still do not know what could be the reason that causes the error. Help would be appreciated!
You don't have all of the dependencies you need to run Jersey 3.
You seem to be missing the org.glassfish.jersey.internal.inject.InjectionManagerFactory class.
Found in the following maven coordinates...
https://search.maven.org/search?q=fc:org.glassfish.jersey.internal.inject.InjectionManagerFactory
See past answers for help identifying which artifact fits your needs...
Jersey stopped working with InjectionManagerFactory not found
HTTP Status 500 - Servlet.init()
BTW, you can get the Servlet to init on startup, so you don't need to send a request to trigger this setup issue.
ServletHolder servletHolder = new ServletHolder(servletContainer);
servletHolder.setInitOrder(1); // <-- this line
servletContextHandler.addServlet(servletHolder, "/api/*");
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
Exception below was found during performance testing.
CXF v3.0.0
JDK v1.8.92
PolicyInInterceptor.java:74 is the following code:
Policy p = (Policy)msg.getContextualProperty(PolicyConstants.POLICY_OVERRIDE);
So looks like interceptor tried to manipulate Hashmap data (with Exchanges?).
We already using this option:
getRequestContext().put("thread.local.request.context", "true");
from this CXF FAQ but with no any changes in stacktrace.
Checked list of issue in CFX jira. Found nothing similar.
Any advice?
javax.xml.ws.soap.SOAPFaultException: Fault string, and possibly fault code, not set
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:159)
at com.sun.proxy.$Proxy281.reqVirtualAcct(Unknown Source)
at com.mycompanyname.vc.vpp.VService.requestCFP(VService.java:240)
at com.mycompanyname.vc.vpp.VService.requestC(VService.java:216)
at com.mycompanyname.vc.vpp.VService.requestC(VService.java:105)
at com.mycompanyname.payment.PaymentSI.requestAndPopulateVC(PaymentSI.java:959)
at com.mycompanyname.payment.PaymentSI.createPayment(PaymentSI.java:669)
at com.mycompanyname.payment.PaymentSI.createPayment(PaymentSI.java:2099)
at sun.reflect.GeneratedMethodAccessor641.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy228.createPayment(Unknown Source)
at com.mycompanyname.paymentws.PSaaSOrderPortTypeV3Impl.createP(PSaaSOrderPortTypeV3Impl.java:148)
at sun.reflect.GeneratedMethodAccessor880.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy260.createPayable(Unknown Source)
at sun.reflect.GeneratedMethodAccessor880.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:181)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:97)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.invoke(AbstractJAXWSMethodInvoker.java:237)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:69)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:59)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$2.run(ServiceInvokerInterceptor.java:126)
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:131)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:243)
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:223)
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:197)
at org.apache.cxf.transport.servlet.ServletController.filter(ServletController.java:146)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.doFilter(CXFNonSpringServlet.java:144)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:506)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.StuckThreadDetectionValve.invoke(StuckThreadDetectionValve.java:220)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
at java.util.HashMap$EntryIterator.next(HashMap.java:1476)
at java.util.HashMap$EntryIterator.next(HashMap.java:1474)
at java.util.HashMap.putMapEntries(HashMap.java:512)
at java.util.HashMap.putAll(HashMap.java:785)
at org.apache.cxf.message.MessageImpl$1.putAll(MessageImpl.java:188)
at org.apache.cxf.message.MessageImpl.calcContextCache(MessageImpl.java:212)
at org.apache.cxf.message.MessageImpl.getContextualProperty(MessageImpl.java:174)
at org.apache.cxf.ws.policy.PolicyInInterceptor.handle(PolicyInInterceptor.java:74)
at org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPolicyInterceptor.java:44)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1636)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1525)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
at org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
at org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215)
at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:638)
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:326)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:279)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:137)
... 59 more
Update
This question was moved to "on hold":
"Questions seeking debugging help ("why isn't this code working?")
must include the desired behavior, a specific problem or error and the
shortest code necessary to reproduce it in the question itself.
Questions without a clear problem statement are not useful to other
readers. See: How to create a Minimal, Reproducible Example."
This question is not "why isn't this code working?". This question is "why isn't this code working in very specific case with exception somewhere in dependency?" Specific case is performance testing. In all other cases this code is working fine.
"shortest code necessary to reproduce" is a problem, because performance testing is test on real system so there are no any code for reproduce. Anyway I tried to reproduce it with no luck.
So Im still thinking original question has enough context and description.
Btw despite that question was asked during weekend I got two up vote on it.
When updating our .wsdl files to the latest Yodlee SOAP API (2014_Q4), errors started being thrown in the area of the code where it wasn't before. There wasn't any change in the our code dealing with transaction searches. The error being thrown is
org.apache.axis2.databinding.ADBException: Unexpected subelement highLevelCategoryReq
Which is happening on a executeUserSearchRequest call, i.e.
Locators.transactionSearchService.executeUserSearchRequest(userContext, transactionSearchRequest)
The setting up of the searchRequest is practically the exact same as what is shown in the sample code (latest Java SDK sample code, with the folder named Aggregation12-JavaSampleApps). A snippet is shown below
val transactionSearchRange = new TransactionSearchResultRange()
transactionSearchRange.setStartNumber(startRange)
transactionSearchRange.setEndNumber(endRange)
val transactionSearchRequest = new TransactionSearchRequest()
val transactionSearchFilter = new TransactionSearchFilter
transactionSearchFilter.setTransactionSplitType(TransactionSplitType.ALL_TRANSACTION)
val itemAccountId = new ItemAccountId()
itemAccountId.setIdentifier(bankData.getItemAccountId)
transactionSearchFilter.setItemAccountId(itemAccountId)
transactionSearchRequest.setSearchFilter(transactionSearchFilter)
transactionSearchRequest.setIgnorePaymentTransactions(false)
transactionSearchRequest.setIncludeAggregatedTransactions(true)
transactionSearchRequest.setResultRange(transactionSearchRange)
transactionSearchRequest.setContainerType("all")
transactionSearchRequest.setSearchClients(TransactionSearchClients.DEFAULT_SERVICE_CLIENT)
transactionSearchRequest.setIgnoreUserInput(true)
Locators.transactionSearchService.executeUserSearchRequest(userContext, transactionSearchRequest)
Stacktrace up to what is relevant is as follows
org.apache.axis2.databinding.ADBException: Unexpected subelement highLevelCategoryReq
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(SAXParserImpl.java:333)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.yodlee.soap.core.transactionsearch.transactionsearchservice.TransactionSearchServiceSoapBindingStub.executeUserSearchRequest(TransactionSearchServiceSoapBindingStub.java:1019)
Is this an error we are expected to catch and deal with, or is it indicative of some bigger underlying issue?
You need to use the right SOAP version end point. Since you are using 2014Q4 WSDLs , the endpoint to all the API calls should point to 2014Q4 version.
Example -
For transaction search - https://xxx.yodlee.com/yodsoap/services/TransactionSearchService_2014Q4
So please change the service version for all the URLs and it should resolve your problem.
This question already has answers here:
Print full call stack on printStackTrace()?
(3 answers)
Closed 6 years ago.
When I run some java program with a command java ExceptionTest , exceptions are sometimes omitted and looks like
Exception in thread "main" java.lang.NoClassDefFoundError: aa/bb/DD
at SOMEWHERE(unknown source)
Caused by: java.lang.ClassNotFoundException: aaa.bbb.CC
at SOMEWHER(unknown source)
... 13 more
I'd like to see 13 more exceptions in this case. Is there an option to see all exception log?
You already see them, it's only the ridiculous way Java (and Logback by defaul) prints exceptions by default. This stack trace:
Exception in thread "main" java.lang.NoClassDefFoundError: aa/bb/DD
at SOMEWHERE(unknown source)
Caused by: java.lang.ClassNotFoundException: aaa.bbb.CC
at SOMEWHER(unknown source)
... 13 more
actually means the following program flow (from bottom to top):
Caused by: java.lang.ClassNotFoundException: aaa.bbb.CC
at SOMEWHER(unknown source)
Exception in thread "main" java.lang.NoClassDefFoundError: aa/bb/DD
at SOMEWHERE(unknown source)
The ... 13 more (N common frames omitted in Logback) only means that these exceptions were already printed before. In Logback you can restructure stack track to avoid duplicates and print stack lines always in correct order, see my blog.
there aren't 13 more exceptions. There are 13 more lines to the call stack which are identical to previous call stacks, as described here: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Throwable.html#printStackTrace()
Deployment environment: Windows Server 2008, Tomcat 7.0.5, Oracle JRE 1.6. Development environment same plus Eclipse Helios.
When I try to deploy my Java application which uses OpenSAML 2.3.1 and test it live, it doesn't want to run. Looking through the source code and stack trace, it seems that DefaultBootstrap.bootstrap() ends up causing java.lang.IllegalArgumentException: InputStream cannot be null. I'm including the full stack trace below.
The software versions on the target deployment system are, or at least are supposed to be, exactly the same as on my development box, where everything runs just fine, but of course there I don't deploy using the .war. I am getting the distinct feeling that I'm missing some XML or DTD file in the deployment archive, but that feeling alone doesn't help me much in fixing it. Googling for parts of the stacktrace also didn't really help me much.
Where do I start tracking down the actual root cause of this error, so I can fix it?
2011-feb-10 10:56:08 org.apache.catalina.core.StandardWrapperValve invoke
ALLVARLIG: Servlet.service() for servlet [se.novasoftware.gabriel.SAMLParser] in context with path [/ServiceTier] threw exception [java.lang.IllegalArgumentException: InputStream cannot be null] with root cause
java.lang.IllegalArgumentException: InputStream cannot be null
at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:120)
at org.opensaml.xml.parse.BasicParserPool$DocumentBuilderProxy.parse(BasicParserPool.java:643)
at org.opensaml.xml.parse.BasicParserPool.parse(BasicParserPool.java:216)
at org.opensaml.xml.XMLConfigurator.load(XMLConfigurator.java:141)
at org.opensaml.DefaultBootstrap.initializeXMLTooling(DefaultBootstrap.java:148)
at org.opensaml.DefaultBootstrap.bootstrap(DefaultBootstrap.java:88)
at _mynamespace_.saml.ParsedResponse.<init>(ParsedResponse.java:56)
at _mynamespace_.saml.ParsedResponse.<init>(ParsedResponse.java:104)
at _mynamespace_.SAMLParser.doPost(SAMLParser.java:29) // servlet entry point
at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
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)
ParsedResponse.java line 56 is the bootstrap() call in its constructor:
private PersedResponse() throws ConfigurationException {
DefaultBootstrap.bootstrap(); // line 56
...
whereas line 104 in that same file is the constructor that gets called from the outside calling this private default constructor:
public ParsedResponse(final String samlXML)
throws UnmarshallingException, ConfigurationException {
this(); // line 104
...
Adding openws-1.3.0.jar to the deployment assembly did the trick.