List Info

Thread: some problems with EAR deployment




some problems with EAR deployment
user name
2007-07-18 15:45:24
Hi,
I try to deploy simple (enterprise) application to test how
work
deployment processing in the last build M6 (EasyBeans).
I created  EAR file (ProjecT-EAR), that contains one JAR
file with two
entity classes and one persistence.xml file.
For persistence framework I choice TopLink.
In the persistence.xml file, I define two persistence-units
for every my
entity classes. 
I put TopLink implementation in Tomcate's lib folder too. 
When I deploy my EAR file, I see following exception: 
------------------------------------------------------------
------------------------------------------------------------
---------------------------------
07-7-18 12:01:10 (I) AbsWebContainerDeployer.deployEAR :
Deploying
EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBtemp
EasyBeans-Deployer-gdimitrovEARProjecT-EAR.
ear]
07-7-18 12:01:11 (I)
JPersistenceUnitInfoHelper.loadDefaultValues :
Default persistence provider set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 12:01:11 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No default configuration for the persistence provider
                       
oracle.toplink.essentials.PersistenceProvider

07-7-18 12:01:11 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No default configuration for the persistence provider
                       
oracle.toplink.essentials.PersistenceProvider

07-7-18 12:01:11 (S) DirectoryDeployerMonitor.init : Cannot
scan for new
archives
org.objectweb.easybeans.server.EmbeddedException:
RuntimeException when
deploying the deployable
'EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBeasy
beans-deploy
ProjecT-EAR.ear]'
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.dete
ctNewArchives(DirectoryDeployerMonitor.java:257)
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.init
(DirectoryDeployerMonitor.java:136)
        at
       
org.objectweb.easybeans.server.Embedded.start(Embedded.java:
296)
        at
       
org.objectweb.easybeans.server.war.EasyBeansContextListener.
contextInitialized(EasyBeansContextListener.java:168)
        at
       
org.apache.catalina.core.StandardContext.listenerStart(Stand
ardContext.java:3827)
        at
       
org.apache.catalina.core.StandardContext.start(StandardConte
xt.java:4334)
        at
       
org.apache.catalina.core.ContainerBase.addChildInternal(Cont
ainerBase.java:791)
        at
       
org.apache.catalina.core.ContainerBase.addChild(ContainerBas
e.java:771)
        at
       
org.apache.catalina.core.StandardHost.addChild(StandardHost.
java:525)
        at
       
org.apache.catalina.startup.HostConfig.deployDescriptor(Host
Config.java:626)
        at
       
org.apache.catalina.startup.HostConfig.deployDescriptors(Hos
tConfig.java:553)
        at
       
org.apache.catalina.startup.HostConfig.deployApps(HostConfig
.java:488)
        at
       
org.apache.catalina.startup.HostConfig.start(HostConfig.java
:1138)
        at
       
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostCo
nfig.java:311)
        at
       
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:117)
        at
       
org.apache.catalina.core.ContainerBase.start(ContainerBase.j
ava:1053)
        at
       
org.apache.catalina.core.StandardHost.start(StandardHost.jav
a:719)
        at
       
org.apache.catalina.core.ContainerBase.start(ContainerBase.j
ava:1045)
        at
       
org.apache.catalina.core.StandardEngine.start(StandardEngine
.java:443)
        at
       
org.apache.catalina.core.StandardService.start(StandardServi
ce.java:516)
        at
       
org.apache.catalina.core.StandardServer.start(StandardServer
.java:710)
        at
org.apache.catalina.startup.Catalina.start(Catalina.java:566
)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
       
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:39)
        at
       
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
thodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
       
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2
88)
        at
       
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:41
3)
Caused by: java.lang.IllegalStateException: Failure when
analyzing the
persistence.xml file
        at
       
org.objectweb.easybeans.deployer.AbsWebContainerDeployer.dep
loyEAR(AbsWebContainerDeployer.java:158)
        at
       
