Help coderanch get a
new server
by contributing to the fundraiser

Komari raj

Ranch Hand
+ Follow
since Dec 12, 2008
Merit badge: grant badges
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Komari raj

HI Suji,
Thank's a lot for your continue support and now it is working as expected with your suggested code. (regular expression string content is going to replace with empty string)



Regards
Raju
HI Suji Thank you for your support..
I have validated with the below code also what you have suggested but no luck,it is giving total content except tags it missed the bold tags in that content as shown in below.



Output is:

textcontent..
By signing below, I agree that Terms and Conditionson the reverse side of this page will apply to the service of theproduct identified above;XXX is not responsible for any
loss, corruption or breach of the data on my product during service;as loss of data may occur as a result of theservice, it is my responsibility to make a backup copy of my databefore bringing my product to XXX for service;
Thank you Suji for your quick reply..

Actually, my requirement is what ever string content below is coming from People Soft side and that tag (<TEXT></TEXT>) dont have "<![CDATA[" in that content.


Can you please correct me if i missed anything.


Regards
Raju

HI Digvijay
Please find the sample code to get the xml content by attribute, it might be helpful for you..

?xml version="1.0" encoding="UTF-8"?>
<!-- bookstores.xml -->
<bookstore>
<book ISBNUMBER="10001">
<title>JAVA1</title>
<author>Headfirst</author>
<category>Programming</category>
<year>2013</year>
</book>
<book ISBNUMBER="10002">
<title>JAVA2</title>
<author>Complete reference</author>
<category>Tutorial</category>
<year>2004</year>
</book>
</bookstore>

DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = factory.newDocumentBuilder();
File file = new File("bookStores.xml");
Document doc = docBuilder.parse(file);

// Get a list of all elements in the document
// The wild card * matches all tags
NodeList list = doc.getElementsByTagName("*");
int bookCount = 0;
for (int i = 0; i < list.getLength(); i++) {
// Get the elements book (attribute isbn), title, author
Element element = (Element)list.item(i);
String nodeName = element.getNodeName();
if (nodeName.equals("book")) {
String isbn = element.getAttribute("ISBNUMBER");
System.out.println("\tISBN:\t" + isbn);
} else if (nodeName.equals("title")) {
System.out.println("\tTitle:\t"
+ element.getChildNodes().item(0).getNodeValue());
} else if (nodeName.equals("author")) {
System.out.println("\tAuthor:\t"
+ element.getChildNodes().item(0).getNodeValue());
}
}



Regards
Raju
HI ALL
I am trying to retrieve the node content for TEXT node using dom4j Node.getText(), but it is escaping html bold tags including content as shown in below.Please help on this to get the content with html tags from xml for TEXT node of SECTION parent node.






output: html bold tag content got missed with tag also.


sectioncontent..terms1
textcontent..By signing below, I agree that Terms and Conditionson the reverse side of this page will apply to the service of theproduct identified above;;as loss of data may occur as a result of theservice, it is my responsibility to make a backup copy of my databefore bringing my product to XXX for service;
sectioncontent..Conditions2
textcontent..1 year warranty



Regartds
Raju
HI Ragu,
in Liferay portletSession will be intiated at render time, so no need to declare PorteletSession Variable so you can use directly.
Please see the updated code below.



Thanks
Raju
11 years ago
Finally i got solution for this.

Remove EJB project from RAD and Open Admin console for APP server and install ejbEAR file manually (Which is exported from RAD as EAR file) from AdminColsole of APP Server.If That ejb project is visible from admin console then uninstall and install new exported EJB ear file.



Regards
Raju
Hi all i am getting follwing exception when deploying new ejb EAR file into websphere application server 7.0 from RAD

Starting EJB jar: CustomerSearchBeanEJB.jar
[4/19/11 14:49:03:949 IST] 0000001e ComponentData E CWMDF0015E: The class loader cannot load the com.allstate.apt.portal.ejb.customersearch.interfaces.CustomerSearchServiceRemote interface on the com.allstate.apt.portal.ejb.customersearch.beans.CustomerSearchServiceBean Enterprise JavaBeans (EJB) file..
[4/19/11 14:49:03:949 IST] 0000001e EJBContainerI E WSVR0040E: addEjbModule failed for CustomerSearchBeanEJB.jar [class com.ibm.ws.runtime.component.DeployedEJBModuleImpl]
com.ibm.ejs.container.EJBConfigurationException: CWMDF0015E: The class loader cannot load the com.allstate.apt.portal.ejb.customersearch.interfaces.CustomerSearchServiceRemote interface on the com.allstate.apt.portal.ejb.customersearch.beans.CustomerSearchServiceBean Enterprise JavaBeans (EJB) file..
at com.ibm.ws.metadata.ComponentDataObject.setInterfacesFromImplements(ComponentDataObject.java:783)
at com.ibm.ws.metadata.ComponentDataObject.finishCDO(ComponentDataObject.java:424)
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2609)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3827)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1120)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1313)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:619)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:938)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:723)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1264)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4566)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4654)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1269)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2041)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:651)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:613)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:282)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
at com.ibm.rmi.iiop.ORB.process(ORB.java:504)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1573)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2845)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2714)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)

