One Star

java.lang.NoClassDefFoundError - sun.text.normalizer.NormalizerImpl

Hello,
Im deploying a Talend REST job in a Linux server to create a PDF from database fields using a 3rd-party Java library. Everything works perfectly when I test it on the Talend program, but when I try to deploy it in the container, I am getting the following error:
INFO   | jvm 1    | 2016/01/04 04:57:54 | java.lang.NoClassDefFoundError: Could not initialize class sun.text.normalizer.NormalizerImpl
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.text.RBTableBuilder.build(RBTableBuilder.java:107)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.text.RBCollationTables.<init>(RBCollationTables.java:83)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.text.RuleBasedCollator.<init>(RuleBasedCollator.java:300)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.text.Collator.getInstance(Collator.java:268)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p551.z6.m2(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p551.z6.m2(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p551.z6.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p551.z6.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p551.z6.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.ms.System.z133.m2(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p584.z8.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p584.z9.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p584.z9.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.ms.System.z90.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.ms.System.z90.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.ms.System.z63.parse(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at com.aspose.pdf.internal.p545.z6.m1(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at aspose.pdf.GraphInfo.<init>(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at aspose.pdf.Pdf.<init>(Unknown Source)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at globiq_demo.bkr_createidcreport_rest_job_0_6.BKR_CreateIDCReport_REST_job.tRESTRequest_1_LoopProcess(BKR_CreateIDCReport_REST_job.java:4832)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at globiq_demo.bkr_createidcreport_rest_job_0_6.BKR_CreateIDCReport_REST_job$RestServiceProviderImpl4TalendJob.processRequest(BKR_CreateIDCReport_REST_job.java:687)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at globiq_demo.bkr_createidcreport_rest_job_0_6.BKR_CreateIDCReport_REST_job$RestServiceProviderImpl4TalendJob.request(BKR_CreateIDCReport_REST_job.java:794)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.lang.reflect.Method.invoke(Method.java:606)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:188)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:104)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:204)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.jaxrs.JAXRSInvoker.invoke(JAXRSInvoker.java:101)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:94)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:241)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:248)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:222)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:153)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(CXFNonSpringServlet.java:171)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:286)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doGet(AbstractHTTPServlet.java:211)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:262)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:652)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:445)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(HttpServiceServletHandler.java:70)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(HttpServiceContext.java:124)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:81)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.Server.handle(Server.java:367)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:926)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:988)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:640)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:628)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
INFO   | jvm 1    | 2016/01/04 04:57:54 | at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2016/01/04 04:57:54 | Start

I have already loaded the appropriate Java library in a tLibraryLoad. Is there something that I have missed or mistakenly configured?
2 REPLIES
Employee

Re: java.lang.NoClassDefFoundError - sun.text.normalizer.NormalizerImpl

Hi jiúnmilsso,
there is not enough info here to really answer your question but a few things you might check:
1. as you use tRESTRequest you exported for 'OSGi for ESB' (either as kar file (for TOS4ESB) or via the Publish to the Aritfact Repo). If not, then do it this way before you continue.
2. the external library might require an extra tLibraryLoad component in your Job, if you do not have this one right now, pleasetry to add it and see if it solves your problem.
As said, just some starting points to look at but it might help. If not let us know. 
Dietmar 
One Star

Re: java.lang.NoClassDefFoundError - sun.text.normalizer.NormalizerImpl

Hi dlenzen,
1. Thanks for the initial help. I have already exported it as OSGi for ESB and is now in the container.
2. I think it is an internal library since the Java autocompelter shows it when I try to import it in the advanced settings of a Java component. (please see screenshot):

Hope these answers can help pinpoint the problem further.
Best regards,