This week's book giveaway is in the JavaScript forum.
We're giving away four copies of JavaScript Promises Essentials and have Rami Sarieddine on-line!
See this thread for details.
The moose likes Websphere and the fly likes Entity beans could not be used (WSAD 5) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Entity beans could not be used (WSAD 5)" Watch "Entity beans could not be used (WSAD 5)" New topic
Author

Entity beans could not be used (WSAD 5)

Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Hi Kyle,
Thanks for your help. I fixed the error, so it's okay with datasource and session beans. But entities...
I cannot do lookup neither from my application nor from UTC on JNDI explorer page of UTC. Although I can test them from Bean page of UTC.
But when I type the JNDI name (copied from ejb-jar) and click lookup button,
I get an error:
IWAD0402E Could not perform lookup with the
JNDI name: ejb/echargeit/entity/UserfileLocalHome
When I call them from my appl, I have an error:
*** Starting the server ***
************ Start Display Current Environment ************
WebSphere Platform 5.0 [BASE 5.0.0 s0245.03] running with process name localhost\localhost\server1 and process id 1624
Host Operating System is Windows 2000, version 5.0
Java version = J2RE 1.3.1 IBM Windows 32 build cn131-20021107 (JIT enabled: jitc), Java Compiler = jitc, Java VM name = Classic VM
was.install.root = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5
user.install.root = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5
Java Home = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5\java\jre
ws.ext.dirs = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/java/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/classes;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/classes;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/ext;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/web/help;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.webservice_5.0.1/runtime/worf.jar
Classpath = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/properties;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/properties;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/bootstrap.jar;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/j2ee.jar;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/lmproxy.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.1/runtime/wteServers.jar;C:/Program Files/IBM/WebSphere Studio/wstools/eclipse/plugins/com.ibm.etools.websphere.tools.common_5.0.1/runtime/wasToolsCommon.jar
Java Library path = C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/bin;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/java/bin;C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/java/jre/bin;C:\Program Files\IBM\WebSphere Studio\eclipse\jre\bin;.;C:\WINNT\System32;C:\WINNT;C:\Program Files\IBM\Application Developer Trial Edition\plugins\com.ibm.etools.server.jdk\bin;C:\ORANT1\bin;C:\Program Files\Oracle\jre\1.1.7\bin;C:\Program Files\Sybase\Jaguar CTS 3.5\bin;C:\Program Files\Sybase\Jaguar CTS 3.5\dll;C:\Program Files\Sybase\Jaguar CTS 3.5\client\dll;C:\Program Files\Sybase8\Shared\Sun\JDK118\bin;C:\Program Files\Sybase8\Shared\PowerBuilder;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\ORANT\BIN;C:\NOTES;C:\ORANT\JDBC\LIB;;C:\Sybase\shared;;C:\Program Files\Sybase8\SQL Anywhere 7\win32;C:\Program Files\Sybase8\Shared\Web Targets;C:\Program Files\Sybase8\Shared\MerantODBC;C:\Program Files\Rational\ClearCase\bin
************* End Display Current Environment *************
[1/20/03 9:35:24:411 EST] 1611ec57 ManagerAdmin I TRAS0017I: The startup trace state is *=all=disabled.
[1/20/03 9:35:27:606 EST] 1611ec57 AdminInitiali A ADMN0015I: AdminService initialized
[1/20/03 9:35:30:440 EST] 1611ec57 Configuration A SECJ0215I: Successfully set JAAS login provider configuration class to com.ibm.ws.security.auth.login.Configuration.
[1/20/03 9:35:30:550 EST] 1611ec57 SecurityDM I SECJ0231I: The Security component's FFDC Diagnostic Module com.ibm.ws.security.core.SecurityDM registered successfully: true.
[1/20/03 9:35:31:361 EST] 1611ec57 SecurityCompo I SECJ0309I: Java 2 Security is disabled.
[1/20/03 9:35:31:461 EST] 1611ec57 SecurityCompo I SECJ0212I: WCCM JAAS configuration information successfully pushed to login provider class.
[1/20/03 9:35:31:511 EST] 1611ec57 SecurityCompo I SECJ0240I: Security service initialization completed successfully
[1/20/03 9:35:31:542 EST] 1611ec57 JMSRegistrati A MSGS0602I: WebSphere Embedded Messaging Client only has been installed
[1/20/03 9:35:42:237 EST] 1611ec57 JMXSoapAdapte A ADMC0013I: SOAP connector available at port 8880
[1/20/03 9:35:42:247 EST] 1611ec57 SecurityCompo I SECJ0243I: Security service started successfully
[1/20/03 9:35:42:247 EST] 1611ec57 SecurityCompo I SECJ0210I: Security enabled false
[1/20/03 9:35:45:752 EST] 1611ec57 ResourceMgrIm I WSVR0049I: Binding EchargeItDataSource_CF as eis/jdbc/EchargeItDatasource_CMP
[1/20/03 9:35:45:892 EST] 1611ec57 ResourceMgrIm I WSVR0049I: Binding EchargeItDataSource as jdbc/EchargeItDatasource
[1/20/03 9:35:47:595 EST] 1611ec57 CacheServiceI I DYNA0048I: WebSphere Dynamic Cache initialized successfully.
[1/20/03 9:35:47:905 EST] 1611ec57 FileBeanStore W CNTR0023W: Directory "C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/temp" does not exist. The EJB Container will use the current directory for passivating beans.
[1/20/03 9:35:52:822 EST] 1611ec57 ApplicationMg A WSVR0200I: Starting application: IBMUTC
[1/20/03 9:35:53:543 EST] 1611ec57 WebContainer A SRVE0161I: IBM WebSphere Application Server - Web Container. Copyright IBM Corp. 1998-2002
[1/20/03 9:35:53:663 EST] 1611ec57 WebContainer A SRVE0162I: Servlet Specification Level: 2.3
[1/20/03 9:35:53:663 EST] 1611ec57 WebContainer A SRVE0163I: Supported JSP Specification Level: 1.2
[1/20/03 9:35:53:914 EST] 1611ec57 WebContainer A SRVE0169I: Loading Web Module: IBM Universal Test Client.
[1/20/03 9:35:54:384 EST] 1611ec57 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: JSP 1.2 Processor: init
[1/20/03 9:35:54:575 EST] 1611ec57 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: SimpleFileServlet: init
[1/20/03 9:35:54:775 EST] 1611ec57 ApplicationMg A WSVR0221I: Application started: IBMUTC
[1/20/03 9:35:54:785 EST] 1611ec57 ApplicationMg A WSVR0200I: Starting application: EchargeIt
[1/20/03 9:35:54:805 EST] 1611ec57 WebContainer A SRVE0169I: Loading Web Module: EchargeItWeb.
[1/20/03 9:35:54:905 EST] 1611ec57 WebGroup I SRVE0180I: [EchargeItWeb] [/EchargeItWeb] [Servlet.LOG]: JSP 1.2 Processor: init
[1/20/03 9:35:54:985 EST] 1611ec57 WebGroup I SRVE0180I: [EchargeItWeb] [/EchargeItWeb] [Servlet.LOG]: SimpleFileServlet: init
[1/20/03 9:35:55:176 EST] 1611ec57 WebGroup I SRVE0180I: [EchargeItWeb] [/EchargeItWeb] [Servlet.LOG]: InvokerServlet: init
[1/20/03 9:35:55:186 EST] 1611ec57 EJBContainerI I WSVR0207I: Preparing to start EJB jar: EchargeItEJB.jar
[1/20/03 9:35:58:841 EST] 1611ec57 EJBContainerI I WSVR0037I: Starting EJB jar: EchargeItEJB.jar
[1/20/03 9:36:01:535 EST] 1611ec57 ApplicationMg A WSVR0221I: Application started: EchargeIt
[1/20/03 9:36:01:585 EST] 1611ec57 HttpTransport A SRVE0171I: Transport http is listening on port 9,080.
[1/20/03 9:36:04:068 EST] 1611ec57 HttpTransport A SRVE0171I: Transport https is listening on port 9,443.
[1/20/03 9:36:04:108 EST] 1611ec57 RMIConnectorC A ADMC0026I: RMI Connector available at port 2809
[1/20/03 9:36:04:178 EST] 1611ec57 WsServer A WSVR0001I: Server server1 open for e-business
[1/20/03 9:36:10:207 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: initializeServlet: init
[1/20/03 9:36:10:778 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /index.jsp: init
[1/20/03 9:36:13:131 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/toolbar/global_nav.jsp: init
[1/20/03 9:36:13:472 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/homePage/homeFrame.jsp: init
[1/20/03 9:36:14:523 EST] 3846ac5d WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/homePage/homePage.jsp: init
[1/20/03 9:36:14:664 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/toolbar/toolbar.jsp: init
[1/20/03 9:36:14:704 EST] 3846ac5d WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/homePage/home.jsp: init
[1/20/03 9:36:18:349 EST] 3846ac5d WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/jndiPage/jndiFrame.jsp: init
[1/20/03 9:36:18:789 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/jndiPage/jndiPage.jsp: init
[1/20/03 9:36:18:980 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: /html/jndiPage/jndi.jsp: init
[1/20/03 9:36:31:588 EST] c2eec47 WebGroup I SRVE0180I: [IBM Universal Test Client] [/UTC] [Servlet.LOG]: jndiLookupServlet: init
[1/20/03 9:39:15:504 EST] 21ec6c40 WebGroup I SRVE0180I: [EchargeItWeb] [/EchargeItWeb] [Servlet.LOG]: /Logon.jsp: init
[1/20/03 9:39:18:398 EST] 21ec6c40 WebGroup I SRVE0180I: [EchargeItWeb] [/EchargeItWeb] [Servlet.LOG]: LogonServlet: init
[1/20/03 9:39:18:398 EST] 21ec6c40 SystemOut O my servlet init before lookup
[1/20/03 9:39:18:408 EST] 21ec6c40 SystemErr R javax.naming.NameNotFoundException: ejb/echargeit/entity/UserfileLocalHome
[1/20/03 9:39:18:408 EST] 21ec6c40 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1503)
[1/20/03 9:39:18:408 EST] 21ec6c40 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1457)
[1/20/03 9:39:18:418 EST] 21ec6c40 SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1167)
[1/20/03 9:39:18:418 EST] 21ec6c40 SystemErr R at com.ibm.ws.naming.ut
I noticed that I created entities in package echargeit.entity and session beans in
echargeit.session but in JNDI explorer all entities are under:
Local EJB beans/ejb/echargeit/entity,
while the session beans are under: ejb/echargeit/session.
So they are on different nodes. For entity bean JNDI name
is ejb/echargeit/entity/UserfileLocalHome and
for session - ejb/echargeit/session/ExistingWipsHome.
(Those JNDI names were created by WSAD)
I have a working project in WSAD 4 where both entities and sessions are
undere the same node which is
the package name.
So what should I do to make them work?
Thanks in advance
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, are these all local entities or remote entities -- this is an important distinction because the rules are VERY different...
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
when I created them using bottom-up mapping, wizard did not ask me how I want them, local or remote. So it created them as local with interfaces:
UserfileLocalHome
UserfileLocal
UserfileBean
UserfileKey ....
In my code I do lookup that way:
echargeit.entity.UserfileLocalHome home;
echargeit.entity.UserfileLocal userfilelocal;
...
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup
("ejb/echargeit/entity/UserfileLocalHome");

home =
(echargeit.entity.UserfileLocalHome)
PortableRemoteObject.narrow(objref,
echargeit.entity.UserfileLocalHome.class);
So what I did wrong?
Thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, local interfaces are NOT looked up by the global JNDI name (strange but true -- the spec is actually very vague on this, and IBM had to make an interpretation, so we chose one that other vendors had chosen as well).
To look up a local EJB you MUST use a local JNDI name. That is, in WSAD, pick your session bean or other Entity bean where the lookup happens, select the "references" tab and add a local EJB reference pointing to that bean. So if the local EJB reference name that you create is "ejb/MyEJB" then in your Session bean code you will do a ctx.lookup() of
"java:comp/env/ejb/MyEJB"
Hope this helps.
Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Still have the exception "name not found":
javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
Thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK, can you post the contents of the ibm-ejb-bnd.xmi file to here so I can see what you've mapped. Also, a tiny code snippet showing just your JNDI lookup would be good too.
Thanks.
Kyle
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Ah, also I'll need to see your ejb-jar.xml file. Post that too.
Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmlns:commonbnd="commonbnd.xmi" xmlns:common="common.xmi" xmi:id="EJBJarBinding_1042582265963" currentBackendId="ORACLE_V8_1">
<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_ID"/>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265963" jndiName="ejb/echargeit/entity/Timedetail_masterLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582263239"/>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091296" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265964" jndiName="ejb/echargeit/entity/UserfileLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582264201"/>
<ejbRefBindings xmi:id="EjbRefBinding_1043098021648" jndiName="ejb/echargeit/entity/UserfileLocalHome">
<bindingEjbRef xmi:type="common:EJBLocalRef" href="META-INF/ejb-jar.xml#EJBLocalRef_1043098021648"/>
</ejbRefBindings>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091297" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265965" jndiName="ejb/echargeit/entity/TimeuserLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582264371"/>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091298" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265966" jndiName="ejb/echargeit/entity/DatesLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582264461"/>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091299" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265967" jndiName="ejb/echargeit/entity/NonchargeLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582264631"/>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091300" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042582265968" jndiName="ejb/echargeit/entity/Assignment_bLocalHome">
<enterpriseBean xmi:type="ejb:ContainerManagedEntity" href="META-INF/ejb-jar.xml#ContainerManagedEntity_1042582265873"/>
<cmpConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091301" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042735153730" jndiName="ejb/echargeit/session/SearchWipHome">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#SearchWip"/>
</ejbBindings>
<ejbBindings xmi:id="EnterpriseBeanBinding_1042940491187" jndiName="ejb/echargeit/session/ExistingWipsHome">
<enterpriseBean xmi:type="ejb:Session" href="META-INF/ejb-jar.xml#ExistingWips"/>
</ejbBindings>
<defaultCMPConnectionFactory xmi:id="CMPConnectionFactoryBinding_1042585091302" jndiName="jdbc/EchargeItDatasource" resAuth="Container"/>
</ejbbnd:EJBJarBinding>
This is how I do lookup:
public void init() throws javax.servlet.ServletException
{
//super.init(config);
try
{
System.out.println("my servlet init before lookup");
InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("java:comp/env/ejb/echargeit/entity/UserfileLocalHome");
System.out.println("my servlet init after lookup");
home =
(echargeit.entity.UserfileLocalHome)PortableRemoteObject.narrow(objref,
echargeit.entity.UserfileLocalHome.class);
System.out.println("my servlet init after home =");
}
catch(Exception e)
{
e.printStackTrace();
System.out.println("my servlet init");
}
}
Thanks Kyle
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Thanks for those two -- but I still need to see the ejb-jar.xml file, too...
P.S. Putting a space between each opening brace ("<") and the first letter of the tag name makes it show up nicely in JavaRanch.
Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Sorry Kyle, it is too big to put space in each line...
< ?xml version="1.0" encoding="UTF-8"?>
< !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 id="ejb-jar_ID">
< display-name>EchargeItEJB</display-name>
< enterprise-beans>
< entity id="ContainerManagedEntity_1042582263239">
< ejb-name>Timedetail_master</ejb-name>
<local-home>echargeit.entity.Timedetail_masterLocalHome</local-home>
<local>echargeit.entity.Timedetail_masterLocal</local>
<ejb-class>echargeit.entity.Timedetail_masterBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.Timedetail_masterKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Timedetail_master</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582262208">
<field-name>staff_number</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262228">
<field-name>lineitem</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262248">
<field-name>dateentered</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262278">
<field-name>wip_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262298">
<field-name>payperiod</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262318">
<field-name>hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262338">
<field-name>memo</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262358">
<field-name>taxyear</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262378">
<field-name>conflict</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262398">
<field-name>cn</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262418">
<field-name>projno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262438">
<field-name>service_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262468">
<field-name>cecode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262488">
<field-name>kilometers</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262498">
<field-name>kmdollars</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262518">
<field-name>kmexpensecode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262538">
<field-name>mealcode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262558">
<field-name>mealexpensecode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262568">
<field-name>mealallowance</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262709">
<field-name>origin_office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262839">
<field-name>origin_dept</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262859">
<field-name>staff_office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262909">
<field-name>staff_dept</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262929">
<field-name>staff_class</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262949">
<field-name>staff_surname</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582262969">
<field-name>staff_initials</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263049">
<field-name>calc_rate</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263079">
<field-name>leave_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263099">
<field-name>relieved_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263109">
<field-name>transfer_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263129">
<field-name>transfer_key</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263149">
<field-name>display_mode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263159">
<field-name>add_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263179">
<field-name>us_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263199">
<field-name>lock_expense</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263209">
<field-name>tax_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263229">
<field-name>staff_true_rate</field-name>
</cmp-field>
<query>
<description>fa</description>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>select object(o) from Timedetail_master o</ejb-ql>
</query>
</entity>
<entity id="ContainerManagedEntity_1042582264201">
<ejb-name>Userfile</ejb-name>
<local-home>echargeit.entity.UserfileLocalHome</local-home>
<local>echargeit.entity.UserfileLocal</local>
<ejb-class>echargeit.entity.UserfileBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.UserfileKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Userfile</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582263259">
<field-name>staff_number</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263279">
<field-name>office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263289">
<field-name>department</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263309">
<field-name>full_initials</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263319">
<field-name>staff_userid</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263339">
<field-name>password</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263349">
<field-name>user_level</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263370">
<field-name>approval_pwd</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263380">
<field-name>cs_expand</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263400">
<field-name>cs_assignment</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263410">
<field-name>invest_sort</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263430">
<field-name>mgr_send</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263440">
<field-name>created_cycle</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263450">
<field-name>last_cycle</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263470">
<field-name>status</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263480">
<field-name>staff_class</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263500">
<field-name>billing_rate</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263570">
<field-name>category</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263650">
<field-name>job_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263710">
<field-name>team</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263770">
<field-name>staff_initials</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263800">
<field-name>staff_surname</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263810">
<field-name>trs_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263820">
<field-name>delete_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582263840">
<field-name>user_access</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264010">
<field-name>staff_job</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264020">
<field-name>staff_firstname</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264030">
<field-name>groupno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264051">
<field-name>chglevel</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264061">
<field-name>stndhourscode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264081">
<field-name>lastsynchronized</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264091">
<field-name>termination_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264101">
<field-name>working_office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264121">
<field-name>working_department</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264151">
<field-name>effective_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264161">
<field-name>pad_rate</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264171">
<field-name>sdn_export</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264191">
<field-name>sdn_transaction_type</field-name>
</cmp-field>
<ejb-local-ref id="EJBLocalRef_1043099902383">
<description></description>
<ejb-ref-name>java:comp/env/ejb/echargeit/entity/UserfileLocalHome</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>echargeit.entity.UserfileLocalHome</local-home>
<local>echargeit.entity.UserfileLocal</local>
<ejb-link>Userfile</ejb-link>
</ejb-local-ref>
<query>
<description>f</description>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>select object(o) from Userfile o</ejb-ql>
</query>
</entity>
<entity id="ContainerManagedEntity_1042582264371">
<ejb-name>Timeuser</ejb-name>
<local-home>echargeit.entity.TimeuserLocalHome</local-home>
<local>echargeit.entity.TimeuserLocal</local>
<ejb-class>echargeit.entity.TimeuserBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.TimeuserKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Timeuser</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582264221">
<field-name>staff_number</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264231">
<field-name>payperiod</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264241">
<field-name>timeperiodfrom</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264261">
<field-name>timeperiodto</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264271">
<field-name>taxyear</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264281">
<field-name>lastsynchronized</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264291">
<field-name>submitted</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264311">
<field-name>lineitem</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264321">
<field-name>periodstndhours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264331">
<field-name>daysoutoftown</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264341">
<field-name>submittedtofist</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264351">
<field-name>acctperiod</field-name>
</cmp-field>
<query>
<description>tu</description>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>select object(o) from Timeuser o</ejb-ql>
</query>
</entity>
<entity id="ContainerManagedEntity_1042582264461">
<ejb-name>Dates</ejb-name>
<local-home>echargeit.entity.DatesLocalHome</local-home>
<local>echargeit.entity.DatesLocal</local>
<ejb-class>echargeit.entity.DatesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.DatesKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Dates</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582264381">
<field-name>timeperiodfrom</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264391">
<field-name>timeperiodto</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264401">
<field-name>taxyear</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264411">
<field-name>payperiod</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264431">
<field-name>submittedtofist</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264441">
<field-name>lastsynchronized</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264451">
<field-name>expense_submittedtofist</field-name>
</cmp-field>
</entity>
<entity id="ContainerManagedEntity_1042582264631">
<ejb-name>Noncharge</ejb-name>
<local-home>echargeit.entity.NonchargeLocalHome</local-home>
<local>echargeit.entity.NonchargeLocal</local>
<ejb-class>echargeit.entity.NonchargeBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.NonchargeKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Noncharge</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582264471">
<field-name>code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264481">
<field-name>description</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264491">
<field-name>office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264511">
<field-name>department</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264531">
<field-name>main</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264541">
<field-name>cecode</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264551">
<field-name>status</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264561">
<field-name>lastsynchronized</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264571">
<field-name>assignment_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264581">
<field-name>gl_office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264591">
<field-name>gl_department</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264601">
<field-name>gl_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264621">
<field-name>display_mode</field-name>
</cmp-field>
<query>
<description>fc</description>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>select object(o) from Noncharge o</ejb-ql>
</query>
</entity>
<entity id="ContainerManagedEntity_1042582265873">
<ejb-name>Assignment_b</ejb-name>
<local-home>echargeit.entity.Assignment_bLocalHome</local-home>
<local>echargeit.entity.Assignment_bLocal</local>
<ejb-class>echargeit.entity.Assignment_bBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>echargeit.entity.Assignment_bKey</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>Assignment_b</abstract-schema-name>
<cmp-field id="CMPAttribute_1042582264641">
<field-name>wip_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264651">
<field-name>department</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264661">
<field-name>office</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264671">
<field-name>main</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264681">
<field-name>cum_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264691">
<field-name>curr_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264701">
<field-name>cum_value</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264711">
<field-name>curr_value</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264721">
<field-name>allowance</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264731">
<field-name>interim_bill</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264772">
<field-name>cum_expense</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264832">
<field-name>gross_wip</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264872">
<field-name>net_wip</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264912">
<field-name>assignment</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264942">
<field-name>sub_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582264992">
<field-name>clientname</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265032">
<field-name>assignname</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265052">
<field-name>ptr_init</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265062">
<field-name>ptnr_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265072">
<field-name>ptr_alternate</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265082">
<field-name>aptnr_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265092">
<field-name>mgr_init</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265102">
<field-name>mgr_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265112">
<field-name>rate_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265192">
<field-name>practice_unit</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265202">
<field-name>percentage</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265212">
<field-name>delete_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265222">
<field-name>authority</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265232">
<field-name>auth_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265233">
<field-name>location</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265242">
<field-name>loca_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265252">
<field-name>status</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265262">
<field-name>discount</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265272">
<field-name>group_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265282">
<field-name>memo_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265292">
<field-name>other_pic</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265302">
<field-name>opic_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265312">
<field-name>other_mgr</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265322">
<field-name>omgr_stno</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265332">
<field-name>billing_rate</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265342">
<field-name>basic_service</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265352">
<field-name>client_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265372">
<field-name>new_client_to_off</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265373">
<field-name>source_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265382">
<field-name>assignment_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265392">
<field-name>fiscal_year_end</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265402">
<field-name>tax_return</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265403">
<field-name>legal_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265412">
<field-name>add_to_ind</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265432">
<field-name>opened_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265443">
<field-name>effective_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265463">
<field-name>delete_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265464">
<field-name>mcs_client_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265473">
<field-name>mcs_new_client</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265483">
<field-name>mcs_competitive</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265484">
<field-name>mcs_prop_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265493">
<field-name>mcs_audit_client</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265503">
<field-name>mcs_industry_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265504">
<field-name>mcs_exp_hours</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265513">
<field-name>mcs_exp_value</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265523">
<field-name>mcs_practice_unit</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265524">
<field-name>mcs_functional_focus</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265533">
<field-name>mcs_vendor_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265543">
<field-name>dp_percent</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265544">
<field-name>ni_percent</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265553">
<field-name>trans_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265563">
<field-name>pending_verify</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265564">
<field-name>lastsynchronized</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265573">
<field-name>tax_type</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265583">
<field-name>global2000</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265584">
<field-name>pw400</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265593">
<field-name>chairman100</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265603">
<field-name>local_top_tier</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265604">
<field-name>enterprise_num</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265613">
<field-name>sector</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265614">
<field-name>client_active_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265623">
<field-name>cross_selling_mcs</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265624">
<field-name>cross_selling_fas</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265633">
<field-name>cross_selling_tax</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265634">
<field-name>cross_selling_audit</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265643">
<field-name>quoted_max_fees</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265653">
<field-name>quoted_max_expenses</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265654">
<field-name>expected_expenses</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265663">
<field-name>standard_fees</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265664">
<field-name>start_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265673">
<field-name>finish_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265674">
<field-name>proposal_date</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265683">
<field-name>invoice_client_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265684">
<field-name>travel_cost_flag</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265693">
<field-name>allowed_km</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265694">
<field-name>duns_number</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265703">
<field-name>client_location</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265704">
<field-name>client_address1</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265713">
<field-name>client_address2</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265714">
<field-name>client_address3</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265723">
<field-name>client_address4</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265724">
<field-name>client_city</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265725">
<field-name>client_state</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265733">
<field-name>client_province</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265743">
<field-name>client_county</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265744">
<field-name>client_postal_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265753">
<field-name>client_country</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265754">
<field-name>billing_location</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265763">
<field-name>billing_address1</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265764">
<field-name>billing_address2</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265765">
<field-name>billing_address3</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265773">
<field-name>billing_address4</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265774">
<field-name>billing_city</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265783">
<field-name>billing_state</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265784">
<field-name>billing_province</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265793">
<field-name>billing_county</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265794">
<field-name>billing_postal_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265795">
<field-name>billing_country</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265803">
<field-name>enterprise_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265804">
<field-name>subassignment_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265813">
<field-name>statutory_auditors</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265814">
<field-name>stat_auditor_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265815">
<field-name>country_of_control</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265823">
<field-name>country_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265824">
<field-name>jurisdiction</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265825">
<field-name>jurisdiction_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265833">
<field-name>cross_selling</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265834">
<field-name>sub_cdn_ent</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265835">
<field-name>cdn_parent</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265836">
<field-name>cdn_parent_stat_aud</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265843">
<field-name>cdn_par_aud_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265844">
<field-name>fgn_parent_stat_aud</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265845">
<field-name>fgn_par_aud_name</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265853">
<field-name>global50</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265854">
<field-name>global200</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265855">
<field-name>national_top_tier</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265863">
<field-name>subsector_code</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265864">
<field-name>auto_allowance</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265865">
<field-name>mn_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265866">
<field-name>ent_id</field-name>
</cmp-field>
<cmp-field id="CMPAttribute_1042582265873">
<field-name>pst_province</field-name>
</cmp-field>
</entity>
<session id="SearchWip">
<ejb-name>SearchWip</ejb-name>
<home>echargeit.session.SearchWipHome</home>
<remote>echargeit.session.SearchWip</remote>
<ejb-class>echargeit.session.SearchWipBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<session id="ExistingWips">
<ejb-name>ExistingWips</ejb-name>
<home>echargeit.session.ExistingWipsHome</home>
<remote>echargeit.session.ExistingWips</remote>
<ejb-class>echargeit.session.ExistingWipsBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK Jenny, where you have:
< ejb-local-ref id="EJBLocalRef_1043099902383">
< description></ description>
< ejb-ref-name>java:comp/env/ejb/echargeit/entity/UserfileLocalHome</ ejb-ref-name>
< ejb-ref-type>Entity</ ejb-ref-type>
< local-home>echargeit.entity.UserfileLocalHome</local-home>
< local>echargeit.entity.UserfileLocal</ local>
< ejb-link>Userfile</ ejb-link>
< /ejb-local-ref>
Change the line that says < ejb-ref-name> to read
< ejb-ref-name>ejb/echargeit/entity/UserfileLocalHome</ ejb-ref-name>
Then, change your code to read:
InitialContext ctx = new InitialContext();
echargeit.entity.UserfileLocalHome home = (echargeit.entity.UserfileLocalHome)ctx.lookup("java:comp/env/ejb/echargeit/entity/UserfileLocalHome");

Note that you don't need the PortableRemotObject.narrow() call -- Local EJB references are different that way.
Also, if you want to look up a local reference from a servlet (note that I was talking about Session beans) you should add a local EJB reference to the Servlet's web.xml file containing the same information. The references tab in the editor for web.xml should help you do that. The key is to remember to type in everything EXCEPT the java:comp/env part of the local name.
And another design point -- hopefully in your final application you won't be looking up Entity beans from a servlet -- that's a bad idea for a number of reasons.
Now, I have some homework for you -- you really should read Richard Monson-Haefel's "Enterprise JavaBeans, third edition". It explains all of these things in great detail, with a number of examples. AFter reviewing the rules for Local EJB references there, you should be all set.
Kyle
[ January 20, 2003: Message edited by: Kyle Brown ]
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Hi Kyle,
I made those two changes as you said. (ejb-jar and code) I double-check everything, but still doesn't work... Exception in the same place, but a little bit different message:
javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
ejb-jar:
< ejb-local-ref id="EJBLocalRef_1043099902383">
< description></description>
< ejb-ref-name>ejb/echargeit/entity/UserfileLocalHome</ejb-ref-name>
< ejb-ref-type>Entity</ejb-ref-type>
< local-home>echargeit.entity.UserfileLocalHome</local-home>
< local>echargeit.entity.UserfileLocal</local>
< ejb-link>Userfile</ejb-link>
</ejb-local-ref>
Thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Did you note what I said about the servlet? I think you've added a local reference into the EJB-JAR file, but that you're running the code in a servlet. That won't help! The local reference (in the form I showed you) will have to be placed in the web.xml file to be able to look up the name from a servlet...

Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Hi Kyle,
I am really confused�
I realise that it is not a good design to call entity from servlet and later I�ll fix it. But isn�t it possible at all?
If yes, I did those two changes you advised (ejb-jar and code). In WAR I go to references tab, add new reference, than in right part I select type as entity (because I call entity from servlet so far). Then I browse to select link and can select only from session beans!??
So if it is not possible at all to call entity from servlet, why to allow selecting type as entity?
So how can I add references to WAR for entity bean? I just need to make it work. So far to make a project work I have to give up all entities but I would like to try to use at least one. Later I�ll definitely do right design
Hope for your help again
Thanks
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
OK Jenny,
Open an editor on web.xml. Flip to the References tab. Flip to the "EJB Local" tab within that. Add your local reference there.
Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Hi Kyle,
The same exception�
javax.naming.NameNotFoundException: Name comp/env/ejb not found in context "java:".
My web.xml:
< ?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
< web-app id="WebApp">
< display-name>EchargeItWeb</display-name>
< servlet>
< servlet-name>LogonServlet</servlet-name>
< display-name>LogonServlet</display-name>
< servlet-class>echargeitservlet.LogonServlet</servlet-class>
</servlet>
< servlet-mapping>
< servlet-name>LogonServlet</servlet-name>
< url-pattern>/LogonServlet</url-pattern>
</servlet-mapping>
< welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
< ejb-local-ref id="EJBLocalRef_1043166909181">
< ejb-ref-name>(New EJB Local Ref)</ejb-ref-name>
< ejb-ref-type>Entity</ejb-ref-type>
< local-home>echargeit.entity.UserfileLocalHome</local-home>
< local>echargeit.entity.UserfileLocal</local>
< ejb-link>EchargeItEJB.jar#Userfile</ejb-link>
</ejb-local-ref>
</web-app>
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
That's because your ref name is the default (New EJB Local Ref) and not the name you need (ejb/echargeit/entity/UserfileLocalHome). You need to change it in the source view of the web.xml editor.
Kyle
Jenny Kalinina
Ranch Hand

Joined: Nov 07, 2002
Posts: 52
Thanks a lot Kyle,
This step is okay now,
But should I add some more references? Looks like findByPrimaryKey doesn�t work. In UTC it is okay.
But when I call it from code, it returns
java.lang.NullPointerException
My code is:
public class LogonServlet extends HttpServlet
{
echargeit.entity.UserfileLocalHome home;
echargeit.entity.UserfileLocal userfilelocal;
public void init(){�}
public void doPost
{�
String userno = request.getParameter("userid");
int userid = Integer.valueOf(userno).intValue();
BigDecimal user = new BigDecimal(userid);
echargeit.entity.UserfileKey primarykey =
new echargeit.entity.UserfileKey(user);
try
{
userfilelocal = home.findByPrimaryKey(primarykey);

server output for pimarykey is echargeit.entity.UserfileKey@4cd77
I did not have all those problems with WSAD 4�
Thanks in advance
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Look in the console log. My guess is that something went wrong in the database and the findByPrimaryKey didn't execute...
Also, either put in a breakpoint (and start the server in debug mode) or put a System.out.println() before you build the key and double-check that the userid has the right value.
Good luck.
Kyle
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Entity beans could not be used (WSAD 5)