kiran_kumar

Greenhorn
+ Follow
since Apr 21, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by kiran_kumar

Hi

In my application i want to apply some filter, but i don't want all the requests has to go to that filter. it will be a performance issues, because already we have some other filters.

I want my filter to apply only for HTTP POST methods.. is there any way?

Please help me to get a way for this.

thanks
Kiran
13 years ago
Hi,

I am using <h:selectManyListbox control. I have list of names. On click on a button i am passing the selected contacts to another selectmanylistbox using javascript.

when I submit i am getting below error.

sourceId=emailTemplate_1:emailTemplateForm:toList[severity=(ERROR 2), summary=(emailTemplate_1:emailTemplateForm:toList: Validation Error: Value is not valid), detail=(emailTemplate_1:emailTemplateForm:toList: Validation Error: Value is not valid)]

here is the code snippet:

<h:selectManyListbox id="contactRoleList" size="10" value="#{emailTemplateBean.rolesList1}" style="width:200px">
<f:selectItems value="#{emailTemplateBean.list11}" /> - > getting data from backing bean.
</h:selectManyListbox>

<button type="button" name="addTO" value="Add to Send List" onclick="javascript:processChange(this)">Add to Send List</button>


<h:selectManyListbox id="toList" size="6" value="#{emailTemplateBean.rolesList2}" style="width:200px">
<f:selectItems value="#{emailTemplateBean.list22}" /> - > list22 initialized at backing bean. - this will be having the data from first list box.
</h:selectManyListbox>

on submit i am getting above mentioned error.

can you please help me in this.. i struckup here...

here is the javascript code.

if($("#emailTemplate_1\\:emailTemplateForm\\:contactRoleList option:selected").length>0)
{
$("#emailTemplate_1\\:emailTemplateForm\\:contactRoleList option:selected").appendTo('#emailTemplate_1\\:emailTemplateForm\\:toList');
}

-Kiran
14 years ago
JSF
Finally I got the answer for this problem.

We need to pass the data base connection object to the hibernate session. That means both CMT and hibernate should use the same connection object.

we have a method in SessionFactory.OpenSession(Connection conn)

it will make use of the existing connection, here we no need to use any transaction object again.

-Kiran
Finally I got the answer for this problem.

We need to pass the data base connection object to the hibernate session. That means both CMT and hibernate should use the same connection object.

we have a method in SessionFactory.OpenSession(Connection conn)

it will make use of the existing connection, here we no need to use any transaction object again.

-Kiran

It is part of single CMT transaction.
Hi All,

I have a secnario like this:

CMT with Hibernate
1. Insert a record into table1 with JXP
2. execute select query with Hibernate on table1 to fetch the record inserted in the above table.
3. Result: No records present in the table ------------> (1)
4. close the hibernate session/tx
Below is the code snippet:
CustomService(CMT) {
PartyRole (CMT) -> insert record
Hibernate -> select record
}


Only with Hibernate
1. Insert a record into table2 using session.save(obj)
2. execute select query on table2 to fetch the record inserted in the above table.
3. 1 record present in the table.-------------------- > (2)
4. commit/close the transaction
Below is the code snippet
create() method: Complete Hibernate
{
open session/transaction
insert record;
select record; -> able to fetch the record.
commit and close ;
}

With the above findings, For the first one....I understood that Hibernate is not identifying any db changes performed by CMT.
In the second example, insert and select done by hibernate. so i am able to fetch the records which is not committed.

Can you help, Is there any way to specify hibernate to make use of the CMT transaction. how it should identify the changes done by CMT.

In Hibernate code I have tried with openSession() as well as currentSession. but did not work.

Please help me in this.

-Kiran
Hi All,

I am new to hibernate. We have a scenario like this.

In my application we are not using Hibernate. But there is a scenario where for the new feature we are adding hibernate.

In CMT we are calling a method which will do some db opertions using hibernate. But the results are not persisting in the db. it is throwing exceptions.

skelton:
CustomService(CMT) {
PartyRole (CMT) -> THIS IS NORMAL JXP (JDBC CALL)
Hibernate -> THIS IS A HIBERNATE CALL
}

sample code here:

public void find(){
/* some code here */
Retval = commonObjectBOB.create(username, authentication, theBO); -> db call..
String partyRoleID=retval.getId();
testPartyHib(partyRoleID); -> hibernate call..
}

public void testPartyHib(String id) throws Exception {
Session session = null;
try{
Configuration cfg = new Configuration();
SessionFactory sessionFactory=(SessionFactory) cfg.configure(CONFIG_FILE_LOCATION).buildSessionFactory();
session = sessionFactory.openSession();
// session.beginTransaction();
TestPartyHib testPartyHib = new TestPartyHib();
testPartyHib.setId(1L);
testPartyHib.setPartyRoleId(id);
session.save(testPartyHib);
session.flush();
//session.getTransaction().commit();
}
catch (SQLGrammarException ex) {
throw (SQLGrammarException) ex;
} finally{
session.close();
}
}
I am getting below error:
[6/14/10 14:52:17:962 EDT] 00000013 SystemOut O Hibernate: insert into TESTPARTYHIB (PARTYROLEID, id) values (?, ?)
[6/14/10 14:53:18:229 EDT] 00000013 SystemOut O 2010-06-14 14:53:18,219 [ORB.thread.pool : 2] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02049: timeout: distributed transaction waiting for lock

