Jump to content

tofa

Members
  • Posts

    6
  • Joined

  • Last visited

 Content Type 

Forum

Downloads

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Security Advisories

Events

Profiles

Posts posted by tofa

  1.  Hi

    Did you found the solution for this?

    I have added both the path to the sources and class files in classpath in iReport...
    But still get this error.

     

     

     

    Code:
      Compiling to file... C:\path\to\report\report.jasperCompilation running time: 1 028!   Filling report...  Locale: norsk (Norge)  Time zone: DefaultHibernate session openedError filling print... Unable to load class declared as <mapping class="no.package.model.Access"/> in the configuration:   org.hibernate.MappingException: Unable to load class declared as <mapping class="no.package.model.Access"/> in the configuration:      at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:650)      at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1589)      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1568)      at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1047)      at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)      at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1542)      at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:1035)      at org.hibernate.cfg.AnnotationConfiguration.doConfigure(AnnotationConfiguration.java:64)      at org.hibernate.cfg.Configuration.configure(Configuration.java:1462)      at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1017)      at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:64)      at org.hibernate.cfg.Configuration.configure(Configuration.java:1448)      at org.hibernate.cfg.AnnotationConfiguration.configure(AnnotationConfiguration.java:1011)      at com.jaspersoft.ireport.designer.connection.JRHibernateConnection.getSessionFactory(JRHibernateConnection.java:128)      at com.jaspersoft.ireport.designer.connection.JRHibernateConnection.createSession(JRHibernateConnection.java:121)      at com.jaspersoft.ireport.designer.compiler.IReportCompiler.run(IReportCompiler.java:928)      at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572)      at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997)  Caused by: java.lang.ClassNotFoundException: no.evote.model.Access      at java.net.URLClassLoader$1.run(Unknown Source)      at java.security.AccessController.doPrivileged(Native Method)      at java.net.URLClassLoader.findClass(Unknown Source)      at java.lang.ClassLoader.loadClass(Unknown Source)      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)      at java.lang.ClassLoader.loadClass(Unknown Source)      at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:252)      at java.lang.ClassLoader.loadClass(Unknown Source)      at java.lang.Class.forName0(Native Method)      at java.lang.Class.forName(Unknown Source)      at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)      at org.hibernate.cfg.AnnotationConfiguration.parseMappingElement(AnnotationConfiguration.java:647)      ... 17 more  Print not filled. Try to use an EmptyDataSource... 
  2.  ekappel: did you get it working?

    lucianc: I have:

     	<subDataset name="Votings">		<parameter name="voterPk" class="java.lang.Long"/>        <parameter name="HIBERNATE_SESSION" class="org.hibernate.Session"/>		<queryString>			<![CDATA[sELECT v.votingCategory.id as catID FROM Voting v WHERE v.voter.pk = $P{voterPk}]]>		</queryString>		<field name="catID" class="java.lang.String"/>	</subDataset>
    

    			<componentElement>				<reportElement x="0" y="25" width="395" height="41"/>				<c:list xmlns:c="http://jasperreports.sourceforge.net/jasperreports/components" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports/components http://jasperreports.sourceforge.net/xsd/components.xsd" printOrder="Vertical">					<datasetRun subDataset="Votings">						<datasetParameter name="voterPk">							<datasetParameterExpression><![CDATA[$F{voterPk}]]></datasetParameterExpression>						</datasetParameter>						<datasetParameter name="HIBERNATE_SESSION">							<datasetParameterExpression><![CDATA[$P{HIBERNATE_SESSION}]]></datasetParameterExpression>						</datasetParameter>					</datasetRun>					<c:listContents height="41" width="395">						<frame>							<reportElement x="0" y="0" width="393" height="31"/>							<textField>								<reportElement x="12" y="15" width="63" height="16"/>								<textElement textAlignment="Right"/>								<textFieldExpression class="java.lang.String"><![CDATA[$F{catID}]]></textFieldExpression>							</textField>						</frame>					</c:listContents>				</c:list>			</componentElement>

     Any ideas on what can be wrong?



    Post Edited by tofa at 06/16/2010 11:56
  3.  Hi

    I trying to generate at report with a ttf font, but also get the JRFontNotFoundException.

    I trying to use the DejaVu Sans font.

    I using Java EE 6 on Glassfish 3.0. iReport 3.7.1, JasperReport 3.7.1

     

    <font fontName="DejaVu Sans" isUnderline="false" isPdfEmbedded="true"/>

    I used Tools/Options/iReport/Fonts to import and "export as extension"

    I generate jasperreports-fonts-DejaVu Sans.jar and I put in WEB-INF\lib

     

    The jasperreports-fonts-DejaVu Sans.jar contains:

    - fonts
         - DejaVuSans.ttf
         - fonts1273221481231.xml
    - jasperreports_extension.properties

     

    fonts1273221481231.xml:

     <?xml version="1.0" encoding="UTF-8"?>

    <beans xmlns="http://www.springframework.org/schema/beans"

           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

           xsi:schemaLocation="http://www.springframework.org/schema/beans

               http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">

     

       <bean id="fontBean127322148123753178" class="net.sf.jasperreports.engine.fonts.SimpleFontFamily">

           <property name="name" value="DejaVu Sans"/>

           <property name="normal" value="fonts/DejaVuSans.ttf"/>

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

       </bean>

    </beans>

     
    jasperreports_extension.properties:
    net.sf.jasperreports.extension.registry.factory.fonts=net.sf.jasperreports.extensions.SpringExtensionsRegistryFactory
    net.sf.jasperreports.extension.fonts.spring.beans.resource=fonts/fonts1273221481231.xml
     
    What am I doing wrong and what have I missed?

     

×
×
  • Create New...