How to use same transaction when calling CMP entity beans and DAO (JDBC)
We are currently using Weblogic 8.1 SP2 with an Oracle 10g database (using XA thin and non-XA drivers).
We have a session bean that invokes an entity bean and a DAO (data access object pattern) in order to add data in 2 separate tables (account and history). Rows are added to the first (account) table using a CMP Entity bean while inserts are done in the 2nd (history) table using a DAO. Here is some pseudo code:
addHistorySessionBean (trans-attribute="Required")
begin
Step #1 - call addAccountEntityBean (trans- attribute="Required")
Step #2 - call addHistoryDAO (get datasource, connection)
end
The 2nd table (history) has a foreign key constraint to ensure that the corresponding key exists in the first (account) table. Unfortunately, DAO inserts on the 2nd (history) table fail with a foreign key constraint violation (INTEGRITY CONSTRAINT VIOLATION - PARENT KEY NOT FOUND!) since they cannot see the row added to the 1st (account) table in step #1 by the CMP entity bean.
How does one ensure that all this is done in a single transaction ? It appears that the app server creates two seperate transactions (one for the session bean facade and the entity bean and a 2nd transaction (when we retrieve a connection using the same data source JNDI name) for the DAO.
A post on server side suggested using a "<resource-ref>" in the session bean to tie the two potentially separate transactions together, but that does not work for us. However, I am not sure if we are doing that correctly. After we define the resource ref in the session facade bean, do we use the resource ref "name" attribute to lookup the datasource or do we still lookup the datasource by JNDI name ? Do we need to define the resource-ref tag in the entity bean also ?
Does Weblogic allow using a single transaction for this type of a scenario ? How does one specify within Weblogic that the same transaction should be utilized by the entity bean and any subsequent DAOs?
People have also suggested that we defer constraint checking until the transaction(s) are committed but that sounds like a work acount without addressing this issue. Would postponing the constraint checking in Oracle cause any additional overhead ?
Any suggestions with specific examples or documentation on how to address this issue will be gratefully appreciated.
Thanks for your suggestion. Unfortunately, this does not work since it appears that there are 2 separate transactions going on here. One, the original one initiated by the session bean and used by the entity bean and the other initiated by the DAO. Any other ideas appreciated.
Hi,
Try setting the delay-database-inserts tag to
ejbCreate in RDBMS descriptor file.
http://bernal/stage/wls/docs81/ejb/DDreference-cmp-jar
.html#1113981
vasanthi ramesh
Similar Messages
-
Error while using sybase trigger with the CMP entity bean,ejb version 2.1
Hi All,
I am using ejb version 2.1 and using entity bean (Transaction required) ,i am trying to update data in sybase(ver 12.3) database table
I am using session bean(Transaction required) to update the multiple entity beans in a while loop.It is working fine .But when i am trying to run it with the trigger which updates multiple tables in different sybase databases on update of each entity.Then it throws NoSuchEntityException and it rollback the whole transaction.
My trigger has only few simple update statements and the trigger runs fine without my CMP entity bean.is the CMP does not support the update triggers in sybase or is it the problem with the transaction.
Please help
Thanks
AnshuIf you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
Give that a try and see if it doesn't solve your compilation failure.
Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
-thorick -
How to manage a XMLType in a CMP Entity Bean
Hi everyone.
Have any of you dealt with a XMLType in a CMP Entity Bean, for instance, the oracle CLOB datatype or directly with XMLType? any of you have tried with a successful result?
What I have to do for creating a CMP if the destination table is going to have a XMLType column. Because I need to Store a very large XML Document.
I will really appreciate.
Thank you
Francisco.Francisco,
In case you haven't already seen it, perhaps this blog from Debu Panda will help:
http://radio.weblogs.com/0135826/2004/08/11.html#a60
Good Luck,
Avi. -
CMP Entity Beans and multiple tables
Hi All,
Is it possible to have a CMP Entity Bean retrieve attributes from multiple tables
(using table join), and populate attributes from columns in both tables?
If yes, how do we configure the same in configuration xml files.
Is there any special handling required for this in the bean itself?
Thanks,
PrabhHi All,
Is it possible to have a CMP Entity Bean retrieve attributes from multiple tables
(using table join), and populate attributes from columns in both tables?
If yes, how do we configure the same in configuration xml files.
Is there any special handling required for this in the bean itself?
Thanks,
Prabh -
How to upload a BLOB file from CMP Entity Beans
Hi,
I want to upload a .xls file as a BLOB using CMP. And also to get back the BLOB from the database through CMP. I am using oracle 8i DataBase and weblogic 8.1 server with weblogic workshop as IDE.
I don't have any idea to save a file as BLOB.
Could any one please help me to solve this as it is very urgent.
regards
KumudaRajarshiI would just put the .xls file into a byte array in a
class that implements the serializable
interface. This class then becomes a column in your
database table(as a blob) represented by an
attribute in your entity bean. On sun appserver7
serializable is mapped to a blob column in the
database by default. You don't have to deal with a
blob at all in the code, just your
serializable type. You may have to use a type 2
driver to get it to work with files
over 4 or 5k.
See the appserver7 EJBdevguide, page 92 for details.could you descrbe the detail how to use the class to become the column as blob?
is that any sample code can be provided?
it's very urgent, please help..
thanks -
Ejbc outofmemory error in weblogic 8.1 sp2 when compiling cmp entity beans
I have a set of entity beans which compiled [ejbc step]fine under weblogic7.0 sp4. But when i try to to the same thing under weblogic 8.1 i get an outofmemory error. Any pointers
I am using 81 sp4
-
Help with exception calling cmp entity bean from session bean
Hi,
I know someone else posted a very similar problem recently but I think the root of my problem may be different.
This is the exception that I receive:
javax.transaction.TransactionRolledbackException: CORBA TRANSACTION_ROLLEDBACK 9998 Maybe; nested exception is:
org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
at com.sun.corba.ee.internal.iiop.ShutdownUtilDelegate.mapSystemException(ShutdownUtilDelegate.java:114)
at javax.rmi.CORBA.Util.mapSystemException(Util.java:65)
at itsthes.security._SecurityManager_Stub.findUserRoles(Unknown Source)
at itsthes.security._SecurityManager_Stub.findUserRoles(Unknown Source)
at itsthes.security.servlets.SecurityUserListView.processRequest(SecurityUserListView.java:80)
at itsthes.security.servlets.SecurityUserListView.doGet(SecurityUserListView.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)
Caused by: org.omg.CORBA.TRANSACTION_ROLLEDBACK: vmcid: 0x2000 minor code: 1806 completed: Maybe
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:306)
at java.lang.Class.newInstance(Class.java:259)
at com.sun.corba.ee.internal.iiop.messages.ReplyMessage_1_2.getSystemException(ReplyMessage_1_2.java:94)
at com.sun.corba.ee.internal.iiop.LocalClientResponseImpl.getSystemException(LocalClientResponseImpl.java:120)
at com.sun.corba.ee.internal.POA.GenericPOAClientSC.invoke(GenericPOAClientSC.java:133)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at itsthes.security._SecurityManager_Stub.findUserRoles(Unknown Source)
... 17 more
This is my primary key implementation:
public final class SecurityUserKey implements java.io.Serializable {
public java.lang.Integer userId;
public java.lang.Integer roleId;
public java.lang.String emailAddress;
* Creates an empty key for Entity Bean: SecurityUser
public SecurityUserKey() {
* @see java.lang.Object#equals(java.lang.Object)
public boolean equals(java.lang.Object otherOb) {
if (this == otherOb) {
return true;
if (!(otherOb instanceof itsthes.security.entitybeans.SecurityUserKey)) {
return false;
itsthes.security.entitybeans.SecurityUserKey other = (itsthes.security.entitybeans.SecurityUserKey) otherOb;
return (
(userId==null?other.userId==null:userId.equals(other.userId))
(roleId==null?other.roleId==null:roleId.equals(other.roleId))
(emailAddress==null?other.emailAddress==null:emailAddress.equals(other.emailAddress))
* @see java.lang.Object#hashCode()
public int hashCode() {
return (
(userId==null?0:userId.hashCode())
^
(roleId==null?0:roleId.hashCode())
^
(emailAddress==null?0:emailAddress.hashCode())
My entity method invocation is this:
public Collection findUserRoles() {
Vector userCollection=new Vector();
try {
Context jndiContext = new InitialContext();
LocalSecurityUserHome home = (LocalSecurityUserHome) jndiContext.lookup(this.securityUserBean);
Iterator i = home.findAll().iterator();
while ( i.hasNext() ) {
LocalSecurityUser securityUser = (LocalSecurityUser)i.next();
SecurityUser sessionBean=mapLocalSecurityUser(securityUser);
userCollection.add(sessionBean);
} catch (javax.naming.NamingException e) {
System.err.println(e);
} catch (javax.ejb.FinderException e) {
System.err.println(e);
return userCollection;
If anyone could point me in the right direction that would be great.
thanks,
WilliamHi,
The Transaction Rollback exception may be due to the SystemException thrown in your findUserRoles() code which force the container to rollback the transaction. catch the generic exception in your findUserRoles() code and veriy what went wrong.
i hope this helps.
-ram -
Cmp Entity Beans and collections
I am doing a proof of concept application and I have implemented an Entity bean which accesses through a DAO object to my Informix database and returns records based on a serial field called sightID. This works fine and I can access the records and store new records. I now need to demonstrate the power of CMP beans and return a collection showing all records for a particular field called Type. Here is where my problems start. If I am using CMP I need to map the primary key field to the primary key field of the database (this is sightID) the field I need to get the collection on is not a key field and is only a text field with one of four values. How can I use CMP to return a collection based on a non priomary key field? is this possible? I am willing to post all my code but there is 14 pages.
any help greatly appreciated
ConnieEJBQL???..
SELECT object(o) from table_object 0 where non_primarykey = 'value i want'
sanjay. -
Using a CMP Entity Bean local stub as a field of another CMP Entity Bean
Hello,
Is it possible to implement a field of a CMP Entity bean as another CMP Entity bean and how is it done?
I've seen a pseudo code for this in Ed Roman's Mastering EJBs, second edition, but I can't seem to get it to work (pages: 330 - 1:1 using CMP and 339 - fake M:N using CMP).
I'm using SUN ONE Application Sever 7. Is this server capable of this?
I'm trying to implement a fake M:N relationship using 3 beans: 2 for each side of the relationship and one as the "bridge" table.
For example, the two beans on each side of the relationship are SubscriberBean, SubscriptionBean and the "bridge: bean is SubscriberSubscriptionBean. The SubscriberSubscriptionBean has two fields: SubscriberLocal stub and SubscriptionLocal stub.
Please let me know if you need more information to answer this question.
Thanks.
NikolaIm sorry but i dont know about the example you are talking about. I kinda learn
all those techniques from forums, articles and tutorials because book often suffer from
not having the information im mostly looking for.
As far as i understand you, you want to implement a bridge been, which is representing a row in a join table. So that if one side of the relation is deleted the join-table entry (your bridge-CMP-Bean) is cascaded. Right?
First of all the simple part: (My approach)
- The joint table is foreign keys only - without a relation description. -
In this case you dont have to implement a bridge bean. Because it just wouldnt represent anything of sense.
Lets think of an entity/table USER whith the columns name (PRIMARY KEY), and prename.
Our second entity/table is ADDRESS with the columns road (PRIMARY KEY) and housenr.
The join table is simply: USER_ADDRESS with fk_name (FOREIGN KEY) and fk_road (FOREIGN KEY) both on CASCADE DELETE. So if the address is deleted the mapping entry is deleted, too same for the user part:
USER -> USER_ADDRESS <- ADDRESS.
Our entity Beans are called User and Address in class-names JNDI-names and names.
Now we want to create the CMR mapping so we can access the addresses of a user from the user bean directly. The methods on the user side are:
public abstract Collection getAddresses();
and
public abstract void setAddresses(Collection new_addresses);
the xdoclet comments on the User side are (for the getter only)
* @ejb.interface-method
* @ejb.relation
* name = "User-has-Addresses"
* role-name = "User-Addresses"
* target-ejb = "Address"
* target-multiple = "true"
* @sunone.relation
* column="USER_ADDRESS.fk_name"
* target="USER_ADDRESS.fk_road"
public abstract Collection getAddresses();
for the other side of the relation we define in the Address-Entity
public abstract Collection getUsers();
and
public void setUsers(Collection users);
the xdoclet comments on the Address side are (for the getter only)
* @ejb.interface-method
* @ejb.relation
* name = "User-has-Addresses"
* role-name = "Address-User"
* target-ejb = "User"
* target-multiple = "true"
* @sunone.relation
* target="USER_ADDRESS.fk_road"
* column="USER_ADDRESS.fk_name"
As we dont want the user or address to be deleted if the other side of the relation is deleted we dont specify cascade-delete="yes" in the ejb.relation namespace.
The sun-cmp-mappings.xml should now look like this:
(For the User - side)
<!-- Relationship User-has-Addresses, role User-Addresses -->
<cmr-field-mapping>
<cmr-field-name>addresses</cmr-field-name>
<column-pair>
<column-name>USER_ADDRESS.fk_name</column-name>
<column-name>USER_ADDRESS.fk_road</column-name>
</column-pair>
</cmr-field-mapping>
and similar on the Address-Side:
<cmr-field-mapping>
<cmr-field-name>users</cmr-field-name>
<column-pair>
<column-name>USER_ADDRESS.fk_road</column-name>
<column-name>USER_ADDRESS.fk_name>/column-name>
</column-pair>
</cmr-field-mapping>
Dont forget that all elements in the Collection must be of the right Interface-type.
First of all the harder part:
Now what you might want is when the relation has some information specified like user live at address and is tenant or facility manager.
The, in the first step you will have to implement the UserAddressRelation entity which will have to CMR fields of the 1:N type.(Just as you wish)
Lets think of the example above extended by the relation type. Our relation bean is named UserAddressRelation.
Now User has the methods as above but the classes in the Collection must now be of the UserAddressRelationLocal/Remote interface and not AddressLocal/Remote-interface.
You will have to change the xdoclet comment to:
* @ejb.interface-method
* @ejb.relation
* name = "User-has-Addresses"
* role-name = "User-Address"
* target-ejb = "UserAddressRelation"
* target-multiple = "true"
* @sunone.relation
* target="USER_ADDRESS.fk_name"
* column="USER.name"
So we now dont reference the other side bean directly. We reference the relation EntityBean. Do the similar changes on the other side.
In particular you will have to specify 4 CMR mappings now:
1. User to UserAddressRelation 1:N
2. UserAddressRelation N:1
3. Address to UserAddressRelation 1:N
4. UserAddressRelation N:1
Which i dont want to explain in detail now because its kinda all the same as above.
Now you cann access the Addresses of a user in the way.
UserLocal.getAddresses(); <- !you get the mappings!
UserLocal.getAddresses().item(0).getAddress() <- you get the address (this is dirty coding just for understanding)
UserLocal.getAddresses().item(0).getUserRole() <. you get the role of the user at this address.
Hope this helped you. You are welcome to ask any detailed question. -
CMP Entity Bean's problem with MS-SQL Server 2000
Hi everyone!
I have a problem regarding CMP Entity Bean on OC4J.
I made one CMP Entity Bean and deployed it to OC4J.
It was successful.
I used MS-SQL Server 2000 as Datasource.
So, I installed MS-SQL Server's JDBC Driver and add some jar files to classpath.
And I updated 'data-sources.xml' in OC4J's config directory.
Then, I updated also 'orion-ejb-jar.xml' in my application's directory.
I changed data-source's name to my data-source's name which use MS-SQL Server 2000.
Finally, I started OC4J and EJB Client program which called Enitiy Bean's create method.
But, The error occured which was 'Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence'.
What's wrong? I need any helps.
Here is stack overflow message. Thank you. Best regards.
com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence.
at UserHome_EntityHomeWrapper2.create(UserHome_EntityHomeWrapper2.java:1114)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
at connection to localhost/127.0.0.1 as admin
at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1530)
at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1453)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:53)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
at __Proxy0.create(Unknown Source)
at com.emc.ksc.ejb.user.UserBeanTestClient1.create(UserBeanTestClient1.java:73)
at com.emc.ksc.ejb.user.UserBeanTestClient1.<init>(UserBeanTestClient1.java:49)
at com.emc.ksc.ejb.user.UserBeanTestClient1.main(UserBeanTestClient1.java:1077)Hi Young,
From the information you have supplied, my guess is that the SQL
string that OC4J is sending to SQL-Server is incorrect. So it may
help if you could see the exact SQL string. In order to see the
SQL string, I suggest you either run OC4J in "debug" mode, or try
using "P6 Spy".
The following web page has details on running OC4J in "debug" mode:
http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
And here is the web page for "P6 Spy"
http://www.provision6.com/
And these other web sites may also be of help (in general):
http://www.orionserver.com
http://www.orionsupport.com
http://www.atlassian.com
http://www.elephantwalker.com
Good Luck,
Avi. -
CMP Entity Bean wrong generated ejbfindByPrimaryKey
i am using Netbeans 6.1
with GlassFish V2
and JavaDB
i wrote a basic CMP Entity Bean and it gives me this exception
JDO74004: Bean 'ProducttbBean' method ejbFindByPrimaryKey:
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
SQL statement<select t0."PRODUCTID", t0."PRODUCTNAME" from "PRODUCTTBBEAN" t0 where t0."PRODUCTID" = CAST (? AS INTEGER)> with input values:java.lang.Integer:1.
Please examine the SQLException for more information.
NestedException: java.sql.SQLSyntaxErrorException: Table/View 'PRODUCTTBBEAN' does not exist.
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.throwJDOSqlException(SQLStoreManager.java:645)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.executeQuery(SQLStoreManager.java:479)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStoreManager.retrieve(SQLStoreManager.java:376)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.retrieve(SQLStateManager.java:2059)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1197)
at com.sun.jdo.spi.persistence.support.sqlstore.SQLStateManager.reload(SQLStateManager.java:1153)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerImpl.getObjectById(PersistenceManagerImpl.java:658)
at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerWrapper.getObjectById(PersistenceManagerWrapper.java:276)
at mybeanspack.ProducttbBean_2002768886_ConcreteImpl.ejbFindByPrimaryKey(ProducttbBean_2002768886_ConcreteImpl.java:148)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
at com.sun.ejb.containers.EntityContainer.invokeFindByPrimaryKey(EntityContainer.java:803)
at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:233)
at $Proxy22.findByPrimaryKey(Unknown Source)
at org.apache.jsp.index_jsp._jspService(index_jsp.java from :63)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:470)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:364)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:317)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:288)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
the table name i'm querying at is
PRODUCTTB
and in the generated select statement
PRODUCTTBBEAN
i need help to solve this problemThis is a copy of the sun-cmp-mappings.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-cmp-mappings PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 OR Mapping//EN" "http://www.sun.com/software/appserver/dtds/sun-cmp-mapping_1_2.dtd">
<sun-cmp-mappings>
<sun-cmp-mapping>
<schema>BOOSHA_CMPBeanApplication-ejb</schema>
<entity-mapping>
<ejb-name>ProducttbBean</ejb-name>
<table-name>PRODUCTTB</table-name>
<cmp-field-mapping>
<field-name>productid</field-name>
<column-name>PRODUCTTB.PRODUCTID</column-name>
<fetched-with>
<default/>
</fetched-with>
</cmp-field-mapping>
<cmp-field-mapping>
<field-name>productname</field-name>
<column-name>PRODUCTTB.PRODUCTNAME</column-name>
<fetched-with>
<default/>
</fetched-with>
</cmp-field-mapping>
</entity-mapping>
</sun-cmp-mapping>
</sun-cmp-mappings>
the table name is right in the descriptor. -
Use direct JDBC with CMP entity bean in one transaction
I am trying to use direct JDBC call with CMP entity bean within a session
bean method that requires transaction. The problem is that it appears these
are not in the same transaction. When I use the JDBC call, the CMP entity
bean update to the DB has not been committed yet.
We are using Weblogic 5.1 SP6. The DB is Oracle.
What I do for the JDBC is get a new connection from the pool using weblogic
jdbc pool driver.
Any help would be appreciated.
PatrickHi. You can do JDBC and invoke CMP EJBs and have this all treated
as one transaction, if your hand-written code explicitly starts
a JTS transaction, then uses the jts driver or a TxDataSource to
get the JDBC connection. Then your code can call transactional
EJBs and their work will be included in the transaction you started.
Assuming the bean work went OK, and your manual JDBC went OK, you
can manually commit the UserTransaction at that time. This is 5.1
talk. For 6.0, with @PC, this may be even easier...
Joe
Patrick Shen wrote:
>
But if I do that, then they would not be in the same transaction anymore.
Is there any way to use JDBC with CMP Entity bean in the same transaction?
Patrick
"L'artiste" <[email protected]> wrote in message
news:[email protected]...
Are you calling all the CMP create in the session Bean ? If so, beforeyou
make the JDBC call from the session bean, the CMP in 2. should commit. Try
to set its attribute to TX_REQUIRES_NEW. This way, the calling client will
block until this transaction is done (committed) before the execution
continues. There might be some overhead involved in doing so if you are
anticipating a lot of users.
"Patrick Shen" <[email protected]> wrote in message
news:[email protected]...
What I am trying to do is:
In a Session bean method -
1. create a new CMP entity bean (a new row in DB table)
2. create another new CMP entity bean that uses previous bean as foreignkey
3. use JDBC to update the row just created
And all these 3 calls have to be in one transaction.
Thanks,
Patrick
"L'artiste" <[email protected]> wrote in message
news:[email protected]...
Can you give a little bit more information?
Do you have methods in your session bean that creates this CMP entitybeans?
It looks like
you might wanna try to change the isolation level to
TRANSACTION_READ_COMITTED
to preven dirty_read.
"Patrick Shen" <[email protected]> wrote in message
news:[email protected]...
I am trying to use direct JDBC call with CMP entity bean within a
session
bean method that requires transaction. The problem is that it
appears
these
are not in the same transaction. When I use the JDBC call, the CMP
entity
bean update to the DB has not been committed yet.
We are using Weblogic 5.1 SP6. The DB is Oracle.
What I do for the JDBC is get a new connection from the pool usingweblogic
jdbc pool driver.
Any help would be appreciated.
Patrick
PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
Send resumes to [email protected] -
How to use same actions for differ pop-up
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi,
Take one integer value attribute in the context of view
when you r performing action on POP1 set it's value to 1
when you r performing action on POP2 set it's value to 2
create one method which receives integer argument, say diaplay(int a)
In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
in display() method, Check the value of integer variable..
if it is 1 then perform action related to POP1
if it is 2 then perform action related to POP2
Regards
LakshmiNarayana -
How to use same page fragment more than once in a page,
Hi Gurus,
How to use same page fragment more than once in a page. I have a complex page fragment which has lots of Bindings (Binding Property set with backingBean variables).
I want to use the same page fragment multiple times on the same page with different tabs.
I want different ApplicationModule Instance for the page fragment in different tabs.
So I have created a Bounded Taskflow with pagefragments which has this complex pagefragment.
I've dragged the taskflow to page and created regions.
I'm able to execute the page successfully when I have only one region but fails if I have region more than once in the page.
Can anyone help me how to resolve this issue.
Web User Interface Developer's Guide for Oracle Application Development Framework: section 19-2 states we can have same pagefragment more than once in a page.
Thanks,
Satyajava.lang.IllegalStateException: Duplicate component id: 'pt1:r1:0:t2:si5', first used in tag: 'com.sun.faces.taglib.jsf_core.SelectItemsTag'
+id: j_id_id1
type: javax.faces.component.UIViewRoot@1d23189
+id: d1
type: RichDocument[UIXFacesBeanImpl, id=d1]
+id: j_id_id5
type: HtmlScript[UIXFacesBeanImpl, id=j_id_id5]
+id: j_id0
type: javax.faces.component.html.HtmlOutputText@bc252
+id: m1
type: RichMessages[UINodeFacesBean, id=m1]
+id: f1
type: RichForm[UIXFacesBeanImpl, id=f1]
+id: pt1
type: RichPageTemplate[oracle.adf.view.rich.component.fragment.UIXInclude$ContextualFacesBeanWrapper@2a0cc, id=pt1]
+id: ps1
type: RichPanelSplitter[UIXFacesBeanImpl, id=ps1]
+id: pt3
at javax.faces.webapp.UIComponentClassicTagBase.doStartTag(UIComponentClassicTagBase.java:1199)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag265(__projectrevenuern_jsff.java:12356)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag264(__projectrevenuern_jsff.java:12317)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag263(__projectrevenuern_jsff.java:12262)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag262(__projectrevenuern_jsff.java:12200)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag261(__projectrevenuern_jsff.java:12147)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag260(__projectrevenuern_jsff.java:12099)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag259(__projectrevenuern_jsff.java:12047)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag258(__projectrevenuern_jsff.java:11992)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag257(__projectrevenuern_jsff.java:11948)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag255(__projectrevenuern_jsff.java:11860)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag254(__projectrevenuern_jsff.java:11808)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag9(__projectrevenuern_jsff.java:510)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag8(__projectrevenuern_jsff.java:461)
at jsp_servlet.__projectrevenuern_jsff._jspx___tag1(__projectrevenuern_jsff.java:149)
at jsp_servlet.__projectrevenuern_jsff._jspService(__projectrevenuern_jsff.java:67)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163)
at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184)
at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(IncludeTag.java:443)
at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:153)
at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTag.java:128)
at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRegion.java:492)
at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(RegionTag.java:127)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag50(__projectrevenuepg_jspx.java:2392)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag49(__projectrevenuepg_jspx.java:2353)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag46(__projectrevenuepg_jspx.java:2209)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag45(__projectrevenuepg_jspx.java:2162)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag9(__projectrevenuepg_jspx.java:526)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag8(__projectrevenuepg_jspx.java:475)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag7(__projectrevenuepg_jspx.java:424)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag6(__projectrevenuepg_jspx.java:373)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag2(__projectrevenuepg_jspx.java:202)
at jsp_servlet.__projectrevenuepg_jspx._jspx___tag1(__projectrevenuepg_jspx.java:144)
at jsp_servlet.__projectrevenuepg_jspx._jspService(__projectrevenuepg_jspx.java:71)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.onAddToMapException(ServletStubImpl.java:408)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:318)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:248)
at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:410)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:44)
at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(ViewHandlerImpl.java:473)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:141)
at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:189)
at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:193)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse(LifecycleImpl.java:710)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:273)
at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:205)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:191)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:97)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:420)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:247)
at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:157)
at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:138)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:326)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
SUBSYSTEM = HTTP USERID = <WLS Kernel> SEVERITY = Error THREAD = [ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)' MSGID = BEA-101020 MACHINE = CAMIND1 TXID = CONTEXTID = TIMESTAMP = 1262712477691
WatchAlarmType: AutomaticReset
WatchAlarmResetPeriod: 30000
>
<JMXWatchNotificationListener><handleNotification> failure creating incident from WLDF notification
oracle.dfw.incident.IncidentCreationException: DFW-40116: failure creating incident
Cause: DFW-40112: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
DIA-48494: ADR home is not set, the corresponding operation cannot be done
Action: Ensure that command line tool "adrci" can be executed from the command line.
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:708)
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createIncident(DiagnosticsDataExtractorImpl.java:246)
at oracle.dfw.spi.weblogic.JMXWatchNotificationListener.handleNotification(JMXWatchNotificationListener.java:195)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor$ListenerWrapper.handleNotification(DefaultMBeanServerInterceptor.java:1732)
at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:257)
at javax.management.NotificationBroadcasterSupport$SendNotifJob.run(NotificationBroadcasterSupport.java:322)
at javax.management.NotificationBroadcasterSupport$1.execute(NotificationBroadcasterSupport.java:307)
at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:229)
at weblogic.management.jmx.modelmbean.WLSModelMBean.sendNotification(WLSModelMBean.java:824)
at weblogic.diagnostics.watch.JMXNotificationProducer.postJMXNotification(JMXNotificationProducer.java:79)
at weblogic.diagnostics.watch.JMXNotificationProducer.sendNotification(JMXNotificationProducer.java:104)
at com.bea.diagnostics.notifications.JMXNotificationService.send(JMXNotificationService.java:122)
at weblogic.diagnostics.watch.JMXNotificationListener.processWatchNotification(JMXNotificationListener.java:103)
at weblogic.diagnostics.watch.Watch.performNotifications(Watch.java:621)
at weblogic.diagnostics.watch.Watch.evaluateLogRuleWatch(Watch.java:546)
at weblogic.diagnostics.watch.WatchManager.evaluateLogEventRulesAsync(WatchManager.java:765)
at weblogic.diagnostics.watch.WatchManager.run(WatchManager.java:525)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: oracle.dfw.common.DiagnosticsException: DFW-40112: failed to execute the adrci commands "create home base=C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr product_type=ofm product_id=defaultdomain instance_id=defaultserver
set base C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr
set homepath diag\ofm\defaultdomain\defaultserver
create incident problem_key="BEA-101020 [HTTP]" error_facility="BEA" error_number=101020 error_message="null" create_time="2010-01-05 12:27:58.155 -05:00" ecid="0000INzXpbB7u1MLqMS4yY1BGrHn00000K"
Cause: There was an error executing adrci commands; the following errors have been found "DIA-48415: Syntax error found in string [create home base=C:\\Documents and Settings\\tammineedis\\Application] at column [69]
DIA-48447: The input path [C:\\Documents and Settings\\tammineedis\\Application Data\\JDeveloper\\system11.1.1.2.36.55.36\\DefaultDomain\\servers\\DefaultServer\\adr] does not contain any ADR homes
DIA-48447: The input path [diag\ofm\defaultdomain\defaultserver] does not contain any ADR homes
DIA-48494: ADR home is not set, the corresponding operation cannot be done
Action: Ensure that command line tool "adrci" can be executed from the command line.
at oracle.dfw.impl.incident.ADRHelper.invoke(ADRHelper.java:1052)
at oracle.dfw.impl.incident.ADRHelper.createIncident(ADRHelper.java:786)
at oracle.dfw.impl.incident.DiagnosticsDataExtractorImpl.createADRIncident(DiagnosticsDataExtractorImpl.java:688)
... 19 moreI get the above Error.
I have checked the bindings and it has 2 instances of the taskflow.
I have changed the backingbean scope to backingBean -
How to use same actions for differ pop-up buttons
Hi gurus,
I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
Plz sugges me.
<b>Points will be sured.</b>
Sanket sethiHi ,
u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
regards
Yash
Maybe you are looking for
-
Update table based on ID reference comparing each column and value
Hi, Through UI user can update any information and click save. In backend i will be receiving only ID as reference . Based on the ID value i should update multiple tables wherever i have the reference tables. Here i will not get the values or column
-
Complex process mapping in eWM 7.02
Hi All, I have a following scenario to be mapped.We sell hazardous chemicals.We store these chemicals in a separate hazardous storage type in drums of big size say 50 ltrs.When a customer asks for these chemicals he asks these in 1 litre bottles say
-
Itunes, no more drag and drop?
Is it me or is 11.0.1 is the worst itunes ever? I can no longer drag and drop songs into playlists. I also have a program called "tune up" and it does not let me drag songs into the application. I was trying to add to a playlist and now playlists
-
Writing decimal value to application file
hi All, I am having an internal table with fields itab-A, itab-b and itab-C. i want to write the record to itab in such a way that itab-ASPACEitab-bitab-c. Now i tried to concatenate the record in one string and write it out but the problem is itab-b
-
Hi experts, I have developed one report in smartforms and trying to printout on Dot matrix printer. When iam printing report(i have 5 pages) ,iam getting fine for first two pages.But third page onwords... few lines of third page are getting printed i