Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Ronak Parekh

Greenhorn
+ Follow
since Aug 21, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ronak Parekh

In case of dynamic queries, I found out that the finder method can not be defined in the Home class. I defined the finder
method in the Bean.
In my Bean, this is the code:
public Collection findAllActivities(String filter, Object[] arguments) throws FinderException
{
Properties myProp = new Properties();
for(int i = 0; i < arguments.length; i++)
{
myProp.setProperty(String.valueOf(i), String.valueOf((arguments[i])));
}

try
{
InitialContext ic = new InitialContext();
RolesHome rh = (RolesHome)ic.lookup("RolesHome");
QueryHome qh = (QueryHome)rh;

String weblogicQL = "SELECT DISTINCT OBJECT(o) FROM roles AS o" + filter;

Query query = qh.createQuery();
return query.find(weblogicQL, myProp);
}
catch (Exception e)
{
e.printStackTrace();
return null;
}
}
I get a naming exception if I use : RolesHome rh = (RolesHome)ic.lookup("RolesHome");
javax.naming.NameNotFoundException: Unable to resolve 'RolesHome' Resolved: '' Unresolved:'RolesHome' ; remaining name
'RolesHome'
I get a casting exception if I use: RolesHome rh = (RolesHome)ic.lookup("Roles");

In my jsp file:
I have this code
InitialContext jndiContext = new InitialContext();
Object obj = jndiContext.lookup("Roles");
RolesHome rolesHome = (RolesHome) obj;
list = (ArrayList) rolesHome.findAllActivities(filter, filterParams);
but the problem is that the home interface does not contain the findAllActivities function. I have already defined rolesHome
earlier in the code which I want to use for findAllActivities also. I can not cast the bean e.g. RolesBean rolesBean = (
RolesBean) rolesHome. I do not want to create a new bean as I am already using an old rolesHome. How do I solve this
problem??? Please do let me know. I am really confused.
Thanks
Ronak Parekh
15 years ago
In case of dynamic queries in weblogic 7.0, how do you avoid including a finder method which is defined in the home?
Example,
I have a finder method in the home class, which is a finder method for dynamic queries. How do you have both the weblogic-ql and ejb-ql as empty strings?
Please do let me know.
Thanks
Ronak Parekh
15 years ago
In case of dynamic queries in weblogic 7.0, how do you avoid including a finder method which is defined in the home?
Example,
I have a finder method in the home class, which is a finder method for dynamic queries. How do you have both the weblogic-ql and ejb-ql as empty strings?
Please do let me know.
Thanks
Ronak Parekh
I am using dynamic ql in my application and want to know if anyone knows about any good documenation on it. Also, in case of dynamic ql, I need to use a class called Query which has a function find. I could not find that too. Can anyone send me a link in case they do know of a good one.
Thank you
Ronak Parekh
15 years ago
Do I need to add an import for QueryHome? Also, what is query home?
I got the bottom code for dynamic QL on a bea website, but it doesn't work in giving me problem for QueryHome (can not resolve symbol). How do I implement dynamic QL in weblogic 7.0.
InitialContext ic = new InitialContext();
RolesHome rHome = (RolesHome)ic.lookup("");
QueryHome qh = (QueryHome)rHome;

String ejbQL = "SELECT DISTINCT OBJECT(o) FROM users AS o," + " IN(o.forRoleID) AS r" + " WHERE r.iD = " + getID() +
filter + orderBy;
Query query = qh.createQuery();
Thank you
Ronak Parekh
15 years ago
what is the driver class needed for SQL server and in which folder is it
present in sql server? I am using weblogic 7.0 and SQL server 7.0. Please do
let me know.
Thank you
Ronak Parekh
15 years ago
This is the query:
<query>
<query-method>
<method-name>findAllWithConstraint</method-name>
<method-params/>
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM users AS o ORDERBY o.iD
DESC]]></ejb-ql>
</query>
This is the error:
weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
While trying to process Finder
Method Name: findAllWithConstraint
Parameter Types: ()
EJB Query: SELECT OBJECT(o) FROM users AS o ORDERBY o.iD DESC
)
Could not parse EJB QL expression: SELECT OBJECT(o) FROM users AS o
ORDERBY o.iD DESC
Please tell me the problem with this query
Ronak Parekh
15 years ago
I am try to check for relationships between my beans and I am not getting anything at all.
In my usersEJB,
I have made columns called "Username" and "Password".
In my rolesEJB,
I have made columns called "Username" and "Description"
When I load my roles_list_applet.jsp(bottom frame) and in users_list_applet.jsp(top frame) in a frame. There should be a relationship established between the two beans such that only the usernames in usersEJB should be present in rolesEJB. For some reason this is not happening.
I do not know the reason for it. How do I check my relationships between my beans? Is there any other way to check relationships between beans?
Please do let me know.
Thank you
Ronak Parekh
15 years ago
What is the reason for this error? The same code works in tomcat but does nto work in weblogic 6.1. What is the reason for it?

This is the error that I get:
C:\bea\wlserver6.1\config\mydomain\applications\.wlnotdelete\wlap38535\WEB-INF\_tmp_war_sempire_web\jsp_servlet\__roles_list_applet.java:117: cannot resolve symbol
symbol : variable SYSTEM_USER
location: class jsp_servlet.__roles_list_applet
Integer SYSTEM_USER_ID = SYSTEM_USER.getID(); //[ /users_list_applet.jsp; Line: 35]

This is the part of my code of my jsp files.

EmpEntities SYSTEM_USER = (EmpEntities) session.getAttribute("SYSTEM_USER");
Integer SYSTEM_USER_ID = SYSTEM_USER.getID();

Ronak Parekh
15 years ago
I am trying to use the orderby function in weblogic and the method in which
I have implemented I have shown in ejb-jar.xml and
weblogic-cmp-rdbms-jar.xml file shown below. Please do let me know if have
implemented it in the right way.
Thank you
Ronak Parekh
I am getthing the error:
Unable to deploy EJB: sempire_bc.jar from sempire_bc.jar:
Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error
was:
The finder method findAllOrderByRoleName of ejb RolesEJB cannot have
a null ejb ql value.
The finder method findAllOrderByUserName of ejb UsersEJB cannot have
a null ejb ql value.
This is my weblogic-cmp-rdbms-jar.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'
>
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>UsersEJB</ejb-name>
<data-source-name>UsersDB</data-source-name>
<table-name>USERS</table-name>
<field-map>
<cmp-field>iD</cmp-field>
<dbms-column>ID</dbms-column>
</field-map>
<field-map>
<cmp-field>userName</cmp-field>
<dbms-column>USER_NAME</dbms-column>
</field-map>
<field-map>
<cmp-field>userPass</cmp-field>
<dbms-column>USER_PASS</dbms-column>
</field-map>
<weblogic-query>
<query-method>
<method-name>findAllOrderByUserName</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<weblogic-ql>SELECT OBJECT(o) FROM o for UsersBean ORDERBY
o.userName</weblogic-ql>
</weblogic-query>
<weblogic-query>
<query-method>
<method-name>findAllOrderByUserPass</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<weblogic-ql>SELECT OBJECT(o) FROM o for UsersBean ORDERBY
o.userPass</weblogic-ql>
</weblogic-query>
</weblogic-rdbms-bean>
<weblogic-rdbms-bean>
<ejb-name>RolesEJB</ejb-name>
<data-source-name>RolesDB</data-source-name>
<table-name>ROLES</table-name>
<field-map>
<cmp-field>iD</cmp-field>
<dbms-column>ID</dbms-column>
</field-map>
<field-map>
<cmp-field>roleName</cmp-field>
<dbms-column>ROLE_NAME</dbms-column>
</field-map>
<field-map>
<cmp-field>roleDesc</cmp-field>
<dbms-column>ROLE_DESC</dbms-column>
</field-map>
<weblogic-query>
<query-method>
<method-name>findAllOrderByRoleName</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<weblogic-ql>SELECT OBJECT(o) FROM o for RolesBean ORDERBY
o.roleName</weblogic-ql>
</weblogic-query>
<weblogic-query>
<query-method>
<method-name>findAllOrderByRoleDesc</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<weblogic-ql>SELECT OBJECT(o) FROM o for RolesBean ORDERBY
o.roleDesc</weblogic-ql>
</weblogic-query>
</weblogic-rdbms-bean>
<create-default-dbms-tables>True</create-default-dbms-tables>
</weblogic-rdbms-jar>
This is my ejb-jar.xml file:
<?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>
<display-name>Business Component CMP 2.0</display-name>
<enterprise-beans>
<entity>
<display-name>Users Entity Bean</display-name>
<ejb-name>UsersEJB</ejb-name>

