Need Help w/ BUILD FAILED

Discussions

EJB programming & troubleshooting: Need Help w/ BUILD FAILED

  1. Need Help w/ BUILD FAILED (4 messages)

    Hello all,
    When I try to build my ejb components I get this error:

    Buildfile: build.xml

    prepare:
        [mkdir] Created dir: /home/rasoul/dev/build
        [mkdir] Created dir: /home/rasoul/dev/build/classes

    compile:
        [javac] Compiling 5 source files to /home/rasoul/dev/build/classes
        [javac] This version of java does not support the classic compiler; upgrading to modern
        [javac] /home/rasoul/dev/src/main/com/rhythm/clients/Client_61.java:6: cannot access javax.naming.InitialContext
        [javac] bad class file: /local/a/apps/java/j2re1.4.2/j2sdk1.4.2/jre/lib/rt.jar(javax/naming/InitialContext.class)
        [javac] class file has wrong version 48.0, should be 47.0
        [javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
        [javac] import javax.naming.InitialContext;
        [javac] ^
        [javac] 1 error

    BUILD FAILED
    /home/rasoul/dev/build.xml:39: Compile failed; see the compiler error output for details.

    I am new to ejb and am hoping some one could help decypher this error message.

    Thanks in advance.
    -r

    Threaded Messages (4)

  2. Need Help w/ BUILD FAILED[ Go to top ]

    Looks like there is a mix of JDK versions 1.3 and 1.4.

    Use JDK1.4 to do the build of your application

    Hope this helps
  3. Need Help w/ BUILD FAILED[ Go to top ]

    Thanks Hari Lakshmanan. It was indeed what you said.
    Now I have another problem. When I try to run my client:

    #!/bin/sh
    # Creates two customers given their primary key
    # Uses command-line parameters:
    # client_61 <primarykey>
    #
    ant run.client_61 -Dparam.pk1=$1

    I get:

    client_61: Permission denied.

    I am not sure why this is happening.

    Thanks in advance.
    -r
  4. Need Help w/ BUILD FAILED[ Go to top ]

    Looks like unix permission problem. Please make sure you have sufficient permission (may be execute permission x) to run the program
  5. Need Help W/ BUILD FAILED[ Go to top ]

    I still can't deploye my bea. Here is what I am getting from the server. I am using JBOSS 3.x. I have included the last few lines of the server log.

    2004-02-04 16:23:37,873 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=employee.jar,service=EjbModule
    2004-02-04 16:23:37,873 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/local/a/usr/lsd/jboss-3.2.3/server/default/deploy/employee.jar
    2004-02-04 16:23:37,984 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/local/a/usr/lsd/jboss-3.2.3/server/default/deploy/employee.jar
    2004-02-04 16:23:37,990 ERROR [org.jboss.deployment.scanner.URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
    Cause: Incomplete Deployment listing:
    Packages waiting for a deployer:
      <none>
    Incompletely deployed packages:
    [org.jboss.deployment.DeploymentInfo@eda4212f { url=file:/local/a/usr/lsd/jboss-3.2.3/server/default/deploy/employeedb-ds.xml }
      deployer: org.jboss.deployment.XSLSubDeployer@9e8c34
      status: Deployment FAILED reason: create operation failed for package file:/local/a/usr/lsd/jboss-3.2.3/server/default/deploy/employeedb-ds.xml; - nested throwable: (org.jbo
    ss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,name=InformixDS)
      state: FAILED
      watch: file:/local/a/usr/lsd/jboss-3.2.3/server/default/deploy/employeedb-ds.xml
      lastDeployed: 1075940616751
      lastModified: 1075940616000
      mbeans:
    ]MBeans waiting for classes:
      <none>
    MBeans waiting for other MBeans:
    [ObjectName: jboss.j2ee:jndiName=EmployeeHome,service=EJB
     state: FAILED
     I Depend On:
     Depends On Me: javax.naming.NameAlreadyBoundException]


    ejb-jar.xml:

    <?xml version="1.0"?>

    <!DOCTYPE ejb-jar PUBLIC
    "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">

    <ejb-jar>

     <enterprise-beans>
       <entity>
          <description>
                This bean represents an employee
          </description>
          <ejb-name>EmployeeEJB</ejb-name>
          <home>com.rhythm.employee.EmployeeHome</home>
          <remote>com.rhythm.employee.Employee</remote>
          <ejb-class>com.rhythm.employee.EmployeeBean</ejb-class>
          <persistence-type>Bean</persistence-type>
          <prim-key-class>com.rhythm.employee.EmployeePK</prim-key-class>
          <reentrant>False</reentrant>
          <security-identity><use-caller-identity/></security-identity>
            <resource-ref>
                    <description>DataSource for the Titan database</description>
                    <res-ref-name>jdbc/rhythmDB</res-ref-name>
                    <res-type>javax.sql.DataSource</res-type>
                    <res-auth>Application</res-auth>
            </resource-ref>
            <resource-env-ref>
                    <resource-env-ref-name>jdbc/rhythmDB</resource-env-ref-name>
                    <resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
            </resource-env-ref>
      </entity>
     </enterprise-beans>

     <assembly-descriptor>

       <security-role>
          <description>
             This role represents everyone who is allowed full access to the employee EJB
          </description>
         <role-name>everyone</role-name>
       </security-role>

       <method-permission>
         <role-name>everyone</role-name>
         <method>
             <ejb-name>EmployeeEJB</ejb-name>
             <method-name>*</method-name>
         </method>
       </method-permission>

       <container-transaction>
         <method>
            <ejb-name>EmployeeEJB</ejb-name>
            <method-name>*</method-name>
         </method>
         <trans-attribute>Required</trans-attribute>
       </container-transaction>

     </assembly-descriptor>

    </ejb-jar>

    jboss.xml:
    <?xml version="1.0"?>

    <jboss>
            <container-configurations>
                    <container-configuration>
                            <container-name>Standard BMP EntityBean</container-name>
                            <commit-option>A</commit-option>
                            <!--commit-option>C</commit-option-->
                    </container-configuration>
            </container-configurations>
            <enterprise-beans>
                    <entity>
                            <ejb-name>EmployeeEJB</ejb-name>
                            <jndi-name>EmployeeHome</jndi-name>
                            <resource-ref>
                                    <res-ref-name>jdbc/rhythmDB</res-ref-name>
                                    <jndi-name>java:/InformixDS</jndi-name>
                            </resource-ref>
                            <resource-env-ref>
                                    <resource-env-ref-name>jdbc/rhythmDB</resource-env-ref-name>
                                    <jndi-name>java:/InformixDS</jndi-name>
                            </resource-env-ref>
                    </entity>
            </enterprise-beans>
    </jboss>



    employeedb-ds.xml:
    <datasources>
      <local-tx-datasource>
        <jndi-name>InformixDS</jndi-name>
        <connection-url>jdbc:informix-sqli://10.4.10.181:8002/pts:INFORMIXSERVER=pts</connection-url>
        <driver-class>com.informix.jdbc.IfxDriver</driver-class>
        <user-name>ptsguest</user-name>
        <password>ptsguest</password>
      </local-tx-datasource>

    </datasources>


      

    Also I have included the ejb and jboss xml files. Maybe some one can help out w/ debugging.

    I use ant simple to try to deploy my components.
    Thanks in advance
    -r