[6/14/10 14:53:18:229 EDT] 00000013 SystemOut O 2010-06-14 14:53:18,229 [ORB.thread.pool : 2] ERROR org.hibernate.util.JDBCExceptionReporter - ORA-02049: timeout: distributed transaction waiting for lock

[6/14/10 14:53:18:349 EDT] 00000013 SystemOut O 2010-06-14 14:53:18,259 [ORB.thread.pool : 2] ERROR org.hibernate.event.def.AbstractFlushingEventListener - Could not synchronize database state with session
org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.chordiant.pmf.service.PartyRoleService.testPartyHib(PartyRoleService.java:298)
at com.chordiant.pmf.service.PartyRoleService.create(PartyRoleService.java:257)
at com.chordiant.pmf.service.PartyRoleService.processRequest(PartyRoleService.java:1809)
at com.chordiant.service.MasterStatelessServiceBean.processRequest(MasterStatelessServiceBean.java:527)
at com.chordiant.service.GatewayHandler.processRequest(GatewayHandler.java:266)
at com.chordiant.service.ejb.EJBGatewayServiceBean.processRequestObject(EJBGatewayServiceBean.java:172)
at com.chordiant.service.ejb.EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.processRequestObject(EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.java:28)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.processRequestObject(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:197)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie._invoke(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:106)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by:
java.sql.BatchUpdateException: ORA-02049: timeout: distributed transaction waiting for lock

at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:808)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:612)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
... 23 more
[6/14/10 14:53:18:349 EDT] 00000013 SystemOut O Exception visu java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock

[6/14/10 14:53:18:409 EDT] 00000013 SystemOut O <Mon Jun 14 14:53:18 EDT 2010> <1276541598409> <ERROR> <Thd=ORB.thread.pool : 2> <com.chordiant.pmf.service.PartyRoleService.create()> <Exception occured <org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update> >
[6/14/10 14:53:18:409 EDT] 00000013 SystemOut O <Mon Jun 14 14:53:18 EDT 2010> <1276541598409> <ERROR> <Thd=ORB.thread.pool : 2> <com.chordiant.pmf.service.PartyRoleService.processRequest()> <Exception occured <org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update> >
[6/14/10 14:53:18:419 EDT] 00000013 ExceptionUtil E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "processRequestObject" on bean "BeanId(ChordiantEAR#ChordiantEJB.jar#EJBGatewayServiceCMT, null)". Exception data: org.hibernate.exception.SQLGrammarException: Could not execute JDBC batch update
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.chordiant.pmf.service.PartyRoleService.testPartyHib(PartyRoleService.java:298)
at com.chordiant.pmf.service.PartyRoleService.create(PartyRoleService.java:257)
at com.chordiant.pmf.service.PartyRoleService.processRequest(PartyRoleService.java:1809)
at com.chordiant.service.MasterStatelessServiceBean.processRequest(MasterStatelessServiceBean.java:527)
at com.chordiant.service.GatewayHandler.processRequest(GatewayHandler.java:266)
at com.chordiant.service.ejb.EJBGatewayServiceBean.processRequestObject(EJBGatewayServiceBean.java:172)
at com.chordiant.service.ejb.EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.processRequestObject(EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.java:28)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.processRequestObject(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:197)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie._invoke(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:106)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: java.sql.BatchUpdateException: ORA-02049: timeout: distributed transaction waiting for lock

at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:343)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10656)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:808)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:612)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
... 23 more
---- Begin backtrace for Nested Throwables
java.sql.SQLException: ORA-02049: timeout: distributed transaction waiting for lock

at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:213)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:952)
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10580)
at com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecuteBatch(WSJdbcPreparedStatement.java:808)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch(WSJdbcStatement.java:612)
at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:48)
at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:246)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:237)
at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:141)
at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298)
at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000)
at com.chordiant.pmf.service.PartyRoleService.testPartyHib(PartyRoleService.java:298)
at com.chordiant.pmf.service.PartyRoleService.create(PartyRoleService.java:257)
at com.chordiant.pmf.service.PartyRoleService.processRequest(PartyRoleService.java:1809)
at com.chordiant.service.MasterStatelessServiceBean.processRequest(MasterStatelessServiceBean.java:527)
at com.chordiant.service.GatewayHandler.processRequest(GatewayHandler.java:266)
at com.chordiant.service.ejb.EJBGatewayServiceBean.processRequestObject(EJBGatewayServiceBean.java:172)
at com.chordiant.service.ejb.EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.processRequestObject(EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805.java:28)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.processRequestObject(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:197)
at com.chordiant.service.ejb._EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie._invoke(_EJSRemoteStatelessEJBGatewayServiceCMT_47cd5805_Tie.java:106)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)


Queries:
1. Can I use hibernate in CMT? If Yes, any configuration required?
2. Is it any dependency on ejb transaction attribute? I have tried with required, requiresNew. but did not work.
I got the solutions... for commandbutton i did not use partialsubmitt attribute. After adding the partialsubmitt and assigned it to true it is working. Thanks

_kiran
16 years ago
JSF
Hi All,

I am using JSF in my application.

I use <tr:goLink text="Calculate Financials one45" onclick="callUC1001();" > </tr:goLink> to open a new page in a new window lets say window1.

I have button in the window1, when the use click the button it will close the window.

In the main window i have clicked another link which uses <tr:goLink tag it will open different window say window2.

Before opening the new window i.e. window2 it will flash window1 data for few seconds then it till show the window2.

Any idea why it is happening?

Note: When the close the window using 'X' button it will not flash the previous page data.

If anybody come across this type issue, please help me.

Regards
Kiran>
16 years ago
JSF
It is working now.. I set default language to "pl" in faces-config.xml file... thanks
16 years ago
JSF
Hi,

I am in Polish environement. like system regional settings and browser settings.

My server console logs are coming in polish and system date information like months are coming in polish.

In my Application i used <tr:inputDate the date picker popup is coming. but the months are coming in english.

I want to see the months in polish characters. Do i need to change any thing. Please suggest me.

-Kiran>
16 years ago
JSF
Can you share the solution with us.. I am also facing some kind of problem with Trinidadpane. I just wanted to see the code.
16 years ago
JSF
Hi All I have an issue with trinidad tags. I have a Panel in the jspx file. below is the code.

for each tab one jspx file is linked means when i click on panel tab it will open one jspx file.

Each jsps file have some text boxes and it has backing bean. data will be stored from the backing bean.

I am in polish locale. backing bean contains the polish characters. When the form loaded the polish characters are coming properly. But when i move from one tab to other the polish characters are getting changed to "?". It is happening for korean characters also.

But on the server console i am getting the data correctly. Means backing bean having correct data. I suspect something is happening when we switch tabs like trinidad cache.

<tr:panelTabbed id="p_1282_pm_usdesc22" position="above">
<tr:showDetailItem id="p_1283_pm_usdesc22general" immediate="true" text="#{pmmsgs.values.general}" >
<tr:subform id="am_pt_pm_rk_ug_usrdesc_gn" >
<ui:include src="/iAdvisorWeb/bundles/profilemanager/jsf/usersandgroups/pmuserdescgeneral.jspx" />
</tr:subform>
<tr:showDetailItem id="p_1283_pm_usdesc22general" immediate="true" text="#{pmmsgs.values.roles}" >
<tr:subform id="am_pt_pm_rk_ug_usrdesc_gn" >
<ui:include src="/iAdvisorWeb/bundles/profilemanager/jsf/usersandgroups/roles.jspx" />
</tr:subform>
<tr:showDetailItem id="p_1283_pm_usdesc22general" immediate="true" text="#{pmmsgs.values.properties}" >
<tr:subform id="am_pt_pm_rk_ug_usrdesc_gn" >
<ui:include src="/iAdvisorWeb/bundles/profilemanager/jsf/usersandgroups/properties.jspx" />
</tr:subform>
</tr:panelTabbed>

Please suggest me to resolve the problem.
16 years ago
JSF
I tried by setting jvm arguments.. but it is not working.

I am using jsf page.. Polish characters are displaying correctly in a label i.e. <tr:outputLabel used for that.
But the same polish characters are converting into ? in a text box i.e. ><tr:inputText

This is happening when i move from one tab to other tab. If i do refresh on the page polish characters are coming correctly.

><trh:cellFormat id="p_1096_pm_desc_gen19" >
<tr:outputLabel id="p_1097_pm_desc_gen20" styleClass="textlable" value="#{pmmsgs.values.firstname}" />
</trh:cellFormat>
<trh:cellFormat id="p_1098_pm_desc_gen21" halign="right">
<tr:inputText id="p_1099_pm_desc_gen22" maximumLength="255" shortDesc="#{(contexthelp.shortDesc == false)? nodata : pmmsgs.values.enterfirstname}" validator="#{usersGeneralBackingBean.validateFirstName}" required="true" value="#{usersGeneralBackingBean.pageDataBean.userObject.firstName}" requiredMessageDetail="#{pmmsgs.values.new_user_firstname_prompt}" label=" " disabled="#{usersDescriptionBackingBean.pageDataBean.renderModify == false || usersGeneralBackingBean.pageDataBean.canUpdateEntity == false}"/>
</trh:cellFormat>

16 years ago
Yes, Oracle is configured to Unicode. The problem is in the Websphere61 environment only, in weblogic it is working fine.
16 years ago