jboss-5.1.0.GA & postgres

Help
giluka
2013-06-07
2013-06-17
  • giluka
    giluka
    2013-06-07

    Hi all!
    Please help me ... i've jboss (version: 5.1.0.GA) and postgresql.
    When i deploy my OX app i've this error:

    2013-06-07 11:42:10,926 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) DWR Version 2.0.5 starting.
    2013-06-07 11:42:10,926 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Servlet Engine: JBoss Web/2.1.3.GA
    2013-06-07 11:42:10,927 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Version:   1.6.0_37
    2013-06-07 11:42:10,927 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Vendor:    Sun Microsystems Inc.
    2013-06-07 11:42:11,077 INFO  [org.directwebremoting.dwrp.DefaultConverterManager] (HDScanner) Probably not an issue: org.jdom.Document is not available so the jdom converter will not load. This is only an problem if you wanted to use it.
    2013-06-07 11:42:11,083 INFO  [org.directwebremoting.dwrp.DefaultConverterManager] (HDScanner) Probably not an issue: org.jdom.Element is not available so the jdom converter will not load. This is only an problem if you wanted to use it.
    2013-06-07 11:42:12,374 WARN  [org.jboss.system.server.profileservice.hotdeploy.HDScanner] (HDScanner) Failed to process changes
    org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
    
    **DEPLOYMENTS MISSING DEPENDENCIES:
      Deployment "persistence.unit:unitName=#default" is missing the following dependencies:
        Dependency "jboss.jca:name=comp/env/jdbc/KPIDS,service=DataSourceBinding" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jca:name=comp/env/jdbc/KPIDS,service=DataSourceBinding' **")
    **
    DEPLOYMENTS IN ERROR:
      Deployment "jboss.jca:name=comp/env/jdbc/KPIDS,service=DataSourceBinding" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name=comp/env/jdbc/KPIDS,service=DataSourceBinding' **
    
        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:993)
        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:939)
        at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:873)
        at ...
    

    My jdb resource is: jdbc/KPIDS

     
    Last edit: giluka 2013-06-07
  • giluka
    giluka
    2013-06-07

    My persistence.xml:

    <persistence 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"
                 version="1.0">
    
        <!-- Jboss+ Postgres -->
        <persistence-unit name="default" transaction-type=RESOURCE_LOCAL>
            <provider>org.hibernate.ejb.HibernatePersistence</provider>
            <!-- non-jta-data-source>java:comp/env/jdbc/KPIDS</non-jta-data-source-->
            <non-jta-data-source>java:/KPIDS</non-jta-data-source>
    
            <class>it.mypackage.Hello</class>
            ...
            <properties>
                <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
                <property name="hibernate.show_sql" value="true" />
                <property name="hibernate.default_schema" value="jaguar"/>
            </properties>
        </persistence-unit>    
    
    </persistence>
    

    I've insert also a classloading configuration to isolate my war into jboss-web.xml:

    <jboss-web>
       <class-loading> 
          <loader-repository>it:archive=MYWAR.war</loader-repository> 
       </class-loading>
    </jboss-web>
    

    Please help me !!

     
    Last edit: giluka 2013-06-07
  • Javier Paniza
    Javier Paniza
    2013-06-10

    Hi Giluka,

    hava a look at this thread.


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

     
    • giluka
      giluka
      2013-06-10

      hi javier,
      i've resolved (partially) with this file (/WEB-INF/jboss-classloading.xml) in MYAPP:

      <?xml version="1.0" encoding="UTF-8"?>
      <classloading xmlns="urn:jboss:classloading:1.0"
                  name="MYAPP.war"
                  domain="localhost"          
                  export-all="NON_EMPTY"
                  import-all="true">
      </classloading>
      

      With this method it seems resolved classpath problems.
      Thanks for your support !!

      But now i've another problem ...
      in .properties files present into my properties folder there are:

      • jndi.properties
      • jndi-jboss.properties
      • jndi-websphere.properties

      i think i'd to remove all of them and leave only a version (jndi.properties) with right content of my application server used.
      I've Jboss, so my jndi.properties lokks like:

      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
      java.naming.provider.url=jnp://localhost:1099
      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
      

      It is right ?

      What happens to me is that in my environment portlets does not end install phase ..

      2013-06-10 16:15:38,808 INFO  [org.jboss.jpa.deployment.PersistenceUnitDeployment] (HDScanner) Starting persistence unit persistence.unit:unitName=#default
      2013-06-10 16:15:38,809 INFO  [org.hibernate.ejb.Ejb3Configuration] (HDScanner) Processing PersistenceUnitInfo [
              name: default
              ...]
      2013-06-10 16:15:38,831 WARN  [org.hibernate.ejb.Ejb3Configuration] (HDScanner) Persistence provider caller does not implement the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
      2013-06-10 16:15:38,843 INFO  [org.hibernate.cfg.AnnotationBinder] (HDScanner) Binding entity from annotated class: it.jlr.kpi.model.KPIJaguar
      2013-06-10 16:15:38,843 INFO  [org.hibernate.cfg.annotations.EntityBinder] (HDScanner) Bind entity it.jlr.kpi.model.KPIJaguar on table kpi
      ...
      2013-06-10 16:15:38,887 INFO  [org.hibernate.cfg.search.HibernateSearchEventListenerRegister] (HDScanner) Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
      2013-06-10 16:15:38,898 INFO  [org.hibernate.connection.ConnectionProviderFactory] (HDScanner) Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
      2013-06-10 16:15:38,899 INFO  [org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider] (HDScanner) Using provided datasource
      2013-06-10 16:15:38,899 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) RDBMS: PostgreSQL, version: 9.1.6
      2013-06-10 16:15:38,899 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 9.1 JDBC4 (build 901)
      2013-06-10 16:15:38,899 INFO  [org.hibernate.dialect.Dialect] (HDScanner) Using dialect: org.hibernate.dialect.PostgreSQLDialect
      2013-06-10 16:15:38,899 INFO  [org.hibernate.transaction.TransactionFactoryFactory] (HDScanner) Transaction strategy: org.hibernate.transaction.JDBCTransactionFactory
      2013-06-10 16:15:38,899 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] (HDScanner) instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
      2013-06-10 16:15:38,900 INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] (HDScanner) instantiated TransactionManagerLookup
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Automatic flush during beforeCompletion(): disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Automatic session close at end of transaction: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) JDBC batch size: 15
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) JDBC batch updates for versioned data: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Scrollable result sets: enabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) JDBC3 getGeneratedKeys(): enabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Connection release mode: auto
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Default schema: jaguar
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Default batch fetch size: 1
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Generate SQL with comments: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Order SQL updates by primary key: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Order SQL inserts for batching: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
      2013-06-10 16:15:38,900 INFO  [org.hibernate.hql.ast.ASTQueryTranslatorFactory] (HDScanner) Using ASTQueryTranslatorFactory
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Query language substitutions: {}
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) JPA-QL strict compliance: enabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Second-level cache: enabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Query cache: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge] (HDScanner) Cache provider: org.hibernate.cache.HashtableCacheProvider
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Optimize cache for minimal puts: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Cache region prefix: persistence.unit:unitName=#default
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Structured second-level cache entries: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Echoing all SQL to stdout
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Statistics: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Deleted entity synthetic identifier rollback: disabled
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Default entity-mode: pojo
      2013-06-10 16:15:38,900 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Named query checking : enabled
      2013-06-10 16:15:38,910 INFO  [org.hibernate.impl.SessionFactoryImpl] (HDScanner) building session factory
      2013-06-10 16:15:38,952 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) Factory name: persistence.unit:unitName=#default
      2013-06-10 16:15:38,952 INFO  [org.hibernate.util.NamingHelper] (HDScanner) JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2013-06-10 16:15:38,960 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) Bound factory to JNDI name: persistence.unit:unitName=#default
      2013-06-10 16:15:38,960 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) InitialContext did not implement EventContext
      2013-06-10 16:15:38,960 INFO  [org.hibernate.util.NamingHelper] (HDScanner) JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
      2013-06-10 16:15:38,961 WARN  [org.hibernate.impl.SessionFactoryImpl] (HDScanner) JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
      2013-06-10 16:15:39,930 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/KPI
      2013-06-10 16:15:40,355 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) DWR Version 2.0.5 starting.
      2013-06-10 16:15:40,355 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Servlet Engine: JBoss Web/2.1.3.GA
      2013-06-10 16:15:40,355 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Version:   1.6.0_37
      2013-06-10 16:15:40,355 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Vendor:    Sun Microsystems Inc.
      2013-06-10 16:15:40,584 INFO  [org.directwebremoting.dwrp.DefaultConverterManager] (HDScanner) Probably not an issue: org.jdom.Document is not available so the jdom converter will not load. This is only an problem if you wanted to use it.
      2013-06-10 16:15:40,584 INFO  [org.directwebremoting.dwrp.DefaultConverterManager] (HDScanner) Probably not an issue: org.jdom.Element is not available so the jdom converter will not load. This is only an problem if you wanted to use it.
      2
      

      it ends here !!

       
  • Javier Paniza
    Javier Paniza
    2013-06-12

    Hi Giluka,

    i've resolved (partially) with this file (/WEB-INF/jboss-classloading.xml) in MYAPP:

    Thanks for putting here the solution. It would nice to have a section in OpenXava wiki about JBoss configuration. We only need a volunteer willing to write it down.

    About the jndi files, try to remove all them. They are an inheritance when OpenXava was a Swing/EJB framework. But, if you're looking for something that is in your own JVM a new InitialContext() should work fine with no extra configuration.


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

     
  • giluka
    giluka
    2013-06-12

    Hi Javier,
    grrrrrrr nothing to do !!
    I've removed all jndi files but nothing ...
    Same errors...

    2013-06-12 18:14:21,475 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Statistics: disabled
    2013-06-12 18:14:21,475 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Deleted entity synthetic identifier rollback: disabled
    2013-06-12 18:14:21,475 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Default entity-mode: pojo
    2013-06-12 18:14:21,475 INFO  [org.hibernate.cfg.SettingsFactory] (HDScanner) Named query checking : enabled
    2013-06-12 18:14:21,507 INFO  [org.hibernate.impl.SessionFactoryImpl] (HDScanner) building session factory
    2013-06-12 18:14:25,775 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) Factory name: persistence.unit:unitName=#default
    2013-06-12 18:14:25,775 INFO  [org.hibernate.util.NamingHelper] (HDScanner) JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
    2013-06-12 18:14:26,886 INFO  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) Bound factory to JNDI name: persistence.unit:unitName=#default
    2013-06-12 18:14:26,886 WARN  [org.hibernate.impl.SessionFactoryObjectFactory] (HDScanner) InitialContext did not implement EventContext
    2013-06-12 18:14:26,886 INFO  [org.hibernate.util.NamingHelper] (HDScanner) JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
    2013-06-12 18:14:26,886 WARN  [org.hibernate.impl.SessionFactoryImpl] (HDScanner) JTASessionContext being used with JDBCTransactionFactory; auto-flush will not operate correctly with getCurrentSession()
    2013-06-12 18:14:37,182 INFO  [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/KPI
    2013-06-12 18:14:42,100 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) DWR Version 2.0.5 starting.
    2013-06-12 18:14:42,101 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Servlet Engine: JBoss Web/2.1.3.GA
    2013-06-12 18:14:42,101 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Version:   1.6.0_37
    2013-06-12 18:14:42,101 INFO  [org.directwebremoting.impl.StartupUtil] (HDScanner) - Java Vendor:    Sun Microsystems Inc.
    2013-06-12 18:15:47,520 INFO  [org.jasig.cas.services.DefaultServicesManagerImpl] (scheduler_Worker-3) Reloading registered services.
    2013-06-12 18:15:47,521 INFO  [org.jasig.cas.services.DefaultServicesManagerImpl] (scheduler_Worker-3) Loaded 4 services.
    

    Focus to resolve is into row with WARN i think ...
    InitialContext did not implement EventContext

    Please someone help me !!

     
  • Javier Paniza
    Javier Paniza
    2013-06-14

    Hi Giluka,

    but I don't see any trace from the OpenXava application. Indeed it seems that the application has started.
    When does it fail exactly?
    What happens when you try to execute your OpenXava application?


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.

     
  • giluka
    giluka
    2013-06-14

    Problem is that portlet version of my OX application is not available:
    +first of all i don't see log description like "...portlet install ok";
    +when i try to add portlet in Liferay with menu "Add->More..." i don't see nothing in list that is showned.
    :(

     
  • Javier Paniza
    Javier Paniza
    2013-06-17

    Hi Giluka,

    Problem is that portlet version of my OX application is not available

    So, the problem is not related with JPA version or classloader ordering, because this problems arose when you start to use the application, not in deploying time.

    Which ant target are you using for generating the war?
    What file structure has the generated war?
    What is the content of the portlet.xml file in your war?

    Anyways, if your're going to work with JBoss, my advice is to test your application in that JBoss as a regular application (outside Liferay) and when it works fine (so you have cleared all the JPA/Classloading problems) then deploy it as a portlet application.


    Help others in this forum as I help you.
    Need more help? Get OpenXava professional support.