Skip to Content
author's profile photo Former Member
Former Member

Problems with custom taglib (PD4ML)

I'm tying to convert html to pdf with PD4ML taglb in a

portal. But I get a NullpointerException when I try to

use the taglib.

I'm running 6.20 SP2

Configuration as follows:

PORTAL-INF/Pagelet/

convert.jsp (see below)

PORTAL-INF/lib

pd4ml_demo.jar (included in the .classpath)

pd4ml_tl_demo.jar

PORTAL-INF/taglib/

pd4ml.tld

In the portalapp.xml

-


<application>

<application-config>

<property name="SharingReference" value="knowledgemanagement,htmlb,com.sap.km.bs.ui.wdf,com.sap.km.cm.ui.flex,com.sap.portal.usermanagement,com.sap.portal.useragent,com.sap.portal.pagebuilder,org.zefer.pd4ml"/>

<property name="ServicesReference" value="com.sap.netweaver.coll.appl.room"/>

<property name="releasable" value="false"/>

<property name="startup" value="true"/>

<property name="ClassLoadingPolicy" value="CoreAccessInAPI,transitive"/>

<property name="DeploymentPolicy" value="5.0"/>

<property name="SharingReference" value="knowledgemanagement, landscape, htmlb, exportalJCOclient, exportal,pd4ml"/>

</application-config>

<component name="pd4ml">

<component-config>

<property name="ComponentType" value="jspnative"/>

<property name="JSP" value="pagelet/convert.jsp"/>

<property name="SecurityZone" value="com.tetrapak.neworbis.dist.PORTAL-INF/low_safety"/>

</component-config>

<component-profile>

<property name="pd4ml" value="../taglib/pd4ml.tld"/>

</component-profile>

</component>

-


convert.jsp

-


<%@ taglib uri="../taglib/pd4ml.tld" prefix="pd4ml"%><%@page

contentType="text/html; charset=ISO8859_1"%><pd4ml:transform

screenWidth="400"

pageFormat="A5"

pageOrientation="landscape"

pageInsets="100,100,100,100,points"

enableImageSplit="false">

<html>

<head>

<title>pd4ml test</title>

<style type="text/css">

body

</style>

</head>

<body>

<img src="images/logos.gif" width="125" height="74">

<p>

Hello, World!

<pd4ml:page_break/>

<table width="100%" style="background-color: #f4f4f4; color: #000000">

<tr>

<td>

Hello, New Page!

</td>

</tr>

</table>

</body>

</html>

</pd4ml:transform>

-


Exception from system log (pd4ml in debug mode)

-


Exception ID:01:04_13/06/05_0003

com.sapportals.portal.prt.component.PortalComponentException: Error in service call of Portal Component

Component : com.tetrapak.neworbis.pd4ml

Component class : pagelet._sapportalsjsp_convert

User : SELOFBERGM

at com.sapportals.portal.prt.core.PortalRequestManager.handlePortalComponentException(PortalRequestManager.java:853)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:311)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:217)

at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:580)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:670)

at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:229)

at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:555)

at java.security.AccessController.doPrivileged(Native Method)

at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)

at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:833)

at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:672)

at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:314)

at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)

at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)

at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)

at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)

at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)

at java.security.AccessController.doPrivileged(Native Method)

at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

Caused by: com.sapportals.portal.prt.component.PortalComponentException: Original exception:

at pagelet._sapportalsjsp_convert.doContent(_sapportalsjsp_convert.java:105)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:217)

at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:580)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:670)

at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:229)

at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:555)

at java.security.AccessController.doPrivileged(Native Method)

at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)

at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:833)

at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:672)

at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:314)

at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)

at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)

at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)

at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)

at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)

at java.security.AccessController.doPrivileged(Native Method)

at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

Caused by: java.lang.NullPointerException

at org.zefer.pd4ml.taglib.PD4MLTransformerTag.doStartTag(PD4MLTransformerTag.java:87)

at pagelet._sapportalsjsp_convert.doContent(_sapportalsjsp_convert.java:47)

at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)

at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:217)

at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:580)

at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:301)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:138)

at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:191)

at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:670)

at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:229)

at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:555)

at java.security.AccessController.doPrivileged(Native Method)

at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:415)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.InvokerServlet.service(InvokerServlet.java:126)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.inqmy.services.servlets_jsp.server.RunServlet.runSerlvet(RunServlet.java:149)

at com.inqmy.services.servlets_jsp.server.ServletsAndJspImpl.startServlet(ServletsAndJspImpl.java:833)

at com.inqmy.services.httpserver.server.RequestAnalizer.checkFilename(RequestAnalizer.java:672)

at com.inqmy.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:314)

at com.inqmy.services.httpserver.server.Response.handle(Response.java:173)

at com.inqmy.services.httpserver.server.HttpServerFrame.request(HttpServerFrame.java:1288)

at com.inqmy.core.service.context.container.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:36)

at com.inqmy.core.cluster.impl5.ParserRunner.run(ParserRunner.java:55)

at com.inqmy.core.thread.impl0.ActionObject.run(ActionObject.java:46)

at java.security.AccessController.doPrivileged(Native Method)

at com.inqmy.core.thread.impl0.SingleThread.run(SingleThread.java:148)

com.sapportals.portal.prt.connection.ContentExceptionHandler@3aa4a4 #

-


Any ideas or suggestions to solve this problem would be much appreciated.

Tanks

M.Lofberg

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jun 13, 2005 at 01:59 PM

    Hi Mikael,

    even if the taglib reference is maybe somewhat strange, it seems to work so far. The problem will be within this tag, I suppose:

    <pd4ml:transform
      screenWidth="400"
      pageFormat="A5"
      pageOrientation="landscape"
      pageInsets="100,100,100,100,points"
      enableImageSplit="false">

    ==>

    java.lang.NullPointerException
    at org.zefer.pd4ml.taglib.PD4MLTransformerTag.doStartTag(PD4MLTransformerTag.java:87)

    I would suggest to have a look into this implementation to get idea what's missing.

    Hope it helps

    Detlev

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Detlev Beutner

      Detlev, in my case "for whatever reason" just means that I don't know it and likely never get to know. (And as you said, I don't have to know.)

      I'm almost as far away from development as you are. Believe me, I often encounter issues where I just want to grab the person(s) in charge and shake'em.

      Seems like I'm your wailing wall right now 😉

      Unfortunately, you won't meet the persons in charge here.

      > But people

      > closing an OSS message, which reports a violation of

      > the JSP specification should!

      In my opinion the portal jsp compiler is not standard and isn't supposed to be. Even basic requirements are not met by the portal jsp compiler who simply translates the jsp into an AbstractPortalComponent.

      But who knows, maybe the bad bad jsp compiler will stop its poor non-standard existence soon? Uuuh, it wasn't me who told this...

      Regards, Karsten

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.