[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-user
Subject:    [jboss-user] [EJB3] - EJB deployment error when migrating to jboss
From:       Dohan Chinthaka <do-not-reply () jboss ! com>
Date:       2011-09-30 8:12:23
Message-ID: 2-629496-3-90329-1317370339295.jivesbs.jivemailuser () http://community ! jboss ! org
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Dohan Chinthaka [http://community.jboss.org/people/dohancrp] created the discussion

"EJB deployment error when migrating to jboss 6.1"

To view the discussion, visit: http://community.jboss.org/message/629496#629496

--------------------------------------------------------------
I am migrating from jboss 5.1 to 6.1. I have an ear which having some EJBs and a war. \
I am getting following error after deploying it in 6.1.

12:00:23,184 INFO   [PersistenceUnitDeployment] Starting persistence unit \
persistence.unit:unitName=ZServer.ear/#ZPersistCtx 12:00:23,204 ERROR \
[AbstractKernelController] Error installing to Start: \
name=persistence.unit:unitName=ZServer.ear/#ZPersistCtx state=Create: \
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast \
                to javax.persistence.spi.PersistenceProvider
               at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:46) \
                [:1.0.2-alpha-4]
               at org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) \
                [:6.1.0.Final]
               at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) \
                [:1.0.2-alpha-4]
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) \
                [:1.6.0_26]
               .
               .
               .
               at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) \
                [:0.2.2]
               at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) \
                [:6.1.0.Final]
               at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) \
                [:6.1.0.Final]
               at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) \
                [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]
               at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) \
[jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]  at \
java.lang.Thread.run(Thread.java:662) [:1.6.0_26]

12:00:23,442 INFO   [EJBContainer] STARTED EJB: \
com.al.sqlgen.ejb.ResponseListnerMDBBean ejbName: ResponseListnerMDBBean 12:00:23,751 \
WARN   [TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory \
for restoring timers

I have following libs in ear.

dohan@mypc:~/usr/local/jboss-6.1.0.Final/server/all/deploy/ZServer.ear/lib> ls
antlr-2.7.6.jar                               flex-messaging-remoting.jar
asm-attrs.jar                                   hibernate3.jar
asm.jar                                               hibernate-annotations.jar
cglib-2.1.3.jar                               hibernate-commons-annotations.jar
commons-collections-2.1.1.jar   hibernate-entitymanager.jar
commons-io-1.4.jar                         hibernate-tools.jar
commons-logging-1.1.jar               HsmSEE.jar
dom4j-1.6.1.jar                               javassist.jar
ehcache-1.2.3.jar                           jdbc2_0-stdext.jar
ejb3-persistence.2.jar                 jta.jar

I tried changing class loading procedure as mentioned  \
http://community.jboss.org/docs/DOC-9288 here but still getting same error. \
                Appreciate if anyone can help me to solve this.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/629496#629496]

Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029]



[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; \
margin: 0; padding: 20px;">

<div>
	<table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: \
1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tbody>
			<tr>

				<td>

					<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" \
style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: \
6px; -webkit-border-radius: 6px;">  <tbody>
							<tr>
								<td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px \
solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; \
-moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; \
                -webkit-border-top-left-radius: 5px;">
									<h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; \
                margin: 0; display: block !important;">
									<!-- To have a header image/logo replace the name below with your img tag \
                -->
									<!-- Email clients will render the images when the message is read so any \
                image -->
									<!-- must be made available on a public server, so that all recipients can \
                load the image. -->
									<a href="http://community.jboss.org/index.jspa" style="text-decoration: \
none; color: #E1E1E1">JBoss Community</a></h1>  </td>

							</tr>
							<tr>
								<td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; \
color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; \
-moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; \
-webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: \
17px; font-weight: normal;">  EJB deployment error when migrating to jboss 6.1
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/dohancrp">Dohan \
Chinthaka</a> in <i>EJB3</i> - <a \
href="http://community.jboss.org/message/629496#629496">View the full discussion</a> \
</span> <hr style="margin: 20px 0; border: none; background-color: #dadada; height: \
1px;">

<div class="jive-rendered-content"><p>I am migrating from jboss 5.1 to 6.1. I have an \
ear which having some EJBs and a war. I am getting following error after deploying it \
in 6.1.</p><p><span style="font-size: 8pt;"><code></code></span></p><pre><span \
style="font-size: 8pt;"><code>12:00:23,184 INFO&#160; [PersistenceUnitDeployment] \
Starting persistence unit \
persistence.unit:unitName=ZServer.ear/#ZPersistCtx<br/>12:00:23,204 ERROR \
[AbstractKernelController] Error installing to Start: \
name=persistence.unit:unitName=ZServer.ear/#ZPersistCtx state=Create: \
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast \
to javax.persistence.spi.PersistenceProvider<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
at org.jboss.jpa.builder.DefaultCEMFBuilder.build(DefaultCEMFBuilder.java:46) \
[:1.0.2-alpha-4]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.as.jpa.scanner.HackCEMFBuilder.build(HackCEMFBuilder.java:49) \
[:6.1.0.Final]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:275) \
[:1.0.2-alpha-4]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) \
[:1.6.0_26]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
.<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
.<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
.<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) \
[:0.2.2]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) \
[:6.1.0.Final]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) \
[:6.1.0.Final]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; at \
org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) \
[jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) \
[jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]<br/><br/>12:00:23,442 INFO&#160; \
[EJBContainer] STARTED EJB: com.al.sqlgen.ejb.ResponseListnerMDBBean ejbName: \
ResponseListnerMDBBean<br/>12:00:23,751 WARN&#160; [TimerServiceContainer] \
EJBTHREE-2193: using deprecated TimerServiceFactory for restoring \
timers</code></span></pre><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>I have following libs in ear.</p><p><code></code></p><pre><span \
style="font-size: 8pt;"><code>dohan@mypc:~/usr/local/jboss-6.1.0.Final/server/all/deploy/ZServer.ear/lib&gt; \
ls<br/>antlr-2.7.6.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
flex-messaging-remoting.jar<br/>asm-attrs.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
hibernate3.jar<br/>asm.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
hibernate-annotations.jar<br/>cglib-2.1.3.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
hibernate-commons-annotations.jar<br/>commons-collections-2.1.1.jar&#160; \
hibernate-entitymanager.jar<br/>commons-io-1.4.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
hibernate-tools.jar<br/>commons-logging-1.1.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
HsmSEE.jar<br/>dom4j-1.6.1.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
javassist.jar<br/>ehcache-1.2.3.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
jdbc2_0-stdext.jar<br/>ejb3-persistence.2.jar&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; \
jta.jar</code></span></pre><p style="min-height: 8pt; height: 8pt; padding: \
0px;">&#160;</p><p>I tried changing class loading procedure as mentioned <a class="" \
href="http://community.jboss.org/docs/DOC-9288">here</a> but still getting same \
error. Appreciate if anyone can help me to solve this.</p><p><span style="font-size: \
8pt;"><br/></span></p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a \
href="http://community.jboss.org/message/629496#629496">going to Community</a></p>  \
<p style="margin: 0;">Start a new discussion in EJB3 at <a \
href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2029">Community</a></p>
 </div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>



_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic