> However adding the fonts to the classpath might be a
> *workaround* for your specific problem, which is definitely

I examined my .bash_profile and I see that JAVA_HOME is defined:

export 
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home

I assume that this was created when the system downloaded and installed JVM. Is 
this the location that the fonts should live?

I tried exporting the needed fonts by selecting the two needed fonts and click 
the Export as Extension. I put everything in the JAVA_HOME directory. Both the 
.ttf and the .jar.

Still no joy. these are the error messages in the console:

Apr 05 00:36:32 ASBriefsD2W[53524] ERROR 
er.jasperreports.ERJRFetchSpecificationReportTask  - Error in JR task
JRFontNotFoundException: Font 'ASGotham-Thin' is not available to the JVM. See 
the Javadoc for more details.
  at 
net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358)
  at 
net.sf.jasperreports.engine.util.JRStyledText.getAwtAttributedString(JRStyledText.java:226)
  at 
net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:362)
  at 
net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:1129)
  at 
net.sf.jasperreports.engine.fill.JRFillStaticText.prepare(JRFillStaticText.java:183)
  at 
net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
  at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)
  at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:378)
  at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillTitle(JRVerticalFiller.java:327)
  at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:261)
  at 
net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:127)
  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942)
  at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:860)
  at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
  at 
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
  at 
net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:540)
  at 
net.sf.jasperreports.engine.JasperRunManager.runReportToPdfFile(JasperRunManager.java:351)
  at 
er.jasperreports.ERJRUtilities.runCompiledReportToPDFFile(ERJRUtilities.java:54)
  at 
er.jasperreports.ERJRFetchSpecificationReportTask._call(ERJRFetchSpecificationReportTask.java:130)
  at 
er.jasperreports.ERJRFetchSpecificationReportTask.call(ERJRFetchSpecificationReportTask.java:97)
  at 
er.jasperreports.ERJRFetchSpecificationReportTask.call(ERJRFetchSpecificationReportTask.java:33)
  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)
  ... skipped 1 stack elements
Apr 05 00:36:35 ASBriefsD2W[53524] ERROR 
er.coolcomponents.CCAjaxLongResponsePage  - Long Response Error:
{}
JRFontNotFoundException: Font 'ASGotham-Thin' is not available to the JVM. See 
the Javadoc for more details.
  at 
net.sf.jasperreports.engine.util.JRFontUtil.checkAwtFont(JRFontUtil.java:358)
  at 
net.sf.jasperreports.engine.util.JRStyledText.getAwtAttributedString(JRStyledText.java:226)
  at 
net.sf.jasperreports.engine.fill.TextMeasurer.measure(TextMeasurer.java:362)
  at 
net.sf.jasperreports.engine.fill.JRFillTextElement.chopTextElement(JRFillTextElement.java:1129)
  at 
net.sf.jasperreports.engine.fill.JRFillStaticText.prepare(JRFillStaticText.java:183)
  at 
net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:329)
  at net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:419)

The font in question lives in the following locations:

/Library/Fonts
~/Library/Fonts
JAVA_HOME

also in the Project Libraries in Eclipse.

What else can I try?

Ted


--- On Wed, 4/4/12, Kieran Kelleher <[email protected]> wrote:

> From: Kieran Kelleher <[email protected]>
> Subject: Re: JasperReports progress
> To: "Theodore Petrosky" <[email protected]>
> Cc: "WebObjects Development" <[email protected]>
> Date: Wednesday, April 4, 2012, 12:10 PM
> Hi Theodore,
> 
> It should work as your expect .... no idea why it isn't.
> However adding the fonts to the classpath might be a
> *workaround* for your specific problem, which is definitely
> weird. I use jdk 6 on OS X Lion 10.7.3 and it works fine
> just as it did in the past on OS X Snow Leopard and jdk5.
> 
> Regards, Kieran
> 
> On Apr 4, 2012, at 11:25 AM, Theodore Petrosky wrote:
> 
> > this is odd. I have the font (truetype) installed in
> /Library/Fonts it shows up in iReport and looks good on the
> screen. However, when I save and use the new .jasper file,
> only the core fonts work in the jasper report.
> > 
> > These are truetype fonts, shouldn't they work as is, or
> do I have to convert them into a .jar. I am re-reading the
> gotchas in the readme file.
> > 
> > Do you have any insight?
> > 
> > Ted
> > 
> > --- On Wed, 4/4/12, Kieran Kelleher <[email protected]>
> wrote:
> > 
> >> From: Kieran Kelleher <[email protected]>
> >> Subject: Re: JasperReports progress
> >> To: "Theodore Petrosky" <[email protected]>
> >> Cc: [email protected]
> >> Date: Wednesday, April 4, 2012, 10:47 AM
> >> If those are installed in the OS that
> >> is running the report, then they will be used.
> >> 
> >> You can bundle fonts with your project for cross
> platform
> >> deployment. For example I bundle jasper reports
> specific
> >> fonts from my Mac into apps that are deployed on
> Centos.
> >> 
> >> See the README.txt in ERJasperReports framewkrok
> for
> >> instructions on how to do that.
> >> 
> >> 
> >> On Apr 4, 2012, at 10:24 AM, Theodore Petrosky
> wrote:
> >> 
> >>> I found the jasper version (3.7.4) and
> downloaded the
> >> correct iReport version and voila. I get no errors
> and it
> >> creates the PDF. The only issue is that the report
> is not
> >> using the fonts I selected.
> >>> 
> >>> Is there something I must do to tell JR to use
> the
> >> fonts I selected?
> >>> 
> >>> Ted
> >>> 
> >>> --- On Wed, 4/4/12, Kieran Kelleher <[email protected]>
> >> wrote:
> >>> 
> >>>> From: Kieran Kelleher <[email protected]>
> >>>> Subject: Re: JasperReports progress
> >>>> To: "Theodore Petrosky" <[email protected]>
> >>>> Cc: [email protected]
> >>>> Date: Wednesday, April 4, 2012, 6:56 AM
> >>>> Seems to me like D2W integration of
> >>>> long response pages is your issue here and
> the
> >> d2wcontext is
> >>>> getting lost. CCAjaxLongResponsePage knows
> nothing
> >> about D2W
> >>>> for a start, neither the nextpage
> controllers being
> >> used
> >>>> there. The jasper task is a background
> Callable
> >> task that
> >>>> returns a File result. The Jasper example
> project
> >> is not a
> >>>> D2W project. So, at this stage I have to
> defer to
> >> the D2W
> >>>> experts on the list for advice on
> integrating a
> >> background
> >>>> task with a File (to be downloaded result)
> into a
> >> D2W
> >>>> scenario.
> >>>> 
> >>>> 
> >>>> The iReport MUST match the JasperReports
> version in
> >> this
> >>>> project. You have been warned.
> >>>> Look in Libraries directory of this project
> for the
> >> jar
> >>>> named something like
> jasperreports-X.X.X.jar.
> >>>> That file has the current version number.
> >>>> 
> >>>> Currently Wonder version is at 3.7.4. It
> will
> >> probably stay
> >>>> that way for a while. Jasper has many
> other
> >> dependencies and
> >>>> those dependencies are used across other
> Wonder
> >> projects
> >>>> .... iText for example. So it is not just a
> case of
> >> drop the
> >>>> latest jasper and all its dependencies
> into
> >> Libraries.
> >>>> 
> >>>> 
> >>>> On Apr 3, 2012, at 10:48 PM, Theodore
> Petrosky
> >> wrote:
> >>>> 
> >>>>> here's what we have.
> >>>>> 
> >>>>> in a stock D2W app there is a method
> in
> >> pageWrapper:
> >>>>> 
> >>>>> public String bodyClass() {
> >>>>>      String result =
> null;
> >>>>>      String pageConfig
> =
> >>>> 
> >>
> (String)d2wContext().valueForKey("pageConfiguration");
> >>>>>      if (pageConfig !=
> null
> >> &&
> >>>> pageConfig.length() > 0) {
> >>>>>         
> result =
> >>>> pageConfig + "Body";
> >>>>>      }
> >>>>>      return result;
> >>>>> }
> >>>>> 
> >>>>> Obviously it is setting the css class
> for the
> >> context.
> >>>> When I return from making the jasper report
> pdf,
> >> the
> >>>> d2wcontect is null and there is the NPE.
> >>>>> 
> >>>>> as a work around, I added to the method
> that
> >> checks the
> >>>> context:
> >>>>> 
> >>>>> if (d2wContext() != null) {
> >>>>>          
> >>>>> NSLog.out.appendln("*** pageWrapper 
> >>>> pageConfiguration  is not  null =
> 
> >> ***** ");
> >>>> 
> >>>>> 
> >>>>>      pageConfig =
> >>>> 
> >>
> (String)d2wContext().valueForKey("pageConfiguration");
> >>>>> }
> >>>>> 
> >>>>> I get a very ugly page. now I can
> figure out
> >> why the
> >>>> compiled jasper report is not using any of
> the
> >> fonts that I
> >>>> am specifying.
> >>>>> 
> >>>>> Are there any gotchas with the
> different
> >> versions of
> >>>> iReport and the version of Jasper Reports
> in
> >> wonder?
> >>>>> 
> >>>>> Ted
> >>>>> 
> >>>>> --- On Tue, 4/3/12, Kieran Kelleher
> <[email protected]>
> >>>> wrote:
> >>>>> 
> >>>>>> From: Kieran Kelleher <[email protected]>
> >>>>>> Subject: Re: JasperReports
> progress
> >>>>>> To: "Theodore Petrosky" <[email protected]>
> >>>>>> Cc: [email protected]
> >>>>>> Date: Tuesday, April 3, 2012, 6:34
> PM
> >>>>>> The NPE is at:
> >>>>>> 
> >>>>>> at
> >>>>>> 
> >>>> 
> >>
> com.as.application.ui.components.PageWrapper.bodyClass(PageWrapper.java:27)
> >>>>>> 
> >>>>>> that is your component ..... so why
> don't
> >> you look
> >>>> there to
> >>>>>> see what is causing the NPE?
> >>>>>> 
> >>>>>> On Apr 3, 2012, at 4:00 PM,
> Theodore
> >> Petrosky
> >>>> wrote:
> >>>>>> 
> >>>>>>> So I've made progress but am
> stumped. I
> >> created
> >>>> a
> >>>>>> customcomponent and used a rule to
> make one
> >> of the
> >>>>>> displayPropertyKeys a hyperlink.
> >>>>>>> 
> >>>>>>> I am basically using the
> >> JasperReportExample. I
> >>>> created
> >>>>>> a hyperlink as one of the property
> keys.
> >> this will
> >>>> fire off
> >>>>>> the method that starts the jasper
> reports
> >> process:
> >>>>>>> 
> >>>>>>> public WOActionResults
> printBrief()
> >>>> {   
> >>>>>>       
> >>>>>>>       
>    
> >>>>>>>       
>   
> >> Brief
> >>>> theBrief =
> >>>>>> (Brief)object();
> >>>>>>>       
>    
> >>>>>>>       
>   
> >>>>>> Callable<File> reportTask =
> >>>>>>
> Reports.createBriefReportTask(theBrief);
> >>>>>>>       
>    
> >>>>>>>       
>   
> >>>>>> CCAjaxLongResponsePage nextPage =
> >>>>>> 
> >> pageWithName(CCAjaxLongResponsePage.class);
> >>>>>>>       
>    
> >>>>>>>       
>    //
> >> Push
> >>>> the task
> >>>>>> into the long response page
> >>>>>>>       
>   
> >>>>>> nextPage.setTask(reportTask);
> >>>>>>>       
>    
> >>>>>>>       
>    //
> >>>> Controller for
> >>>>>> handling the Callable result in the
> long
> >> response
> >>>> page
> >>>>>>>       
>   
> >>>>>> FileTaskDownloadController
> >> nextPageController =
> >>>> new
> >>>>>> FileTaskDownloadController();
> >>>>>>>       
>    
> >>>>>>>       
>    //
> >>>> Hyperlink text
> >>>>>> on the "Your file is downloaded
> page" to
> >> get back
> >>>> here
> >>>>>>>       
>   
> >>>>>> 
> >> nextPageController.setReturnLinkText("Reports
> >>>> Menu");
> >>>>>>>       
>    
> >>>>>>>       
>    //
> >> The
> >>>> filename
> >>>>>> for the download
> >>>>>>>       
>   
> >>>>>> 
> >>>> 
> >>
> nextPageController.setDownloadFileNameForClient("BriefReport.pdf");
> >>>>>>>       
>    
> >>>>>>>       
>   
> >>>>>> 
> >>>> 
> >>
> nextPage.setNextPageForResultController(nextPageController);
> >>>>>>>       
>    
> >>>>>>>       
>   
> >>>>>> NSLog.out.appendln("*** nextPage =
> 
> >> ***** " +
> >>>>>> nextPage); 
> >>>>>>> 
> >>>>>>>       
>    
> >>>>>>>       
>   
> >> return
> >>>> nextPage;
> >>>>>>>   
>    }
> >>>>>>> 
> >>>>>>> Here is the Reports method:
> >>>>>>> 
> >>>>>>>   
>    public static
> >>>> Callable<File>
> >>>>>> createBriefReportTask(Brief b) {
> >>>>>>>       
>   
> >>>>>>       
>    
> >>>>>>>       
>   
> >> String
> >>>>>> reportDescription = "Printed
> Brief";
> >>>>>>>       
>    
> >>>>>>>       
>   
> >>>>>> HashMap<String, Object>
> parameters =
> >> new
> >>>>>> HashMap<String, Object>();
> >>>>>>>       
>   
> >>>>>>
> parameters.put("reportDescription",
> >>>> reportDescription);
> >>>>>>>       
>   
> >>>>>> parameters.put("userName", "User
> From
> >> session");
> >>>>>>>   
>    
> >>>>>>>   
>    
> >>>>     EOQualifier
> >>>>>> qualifier =
> >> ERXQ.equals(Brief.JOB_NUMBER_KEY,
> >>>>>> b.jobNumber());
> >>>>>>> 
> >>>>>>>       
>   
> >>>>>> ERXFetchSpecification<Brief>
> fs =
> >> new
> >>>>>> 
> >>>> 
> >>
> ERXFetchSpecification<Brief>(Brief.ENTITY_NAME,
> >>>>>> qualifier, null);
> >>>>>>> 
> >>>>>>>       
>   
> >>>>>> ERJRFetchSpecificationReportTask
> reportTask
> >> = new
> >>>>>>
> ERJRFetchSpecificationReportTask(fs,
> >>>>>> jasperCompiledReportFileName,
> parameters);
> >>>>>>>       
>    
> >>>>>>>       
>   
> >> return
> >>>>>> reportTask;
> >>>>>>> 
> >>>>>>>   
>    }
> >>>>>>> 
> >>>>>>> indeed it goes out and starts
> to create
> >> the
> >>>> pdf. I see
> >>>>>> the the pdf in
> >>>>>> 
> >>>> 
> >>
> /var/folders/2d/23408oihsdvh08r23/T/Brief3234987239872398472.pdf
> >>>>>>> 
> >>>>>>> However, just when
> >> DownloadIsComplete's
> >>>>>> appendToResponse method is called I
> get
> >> errors:
> >>>>>>> 
> >>>>>>> 
> >>>>>>> Apr 03 15:33:34
> ASBriefsD2W[57285] WARN
> >> 
> >>>>>> NSLog  -
> >>>>>> 
> >>>> 
> >>
> <com.webobjects.appserver._private.WOComponentRequestHandler>:
> >>>>>> Exception occurred while handling
> request:
> >>>>>>> java.lang.NullPointerException
> >>>>>>> [2012-4-3 15:33:34 EDT]
> >> <WorkerThread0>
> >>>>>> java.lang.NullPointerException
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.as.application.ui.components.PageWrapper.bodyClass(PageWrapper.java:27)
> >>>>>>>   
>    at
> >>>>>> 
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>>> Method)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >>>>>>>   
>    at
> >>>>>> 
> >> java.lang.reflect.Method.invoke(Method.java:597)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKeyValueCoding.java:636)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKeyValueCoding.java:1134)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey(NSKeyValueCoding.java:1324)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver.WOComponent.valueForKey(WOComponent.java:1736)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:447)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver.WOComponent.valueForKeyPath(WOComponent.java:1804)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver._private.WOKeyValueAssociation.valueInComponent(WOKeyValueAssociation.java:50)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver._private.WOHTMLDynamicElement.stringValueInContext(WOHTMLDynamicElement.java:537)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver._private.WOHTMLDynamicElement.classInContext(WOHTMLDynamicElement.java:542)
> >>>>>>>   
>    at
> >>>>>> 
> >>>> 
> >>
> com.webobjects.appserver._private.WOHTMLDynamicElement._appendClassAndIdToResponse(WOHTMLDynamicElement.java:518)
> >>>>>>> 
> >>>>>>> I can provide more but I have
> to start
> >>>> somewhere. 
> >>>>>>> 
> >>>>>>> I don't know  what else to
> says
> >> other
> >>>> than
> >>>>>> 'HELP'!!! i'm drowning.
> >>>>>>> 
> >>>>>>> Ted
> >>>>>>> 
> >>>>>>> 
> >>>>>>> 
> >>>>
> _______________________________________________
> >>>>>>> Do not post admin requests to
> the list.
> >> They
> >>>> will be
> >>>>>> ignored.
> >>>>>>> Webobjects-dev mailing list 
> >>    
> >>>> ([email protected])
> >>>>>>> Help/Unsubscribe/Update your
> >> Subscription:
> >>>>>>> https://lists.apple.com/mailman/options/webobjects-dev/kelleherk%40gmail.com
> >>>>>>> 
> >>>>>>> This email sent to [email protected]
> >>>>>> 
> >>>>>> 
> >>>> 
> >>>> 
> >> 
> >> 
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to