PLEASE HELP! Problems creating Entity Bean
Hello,
I've created an Application Client in order to access an Entity Beans via a Session Bean. Whilst creating the "Language"-Bean via the Remote Object the size of the error log is growing very fast (in a few minutes up to 500 MB) and the SUN minor code 1015 is thrown.
Does anyone know what to do? I've spent now nearly 2 days in order to solve the problem and I'm really despaired.
Thanks in advance.
Beate
The Session Bean contains the following code:
try {
javax.naming.Context jndiContext = new InitialContext();
LanguageHome languageHome = (LanguageHome) jndiContext.lookup (LANGUAGE_JNDI);
LanguageRemote languageRemote = languageHome.create(languageHashtable);
catch (NamingException ne) {
System.out.println("in NamingException in createLanguage");
throw new CreateException(ne.toString());
catch(RemoteException re){
System.out.println("in RemoteException in createLanguage");
throw new CreateException(re.toString());
The error log contains the following error text:
org.omg.CORBA.OBJ_ADAPTER: vmcid: SUN minor code: 1015 completed: No
at com.sun.corba.ee.internal.POA.GenericPOAServerSC.preinvoke(GenericPOAServerSC.java:352)
at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.initServant(ServantCachePOAClientSC.java:100)
at com.sun.corba.ee.internal.POA.ServantCachePOAClientSC.unmarshal(ServantCachePOAClientSC.java:91)
at com.sun.corba.ee.internal.POA.POAImpl.makeObjectReference(POAImpl.java:998)
at com.sun.corba.ee.internal.POA.POAImpl.createReference(POAImpl.java:1008)
at com.sun.corba.ee.internal.POA.POAImpl.create_reference_with_id(POAImpl.java:1061)
at com.sun.enterprise.iiop.POAProtocolMgr.createReference(POAProtocolMgr.java:296)
at com.sun.ejb.containers.EntityContainer.internalGetEJBObject(EntityContainer.java:1197)
at com.sun.ejb.containers.EntityContainer.getEJBObject(EntityContainer.java:171)
at com.sun.ejb.containers.ContainerFactoryImpl.getTargetObject(ContainerFactoryImpl.java:176)
Hello,
I found the problem. My Primarykey class had a corrupt "equals" function. I used "==" for a String comparison instead of "equals()". This caused an endless loop.
Thanks.
Beate
Similar Messages
-
Creating entity beans with auto numbered primary key
I have two entity bean with a CMR between them. I am successfully creating the first one but when I try and create the child entity bean I get a NullPointerException.
Now I think this is because the gernerated code tries to get the primary key of the created entity bean and this is not set as it is set using a auto number in the database (An oracle sequence and trigger).
Is there anyway i can get round this problem?
Thanks in advance,
AdrianThis is the auto generated code:
public dmd.sync.ejbs.entity.AppliancePackInfoLocal create_Local(dmd.sync.dataobjects.dto.AppliancePackInfoDTO appliancePackInfoDTO, dmd.sync.ejbs.entity.AmppLocal amppLocal) throws javax.ejb.CreateException, java.rmi.RemoteException {
BeanO beanO = null;
dmd.sync.ejbs.entity.AppliancePackInfoLocal result = null;
boolean createFailed = false;
boolean preCreateFlag = false;
try {
beanO = super.createBeanO();
dmd.sync.ejbs.entity.AppliancePackInfoBean bean = (dmd.sync.ejbs.entity.AppliancePackInfoBean) beanO.getEnterpriseBean();
preCreateFlag = super.preEjbCreate(beanO);
bean.ejbCreate(appliancePackInfoDTO, amppLocal);
Object ejsKey = keyFromBean(bean);
result = (dmd.sync.ejbs.entity.AppliancePackInfoLocal) super.postCreate_Local(beanO, ejsKey, true);
bean.ejbPostCreate(appliancePackInfoDTO, amppLocal);
super.afterPostCreate(beanO, ejsKey);
It must be falling over on the last line as it calls the ejbPostCreate fine. -
MDB gets cannot find recently created Entity Bean
I have a session bean that creates several entities beans, and puts a message onto
JMS queue. A MDB is configured to read the queue, and in onMessage(), it calls
findByPrimaryKey() for one of the newly created EntityBeans. However, the entity
bean cannot be found.
All of the beans in question are using container managed transactions, and all
have transaction required. The entity bean that I'm looking for is using optimistic
concurrency. I cannot change it to exclusive without redesigning a major part
of the system, which have solved a similar problem that I encounted earlier that
did not involve any message driven beans.
The only way that I got it to work is put in Thread.sleep(5000) right before calling
the finder. Does anyone know of any alternatives besides having the MDB sleep?No, this will work fine with the existing server. If the publish is
part of the JTA transaction, then no one can consume the message until
the original JTA transaction has committed.
-- Rob
Rajesh Mirchandani wrote:
XA defines that a transaction's individual operations will either fail or
succeed atomically. XA can not, and does not define that a transaction's
individual operations occur exactly simultaneously.
The WL transaction monitor does not currently provide a way to serialize a
transactions commit operations on its component resource managers.
There is an enhancement filed for this, I guess. Follow up with BEA support.
Rob Woollen wrote:
Vina Wang wrote:
The JMS send is part of the transaction, sort of. The call is within
the session
bean transaction, but I'm not using transacted session for
JMSPulisher. Would
that fix the problem?Sadly this is a confusing aspect of JMS. You want a non-transacted
session because you want it to participate in the global transaction
that the EJB started. Also, make sure that you've enabled user
transactions on your connection factory.
There's more info here:
http://edocs.bea.com/wls/docs70/faq/jms.html#252635
Let us know if you're still having problems.
-- Rob
I know that the transaction hasn't been commited, but I was monitoring
database
via SQL call when I tried this. There was about 2 second delay on my
development
machine.
Rob Woollen wrote:
My guess is the MDB is receiving the message before your "create entity
bean" transaction has committed. Is the JMS send part of the "create
entity bean" transaction? It probably should be.
You can easily prove this by writing a few lines of JDBC to hit the
database and check for your primary key.
I would not recommend changing to exclusive or using the Thread.sleep.
-- Rob
Vina Wang wrote:
I have a session bean that creates several entities beans, and putsa
message onto
JMS queue. A MDB is configured to read the queue, and in onMessage(),
it calls
findByPrimaryKey() for one of the newly created EntityBeans. However,
the entity
bean cannot be found.
All of the beans in question are using container managed transactions,
and all
have transaction required. The entity bean that I'm looking for is
using optimistic
concurrency. I cannot change it to exclusive without redesigning a
major part
of the system, which have solved a similar problem that I encounted
earlier that
did not involve any message driven beans.
The only way that I got it to work is put in Thread.sleep(5000) right
before calling
the finder. Does anyone know of any alternatives besides having the
MDB sleep?
Rajesh Mirchandani
Developer Relations Engineer
BEA Support -
Please help me creating a new listener with different port#.
I have two instances in a server. both have different homes. I want to create a seperate listener for the second one i created.
But that is not happening.
here i tried to give name from LISTENER TO LISTENER1 & Port# from 1521 to 1524.
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /apps2/oracle)
(PROGRAM = extproc)
LISTENER1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = aixth53)(PORT = 1524))
When I check lsnrctl status with LISTENER1 , it still shows the other instance home with port#: 1521
Please help me creating a new listener with different port#.
Thanks,marist89 wrote:
sb92075 wrote:
marist89 wrote:
sybrand_b wrote:
The listener is a broker only and doesn't play any role in normal communications.
It just forks a process or a thread, and that's it.And the listener is a single point of failure. Listener goes down, you can't connect to the db. That's why you need two listeners.If listener one goes down, then listener two goes down for exact same reason since it is a single executable file.I'm not playing tit-for-tat with you. Fact is, there are situations where people who are not you might want to use more than one listener.Some folks might want to jab a sharp pencil into their eye, too.
Just because you can do something, it does not necessarily mean it should be done. -
please help problem with importing a file error output "there was an error decompressing audio or video"
this is related to what adobe program/version?
-
I created my itunes account YEARS ago!! And I can't remember the answers to my security questions? Because I cannot remember the answers I cannot make purchases in the app store. Please help me create new security questions. Please help me.
If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
or try ringing the number for Apple in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57 -
I cant create rescuse email to change security questions. Please helps me create rescuse email
If you have a rescue email address (which is not the same thing as an alternate email address) set up on your account then you can try going to https://appleid.apple.com/and click 'Manage your Apple ID' on the right-hand side of that page and log into your account. Then click on 'Password and Security' on the left-hand side of that page and on the right-hand side you might see an option to send security question reset info to your rescue email address.
If you don't have a rescue email address (you won't be able to add one until you can answer 2 of your questions) then see if this user tip helps you get the questions reset :https://discussions.apple.com/docs/DOC-4551
e.g. you can try contacting iTunes Support :http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security
or try ringing the number for Apple in your country and ask to talk to the Account Security Team : http://support.apple.com/kb/HE57 -
Pivot table problem. Please help me create this report
Hi friends..I'm new to OBIEE. We can create the grand total column in pivot table. I need grand total as well as Grand average. How can I create a new column in pivot table that is same as grand total but calculates average.
My table structure is like this.
Facility......Date........totaldays
A..........01/01/08......210
B..........01/01/08......215
C..........01/01/08......917
A..........02/01/08......211
B..........02/01/08......211
C..........02/01/08......911
A..........03/01/08......210
B..........03/01/08......215
C..........03/01/08......917
I need the report like this..
Facility.....01/01/08......02/01/08....03/01/08...Total....AVG
A...............210.............211............210.....631......210.3
B...............215.............211............215.....641.....213.6
C...............917.............911............917.....2745....915
For this report..I created pivot table but I'm not able to calculate the average..
Can you please help..I'm new to OBIEE...
Thanks in advancePlease change your username....
Here is what you need to do...
1) In the Pivot Table View, click on the Measures column and select New Calculated Item.
2) In the pop-up window complete as follows:
Name: type "Total Average"
Function: Select "Average" from the drop-down window.
Click on the values in the right pane that you wish OBI to calculate the average for.
3) Click "OK."
You now have another column that is the average of the values in each row. -
Please help,problem when creating Jar.
I am somewhat new to Java...But I made a simple program,and then tried to create a Jar file.
Now all my Java commands where in /program files/Java/JavaSDK/Bin,it was a hassle to CD to that everytime I wanted to use a command,so I coppied all the commands in BIn directory,and put them in System 32,I suppose this is ok? That was my first question.
My next one is,when i try creating a Jar file..I suppose I am doing ti right,but the entire command prompt fills up with code,the ASCII and all the symbols....and a REALLY loud constant beep comes from my computer,and speakers..and it seems it doesnt create anything by this code in the screen and th noise..
Please help.My next one is,when i try creating a Jar file..I
suppose I am doing ti right,but the entire command
prompt fills up with code,the ASCII and all the
symbols....and a REALLY loud constant beep comes from
my computer,and speakers..and it seems it doesnt
create anything by this code in the screen and th
noise..It is from jar help:
Example 1: to archive two class files into an archive called classes.jar:
jar cvf classes.jar Foo.class Bar.class
Example 2: use an existing manifest file 'mymanifest' and archive all the
files in the foo/ directory into 'classes.jar':
jar cvfm classes.jar mymanifest -C foo/ . -
Failure to create entity bean with CMP2 under JBOSS + Postgresql
I have written a simple jsp programme using JBOSS 4 DR2 with postgresql 7.3.3 whereby a simple entity bean could be created into a table in the postgresql 7.3.3 table. However I kept getting the exception message [ javax.ejb.CreateException :Erro checking if entity exists:java.sql.SQLException: ERROR:parser:parse error at or near "=" at character 39 ]
I have even examined the logfile created under the cygwin postgresql , the log output record produce the error FATAL : unsupported frontend protocol ,with next line read [ERROR:parser:parse error at or near "=" at character 39 .
I have no idea why this is happening? The postgrsql 7.3.3 was run under cygwin using the command: pg_ctl start _D {data directory} -l logfile -o "-p 5432"
My guess is that this may not be the Jboss-postgresql data source configuration error since I am able the verify the existence postgresql jndi ,datasource and connector service under the jboss console.Somehow it just got something to do with the jsp programme in the way it was written may be ? But it should not pose a great problem, since i am trying to create a simple entity bean only.
By the way the entity bean creation statement is home.create("123"),to further verify that the home & remote interface was working ,I have the object context printed out before the creation, and it appeared OK.
Thanks in advance for those willing to help me to resolve the issuesI have managed to get the debug from the postmaster , it all boils down to the query [SELECT COUNT(*) FROM {TABLE} WHERE ={CMP FILED}="123"] , the = sign after the 'WHERE' responsible for the failure , but I am still puzzle why it would happen as such?
Any helper ?
Thanks -
hai every one ....
i created three files and saved in respective areas
new.jsp--->C:\Tomcat 5.0\webapps\ROOT
one.html--->C:\Tomcat 5.0\webapps\ROOT
MyBean.java--->C:\Tomcat 5.0\webapps\ROOT
MyBean.class--->C:\Tomcat 5.0\webapps\ROOT\WEB-INF\classes
this is the coding part------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------
--------------------------------new.jsp---------------------------------------- ---
<%@page contentType="text/html"%>
<%@ page import="javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="java.util.*" %>
<%@ page language="java" %>
<html>
<body>
<jsp:useBean id= "mars" scope="session" class="MyBean"/>
<jsp:setProperty name ="mars" property="cname" value=request.getParameter("cname");/>
<jsp:setProperty name ="mars" property="cid" value=request.getParameter("cid");/>
</body>
</html>
---------------------------------one.html-------------------------------------- -
<html>
<body bgcolor="667788">
<form method="post" action="new.jsp">
<table>
<tr>
<td>
name
</td>
<td>
<input type="text" name="cname">
</td>
</tr>
<tr>
<td>
id
</td>
<td>
<input type="text" name="cid">
</td>
</tr>
<tr>
<td>
<input type="submit" value="submit">
</td>
</tr>
</table>
</form>
</body>
</html>
--------------------------------mybean.java------------------------------------ ---
import java.util.*;
import java.sql.*;
import java.io.*;
public class MyBean implements Serializable
private String cname;
private String cid;
public MyBean()
cname = "";
cid = "";
public String getCname()
return cname;
public String getCid()
return cid;
public void setCname(String x)
cname=x;
public void setCid(String y)
cid=y;
public boolean insertDB()
Connection con = null;
Statement stmt = null;
ResultSet rs = null;
String query = "insert into apply(name,email) values( ?,? )";
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con = DriverManager.getConnection("jdbc:odbc:mysqlDSN","","");
PreparedStatement pstmt = con.prepareStatement(query);
pstmt.setString(1,cname);
pstmt.setString(2,cid);
int count = pstmt.executeUpdate();
if(count != 1)
return false;
pstmt.close();
con.close();
catch(Exception e){
System.out.println(e.getMessage());
return false;
return true;
im getting this error when i press submit
--------------------------------ERROR------------------------------------------ --
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /new.jsp(21,22) equal symbol expected
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.jav a:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:238)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:188)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:201)
org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserC ontroller.java:449)
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserCo ntroller.java:419)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:203)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:137)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
Apache Tomcat/5.0.18
------------------------------------------------->>>><<<<<<<<<<<-----------------------------------------
please help me out.....
any kind of help is appriciated
RakeshFor visual beans, check out jsp:plugin
This will convert you bean to an applet.
For non-visual beans, check out jsp:useBean -
Please help with creating more diverse iweb blog entries
I have a blog about sports memorabilia that I use iweb for: http://www.hoopography.com. I have come to a road block in creating blog entries. I have two issues:
1.) I would like to include more than one image for each blog. I tried to just add images and wrap text around when I create the entry in iWeb, but the images do not show up on the homepage where the blog section is located. I'm assuming I need more than one "place holder", but I have not been able to add more than one. Here is an example of another blog that has multiple images for one entry. Essentially, what I am trying to accomplish: http://offysports.blogspot.com/
2.) I would like to add YouTube videos so that they not only appear in the individual entry, but also on the homepage where the blog section is located (Otherwise, visitors to the site need to click on the entry to even realize the image is a video. I would like readers to be able to play it right on the homepage.). I have tried to use the "YouTube Widget" to add the videos when working on the entry in iWeb, but the video appears as a still image on the homepage's blog section.
I have some knowledge of iWeb and Macs. I have been using a Mac and iWeb to work on this blog for about 6 months now, but these 2 problems have stumped and constrained me and the blog. Please help!!!!!! Thanks You.I tuned the Place holder into a YouTube Video Widget, and it does display on the homepage, but it does not display as a video. It displays as a still image that the reader has to click on to access the entry and then play the video in the entry instead of playing right on the homepage.
For the multiple images, are you saying that I can only have one placeholder? I do not follow. I want multiple placeholders for multiple images throughout the single entry (ex: http://offysports.blogspot.com/2010/05/2009-10-panini-studio-basketball.html)
Thanks -
Some problems about entity bean
As what I learnt from books, client uses primary key for getting instance of entity bean. However, if I want to create some entity beans for read only purposes. That is, I will not has the process of bean instantiation from client side directly. What should that object be existed in my system. As they are persistent, they will not be value object. Would you give me some suggestions?
If you want to create some entity-bean instances in order to read the data from the database, you should you find method insteads of create method. If you want to ADD new row in the table then use create method.
If you want to read, it is better to used session bean, and get the RowSet from ResultSet(jdbc)(Please don't update the data in RowSet it will update the database but the entity bean when you do it).
I hope I understand your question correctly and you understand what my words too. -
Hi friends, i am using cmp entity bean to access my relational data base. In my table i am using a sequence (oracle) to generate a sequentiel number as a unique identifier so in my entity bean i am not inserting a primery key. The problem is that i need to get the primary key of the bean after creating and storing it to use the key for other treatment. Any idea, thank a lot
Hi,
It seems you just need to move all "after creation" stuff (including getId()) into ejbPostCreate method.
If I don't miss anything, think that's all.
Good luck -
Little Help with CMP Entity Bean
I have the following error:
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:service=EjbModule,module=SISEPROEJB.jar
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Atleast one role of a
foreign-key mapped relationship must have key fields (or <primkey-field> is
missing from ejb-jar.xml): ejb-relation-name=Abogado-to-AdmninistrativoI have two entity beans called abogado and adminsitrativo, the relation is abogado-has-many-adminitrativo, (one-to-many)
Here is my xdoclet code in abogado:
* @ejb.interface-method
* @ejb.relation
* name="Abogado-to-Administrativo"
* role-name="Abogado-has-many-Administrativo"
* target-ejb = "Administrativo"
* target-role-name = "Administrativo-has-one-Abogado"
* @jboss.target-relation related-pk-field = "userName"
* fk-column = "UserName_id_fk"
* @return Collection de procesos administrativos
public abstract Collection getProcesos();Here is the xdoclet code for administrativo
* @ejb.interface-method
* @ejb.relation name="Abogado-to-Admninistrativo"
* role-name="Administrativo-has-one-Abogado"
* target-ejb="Abogado"
* target-role-name="Abogado-has-many-Administrativo"
* target-multiple="true"
* @return
public abstract AbogadoLocal getAbogado();Both beans have pk fields defined with:
* @ejb.persistence column-name = "id"
* @ejb.pk-fieldand
* @ejb.interface-method
* @ejb.persistence column-name = "UserName"
* sql-type="VARCHAR"
* @ejb.pk-fieldPlease help me I have been stuck here for the whole weekend.
Thanks
Daniel CastroTry the following forum (about EJB technology)
http://forum.java.sun.com/forum.jspa?forumID=13
Maybe you are looking for
-
My boyfriend will be leaving for med school at the end of next month. I want to get him an iPad as a gift but before I buy it I want to know if there is an app that will work with a stylus for note taking. Specifically, I would like him to be able ta
-
How to control the Cost Center incurred value posted from many transactions
In KP60, cost center wise , element wise budget is allocated .i.e planned. Ex: 450000 is assigned and saved. Now ex: in FB60, when we post a vendor invoice having the value greater than the above value, system should not allow. Like this, the cost to
-
Bapi to Create a meterial from a template material
Dear All, I have a requirement to create a material, through a bapi.. But if there is a template material ( copy from material.. ) is given, the material should be created with the details of the given material except the basic data and Classificatio
-
Java.io.NotSerializableException when overwrite the JTable data into .txt file
hi everyone this is my first time to get help from sun forums i had java.io.NotSerializableException: java.lang.reflect.Constructor error when overwrite the JTable data into .txt file. At the beginning, the code will be generate successfully and the
-
Feature request Lock workstation (Win+L) when Lid is closed ~ power manager option
Under "Events" in Power Manager windows there are any options what should happen when you use this or that hotkey or when you close laptop lid. But what it really misses is an option to just Lock the laptop - same pressing Win+L Can you consider addi