Discussions

EJB programming & troubleshooting: problem in deploying entity(CMP) through weblogic5.1.0

  1. hello freinds,

    i am ramakrishna , i got the solution for the BMP.
    the only thing we are not able to do is :

    deploying the entity bean(CMP) through deployment tool of weblogic 5.1.0 . we are using evaluation version.

    the message is:

    Compiler failed executable.exec([Ljava.lang.String;[C:/jdk1.2.2/bin/javac.exe, -classpath, C:\weblogic\myserver\serverclasses;C:\weblogic\jre1_2\lib\tools.jar;C:\weblogic\jre1_2\jre\lib\rt.jar;C:\weblogic\jre1_2\jre\lib\i18n.jar;C:\weblogic\license;C:\weblogic\classes\boot;C:\weblogic\classes;C:\weblogic\lib\weblogicaux.jar;C:\weblogic\eval\cloudscape\lib\cloudscape.jar;C:\weblogic\license;C:\weblogic\classes;C:\weblogic\myserver\serverclasses;C:\weblogic\lib\weblogicaux.jar;C:\WINDOWS\.ejbdeployer\provider-projects\account11\ejb-jar;C:\weblogic\lib\persistence\WebLogic_RDBMS.jar;C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar;;C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar;;C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar, -d, C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar, C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar\emp\EmployeeBeanHomeImpl.java, C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar\emp\EmployeeBeanEOImpl.java, C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar\emp\EmployeePS.java])

    the console is:
    C:\WINDOWS\.ejbdeployer\provider-projects\insert\ejb-jar\emp\EmployeeBeanEOImpl.java:56: Incompatible type for =. Can't convert java.lang.String to emp.EmployeePK.

    pk = bean.id;

       ^

    1 error

    we are able to get the entity bean deployed manually using ejbc. not getting through tool . is there any solution to do this through tool.

    waiting for reply
    k.ramakrishna

  2. Dont set the type of primary key field. Let it be Null..

    That should solve the problem..

    Shiva
  3. Weblogic 5.1.0 is EJB 1.1 compliant and EJB 1.1 spec states that the return type of the PrimaryKey finder can only be of the type of objectPK. Here it looks as if the bean.id is a String type. Try the above solution, or restructure your code, so that no type casting occurs with PK type.

    Still confused? Show the part of the code that handles this?