<local-home>com.sempire.builder.business_component.UsersHome</local-home>
<local>com.sempire.builder.business_component.Users</local>
<ejb-class>com.sempire.builder.business_component.UsersBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>users</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>userName</field-name></cmp-field>
<cmp-field><field-name>userPass</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<ejb-local-ref>
<ejb-ref-name>UsersEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.sempire.builder.business_component.UsersHome</local-home>
<local>com.sempire.builder.business_component.Users</local>
</ejb-local-ref>
<resource-ref>
<res-ref-name>jdbc/UsersDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAllWithConstraint</method-name>
<method-params />
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM users AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllOrderByUserName</method-name>
<method-params />
</query-method>
<ejb-ql></ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllOrderByUserPass</method-name>
<method-params />
</query-method>
<ejb-ql></ejb-ql>
</query>
</entity>
<entity>
<display-name>Roles Entity Bean</display-name>
<ejb-name>RolesEJB</ejb-name>

<local-home>com.sempire.builder.business_component.RolesHome</local-home>
<local>com.sempire.builder.business_component.Roles</local>
<ejb-class>com.sempire.builder.business_component.RolesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>roles</abstract-schema-name>
<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>roleName</field-name></cmp-field>
<cmp-field><field-name>roleDesc</field-name></cmp-field>
<primkey-field>iD</primkey-field>
<ejb-local-ref>
<ejb-ref-name>RolesEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>com.sempire.builder.business_component.RolesHome</local-home>
<local>com.sempire.builder.business_component.Roles</local>
</ejb-local-ref>
<resource-ref>
<res-ref-name>jdbc/RolesDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<query-method>
<method-name>findAllWithConstraint</method-name>
<method-params />
</query-method>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM roles AS o]]></ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllOrderByRoleName</method-name>
<method-params />
</query-method>
<ejb-ql></ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllOrderByRoleDesc</method-name>
<method-params />
</query-method>
<ejb-ql></ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>UsersEJB</ejb-name>
<method-name>*</method-name>
</method>
<method>
<ejb-name>RolesEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
15 years ago
I have this error in my weblogic.log file. I do not know the reason for the
error. What is the error about?
####<Oct 7, 2002 1:23:34 PM PDT> <Error> <Management> <hewlett-yf9yyzb>
<myserver> <ExecuteThread: '0' for queue: '__weblogic_admin_html_queue'>
<system> <> <140001> <Error getting attribute EJBName.MethodName on MBean
mydomain:Application=test,AssemblyDescriptor=AssemblyDescriptor-4,ContainerT
ransaction=ContainerTransaction-4,EJBComponent=sempire_bc,EJBDescriptor=EJBD
escriptor-4,EJBJar=EJBJar-9,Location=myserver,Name=Method-12,Type=Method.
Method: null>
javax.management.AttributeNotFoundException: EJBName.MethodName
at
weblogic.management.internal.DynamicMBeanImpl.getXAttributeInfo(DynamicMBean
Impl.java:1643)
at
weblogic.management.internal.DynamicMBeanImpl.getAttribute(DynamicMBeanImpl.
java:502)
at
weblogic.management.internal.DynamicMBeanImpl.getAttribute(DynamicMBeanImpl.
java:477)
at
com.sun.management.jmx.MBeanServerImpl.getAttribute(MBeanServerImpl.java:118
3)
at
com.sun.management.jmx.MBeanServerImpl.getAttribute(MBeanServerImpl.java:115
3)
at
weblogic.management.internal.MBeanProxy.getOneAttribute(MBeanProxy.java:283)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:199)
at $Proxy77.getAttribute(Unknown Source)
at
weblogic.management.console.utils.MBeans.getDisplayNameFor(MBeans.java:705)
at
weblogic.management.console.utils.ConsoleComparator.compare(ConsoleComparato
r.java:83)
at java.util.Arrays.mergeSort(Arrays.java:1176)
at java.util.Arrays.sort(Arrays.java:1123)
at java.util.Collections.sort(Collections.java:116)
at weblogic.management.console.utils.MBeans.sort(MBeans.java:1101)
at
weblogic.management.console.tags.DeclareBeanSetTag.doStartTag(DeclareBeanSet
Tag.java:96)
at
weblogic.management.console.webapp._ejb._ejb20.__nav._jspService(__nav.java:
4606)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:482)
at
weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImp
l.java:308)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:116)
at
weblogic.management.console.webapp._ejb.__nav._jspService(__nav.java:177)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImp
l.java:242)
at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:112)
at
weblogic.management.console.actions.ForwardAction.perform(ForwardAction.java
:35)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:171)
at
weblogic.management.console.actions.internal.ActionServlet.doGet(ActionServl
et.java:91)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2546)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2260)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Ronak Parekh
15 years ago
In my log file I get this error:

