Jump to content
We've recently updated our Privacy Statement, available here ×

fmcypriano

Members
  • Posts

    26
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Posts posted by fmcypriano

  1. I think it shouldn't be necessary, but I've to set manually a userdir in <iReport install folder>/etc/ireport.conf:

     

    default_options="-J-Xms256m -J-Xmx512m -J-Dfile.encoding=UTF-8 -J-Dorg.netbeans.ProxyClassLoader.level=1000 --userdir D:/Users/Felipe/.iReport/3.5.2"

     

    If it's mandatory should be documented, don't you think?

  2. Hello,

    I'm doing a report to test my new Hibernate connection and when I click Preview I get this, very strange, error:

    net.sf.jasperreports.engine.design.JRValidationException: Report design not valid :       1. java.lang.ClassNotFoundException: Will not load classes from default package (int)      2. java.lang.ClassNotFoundException: Will not load classes from default package (boolean)      3. java.lang.ClassNotFoundException: Will not load classes from default package (boolean)      4. java.lang.ClassNotFoundException: Will not load classes from default package (boolean)

     

    This errors refer to the following fields in mapping class:

    1.     @Id
          @GeneratedValue(strategy = GenerationType.SEQUENCE,
              generator = "SequencePedidoVenda")
          @Min(0)
          private int id;
    2.     @Transient
          private boolean itensWithErros;
    3.     @Column(name="LANCADO_ESTOQUE")
          @Type(type="SimNaoChar")
          private boolean lancadoEstoque;
    4.     @Column(name="LANCADO_ESTOQUE_PROGRAMADO")
          @Type(type="SimNaoChar")
          private boolean lancadoEstoqueProgramado;

    Why iReport is complaing about java.lang classes?

  3. Hello,

     

    I've just download iReport-nb-3.5.2-windows-installer.exe and installed it. When I click in Start Menu / Programs / iReport / iReport-nb-3.5.2 nothing happens, no error messages and no iReport at all.

    I already set the jdkhome in ireport.conf, but didn't work either.

    What can I do to see what's wrong?

    I'm using Windows Vista SP1 and JDK6_13

  4. For me works as well. Using a test persistence.xml the connection was tested successfully.

     

    But when I use the actual classes of my project things don't works as expected...

     

    I've some UserType defined in package level. When runing my project inside the container hibernate uses auto detection to search the package-info.java and all the entity classes. But, inside iReport auto detection doesn't work, then I specified all the classes with <class> but I get this error:

     

    Caused by: org.hibernate.MappingException: Could not etermine type for: SimNaoChar, at table: LOCALCOB, for columns: [org.hibernate.mapping.Column(MOSTRAR_SITE)]

     

    Means hibernate can't find the package-info.java and I can't find a way to "force" him.

     

    junejava, can you test if in production environment(only JasperReports) the report, using EJBQL connection, go ok?

  5. I update this files in iReport/lib, removing the old versions:

     

    antlr-2.7.6.jar

    commons-collections-2.1.1.jar

    commons-logging-1.0.4.jar

    dom4j-1.6.1.jar

    ehcache-1.2.3

    jta.jar

    log4j-1.2.11.jar

    xml-apis.jar

     

    Remove these files from Classpath and put them in iReport/lib:

     

    hibernate-annotations.jar

    hibernate-commons-annotations.jar

    hibernate-entitymanager.jar

    hibernate-validator.jar

    jboss-archive-browsing.jar

     

    javassist.jar (after an error NoClassDefFound for javaassist)

     

    Now when I test the connection I get an error telling me that the class or package of my project wasn't found. This is good, hibernate is running and not find classes that are in persistence.xml

     

    I'm still trying and will post here when I get news.

  6. I update the hibernate3.jar, asm.jar, asm-attr.jar and cglib-2.1.3.jar and like junejava change jpa.jar to ejb3-persistence.jar.

     

    I don't add files in lib that don't was there. I put this files in classpath:

     

    D:/Java/Jaybird-2.1.1JDK_1.5/jaybird-full-2.1.1.jar

    D:/Java/iReport classpath

    D:/Java/hibernate-entitymanager-3.3.1.GA/lib/hibernate-annotations.jar

    D:/Java/hibernate-entitymanager-3.3.1.GA/lib/hibernate-commons-annotations.jar

    D:/Java/hibernate-entitymanager-3.3.1.GA/hibernate-entitymanager.jar

    D:/Java/hibernate-entitymanager-3.3.1.GA/lib/hibernate-validator.jar

    D:/Java/hibernate-entitymanager-3.3.1.GA/lib/jboss-archive-browsing.jar

     

    Restart the iReport and try to test an EJBQL Connection, now I get this error:

     

    java.lang.IllegalAccessError: tried to access method org.hibernate.engine.CascadeStyle.<init>()V from class org.hibernate.engine.EJB3CascadeStyle$1
    at org.hibernate.engine.EJB3CascadeStyle$1.<init>(EJB3CascadeStyle.java:24)
    at org.hibernate.engine.EJB3CascadeStyle.<clinit>(EJB3CascadeStyle.java:19)
    at org.hibernate.ejb.event.EJB3PersistEventListener.<clinit>(EJB3PersistEventListener.java:19)
    at org.hibernate.ejb.EventListenerConfigurator.<init>(EventListenerConfigurator.java:80)
    at org.hibernate.ejb.Ejb3Configuration.<init>(Ejb3Configuration.java:132)
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:51)
    at it.businesslogic.ireport.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java:130)
    at it.businesslogic.ireport.connection.EJBQLConnection$1.run(EJBQLConnection.java:178)
    at java.awt.event.InvocationEvent.dispatch(Unknown Source)

     

    I don't know what is IllegalAccessError, so from Java Docs I get:

     

    Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to.

    Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.

     

    IMO we've to update more libraries..

     

    Thanks for helping.

    Post edited by: fmcypriano, at: 2008/02/20 10:33

  7. So, I'm still trying. Nobody is helping (hibernate forum and here) but...

     

    The hibernate3.jar in iReport/lib is out of date. I replace the file with my hibernate3.jar and now the missing method was found but the error changed to:

     

    java.lang.NoClassDefFoundError: org/hibernate/bytecode/cglib/BytecodeProviderImpl
    at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:690)
    at org.hibernate.cfg.Environment.buildBytecodeProvider(Environment.java:682)
    at org.hibernate.cfg.Environment.<clinit>(Environment.java:568)
    at org.hibernate.cfg.Configuration.reset(Configuration.java:174)
    at org.hibernate.cfg.AnnotationConfiguration.reset(AnnotationConfiguration.java:220)
    at org.hibernate.cfg.Configuration.<init>(Configuration.java:193)
    at org.hibernate.cfg.Configuration.<init>(Configuration.java:197)
    at org.hibernate.cfg.AnnotationConfiguration.<init>(AnnotationConfiguration.java:96)
    at org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:105)
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java:138)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection$1.run(EJBQLConnection.java:188)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

    Post edited by: fmcypriano, at: 2008/02/19 11:35

  8. I can't find a way to see iReport log. So I install the iReport for Netbeans to see if in IDE Log I could found the exception and it works, no solution yet but at least error messages.

     

    After I put the jars of hibernate entity manager in iReport Classpath and try to test an EJBQL connection I get this exception:

     

    java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.ejb.Ejb3Configuration
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java:138)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection$1.run(EJBQLConnection.java:188)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

     

     

    So even with the jars in classpath iReport can't find the class. Then I go to iReport Fontpath and select all the jars (listed bellow), saved fontpath and restart. Without no changes in iReport Classpath just in iReport Fontpath the exception now is:

     

    java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.setEntityNotFoundDelegate(Lorg/hibernate/proxy/EntityNotFoundDelegate;)V
    at org.hibernate.ejb.Ejb3Configuration.<init>(Ejb3Configuration.java:131)
    at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:119)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:83)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection.getEntityManager(EJBQLConnection.java:138)
    at com.jaspersoft.ireport.designer.connection.EJBQLConnection$1.run(EJBQLConnection.java:188)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

     

     

    I don't give up. I'm trying. If anyone has any ideas please post here.

     

     

    My iReport Classpath:

    D:JavaiReport classpath
    D:Javahibernate-3.2hibernate3.jar
    D:Javahibernate-entitymanager-3.3.1.GAlibejb3-persistence.jar
    D:Javahibernate-entitymanager-3.3.1.GAlibhibernate-annotations.jar
    D:Javahibernate-entitymanager-3.3.1.GAlibhibernate-commons-annotations.jar
    D:Javahibernate-entitymanager-3.3.1.GAhibernate-entitymanager.jar
  9. This is my persistence.xml:

     

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:«»xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:«»schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
    <persistence-unit name="VCModelPU" transaction-type="RESOURCE_LOCAL">
    <provider>org.hibernate.ejb.HibernatePersistence</provider>

    <class>visualcontrol.model.entity.CliFor</class>
    <class>visualcontrol.model.entity.Cliente</class>
    <class>visualcontrol.model.entity.CondicaoPagamento</class>
    <class>visualcontrol.model.entity.Cor</class>
    <class>visualcontrol.model.entity.DeclaracaoImportacao</class>
    <class>visualcontrol.model.entity.Estoque</class>
    <class>visualcontrol.model.entity.EstoqueProgramado</class>
    <class>visualcontrol.model.entity.EstoqueProjetado</class>
    <class>visualcontrol.model.entity.Familia</class>
    <class>visualcontrol.model.entity.Fornecedor</class>
    <class>visualcontrol.model.entity.Kardex</class>
    <class>visualcontrol.model.entity.LocalCobranca</class>
    <class>visualcontrol.model.entity.Loja</class>
    <class>visualcontrol.model.entity.Natureza</class>
    <class>visualcontrol.model.entity.PedidoCompra</class>
    <class>visualcontrol.model.entity.PedidoVenda</class>
    <class>visualcontrol.model.entity.PedidoVendaItem</class>
    <class>visualcontrol.model.entity.Produto</class>
    <class>visualcontrol.model.entity.Transportadora</class>
    <class>visualcontrol.model.entity.UF</class>
    <class>visualcontrol.model.entity.Usuario</class>
    <class>visualcontrol.model.entity.Vendedor</class>

    <properties>
    <property name="hibernate.connection.username" value="***"/>
    <property name="hibernate.connection.driver_class" value="org.firebirdsql.jdbc.FBDriver"/>
    <property name="hibernate.connection.password" value="***"/>
    <property name="hibernate.connection.url" value="jdbc:firebirdsql://localhost:3050/D:DataBaseERP_VCONTROL_LIEX.FDB"/>
    <property name="hibernate.cache.provider_class" value="org.hibernate.cache.NoCacheProvider"/>
    <property name="hibernate.dialect" value="org.hibernate.dialect.FirebirdDialect"/>
    </properties>
    </persistence-unit>
    </persistence>

    Post edited by: fmcypriano, at: 2008/02/15 11:47

  10. I've seem a few posts talking about EJBQL connections. None of them have answer. (IMO) This subject is complete ignored for (at-least) non-commercial users.

     

    So, lets try solve this problem.

     

    I create a directory called iReport classpath and inside put my META-INF/persistence.xml, configure the classpath of iReport to point to "iReport classpath", create one EJBQL connection and click on Test button and I get this error:

     

    "No Persistence provider for EntityManager named VCModelPU"

     

    So I figured out iReport can't find my provider which is Hibernate EntityManger. Then I put the jars of hibernate entity manager in iReport classpath:

     

    hibernate-entitymanager-3.3.1.GAlibejb3-persistence.jar
    hibernate-entitymanager-3.3.1.GAlibhibernate-annotations.jar
    hibernate-entitymanager-3.3.1.GAlibhibernate-commons-annotations.jar
    hibernate-entitymanager-3.3.1.GAlibhibernate-validator.jar
    hibernate-entitymanager-3.3.1.GAlibjboss-archive-browsing.jar
    hibernate-entitymanager-3.3.1.GAhibernate-entitymanager.jar

     

    After this I restart iReport and try to test again the EJBQL connection and don't get any messages, success nor error messages appears. Seems like the button is ignored.

     

    I'm trying to see the iReport log, but I don't find this. Anyone knows how can I activate a detailed log? I need to see the exceptions.

×
×
  • Create New...