Error in deploying entity beans - migration from JBoss to Weblogic 10.3.4

Hi,
I am migrating EJB2.x code from JBoss to Weblogic 10.3.4. As a first step, I am tyring to deploy just Entity beans. I get following error when deploying to server.
'weblogic.application.ModuleException: Exception preparing module: EJBModule(myEJB.jar)
Unable to deploy EJB: CollMetaData from myEJB.jar:
[EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
There are 1 nested errors:
java.lang.NullPointerException
     at weblogic.ejb.container.cmp.rdbms.finders.EjbqlFinder.setMethods(EjbqlFinder.java:288)
     at weblogic.ejb.container.cmp.rdbms.Deployer.processFinders(Deployer.java:744)
     at weblogic.ejb.container.cmp.rdbms.Deployer.readTypeSpecificData(Deployer.java:446)
     at weblogic.ejb.container.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.java:506)
     at weblogic.ejb.container.persistence.PersistenceType.setupDeployer(PersistenceType.java:455)
     at weblogic.ejb.container.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:118)
     at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1214)
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:442)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
     at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:207)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:98)
     at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:747)
     at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1216)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:250)
     at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:171)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:13)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:46)
     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Can someone help me fixing the issue?
I changed schema locations of descriptor files as suggested at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13706/overview.htm#i1074199 (see the third category for '*Enterprise Bean 2.1*' in the listing Table 1-1). Alternatively, you may see the schema locations for EJB2.0 directly at http://download.oracle.com/docs/cd/E17904_01/web.1111/e13719/dd_reference.htm#EJBPG481

JRE version in JBoss is 1.6.0_16. JVM in web logic is pointing to jrockit_160_22_D1.1.1-3 which is come in the package. It doesn't seem to be related to JVM version mismatch.
I think it is an issue with definitions in weblogic-cmp-rdbms-jar.xml file. How should be the definition of entity-descriptor appear for entity bean which has finder methods in ejb-jar.xml?
Please see the snippets from corresponding descriptor files below.
ejb-jar.xml
=========
<entity>
<display-name>EmpBean</display-name>
<ejb-name>EmpBean</ejb-name>
<local-home>LocalEmpBeanHome</local-home>
<local>LocalEmpBean</local>
<ejb-class>EmpBeanBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>EmpBean</abstract-schema-name>
<cmp-field>
<field-name>firstName</field-name>
</cmp-field>
<cmp-field>
<field-name>lastName</field-name>
</cmp-field>
<cmp-field>
<field-name>phone</field-name>
</cmp-field>
<cmp-field>
<field-name>address</field-name>
</cmp-field>
<primkey-field>lastName</primkey-field>
<query>
<query-method>
          <method-name>findByPrimaryKey</method-name>
               <method-params>
               <method-param>java.lang.String</method-param>
               </method-params>
          </query-method>
          <ejb-ql>SELECT Object(o) FROM EmpBean o WHERE o.lastName= ?1</ejb-ql>
     </query>
</entity>
weblogic-jar.xml
============
<weblogic-enterprise-bean>
<ejb-name>EmpBean</ejb-name>
<entity-descriptor>
     <pool>
          <max-beans-in-free-pool>20</max-beans-in-free-pool>
          <initial-beans-in-free-pool>5</initial-beans-in-free-pool>
     </pool>
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>meta-inf/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
<finders-load-bean>true</finders-load-bean>
</persistence>
</entity-descriptor>
<local-jndi-name>ejb/EmpBean</local-jndi-name>
</weblogic-enterprise-bean>
weblogic-cmp-rdbms-jar.xml
====================
<weblogic-rdbms-bean>
<ejb-name>EmpBean</ejb-name>
<data-source-jndi-name>mysqlDS</data-source-jndi-name>
<table-map>
<table-name>emp</table-name>
<field-map>
<cmp-field>firstName</cmp-field>
<dbms-column>first_namel</dbms-column>
</field-map>
<field-map>
<cmp-field>lastName</cmp-field>
<dbms-column>last_name</dbms-column>
</field-map>
<field-map>
<cmp-field>phone</cmp-field>
<dbms-column>phone</dbms-column>
</field-map>
<field-map>
<cmp-field>address</cmp-field>
<dbms-column>address</dbms-column>
</field-map>
</table-map>
<weblogic-rdbms-bean>
Please ignore any typos that you may notice in above sample descriptions (because I just typed it here changing original names).
When I try to deploy the application, I get error message as posted in my first post above in this thread. Please correct me if I am making any erros in descriptor files.
Edited by: 839281 on Feb 25, 2011 10:55 AM
Edited by: venkatp on Mar 1, 2011 9:31 AM