####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "ejb-local-ref" is not declared in the dtd or schema..>
####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "local-home" is not declared in the dtd or schema..>
####<Oct 2, 2002 10:55:39 AM PDT> <Info> <HTTP> <hewlett-yf9yyzb> <myserver> <ExecuteThread: '1' for queue: '__weblogic_admin_html_queue'> <system> <> <101160> <Deployment descriptor is malformed, check against the DTD: org.xml.sax.SAXParseException: Element type "local" is not declared in the dtd or schema..>

But what I don't understand is that the dtd for web.xml is "http://java.sun.com/dtd/web-app_2_3.dtd" and they use ejb-local-ref, local-home and local. Why do I still get the error when the dtd mentions it.

<web-app>

<ejb-ref>
<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>GangsterEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>

</ejb-local-ref>

<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>OrganizationEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>

</ejb-local-ref>

<ejb-local-ref>
<description>
Reference EJB resources in Weblogic Resources
</description>
<ejb-ref-name>JobEJB</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>

</ejb-local-ref>

</web-app>

Do I need to specify ejb-local-ref in my ejb-jar.xml also??
and my ejb-jar.xml is:

<?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>
<display-name>Business Component CMP 2.0</display-name>

<enterprise-beans>
<entity>
<display-name>Gangster Entity Bean</display-name>
<ejb-name>GangsterEJB</ejb-name>

<local-home>com.sempire.builder.business_component.GangsterHome</local-home>
<local>com.sempire.builder.business_component.Gangster</local>
<ejb-class>com.sempire.builder.business_component.GangsterBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>GangsterEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>nickname</field-name></cmp-field>
<cmp-field><field-name>badness</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/GangsterDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM GangsterEJB AS a]]>
</ejb-ql>
</query>
</entity>

<entity>
<display-name>Organization Entity Bean</display-name>
<ejb-name>OrganizationEJB</ejb-name>

<local-home>com.sempire.builder.business_component.OrganizationHome</local-home>
<local>com.sempire.builder.business_component.Organization</local>
<ejb-class>com.sempire.builder.business_component.OrganizationBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>OrganizationEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>description</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/OrganizationDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM OrganizationEJB AS a]]>
</ejb-ql>
</query>

</entity>

<entity>
<display-name>Job Entity Bean</display-name>
<ejb-name>JobEJB</ejb-name>

