have you tried with the hibernate JAR files (3.5) from the Update Center (contrib repository)?
% bin/pkg install hibernate
this package places the JARs in the glassfish/lib/ directory.
hth,
-Alexis
On 28 déc. 2010, at 17:19, RamKrishna wrote:
>
> Hi
> I am using Glassfish3.0.1 with NetBeans IDE 6.9.1 (Build 201007282301) and
> trying deploy an EAR file that was working fine with GlassfishV2.1. But the
> EAR deployment is failing with following Error.I copied all needed Hibernate
> jar files in domain1/lib/ext folder. Not sure where things are going wrong
>
> .........
>
> INFO: SEC1002: Security Manager is OFF.
> INFO: Security startup service called
> INFO: SEC1143: Loading policy provider
> com.sun.enterprise.security.provider.PolicyWrapper.
> INFO: Realm admin-realm of classtype
> com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
> INFO: Realm file of classtype
> com.sun.enterprise.security.auth.realm.file.FileRealm successfully created.
> INFO: Realm certificate of classtype
> com.sun.enterprise.security.auth.realm.certificate.CertificateRealm
> successfully created.
> INFO: Security service(s) started successfully....
> INFO: Instantiated an instance of
> org.hibernate.validator.engine.resolver.JPATraversableResolver.
> SEVERE: Exception while invoking class
> org.glassfish.persistence.jpa.JPADeployer prepare method
> java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at
> org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:149)
> at
> org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
> at
> org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
> at
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
> at
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
> at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
> at
> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
> at java.lang.Thread.run(Thread.java:619)
>
> SEVERE: Exception while preparing the app
> java.lang.ClassCastException
> at java.lang.Class.cast(Class.java:2990)
> at
> org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:149)
> at
> org.glassfish.persistence.jpa.PersistenceUnitLoader.<init>(PersistenceUnitLoader.java:96)
> at
> org.glassfish.persistence.jpa.JPADeployer.prepare(JPADeployer.java:121)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.prepareModule(ApplicationLifecycle.java:644)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:296)
> at
> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
> at
> org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
> at
> com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
> at
> com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
> at
> com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
> at
> com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
> at
> com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
> at
> com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
> at
> com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
> at
> com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
> at
> com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
> at
> com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
> at
> com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
> at
> com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
> at
> com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
> at
> com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
> at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
> at
> com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
> at java.lang.Thread.run(Thread.java:619)
>
> Below is my persistance.xml file.
>
> <?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="WMSEntitiesPU">
> <provider>org.hibernate.ejb.HibernatePersistence</provider>
> <jta-data-source>jdbc/__wmsDS</jta-data-source>
> <properties>
> <property name="hibernate.dialect"
> value="org.hibernate.dialect.OracleDialect"/>
> <property name="hibernate.show_sql" value="true"/>
> </properties>
> </persistence-unit>
> </persistence>
>
>
>
> --
> View this message in context: http://old.nabble.com/Glassfish3.0.1-.-EAR-deployemnt-error.-tp30545734p30545734.html
> Sent from the java.net - glassfish users mailing list archive at Nabble.com.
>