org.objectweb.easybeans.deployer.TomcatDeployer.deploy(Tomca
tDeployer.java:195)
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.dete
ctNewArchives(DirectoryDeployerMonitor.java:249)
        ... 27 more
Caused by:
org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAn
alyzerException:
Cannot load the persistence provider class '
                       
oracle.toplink.essentials.PersistenceProvider
                '.
        at
       
org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAn
alyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.
java:119)
        at
       
org.objectweb.easybeans.deployer.AbsWebContainerDeployer.dep
loyEAR(AbsWebContainerDeployer.java:155)
        

this is my persistence.xml file :
------------------------------------------------------------
--------------------------------------------------
	<persistence-unit name="ProjecTDB_Oracle_PU"
transaction-type="JTA">
		<provider>oracle.toplink.essentials.PersistenceProvi
der</provider>

		<jta-data-source>ProjecTDBOracleJndi</jta-data-so
urce>
		<class>bg......entities.ProjecT.RBEntity</class&g
t;
		<exclude-unlisted-classes>true</exclude-unlisted-
classes>
	<properties>			
			<property name="toplink.cache.type.default"
value="NONE" />
		</properties>
	</persistence-unit>
	<persistence-unit name="ProjecTDB_MySQL_PU"
transaction-type="JTA">
		<provider>oracle.toplink.essentials.PersistenceProvi
der</provider>	

		<jta-data-source>ProjecTDBMySQLJndi</jta-data-sou
rce>
		<class>
			bg......entities.ProjectT2.TUEntity
		</class>
		<exclude-unlisted-classes>true</exclude-unlisted-
classes>
		<properties>
			<property name="toplink.cache.type.default"
value="NONE" />
		</properties>
	</persistence-unit>
	

After that I decide to use default persistence
implementation –
Hibernate .
In the same EAR I comment provider tag in persistence.xml
file and I
deploy again EAR file.
Now I see different exception: 
------------------------------------------------------------
------------------------------------------------------------
--------------------------------

07-7-18 14:23:29 (I) AbsWebContainerDeployer.deployEAR :
Deploying
EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBtemp
EasyBeans-Deployer-gdimitrovEARProjecT-EA
ear]
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.loadDefaultValues :
Default persistence provider set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No persistence provider was set, set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Found a default configuration for the persistence provider
org.hibernate.ejb.HibernatePersistence
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property
hibernate.transaction.manager_lookup_class with
value org.hibernate.transaction.JOTM
ansactionManagerLookup
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.cache.provider_class with
value
org.hibernate.cache.HashtableCacheProvider
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No persistence provider was set, set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Found a default configuration for the persistence provider
org.hibernate.ejb.HibernatePersistence
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property
hibernate.transaction.manager_lookup_class with
value org.hibernate.transaction.JOTM
ansactionManagerLookup
07-7-18 14:23:29 (I)
JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.cache.provider_class with
value
org.hibernate.cache.HashtableCacheProvider
07-7-18 14:23:30 (I) Version.<clinit> : Hibernate
Annotations 3.3.0.GA
07-7-18 14:23:30 (I) Environment.<clinit> : Hibernate
3.2.2
07-7-18 14:23:30 (I) Environment.<clinit> :
hibernate.properties not
found
07-7-18 14:23:30 (I) Environment.buildBytecodeProvider :
Bytecode
provider name : cglib
07-7-18 14:23:30 (I) Environment.<clinit> : using JDK
1.4
java.sql.Timestamp handling
07-7-18 14:23:30 (I) Version.<clinit> : Hibernate
EntityManager 3.3.1.GA
07-7-18 14:23:30 (I) Ejb3Configuration.configure :
Processing
PersistenceUnitInfo [
        name: ProjecTDB_Oracle_PU
        ...]