<local-home>com.sempire.builder.business_component.JobHome</local-home>
<local>com.sempire.builder.business_component.Job</local>
<ejb-class>com.sempire.builder.business_component.JobBean</ejb-class>

<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Integer</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>

<abstract-schema-name>JobEJB</abstract-schema-name>

<cmp-field><field-name>iD</field-name></cmp-field>
<cmp-field><field-name>name</field-name></cmp-field>
<cmp-field><field-name>score</field-name></cmp-field>
<cmp-field><field-name>setupCost</field-name></cmp-field>
<primkey-field>iD</primkey-field>

<resource-ref>
<res-ref-name>jdbc/JobDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>

<query>
<query-method>
<method-name>findAll</method-name>
<method-params></method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM JobEJB AS a]]>
</ejb-ql>
</query>
</entity>

</enterprise-beans>

Thanks
Ronak Parekh
15 years ago
In case I change the name of the jndi name to a unique name. I still get the same problem. I checked for multiple occurences, but there aren't any.
My weblogic-ejb-jar.xml file is:
<weblogic-enterprise-bean>
<ejb-name>GangsterEJB</ejb-name>
<local-jndi-name>Gangster</local-jndi-name>
</weblogic-enterprise-bean>
I do not get the problem.
Thank you
Ronak Parekh

This is the error:
Unable to deploy EJB: OrganizationEJB from sempire_bc.jar:

Unable to bind EJB Home Interface to the JNDI name: Organization. The error was:

javax.naming.NameAlreadyBoundException: Organization is already bound; remaining
name ''
<<no stack trace available>>

Ronak Parekh
15 years ago
do I need to copy any jsp file or jar file in c:/bea???
I have deployed my application. My path structure is:
c:/myapp/META-INF/application.xml
c:/myapp/myejb/META-INF/ejb-jar.xml
c:/myapp/myejb/META-INF/weblogic-ejb-jar.xml
c:/myapp/myejb/META-INF/weblogic-cmp-rdbms-jar.xml
c:/myapp/myejb/META-INF/classes/*.class
c:/myapp/WEB-INF/jsps/*.jsp
c:/myapp/WEB-INF/web.xml
c:/myapp/WEB-INF/weblogic.xml
I copy app.ear to c:/bea/wlserver6.1/config/mydomain/applications
Do I have to copy any other files in c:/bea? Do I have to copy gangster_list_applet.jsp or *.jar file in any folder in bea? If yes, which and where??? Please do let me know.
When I deploy my file, I get the output as
<Sep 25, 2002 12:32:26 PM PDT> <Debug> <HTTP> <Registering ServletContext:
"sempire_web:/myapp">
How do I run my jsp files to see if it gets the JavaBean instances? In case
I have a file gangster_list_applet.jsp.
Do I check it by specifying the url
http://127.0.0.1:7001/gangster_list_applet.jsp or is it something else?
Thank you
Ronak Parekh
15 years ago
I have deployed my application. My path structure is:
myapp/META-INF/application.xml
myapp/myejb/META-INF/ejb-jar.xml
myapp/myejb/META-INF/weblogic-ejb-jar.xml
myapp/myejb/META-INF/weblogic-cmp-rdbms-jar.xml
myapp/myejb/META-INF/classes/*.class
myapp/WEB-INF/jsps/*.jsp
myapp/WEB-INF/web.xml
myapp/WEB-INF/weblogic.xml
I copy app.ear to c:/bea/wlserver6.1/config/mydomain/applications
When I deploy my file, I get the output as
<Sep 25, 2002 12:32:26 PM PDT> <Debug> <HTTP> <Registering ServletContext:
"sempire_web:/myapp">
How do I run my jsp files to see if it gets the JavaBean instances? In case
I have a file gangster_list_applet.jsp.
Do I check it by specifying the url
http://127.0.0.1:7001/gangster_list_applet.jsp or is it something else?
Thank you
Ronak Parekh
15 years ago