0 Replies Latest reply on Aug 23, 2011 3:45 PM by Brian Freyling

    Jboss 7 EJB Issue

    Brian Freyling Newbie

      Looking for help in understanding this error with my persistence unit (and/or resolving it!).

      Application is an originally working jboss5 app being ported to jboss7.

       

      I have re-examined my persistence.xml and looked at my standalone.xml's data source.  I cannot find anything I am doing.

       

      Attached: log generated setting a TRACE level, standalone.xml, and the ear.

       

      I really need to get this working in Jboss 7.  Thanks.

       

      09:46:42,717 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC00001: Failed to start service jboss.deployment.subunit."security.ear"."security-ejb-2.0.jar".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."security.ear"."security-ejb-2.0.jar".INSTALL: Failed to process phase INSTALL of subdeployment "security-ejb-2.0.jar" of deployment "security.ear"

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)

              at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)

              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_17]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_17]

              at java.lang.Thread.run(Thread.java:619) [:1.6.0_17]

      Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: Failed to install component org.jboss.as.ee.component.ComponentConfiguration[name=SecurityManager class="security".ejb.server.SecurityManager]

              at org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:77)

              at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)

              ... 5 more

      Caused by: java.lang.IllegalArgumentException: Incompatible conflicting binding at java:comp/env/security.ejb.server.SecurityManager/entityManager source: org.jboss.as.jpa.injectors.PersistenceContextInjectionSource@62506aee

              at org.jboss.as.ee.component.ComponentInstallProcessor.processBindings(ComponentInstallProcessor.java:218)

              at org.jboss.as.ee.component.ComponentInstallProcessor.access$000(ComponentInstallProcessor.java:53)

              at org.jboss.as.ee.component.ComponentInstallProcessor$1.handle(ComponentInstallProcessor.java:173)

              at org.jboss.as.ee.component.ClassDescriptionTraversal.run(ClassDescriptionTraversal.java:52)

              at org.jboss.as.ee.component.ComponentInstallProcessor.deployComponent(ComponentInstallProcessor.java:170)

              at org.jboss.as.ee.component.ComponentInstallProcessor.deploy(ComponentInstallProcessor.java:75)

              ... 6 more

       

       

      From: SecurityManager.java

      @Stateless

      @RolesAllowed( { "ADMINISTRATOR" })

      @Named ("security/SecurityManager/remote")

      //originally: @RemoteBinding(jndiBinding = "security/SecurityManager/remote")

      @WebService(endpointInterface = "security.ejb.client.SecurityManagerEndpoint")

      @SOAPBinding(style = SOAPBinding.Style.RPC)

      //TODO @WebContext(contextRoot="/securityws", authMethod="CLIENT-CERT", transportGuarantee="CONFIDENTIAL", secureWSDLAccess=false)

      @TransactionManagement(value = TransactionManagementType.CONTAINER)

      public class SecurityManager implements SecurityManagerRemote {

          /** logger */

          private static Log logger = LogFactory.getLog(SecurityManager.class);

         

          /** entity manager */

          @PersistenceContext(unitName = "security")    //TODO bugging out here?

          private EntityManager entityManager;  

       

       

      From: persistence.xml

      <?xml version="1.0" encoding="UTF-8"?>

        <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_2_0.xsd"

          version="2.0">

          <persistence-unit name="security">

              <provider>org.hibernate.ejb.HibernatePersistence</provider>

              <jta-data-source>java:jboss/datasources/security</jta-data-source>

           <properties>

            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect" />

           </properties>

          </persistence-unit>

        </persistence>