07-7-18 14:23:30 (I) Ejb3Configuration.scanForClasses :
found EJB3
Entity bean: bg......entities.ProjecT.RBEntity
07-7-18 14:23:30 (I) Ejb3Configuration.scanForClasses :
found EJB3
Entity bean: bg......entities.ProjectT2.TUEntity
2007-7-18 14:23:30 org.hibernate.cfg.AnnotationBinder
bindClass
INFO: Binding entity from annotated class:
bg......entities.ProjecT.RBEntity
2007-7-18 14:23:30 org.hibernate.cfg.annotations.QueryBinder
bindQuery
INFO: Binding Named query: RBEntity.findByloginAndPassword
=> SELECT o
FROM RBEntity WHERE o.anmeldname = :userName AND o.kennwort
= :password
2007-7-18 14:23:30
org.hibernate.cfg.annotations.EntityBinder bindTable
INFO: Bind entity bg......entities.ProjecT.RBEntity on table
RB
2007-7-18 14:23:30 org.hibernate.cfg.AnnotationBinder
bindClass
INFO: Binding entity from annotated class:
bg......entities.ProjectT2.TUEntity
07-7-18 14:23:30 (S) DirectoryDeployerMonitor.init : Cannot
scan for new
archives
org.objectweb.easybeans.server.EmbeddedException:
RuntimeException when
deploying the deployable
'EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBeasy
beans-deplo
ProjecT-EAR.ear]'
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.dete
ctNewArchives(DirectoryDeployerMonitor.java:257)
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.init
(DirectoryDeployerMonitor.java:136)
        at
       
org.objectweb.easybeans.server.Embedded.start(Embedded.java:
296)
        at
       
org.objectweb.easybeans.server.war.EasyBeansContextListener.
contextInitialized(EasyBeansContextListener.java:168)
        at
       
org.apache.catalina.core.StandardContext.listenerStart(Stand
ardContext.java:3827)
        at
       
org.apache.catalina.core.StandardContext.start(StandardConte
xt.java:4334)
        at
       
org.apache.catalina.core.ContainerBase.addChildInternal(Cont
ainerBase.java:791)
        at
       
org.apache.catalina.core.ContainerBase.addChild(ContainerBas
e.java:771)
        at
       
org.apache.catalina.core.StandardHost.addChild(StandardHost.
java:525)
        at
       
org.apache.catalina.startup.HostConfig.deployDescriptor(Host
Config.java:626)
        at
       
org.apache.catalina.startup.HostConfig.deployDescriptors(Hos
tConfig.java:553)
        at
       
org.apache.catalina.startup.HostConfig.deployApps(HostConfig
.java:488)
        at
       
org.apache.catalina.startup.HostConfig.start(HostConfig.java
:1138)
        at
       
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostCo
nfig.java:311)
        at
       
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:117)
        at
       
org.apache.catalina.core.ContainerBase.start(ContainerBase.j
ava:1053)
        at
       
org.apache.catalina.core.StandardHost.start(StandardHost.jav
a:719)
        at
       
org.apache.catalina.core.ContainerBase.start(ContainerBase.j
ava:1045)
        at
       
org.apache.catalina.core.StandardEngine.start(StandardEngine
.java:443)
        at
       
org.apache.catalina.core.StandardService.start(StandardServi
ce.java:516)
        at
       
org.apache.catalina.core.StandardServer.start(StandardServer
.java:710)
        at
org.apache.catalina.startup.Catalina.start(Catalina.java:566
)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
       
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce
ssorImpl.java:39)
        at
       
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe
thodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
       
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:2
88)
        at
       
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:41
3)
Caused by: org.hibernate.cfg.NotYetImplementedException:
Pure native
scalar queries are not yet supported
        at
       
org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(Qu
eryBinder.java:118)
        at
       
org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(
QueryBinder.java:197)
        at
       
org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBin
der.java:287)
        at
       
org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinde
r.java:417)
        at
       
