vikram karne

Ranch Hand
+ Follow
since Jun 05, 2007
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 vikram karne

Hi Friends

I am facing a issue while running build script for which i need your help.
I am using RAD 7.0 as the development tool and using WebSphere Application Server 6.1 as the runtime.

I have my source folder path as follows.
E:\RT\RI complete\buildscripts\build.xml

My WAS Home is D:\Program Files\IBM\SDP70\runtimes\base_v61.
I have set the Environment Variable as WAS_HOME.

when i try to run the build.xml i am getting the following error.
BUILD FAILED
E:\RT\RT\buildscripts\riaf_build.xml:151: E:\RT\RTcomplete\buildscripts\${env.WAS_HOME}\lib not found.

The portion of the build.xml file where i am getting this error is follows

<javac debug="on" optimize="on" destdir="${tmp}/CustomTags/classes" includes="*.java" deprecation="off" verbose="off">
<src path="${tmp}/CustomTags/src"/>
<include name="nl/**/*.java"/>
<classpath refid="util.compile.classpath"/>
</javac>

Not able to figure out why its not taking the WAS_HOME which i have already set.
Waiting for a positive reply from your side.

Thanks & Regards
Vikram K
14 years ago
Hi

We are trying to upgrade the WebSphere Portal Version from 6.0.0 to 6.0.1.1. We have run the following patches on the WPS 6.0.0.
1. WP_PTF_601.jar
2. WP_PTF_6011.jar
in the following order on the WPS 6.0 on the system.

When we run the update installer for the version 6.0.1.1 we are getting the following error at the end of the installation

BUILD FAILED
file:../config/actions/jcr_cfg.xml:2144: Java returned: 1

We are not able to figure out the fix for this error. we searched google but did not get any satisfactory answer.Can anybody out here let us know whats the problem here or any fix for the issue.

Thanks & Regards
Vikram K
14 years ago
Hi sairaj

For you to send any useful message to the user you have to create your own exception type in your code first. you can then use this exception in your handler class where you can instantiate it to send a useful message to the user.
i think you may have to embed that exception type in your .wsdl file if you are hand editing the wsdl other wise it can be directly generated from the .wsdd file.
rest you can refer any sample .wsdl file on the net.

hope this is useful

Regards
Vikram K
14 years ago
Hi

Go through this link its a excellent guide for WebServcices starters.
http://ws.apache.org/axis/java/user-guide.html

hope this is useful.

Regards
Vikram K
14 years ago
Thank you all for your replies

Finally i have set all the values in the ArrayList as all of you suggested.
it works for now but need to see the performance issue in the longer run for such a huge list of values.

Thanks a lot once again

Regards
Vikram K
14 years ago
Hi friends

i am stuck with a problem for which i need your help.i will list it out as below.

i am having a dropdown in my jsp page a ComboBox. The values in the dropdown are in the form
After 10 minutes
After 20 minutes
After 30 minutes
Before 5 minutes

Now when the user selects a value in the dropdown list ex. After 10 minutes. This value needs to be fetched and i have to retrive 10 & minutes seperately from the string "After 10 minutes" and the values should go into two different colums of 2 tables in the database.

I cannot use a DTO to set these values since the values will be combination pair of value & timetype.
What should be my approach here.
should i use a Hashmap or a Hashtable or some list so that i can send these values from the Action class to the Session Bean method.

please let me know what needs to be done in this case.waiting for a positive reply from your side.

Thanks & Regards
Vikram K
14 years ago
Hi Friends

I am having more than 1000 entries of different TimeZone's which i need to display in a dropdown list.
i am not able to decide whether i need to use a Vector or Arraylist for storing these values.
please let me know which one will be best suited to use in case the list entry is more than 1000 characters.
waiting for a positive reply from your side.

Thanks & Regards
Vikeng
14 years ago
Hi

I am stuck in a problem for which i need your help.
We are implementing a Time Out feature for one of the functionalities in a web application.
we have a functionality called Alerts in our application.
Currently the Alerts are displaying properly and are present in the application all the time . now we have to implement the Time Out feature for the requirement.The Alerts should disappear after certain amount of time.can anybody let me know the design for this approach and how this should be implpemented.

i am using jdk 1.5,MySql db, JBoss Application server, Struts for the UI.
Please let us know your comments and suggestions. waiting for a positive reply form your side.

Thanks & Regards
Vikram K
14 years ago
Hi

can anybody let me know how to call a java program from a batch file.
i have a folder structure like this
wsclient--->src--> TestClient -->TestClient.java

i have written this program and now i need to call this program when i click a batch file .bat
Can anybody give me a idea as how this is to be done.
any sample code to do this would be very helpful.
waiting for positive replies from your side

Thanks & Regards
Vikramk
14 years ago
Hi Friends

i am stuck in a problem for which i need your help.
i am using the Axis wsdl2java tool to generate the client side stub classes.
the wsdl which i was using was referring to the port http://localhost/hth/services/Client?wsdl
i was running the wsdl2java tool on this wsdl to generate stubs. it was working fine.

Now i have removed the client.wsdl from the default localhost port and
want to keep it in some location like D:\wsdl\Client.wsdl so that i don't have to depend on the Application server which needs to be up everytime for the wsdl to be used.
when i run the wsdl2java command on this location i get the following error.
org.xml.sax.SAXException: Fatal Error: URI=file:///D:/wsdl/Client.wsdl Line=1: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:723)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:218)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPIData(XMLScanner.java:689)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanPIData(XMLDocumentFragmentScannerImpl.java:750)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.scanPI(XMLScanner.java:664)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:845)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:250)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:369)
at org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
at org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:595)

Please let me know what is the problem here and how can i resolve this issue.
here is bit of the sample client.wsdl

<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl efinitions targetNamespace="D:\wsdl\Client.wsdl" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="D:\wsdl\Client.wsdl" xmlns:intf="D:\wsdl\Client.wsdl" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns1="D:\wsdl\Client.wsdl" xmlns:tns2="http://client.hth.march.com" xmlns:tns3="http://exception.hth.march.com" xmlns:tns4="http://equipment.hth.march.com" xmlns:tns5="http://equipment.ws.hth.march.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.3
Built on Oct 05, 2005 (05:23:37 EDT)

-->
- <wsdl:types>
- <schema targetNamespace="D:\wsdl\Client.wsdl" xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="http://equipment.ws.hth.march.com" />
<import namespace="http://xml.apache.org/xml-soap" />
<import namespace="http://exception.hth.march.com" />
<import namespace="http://client.hth.march.com" />
<import namespace="http://equipment.hth.march.com" />
<import namespace="http://localhost/hth/services/Client" />
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
- <complexType name="HTHBaseDTO">
- <sequence>
<element name="md5Sum" nillable="true" type="xsd:string" />
<element name="primaryKey" nillable="true" type="xsd:integer" />
</sequence>
</complexType>
- <complexType name="VitalThresholdEnum">
- <sequence>
<element name="labelKey" nillable="true" type="xsd:string" />
<element name="pk" nillable="true" type="xsd:short" />
</sequence>
</complexType>
- <complexType name="VitalThresholdDTO">
- <complexContent>
- <extension base="tns1:HTHBaseDTO">
- <sequence>
<element name="categoryPk" nillable="true" type="xsd:short" />
<element name="clientCarePlanPk" nillable="true" type="xsd:long" />
<element name="clientPk" nillable="true" type="xsd:integer" />
<element name="clientVitalPrescriptionPk" nillable="true" type="xsd:integer" />
<element name="statusPk" nillable="true" type="xsd:short" />
<element name="syncStatusPk" nillable="true" type="xsd:short" />
<element name="thresholdType" nillable="true" type="tns1:VitalThresholdEnum" />
<element name="thresholdValue" nillable="true" type="xsd ouble" />
<element name="unitTy


hoping for positive replies from your side.

Thanks & regards
Vikram K
14 years ago
Hi Friends

I am stuck in this typical Junit problem for a copule of days but still not able to find any solution for it.The problem is as below.

I have written Junit test case for 1 method that has been added in the session bean. the code is as below.

public void testfindResponses() {

ClientManager cMgr = null;
Collection retvalue= new ArrayList();
try {
System.out.println("Before");
cMgr = EJBHomeUtilities.getClientManagerHome().create();
System.out.println("After" + cMgr.toString());
// retvalue=cMgr.findSurveyResponses(clientPk,startTime,endTime);
}catch (RemoteException e) {

//logger.error(e.getMessage());
throw new EJBException(e.getMessage());
} catch (CreateException e) {

// logger.error(e.getMessage());
throw new EJBException(e.getMessage());
} finally {

EJBHomeUtilities.removeSessionBean(cMgr);
}
//return retvalue;


when i run this using the Junit consol;e on the eclipse i am getting
java.lang.NoClassDefFoundError
at sun.reflect.GeneratedSerializationConstructorAccessor35.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.io.ObjectStreamClass.newInstance(ObjectStreamClass.java:869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1698)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at java.rmi.MarshalledObject.get(MarshalledObject.java:135)
at org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy.invoke(JRMPInvokerProxy.java:120)
at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:227)
at org.jboss.invocation.MarshallingInvokerInterceptor.invoke(MarshallingInvokerInterceptor.java:37)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:55)
at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:169)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
at $Proxy0.create(Unknown Source)
at com.march.hth.test.client.ClientManagerBeanTest.testfindSurveyResponses(ClientManagerBeanTest.java:3918)
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:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

The remote reference that i get seems to not work atall.i tried to put debug statements to see if i am getting the remote reference,but the control seems to not go there itself.
The same method if i write for another session bean it is working fine without any errors.

Please let me know whats wrong here as i am stuck up with this issue for a long time .waiting for positive replies from your side.

Thanks & Regards
Vikram K
14 years ago
Hi Vaibhav

Using a Fully qualified domian name in place of the ip address should not cause any problem.

see the specs to make sure that these mappings are supported or not depending on the SOAP engine you are using in your application.

Regards
Vikram K
14 years ago
Hi Friends

i am stuck in a problem for which i need your help.i will brief you about the issue below.

I am having Multiple Insert Statements which i need to execute to put the data in the database.i have a doubt about the use of the executeUpdate() function in the statement interface. sample code is as below.

stmt = conn.prepareStatement("INSERT INTO Client ( clientPk, provincePk, countryPk, statusPk, branchPk, salutation, ) VALUES(PID, 2, '123123123', '123', '66', 1, 1 );");
int n =stmt.executeUpdate();

Now the problem is how do i insert multiple Insert statements using the conn.prepareStatement().should i do like
stmt = conn.prepareStatement("")
int n =stmt.executeUpdate();
stmt = conn.prepareStatement("")
int n =stmt.executeUpdate();
stmt = conn.prepareStatement("")
int n =stmt.executeUpdate(); ..................................

should i use the same steps to execute each individual query and then use executeUpdate().
Please let me know the correct procedure to be followed to execute these tasks.waiting for a positive reply from your side.

Thanks & Regards
Vikram K
Hi Sachin

Which SOAP engine are you using in your application.I have worked with the Axis 1.4 SOAP engine. In Eclipse you can import the axis jar file and set the source and the destination end points for the WSDL and the Client Side Stubs generated from the WSDL. I think there may some mistake in this as the engine you are using is not able to get hold of the WSDL.Check for proper syntax to be used to do this operation.

For the client side exception that you are getting see if you are passing the correct parameter to your webservice.it looks like the SOAP engine is not able to serialize the object or the parameter you are passing.try to always pass non null values to your service or you have to do proper exception handling.

Regards
Vikram K
14 years ago
Hi

Can anybody let me know whats the difference between the RPC style & Document Style in WebServices.
Where can we use either of these and if possible provide me some WSDL which contains this difference.
any help will be greatly appereciated.

Thanks & Regards
Vikram K
14 years ago