[4/19/11 14:49:03:964 IST] 0000001e EJBContainerI I WSVR0041I: Stopping EJB jar: CustomerSearchBeanEJB.jar
[4/19/11 14:49:03:964 IST] 0000001e EJBContainerI I WSVR0059I: EJB jar stopped: CustomerSearchBeanEJB.jar
[4/19/11 14:49:03:964 IST] 0000001e DeployedAppli W WSVR0206E: Module, CustomerSearchBeanEJB.jar, of application, CustomerSearchBeanEJBEAR.ear/deployments/CustomerSearchBeanEJBEAR, failed to start
[4/19/11 14:49:03:964 IST] 0000001e ApplicationMg W WSVR0101W: An error occurred starting, CustomerSearchBeanEJBEAR
[4/19/11 14:49:03:964 IST] 0000001e ApplicationMg A WSVR0217I: Stopping application: CustomerSearchBeanEJBEAR
[4/19/11 14:49:03:964 IST] 0000001e TreeBuilder W ODCF0002E: Exception: java.lang.NullPointerException
at com.ibm.ws.odc.cell.TreeBuilder.stateChanged(TreeBuilder.java:454)
at com.ibm.ws.odc.cell.TreeBuilder$LocalEventListener.stateChanged(TreeBuilder.java:5061)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stateChanged(ApplicationMgrImpl.java:1072)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectEvent(DeployedApplicationImpl.java:1296)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.setState(DeployedApplicationImpl.java:277)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.stop(DeployedApplicationImpl.java:1083)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.stopApplication(ApplicationMgrImpl.java:925)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:754)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$1.run(ApplicationMgrImpl.java:1264)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4566)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4654)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1269)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2041)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:437)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:122)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:380)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:651)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:613)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:36)
at sun.reflect.GeneratedMethodAccessor13.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:243)
at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1085)
at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:966)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:848)
at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:773)
at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1320)
at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1213)
at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
at com.ibm.ws.management.connector.rmi.RMIConnectorService.invoke(RMIConnectorService.java:282)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie.invoke(_RMIConnectorService_Tie.java:395)
at com.ibm.ws.management.connector.rmi._RMIConnectorService_Tie._invoke(_RMIConnectorService_Tie.java:160)
at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:622)
at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:475)
at com.ibm.rmi.iiop.ORB.process(ORB.java:504)
at com.ibm.CORBA.iiop.ORB.process(ORB.java:1573)
at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2845)
at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2714)
at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:63)
at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:118)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)


Please help on this if any body knows..

Regards
raju
1 a) No
2 a) yes for same request( After performing any action on portlet) from ProcessAction() to doView

Regards
Raju
13 years ago
HI All,

I am setting value in Request Attribute using Actionreq.setAttribute("name","Raj") in ProcessAction() method when ever action performed on portlet.

I am getting value as null from Request Attribute using Renderreq.getAttribute("name") in doView() method.

Any Suggestions.


Regards
Raju


13 years ago
Hi all

I am getting Exception when i hit the yahoo.com.


It is taking so much time for displaying console...finally i got following exception...


java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:352)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:214)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:201)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:377)
at java.net.Socket.connect(Socket.java:530)
at java.net.Socket.connect(Socket.java:480)
at sun.net.NetworkClient.doConnect(NetworkClient.java:175)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:406)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:541)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:245)
at sun.net.www.http.HttpClient.New(HttpClient.java:318)
at sun.net.www.http.HttpClient.New(HttpClient.java:335)



Why it is taking so much time ....and not even display response is true or not

Please help on this if you know about this..


regards
Raju

13 years ago

Andrey Kozhanov wrote:Just put necessary functionality in your AddressComparator class. For example if address is a String, it could be written like this:




Hi Andrey Kozhanov

Thank you very much..

As my requirement it is ok..

Regards
Raju.Komari
13 years ago
Hi All

Hi I have list of Beans with 3 proprties of Employee Bean(name, age, address) .

I have Taken Address comparator Class shown in below.

Output I am getting is:

Address: 12-3-hyd Age: 25 Name: XXX
Address: 45-KKD Age: 23 Name: YYY
Address: AD Road-Delhi Age: 56 Name: aaa
Address: BRRoad-Delhi Age: 45 Name: bbb


here my requirement is....

I want to display sort beans as per Address like below..

Address: AD Road-Delhi Age: 56 Name: aaa
Address: BRRoad-Delhi Age: 45 Name: bbb
Address: 12-3-hyd Age: 25 Name: XXX
Address: 45-KKD Age: 23 Name: YYY

That comparior Interface is first preference given to numbers only...but i want write comparitor class for giving first preffs to strings...

13 years ago
hi siva, please understand what i am saying...

Please insert image into some file system or your application folder...after that please take that image and add to document...

i am trying to say is... directly image is not inserting into word document(this is not working) because of this reason...first save your image to file system and get back and add it to document...



Regards
Raju