org.hibernate.cfg.AnnotationConfiguration.processArtifactsOf
Type(AnnotationConfiguration.java:498)
        at
       
org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(
AnnotationConfiguration.java:277)
        at
       
org.hibernate.cfg.Configuration.buildMappings(Configuration.
java:1115)
        at
       
org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Config
uration.java:1269)
        at
       
org.hibernate.ejb.EventListenerConfigurator.configure(EventL
istenerConfigurator.java:150)
        at
       
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configurat
ion.java:888)
        at
       
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configurat
ion.java:416)
        at
       
org.hibernate.ejb.HibernatePersistence.createContainerEntity
ManagerFactory(HibernatePersistence.java:126)
        at
       
org.objectweb.easybeans.persistence.JPersistenceContext.init
(JPersistenceContext.java:72)
        at
       
org.objectweb.easybeans.persistence.JPersistenceContext.<
init>(JPersistenceContext.java:65)
        at
       
org.objectweb.easybeans.persistence.PersistenceUnitManager.&
lt;init>(PersistenceUnitManager.java:60)
        at
       
org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAn
alyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.
java:139)
        at
       
org.objectweb.easybeans.deployer.AbsWebContainerDeployer.dep
loyEAR(AbsWebContainerDeployer.java:155)
        at
       
org.objectweb.easybeans.deployer.TomcatDeployer.deploy(Tomca
tDeployer.java:195)
        at
       
org.objectweb.easybeans.server.DirectoryDeployerMonitor.dete
ctNewArchives(DirectoryDeployerMonitor.java:249)
        ... 27 more
      

I will be happy to see your comments about this exceptions

Greetings,
G.Dimitrov

-- 
http://www.fastmail.fm
- mmm... Fastmail...



  
Re: some problems with EAR deployment
country flaguser name
France
2007-07-19 03:18:31
    Hello Georgi,

For the first exception, "Cannot load the persistence provider class oracle.toplink.essentials.PersistenceProvider", it is because the Oracle TopLink Essentials Provider library is not found.

Here are the steps that I've done :
I downloaded the persistence provider here:
    https://glassfish.dev.java.net/downloads/persistence/JavaPersistence.html  (Build b41d-beta2)