Similar Messages

  • Error While deploying Entity Bean

    Hi,
    We are using JDeveloper 3.2.2 to deploy EJB into Oracle 9ias (Oracle 8.1.7 database). The following error occured while deploying entity bean.
    "Persistence provider declared in the deployment descriptor is not supported
    *** Errors occurred while deploying the EJB to 8i JVM ***
    *** Deployment completed ***"
    Please help us with the solution if anyone have come across this kind of error.
    Regards
    Santhosh
    null

    Thank you Raghu, We were in a position to deploy the entity bean to the database. We solved the problem by adding the following parameters to the init.ora file
    (a) Java_max_sessionspace_size
    (b) java_soft_sessionspace_limit
    When I tried to create an EJB for a table in another schema, it started deploying the BC4J to that schama also. Is it necessary that BC4J should deploy in all the schemas of the database ? Can I deploy BC4J to one schema and grant required permissions to others users or create public synonym for BC4J ? Can you please tell me how I can deploy BC4J globally for an instance of Oracle (Applicable to all the schemas in that instance) ?
    Santhosh

  • Oracle Application Server 10.1.3, error when deploying entity bean

    I am using 9.0.4.2 and am planning to upgrade to 10.1.3. When trying to deploy the application to 10.1.3 I get the following error for an Entity Bean with Container Managed Persistence
    006-03-20 10:05:51.436 NOTIFICATION Error while compiling EJB component: file:/C:/oc4j/j2ee/home/ap
    plications/ipower/InstitutionMgrSer-EJB.jar
    06/03/20 10:05:51 WARNING: EJBContainer.postInit Error generating wrappers for file:/C:/oc4j/j2ee/ho
    me/applications/ipower/InstitutionMgrSer-EJB.jarcom.evermind.compiler.CompilationException: Method p
    ublic abstract int com.eplinc.gv.bus.instmgr.AccessibleTrailerBean.getInstitution() can not be decla
    red abstract for entity 'AccessibleTrailerBean'
    at com.evermind.server.ejb.compilation.CMPObjectCompilation.verifyMethods(CMPObjectCompilati
    on.java:782)
    at com.evermind.server.ejb.compilation.CMPObjectCompilation.<init>(CMPObjectCompilation.java
    :56)
    at com.evermind.server.ejb.compilation.PersistenceManagerCompilation.<init>(PersistenceManag
    erCompilation.java:30)
    at com.evermind.server.ejb.compilation.EntityBeanCompilation.<init>(EntityBeanCompilation.ja
    va:121)
    at com.evermind.server.ejb.compilation.Compilation.generateAnyOldStyle(Compilation.java:1590
    at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:182)
    at com.evermind.server.ejb.compilation.Compilation.doGenerateCode(Compilation.java:250)
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:891)
    at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning
    .java:210)
    at com.evermind.server.Application.setConfig(Application.java:391)
    at com.evermind.server.Application.setConfig(Application.java:308)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1771)
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:50
    7)
    What am I missing? Note that on 9.0.4.2 and its previous versions the deployment was successful.

    We use EJB2.0 and as per the specifications entity class and getters/setters should be abstract. This is what we have. I have verified the dtd used in ejb-jars and it has references to the correct version. Here is an example <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">. Also the tag <cmp-version>2.x</cmp-version> is included for all the entity beans.
    Now I am just curious to know if anyone has tried deploying Entity Beans 2.0 on a 10.1.3? and if so was the deployment successful?

  • Error while deploying Entity Beans on OC4J 10.1.3

    Hi,
    We have 350 entity beans in our system. Recently a new table is created as per following script.
    CREATE TABLE TBLSMDTATTRIBUTECATREL
    MDTCATEGORYID CHAR(7),
    ATTRIBUTECATEGORYID CHAR(10),
    CONSTRAINT PK_MDTATTRIBUTECATREL PRIMARY KEY (MDTCATEGORYID,ATTRIBUTECATEGORYID)
    Entity Bean for the same has been created. While deploying I am facing the following error.
    06/06/11 13:09:23 Notification ==> Error while compiling EJB component: file:/export/home/oc4j/j2ee/home/applications/JispAppEntities/billing-entities.jar
    com.evermind.compiler.CompilationException: Method public abstract java.lang.String com.elitecore.billing.ejb.system.entity.MdtattributecatrelCMP.getMdtcategoryid() can not be declared abstract for entity 'Mdtattributecatrel'
    at com.evermind.server.ejb.compilation.CMPObjectCompilation.verifyMethods(CMPObjectCompilation.java:800)
    at com.evermind.server.ejb.compilation.CMPObjectCompilation.<init>(CMPObjectCompilation.java:55)
    at com.evermind.server.ejb.compilation.PersistenceManagerCompilation.<init>(PersistenceManagerCompilation.java:26)
    at com.evermind.server.ejb.compilation.EntityBeanCompilation.<init>(EntityBeanCompilation.java:121)
    at com.evermind.server.ejb.compilation.Compilation.generateAnyOldStyle(Compilation.java:1593)
    at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:181)
    at com.evermind.server.ejb.compilation.Compilation.doGenerateCode(Compilation.java:249)
    at com.evermind.server.ejb.EJBContainer.postInit(EJBContainer.java:971)
    at com.evermind.server.ApplicationStateRunning.initializeApplication(ApplicationStateRunning.java:205)
    at com.evermind.server.Application.setConfig(Application.java:387)
    at com.evermind.server.Application.setConfig(Application.java:304)
    at com.evermind.server.ApplicationServer.addApplication(ApplicationServer.java:1651)
    at oracle.oc4j.admin.internal.ApplicationDeployer.addApplication(ApplicationDeployer.java:402)
    at oracle.oc4j.admin.internal.ApplicationDeployer.doDeploy(ApplicationDeployer.java:158)
    at oracle.oc4j.admin.internal.DeployerBase.execute(DeployerBase.java:93)
    at com.evermind.server.administration.DefaultApplicationServerAdministrator.internalDeploy(DefaultApplicationServerAdministrator.java:440)
    at com.evermind.server.administration.DefaultApplicationServerAdministrator.deploy(DefaultApplicationServerAdministrator.java:341)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at com.evermind.server.rmi.ServerRmiMessageHandler.doMethodCall(ServerRmiMessageHandler.java:560)
    at com.evermind.server.rmi.ServerRmiMessageHandler.handleMethodInvocation(ServerRmiMessageHandler.java:471)
    at com.evermind.server.rmi.ServerRmiMessageHandler.handleOrmiRequest(ServerRmiMessageHandler.java:262)
    at com.evermind.server.rmi.ServerRmiMessageHandler.dispatchRequest(ServerRmiMessageHandler.java:231)
    at com.evermind.server.rmi.RMIServerConnection.processReceivedCommand(RMIServerConnection.java:155)
    at com.evermind.server.rmi.RMIConnection.handleCommand(RMIConnection.java:151)
    at com.evermind.server.rmi.RMIConnection.listenForOrmiCommands(RMIConnection.java:126)
    at com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:105)
    at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
    at java.lang.Thread.run(Thread.java:534)
    Can anybody please suggest the solution?
    Thanks in advance.
    Regards,
    Jinal Shah

    Hi,
    The error was coming because of the table structure. All the columns were composite keys. I alter the structured by removing composite keys and added a new column as primary key. Now it is getting deployed successfully.
    Can anybody comment on such a behaviour of OC4J?
    Regards,
    Jinal Shah

  • Deploying ear application - migrating from OC4j to Weblogic

    I am trying to migrate application from OC4J to weblogic server. Apart from usual differences in descriptors, structure of EAR etc. I came across unusual error:
    "both the remote home and remote component interface must be specified. Currently, only one of them is specified"
    It is about deploying session bean. Usual EJB3 stateless session bean with local and remote interface, deployed without any problem on OC4J and JBoss. Of course, I know home interfaces are something to do with EJB 2.1, but this is EJB3 application and, I guess, Weblogic has full support for it. Does it? :)
    Anyway, is there workaround? Or am I missing something? I don't have to tell you what problems we will be facing if I have to restructure whole application with dozens and hundreds of session beans.
    Thanks a lot!

    OK. I just want to make sure that there are no problems with the deployment descriptors.
    To pin point the problem do the following in JDeveloper:
    1. Create a simple EJB 3.0 session bean
    2. On that session bean create a Sample Java Client.
    3. Run the Session Bean
    4. Run the Client
    5. If both are running fine, compare the deployment descriptors from the sample and your real application.
    --olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Application Migration from JBOSS to Weblogic Server

    Hi,
    I am facing lots of issues while deploying an .ear file on Weblogic server. In the JBOSS server the application is working properly but whenever I am trying to deploy it on Weblogic server its throwing me an error stating :
    "ERROR: No j2ee modules detected in EAR archive. Deployment aborted. "
    I tried to convert the things to .war file and tried to deploy the application, the application got deployed but its throwing 'exception'.
    Please revert me back with some solution.
    Thanks
    Trishul

    Is this forum about Jboss?
    Is it about Weblogic?
    If so, why do you put a question about a non-Oracle non-database product in a forum on Oracle Database?
    Sybrand Bakker
    Senior Oracle DBA

  • Migrate EJB 3.0 from JBoss to Weblogic 10.3.5

    Hi all,
    I need help in deploying my ear file from Jboss to Weblogic, got this error relates to EJB module:
    ####<Dec 26, 2012 10:45:03 PM PST> <Warning> <Deployer> <localhost.localdomain> <AdminServer> <[ACTIVE] ExecuteThread: '9' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1356590703830> <BEA-149004> <Failures were detected while initiating deploy task for application 'MyScheduler'.>
    ####<Dec 26, 2012 10:45:03 PM PST> <Error> <Console> <localhost.localdomain> <AdminServer> <[ACTIVE] ExecuteThread: '7' for queue: 'weblogic.kernel.Default (self-tuning)'> <tungpl> <> <> <1356590703869> <BEA-240003> <Console encountered the following error weblogic.application.ModuleException: Could not setup environment
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1495)
         at weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:438)
         at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:375)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.flow.ModuleStateDriver.activate(ModuleStateDriver.java:95)
         at weblogic.application.internal.flow.ScopedModuleDriver.activate(ScopedModuleDriver.java:194)
         at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:227)
         at weblogic.application.internal.flow.DeploymentCallbackFlow$2.next(DeploymentCallbackFlow.java:541)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:175)
         at weblogic.application.internal.flow.DeploymentCallbackFlow.activate(DeploymentCallbackFlow.java:167)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: While trying to look up ejb-info in /app/ejb/myEjb.jar#myEjb.; remaining name 'ejb-info'
         at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1139)
         at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
         at weblogic.deployment.BaseEnvironmentBuilder.autowireEJBRef(BaseEnvironmentBuilder.java:408)
         at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:513)
         at weblogic.servlet.internal.CompEnv.activate(CompEnv.java:157)
         at weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletContext.java:3144)
         at weblogic.servlet.internal.WebAppModule.activateContexts(WebAppModule.java:1493)
    >
    I have tried some solution in this thread https://kr.forums.oracle.com/forums/thread.jspa?threadID=2174802 but it doesn't help at all.
    Could sb give me any idea?
    Pretty thanks!
    Edited by: user12925202 on Jan 20, 2013 11:33 PM

    Frank,
    Thanks. The @LOB annotations are missing.
    Create table with:
    CREATE TABLE TestBlob (id number PRIMARY KEY, xmlCol BLOB);
    INSERT INTO TestBlob VALUES(1, EMPTY_BLOB());
    The following is the complete listing for the EJB 3 class generated from table TestBlob.
    package ejb3;
    import java.io.Serializable;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import javax.persistence.NamedQueries;
    import javax.persistence.NamedQuery;
    @Entity
    @NamedQueries({
    @NamedQuery(name = "Testblob.findAll", query = "select o from Testblob o")
    public class Testblob implements Serializable {
    @Id
    @Column(nullable = false)
    private Long id;
    private byte[] xmlCol;
    public Testblob() {
    public Testblob(Long id) {
    this.id = id;
    public Long getId() {
    return id;
    public void setId(Long id) {
    this.id = id;
    public byte[] getXmlCol() {
    return xmlCol;
    public void setXmlCol(byte[] xmlCol) {
    this.xmlCol = xmlCol;
    }

  • Error in locating entity bean

    Hi
    when i tested my first session bean by IBM websphere Universal Test Client , i got the following error when execute getBookForPlatform(String workPlatform) saying error in locating entity bean Book_catalog and i tried to test Book_catalog entity bean and it's working successfuly but i do not know why seesion bean could not locate it ? :
    ========== the Error ===========
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: ; nested exception is:
    javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
    at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:156)
    at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:684)
    at javax.rmi.CORBA.Util.wrapException(Util.java:295)
    at apress.wsad.techlib._TechLibFacade_Stub.getBookForPlatform(_TechLibFacade_Stub.java:267)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
    at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
    at com.ibm.etools.utc.model.ReflectionMethodModel.invoke(ReflectionMethodModel.java:68)
    at com.ibm.etools.utc.servlet.InvokeServlet.invoke(InvokeServlet.java:110)
    at com.ibm.etools.utc.servlet.InvokeServlet.doPost(InvokeServlet.java:366)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
    at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
    at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
    at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
    at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
    at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
    Caused by: java.rmi.RemoteException: ; nested exception is:
    javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
    at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapEJBException(RemoteExceptionMappingStrategy.java:379)
    at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapException(RemoteExceptionMappingStrategy.java:112)
    at com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException(RemoteExceptionMappingStrategy.java:202)
    at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedException(EJSDeployedSupport.java:296)
    at apress.wsad.techlib.EJSRemoteStatelessTechLibFacade_3526fe64.getBookForPlatform(EJSRemoteStatelessTechLibFacade_3526fe64.java:32)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
    at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
    at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:703)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:701)
    at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1084)
    at $Proxy1.getBookForPlatform(Unknown Source)
    at apress.wsad.techlib._TechLibFacade_Stub.getBookForPlatform(_TechLibFacade_Stub.java:260)
    ... 29 more
    Caused by: javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
    at apress.wsad.techlib.TechLibFacadeBean.getBookForPlatform(TechLibFacadeBean.java:92)
    at apress.wsad.techlib.EJSRemoteStatelessTechLibFacade_3526fe64.getBookForPlatform(EJSRemoteStatelessTechLibFacade_3526fe64.java:22)
    ... 39 more
    ===== End of Error ======
    ====== the source code of session bean=======
    package apress.wsad.techlib;
    import javax.ejb.*;
    import javax.naming.*;
    import javax.rmi.*;
    import java.rmi.*;
    import java.lang.*;
    import java.util.*;
    public class TechLibFacadeBean implements javax.ejb.SessionBean
    private javax.ejb.SessionContext mySessionCtx;
    // Variable to keep the Home Local refernce to TechLibBook_catalog object
    private TechLibBook_catalogLocalHome catalogLocalHome = null ;
    // Method to get the Home Interface of the Book_catalog entity bean.
    private TechLibBook_catalogLocalHome getCatalogLocalHome()
    throws RemoteException
    try
    if (catalogLocalHome == null)
    InitialContext initContext = new InitialContext();
    Object objRef =initContext.lookup("ejb/Book_catalog");
    catalogLocalHome = (TechLibBook_catalogLocalHome) objRef;
    return (TechLibBook_catalogLocalHome) objRef;
    else
    return catalogLocalHome;
    catch (NamingException ne)
    System.out.println("Error locating TechLibBook_catalogLocalHome: " +
    ne.getMessage());
    throw
    new RemoteException("Error locating TechLibBook_catalogLocalHome: " +
    ne.getMessage());
    // This business method must be promoted to the remote interface
    public Vector getBookForPlatform(String workPlatform)
    throws FinderException
    Vector bookVector = new Vector();
    TransportBean transObject;
    TechLibBook_catalogLocal bookCatalogLocal = null;
    Collection collBookRecords;
    try
    collBookRecords =
    getCatalogLocalHome().findByPlatform(workPlatform);
    Iterator iterator = collBookRecords.iterator();
    while (iterator.hasNext())
    bookCatalogLocal =
    (TechLibBook_catalogLocal) iterator.next();
    transObject = new TransportBean();
    transObject.catalogNumber = bookCatalogLocal.getCatalog_number();
    transObject.author = bookCatalogLocal.getAuthor();
    transObject.bookTitle = bookCatalogLocal.getBook_title();
    transObject.location = bookCatalogLocal.getLocation();
    transObject.platform = bookCatalogLocal.getPlatform();
    transObject.txnDate = bookCatalogLocal.getLanguage();
    bookVector.addElement(transObject);
    } // End of while
    } // End of try
    catch(FinderException fe)
    System.out.println("Error executing findByPlatform method: " +
    fe.getMessage());
    throw
    new EJBException("Error executing findByPlatform method: " +
    fe.getMessage());
    catch(Exception e)
    System.out.println("Error getting TechLibBook_catalogLocalHome from findByPlatform method:" + e.getMessage());
    throw
    new EJBException("Error getting TechLibBook_catalogLocalHome from findByPlatform method:" + e.getMessage());
    return bookVector;
    public javax.ejb.SessionContext getSessionContext()
    return mySessionCtx;
    public void setSessionContext(javax.ejb.SessionContext ctx)
    mySessionCtx = ctx;
    * ejbCreate
    public void ejbCreate() throws javax.ejb.CreateException
    public void ejbActivate()
    public void ejbPassivate()
    public void ejbRemove()
    ==== End if source code =========
    Please tell me what's the problem ?
    with regards

    i found what's the problem i made the url for lookup as the following:
    lookup("java:comp/env/Book_catalog")
    instead of
    lookup("ejb/Book_catalog")
    could anyone tell me what's the difference between 'java:comp/env/' and without it
    by the way i used for lookup Datasource the following and it's working
    DataSource dataSource = (DataSource)jndiContext.lookup("jdbc/TECHBOOK");
    thanks

  • Deploying Entity Bean

    I am trying to deploy Entity Bean(Bean-Managed Persistence) using deploytool. But in halfway of deployment, I am getting an error.
    Error Says "There was deployment error.java.rmi.ServerException:Remote Exception occured in server thread;nested exception is java.rmi.RemoteException:error while loading ejb.jar"
    I am not getting why this error occurs.

    I am using J2EE deploytool. We are not able to trap the exact cause of error. We have created a fresh bean without any problem yesterday.

  • Error while deploying a PAR file from NWDS into an ECC.

    Hi all,
    I am getting this error while deploying a PAR file from NWDS into an ECC.
    Operation Failed: Please make sure the server is running or check the log (sap-plugin.log) for
    more detail.
    My server is running properly
    1 - Where is sap-plugin.log file? I don´t find it. 
    2 - Could there be another file with another name with information about the error?
    3 - Is there another way to deploy the file directly from the ECC?
    Regards,

    Hi,
    Just make sure you have maintained correct server setting to check the same open the NWDS and follow this path
    Windows/ Prefereces / SAP Enterprise Portal
    Check the following enteries
    Alias
    Host
    Port
    Login etc.
    Regards,

  • Migration from JBoss

    Hi,
    We have an application developed on Jboss 2.4.6 application server and Tomcat 4 web server and servlet engine. We are tring to migrate it to iPlanet Application server 6.5 enterprise edtion.
    So is there any support or tools availbale for that?
    Thanks and regards,
    Nadika.

    Nadika,
    The next version of the migration tool (v3.0) will support migration from JBoss 3.0 & Tomcat 4.1 to Sun ONE App Server 7, not iPlanet App Server 6.5 though. It will be available early March 2003.
    -Robert

  • How to deploy exploded war file(from JBoss-Eclipse IDE) to Sun Server 9

    anyone plz tell how to deploy exploded war file (from JBoss-Eclipse IDE) to sun application server 9.i deployed noramllay at tht time404 hrown.plzz tell urgent
    regards,
    S Sunder

    Hi!
    How did You deploy WAR file? Did You try to do this with Application Server Admin Console?
    Thanks,
    Roman.

  • How to deploy entity bean in weblogic

    Hi frnds,
    can anybody tell me that
    how to deploy entity bean in weblogic8.1
    i want to know step by step process.
    bcoz i am totally new for weblogic
    thanks & regards

    WebLogic 8.1 docs.

  • Deploying entity beans with Local interfaces on Jboss

    Hi, I'm trying to deploying a simple entity bean on Jboss. The EJB has been developed with Local Interfaces because then I want to access it with a session bean facade.
    I get the following error:
    <!-- ERROR BEGIN -->
    23:41:25,984 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.2.2
    Warning: The entity bean class must not be defined as abstract.
    23:41:25,984 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.4.7.1
    Warning: The primkey-field element must name a public field in the bean implemen
    tation class.
    <!-- ERROR END -->
    I'm following what is wrote in the Professional EJB editeb by wrox?
    Is it possible to deploy an entity bean alone with Local interfaces? Is there something I'm missing? It's true that I defined the implementation class as abstract, but because there are abstract getter/setter methods.
    Thanks for any help,
    Marco

    Greetings,
    Hi, I'm trying to deploying a simple entity bean on
    Jboss. The EJB has been developed with Local
    23:41:25,984 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.2.2
    Warning: The entity bean class must not be defined as abstract.
    23:41:25,984 WARN [verifier] EJB spec violation:
    Bean : UsersEJB
    Section: 9.4.7.1
    Warning: The primkey-field element must name a public field in
    the bean implementation class.What version of JBoss are you using? These errors indicate container compliance with EJB spec 1.1, not 2.0 to which your CMP beans are written. Download the latest JBoss release version - 3.2.1 - and you should not see this problem.
    Is it possible to deploy an entity bean alone with
    Local interfaces? Is there something I'm missing? It'sYes it is (no, you are not "missing something" ;). In fact, this is recommended practice in most cases under CMP 2.0 - CMR having been a major impetus to the development of Local interfaces in the specification. ;)
    true that I defined the implementation class as
    abstract, but because there are abstract getter/setter
    methods.No problems. You are "right on track" for CMP 2.0. :)
    Thanks for any help,
    MarcoRegards,
    Tony "Vee Schade" Cook

  • Error deploying entity bean on web logic server

    i am trying to deploy a container managed persistence entity bean on web logic server when i run the command ejbc which generates the final jar file ready to deploy having its stub and skeleton it gives me the error that the return type of create(int) method should have a type of bean home interface while in accordance with ejb1.1 specicication it should be the type of primary key and a null value should be returned.
    plz let me know where i am doing it wrong.

    thanks for ur quick response sir i am using this services provided by sun microsystem first time and
    am really thankful to Sun Microsystem for this great deal of help to the new commers but sir my problem is still there.
    following is the method which i have written in the code
         public InvoicePK ejbCreate(int id)
              this.id=id;
              return null;
    and here it is the error generated by the server deployment tool.
    [9.2.8] In EJB Invoice, the return type for the create method create(int) must be the bean's remote interface type.
    [9.2.8] In EJB Invoice, the findByPrimaryKey method must return the Entity bean's remote interface type.
    [9.2.8] In EJB Invoice, the return type for the method findByPrimaryKey(com.swi.InvoicePK) must be the entity bean's remote interface type (for a single-object finder) or a collection thereof (for a mult-object finder).
    the detail of files created by me are as follows.
    1. Invoice (Entity Bean)
    2. InvoicePK (Primary Key file)
    3. MyRemoteInterface (remote interface for entity bean)
    4. MyHomeInterface (home interface for entity bean)
    plz let me know where i am doing wrong and oblige.

Maybe you are looking for

  • FRA and archive logs

    Hello all, i have db from 10.2.0.4 to 11.2.0.3, my question is with regards to FRA. We do not use the full blow FRA, but only use it to store our Archive logs ONLY. This is still in testing phase for us... Our Current method it to backup the archive

  • After Upgrade to CS4 ... Can I Install CS3 on Different Computer

    Here is a licensing question ... I deactivated CS3 on an older Mac and did a clean install of a CS4 upgrade to a new Mac (I just used the CS3 serial number to validate the upgrade). So, now I'm wondering if the CS license would allow me to legally in

  • Can we use JVM and/or Oracle Multimedia with the Express Edition?

    Hi! I wonder if there is any way to instal/use/activate JVM (implement java classes) and/or Oracle Multimedia? I want to make a little application that would exploit those features ... Can we do this with Oracle Express? If so, how do I proceed? Than

  • Cant sign out of skype

    i cant seem to find out how to sign out of skype, some one please help

  • Can't update bridge

    When I upgraded to cs5. Can't quite remember what I did but anyway at this point I can't update bridge. It keeps telling me that bridge had been moved and to reinstall it. I tried that with no luck.