Then I copy the lib to the EasyBeans folder
    cp glassfish-persistence/*.jar apache-tomcat-6.0.13/webapps/ow_easybeans/WEB-INF/lib/

The persistence.xml of the entity bean has been modified:
    <provider>;oracle.toplink.essentials.PersistenceProvider</provider>

I start Tomcat/EasyBeans:
7/19/07 10:08:43 AM (I) AbsDeployer.deployEJB : Deploying EJB3DeployableImpl[archive=/tmp/apache-tomcat-6.0.13/easybeans-deploy/entitybean.jar]
7/19/07 10:08:43 AM (I) ENCManager.getInterceptorClass : Detecting Tomcat: using Tomcat ENC for the naming.
Jul 19, 2007 10:08:44 AM org.objectweb.easybeans.persistence.xml.JPersistenceUnitInfoHelper loadDefaultValues
INFO: Default persistence provider set to value org.hibernate.ejb.HibernatePersistence.
Jul 19, 2007 10:08:44 AM org.objectweb.easybeans.persistence.xml.JPersistenceUnitInfoHelper getPersistenceUnitInfo
INFO: Found a default configuration for the persistence provider oracle.toplink.essentials.PersistenceProvider
Jul 19, 2007 10:08:44 AM org.objectweb.easybeans.persistence.xml.JPersistenceUnitInfoHelper getPersistenceUnitInfo
INFO: Setting the property toplink.logging.level with value INFO
Jul 19, 2007 10:08:44 AM org.objectweb.easybeans.persistence.xml.JPersistenceUnitInfoHelper getPersistenceUnitInfo
INFO: Setting the property toplink.target-server with value org.objectweb.easybeans.persistence.oracle.toplink.essentials.EasyBeansServerPlatform


And I executed the client:
run.client:
     [java] Jul 19, 2007 10:09:02 AM org.objectweb.carol.util.configuration.ConfigurationRepository init
     [java] INFO: No protocols were defined for property 'carol.protocols', trying with default protocol = 'jrmp'.
[TopLink Info]: 2007.07.19 10:09:02.694--ServerSession(27021384)--TopLink, version: Oracle TopLink Essentials - 2.0 (Build b41d-beta2 (04/24/2007))
[TopLink Info]: 2007.07.19 10:09:02.706--ServerSession(27021384)--Server: EasyBeans
[TopLink Info]: 2007.07.19 10:09:02.875--ServerSession(27021384)--file:/tmp/apache-tomcat-6.0.13/easybeans-deploy/entitybean.jar-entity login successful
[TopLink Warning]: 2007.07.19 10:09:02.944--ServerSession(27021384)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0 (Build b41d-beta2 (04/24/2007))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: Table not found: EMPLOYEES in statement [DROP TABLE EMPLOYEES]
Error Code: -22
Call: DROP TABLE EMPLOYEES
Query: DataModifyQuery()
     [java] Employee with id 1 = Florent
     [java] Employee with id 2 = Whale


So it's working on my side.


For the second exception, it's that Hibernate Entity Manager is not supporting the given operation.
Caused by: org.hibernate.cfg.NotYetImplementedException: Pure native scalar queries are not yet supported at
        org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
You can look at http://opensource.atlassian.com/projects/hibernate/browse/ANN-469 for the issue.

Regards,

Florent


Georgi Dimitrov wrote:
webmail.messagingengine.com" type="cite">
Hi,
I try to deploy simple (enterprise) application to test how work
deployment processing in the last build M6 (EasyBeans).
I created  EAR file (ProjecT-EAR), that contains one JAR file with two
entity classes and one persistence.xml file.
For persistence framework I choice TopLink.
In the persistence.xml file, I define two persistence-units for every my
entity classes. 
I put TopLink implementation in Tomcate's lib folder too. 
When I deploy my EAR file, I see following exception: 
---------------------------------------------------------------------------------------------------------------------------------------------------------
07-7-18 12:01:10 (I) AbsWebContainerDeployer.deployEAR : Deploying

EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBtempEasyBeans-Deployer-gdimitrovEARProjecT-EAR.
ear]
07-7-18 12:01:11 (I) JPersistenceUnitInfoHelper.loadDefaultValues :
Default persistence provider set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 12:01:11 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No default configuration for the persistence provider
                        oracle.toplink.essentials.PersistenceProvider

07-7-18 12:01:11 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No default configuration for the persistence provider
                        oracle.toplink.essentials.PersistenceProvider

07-7-18 12:01:11 (S) DirectoryDeployerMonitor.init : Cannot scan for new
archives
org.objectweb.easybeans.server.EmbeddedException: RuntimeException when
deploying the deployable
'EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBeasybeans-deploy
ProjecT-EAR.ear]'
        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.detectNewArchives(DirectoryDeployerMonitor.java:257)

        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.init(DirectoryDeployerMonitor.java:136)
        at
        org.objectweb.easybeans.server.Embedded.start(Embedded.java:296)

        at
        org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:168)
        at
        org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at
        org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
        at
        org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at
        org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
        org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at
        org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at
        org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at
        org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at
        org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at
        org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at
        org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at
        org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at
        org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at
        org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at
        org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
        org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at
        org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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:585)
        at
        org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at
        org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.IllegalStateException: Failure when analyzing the
persistence.xml file
        at
        org.objectweb.easybeans.deployer.AbsWebContainerDeployer.deployEAR(AbsWebContainerDeployer.java:158)
        at
        org.objectweb.easybeans.deployer.TomcatDeployer.deploy(TomcatDeployer.java:195)
        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.detectNewArchives(DirectoryDeployerMonitor.java:249)

        ... 27 more
Caused by:
org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAnalyzerException:
Cannot load the persistence provider class '
                        oracle.toplink.essentials.PersistenceProvider
                '.
        at
        org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:119)
        at
        org.objectweb.easybeans.deployer.AbsWebContainerDeployer.deployEAR(AbsWebContainerDeployer.java:155)
        

this is my persistence.xml file :
--------------------------------------------------------------------------------------------------------------
	<persistence-unit name="ProjecTDB_Oracle_PU" transaction-type="JTA">
		&lt;provider&gt;oracle.toplink.essentials.PersistenceProvider</provider>


		<jta-data-source>ProjecTDBOracleJndi</jta-data-source>
		&lt;class>bg......entities.ProjecT.RBEntity</class&gt;
		<exclude-unlisted-classes>true&lt;/exclude-unlisted-classes>

	<properties>			
			<property name="toplink.cache.type.default" value="NONE" />
		&lt;/properties>
	&lt;/persistence-unit&gt;
	<persistence-unit name="ProjecTDB_MySQL_PU" transaction-type="JTA">
		&lt;provider&gt;oracle.toplink.essentials.PersistenceProvider</provider>	

		<jta-data-source>ProjecTDBMySQLJndi</jta-data-source>
		&lt;class>
			bg......entities.ProjectT2.TUEntity
		</class&gt;
		<exclude-unlisted-classes>true&lt;/exclude-unlisted-classes>

		<properties>

			<property name="toplink.cache.type.default" value="NONE" />
		&lt;/properties>
	&lt;/persistence-unit&gt;
	

After that I decide to use default persistence implementation –
Hibernate .
In the same EAR I comment provider tag in persistence.xml file and I
deploy again EAR file.
Now I see different exception: 
--------------------------------------------------------------------------------------------------------------------------------------------------------

07-7-18 14:23:29 (I) AbsWebContainerDeployer.deployEAR : Deploying

EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBtempEasyBeans-Deployer-gdimitrovEARProjecT-EA
ear]
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.loadDefaultValues :
Default persistence provider set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No persistence provider was set, set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Found a default configuration for the persistence provider
org.hibernate.ejb.HibernatePersistence
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.transaction.manager_lookup_class with
value org.hibernate.transaction.JOTM
ansactionManagerLookup
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.cache.provider_class with value
org.hibernate.cache.HashtableCacheProvider
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
No persistence provider was set, set to value
org.hibernate.ejb.HibernatePersistence.
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Found a default configuration for the persistence provider
org.hibernate.ejb.HibernatePersistence
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.transaction.manager_lookup_class with
value org.hibernate.transaction.JOTM
ansactionManagerLookup
07-7-18 14:23:29 (I) JPersistenceUnitInfoHelper.getPersistenceUnitInfo :
Setting the property hibernate.cache.provider_class with value
org.hibernate.cache.HashtableCacheProvider
07-7-18 14:23:30 (I) Version.&lt;clinit>; : Hibernate Annotations 3.3.0.GA
07-7-18 14:23:30 (I) Environment.<clinit> : Hibernate 3.2.2
07-7-18 14:23:30 (I) Environment.<clinit> : hibernate.properties not
found
07-7-18 14:23:30 (I) Environment.buildBytecodeProvider : Bytecode
provider name : cglib
07-7-18 14:23:30 (I) Environment.<clinit> : using JDK 1.4
java.sql.Timestamp handling
07-7-18 14:23:30 (I) Version.&lt;clinit>; : Hibernate EntityManager 3.3.1.GA
07-7-18 14:23:30 (I) Ejb3Configuration.configure : Processing
PersistenceUnitInfo [
        name: ProjecTDB_Oracle_PU
        ...]
07-7-18 14:23:30 (I) Ejb3Configuration.scanForClasses : found EJB3
Entity bean: bg......entities.ProjecT.RBEntity
07-7-18 14:23:30 (I) Ejb3Configuration.scanForClasses : found EJB3
Entity bean: bg......entities.ProjectT2.TUEntity
2007-7-18 14:23:30 org.hibernate.cfg.AnnotationBinder bindClass

INFO: Binding entity from annotated class:
bg......entities.ProjecT.RBEntity
2007-7-18 14:23:30 org.hibernate.cfg.annotations.QueryBinder bindQuery

INFO: Binding Named query: RBEntity.findByloginAndPassword => SELECT o
FROM RBEntity WHERE o.anmeldname = :userName AND o.kennwort = :password

2007-7-18 14:23:30 org.hibernate.cfg.annotations.EntityBinder bindTable

INFO: Bind entity bg......entities.ProjecT.RBEntity on table RB
2007-7-18 14:23:30 org.hibernate.cfg.AnnotationBinder bindClass

INFO: Binding entity from annotated class:
bg......entities.ProjectT2.TUEntity
07-7-18 14:23:30 (S) DirectoryDeployerMonitor.init : Cannot scan for new
archives
org.objectweb.easybeans.server.EmbeddedException: RuntimeException when
deploying the deployable
'EARDeployableImpl[archive=....apache-tomcat-6.0.13-EBeasybeans-deplo
ProjecT-EAR.ear]'
        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.detectNewArchives(DirectoryDeployerMonitor.java:257)

        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.init(DirectoryDeployerMonitor.java:136)
        at
        org.objectweb.easybeans.server.Embedded.start(Embedded.java:296)

        at
        org.objectweb.easybeans.server.war.EasyBeansContextListener.contextInitialized(EasyBeansContextListener.java:168)
        at
        org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)
        at
        org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)
        at
        org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at
        org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at
        org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
        at
        org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
        at
        org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
        at
        org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
        at
        org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
        at
        org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
        at
        org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
        at
        org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at
        org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
        at
        org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at
        org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at
        org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at
        org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
        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:585)
        at
        org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
        at
        org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.hibernate.cfg.NotYetImplementedException: Pure native
scalar queries are not yet supported

        at
        org.hibernate.cfg.annotations.QueryBinder.bindNativeQuery(QueryBinder.java:118)
        at
        org.hibernate.cfg.annotations.QueryBinder.bindNativeQueries(QueryBinder.java:197)
        at
        org.hibernate.cfg.AnnotationBinder.bindQueries(AnnotationBinder.java:287)
        at
        org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:417)
        at
        org.hibernate.cfg.AnnotationConfiguration.processArtifactsOfType(AnnotationConfiguration.java:498)
        at
        org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277)
        at
        org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
        at
        org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1269)
        at
        org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
        at
        org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:888)
        at
        org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:416)
        at
        org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
        at
        org.objectweb.easybeans.persistence.JPersistenceContext.init(JPersistenceContext.java:72)
        at
        org.objectweb.easybeans.persistence.JPersistenceContext.<init&gt;(JPersistenceContext.java:65)

        at
        org.objectweb.easybeans.persistence.PersistenceUnitManager.<init>(PersistenceUnitManager.java:60)
        at
        org.objectweb.easybeans.persistence.xml.PersistenceXmlFileAnalyzer.analyzePersistenceXmlFile(PersistenceXmlFileAnalyzer.java:139)
        at
        org.objectweb.easybeans.deployer.AbsWebContainerDeployer.deployEAR(AbsWebContainerDeployer.java:155)
        at
        org.objectweb.easybeans.deployer.TomcatDeployer.deploy(TomcatDeployer.java:195)
        at
        org.objectweb.easybeans.server.DirectoryDeployerMonitor.detectNewArchives(DirectoryDeployerMonitor.java:249)

        ... 27 more
      

I will be happy to see your comments about this exceptions

Greetings,
G.Dimitrov

  

  
[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )