saikiran surya

Greenhorn
+ Follow
since Jun 04, 2004
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 saikiran surya

Hi,

I'm having a rather strange problem with 'ActionForward'. I was wondering if someone can help me solve this

I have a piece of code that gets the query String from the request and stores the values in a session before forwarding to a page inside another module.

This works allright for the first request from the browser, i.e when I open up the browser and type in the URL with query string, the code is doing what is was supposed to do and forwarding my request to the correct page. The response from that page is XML which getting outputted on the browser.

Now if I use the same window and send another request, the request is not getting forwarded to the correct page. I printed out the query string and the session attributes and they are changing for the new request, but the control is stopping at the point where it has to forward to another page.

On my browser I only see the result from first request and not the second one. If I clear my browser cache then the request is getting forwarded.

I dont know if its the browser's problem or struts problem as my code seems to be working perfectly fine.

Please help me out on this issue.

Thanks.
16 years ago
Hi All,

I've a rather strange problem with Action class's "execute" method and the "TimerTask" class. May be my design is incorrect, but here is the problem.

The "execute" method in my "action" class has logic to lookup the database for a user. If the "user" is not found in the database, it tries to push the user information into the database. The database update takes some amount of time to get updated so I cannot display the results for that particular user instantly.

Hence I created a timertask that fires off after ceratin time. the logic inside the timetask tries to query the database and get the user related information. In the mean time, In the mean time I'm trying to show a progress page to the user saying that information is getting retrieved.

Once the timer task has completed its work, it tries to invoke a forward on another page that displays results. (An inner class is written that extends TimeTask and it fetches data from database)


I'm not able to forward to the results page from "timertask" class. I was wondering if anyone can help me solve this issue.

Thanks,
kiran
16 years ago
Hi All,

I've an error thrown in the server console whenever I start the websphere test environment server. I dont know whats causing this problem but here is the error.

Error creating component com.ibm.ws.webservices.component.WSServerImpl
java.lang.NoClassDefFoundError: com/ibm/etools/webservice/wsdd/WebServices
at java.lang.Class.newInstance0(Native Method)
at java.lang.Class.newInstance(Class.java:262)
at com.ibm.ws.runtime.service.ComponentManagerImpl.getInstance(ComponentManagerImpl.java:183)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponent(ContainerImpl.java:490)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:420)
at com.ibm.ws.runtime.component.ApplicationServerImpl.initialize(ApplicationServerImpl.java:68)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponent(ContainerImpl.java:507)
at com.ibm.ws.runtime.component.ContainerImpl.initializeComponents(ContainerImpl.java:443)
at com.ibm.ws.runtime.component.ServerImpl.initialize(ServerImpl.java:95)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:126)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:232)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)

Can someone be kind enuf to tell me why this is happening?

Thanks,
vk
17 years ago
Hi Richard,

I'm going to provide some code snippets for this problem.

****************************************************************************
Main Servlet "TEST"
****************************************************************************
public void init() throws ServletException {

super.init();


try {

Timer t = new Timer();

t.schedule(new DBThread(), 1000, 60*1000);

} catch (NamingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

catch(SQLException se){

se.printStackTrace();

}

}

****************************************************************************
Back ground DB Thread class
****************************************************************************
public class DBThread extends TimerTask {


public void run(){


System.out.println("I'm in run in DBThread");

Connection conn= null;

Statement stmt = null;

ResultSet rs = null;

try {

java.util.Hashtable env = new java.util.Hashtable();

env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");

env.put(Context.PROVIDER_URL,"iiop://localhost:2809");

Context ctxt = new InitialContext(env);

/**
*Even tried with a local lookup by not setting the environment my self.
* It did not work either
*/

DataSource ds = (DataSource)ctxt.lookup("jdbc/mysql");

conn = ds.getConnection("","");

stmt = conn.createStatement();

rs = stmt.executeQuery("SELECT * FROM EMPLOYEE");

while(rs.next()){

System.out.println("Contains:" + rs.getString(1));

}


} catch (NamingException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

catch(SQLException se){

se.printStackTrace();

}


finally{


try {

if(conn!= null)

conn.close();

} catch (SQLException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

}

}

}

****************************************************************************
Console errors and information
****************************************************************************

[9/29/04 7:54:23:660 EDT] 22fecb7e ConnectionFac I J2CA0122I: Resource reference jdbc/mysql could not be located, so default values of the following are used: [Resource-ref settings]

res-auth: 1 (APPLICATION)

res-isolation-level: 0 (TRANSACTION_NONE)

res-sharing-scope: true (SHAREABLE)

res-resolution-control: 999 (undefined)

[Other attributes]

isCMP1_x: false (not CMP1.x)

isJMS: false (not JMS)

[9/29/04 7:54:23:830 EDT] 22fecb7e ConnectionMan W J2CA0075W: An active transaction should be present while processing method allocateMCWrapper.

[9/29/04 7:54:23:860 EDT] 22fecb7e ConnectionMan W J2CA0075W: An active transaction should be present while processing method initializeForUOW.

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R java.sql.SQLException: General error, message from server: "No Database Selected"

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1962)

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1163)

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1257)

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.MysqlIO.sqlQuery(MysqlIO.java:1218)

[9/29/04 7:54:24:912 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.Connection.execSQL(Connection.java:2239)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.Connection.execSQL(Connection.java:2187)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.Statement.executeQuery(Statement.java:1158)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeQuery(StatementWrapper.java:617)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeQuery(WSJdbcStatement.java:445)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at com.test.DBThread.run(DBThread.java:37)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at java.util.TimerThread.mainLoop(Timer.java:446)

[9/29/04 7:54:24:922 EDT] 22fecb7e SystemErr R at java.util.TimerThread.run(Timer.java:396)
****************************************************************************

Note: That the resouce tab in the web.xml is also set to point to the data-source

Appreciate your help in advance.

SS
17 years ago
Hi All,

I've a rather weird problem with threads spawned by my servlet.
I have a servlet say "test" that creates a new thread in its init method. The thread class looksup for the datasource and does some database work.

My problem is, I could successfull lookup for the datasource in my main servlet(test) but in my thread class when I try to lookup the datasource, it says cannot find resource reference. What am I doing wrong.

I'm using websphere application server and WSAD environment.

Appreciate your help,
ss
17 years ago
Hi All,

I need some general information on cvs and eclipse and was wondering if anyone can show me a direction on this.

I'm using wsad 5.0.1.2 that contains the eclipse 2.0.x workbench. In the WSAD/eclipse there is a main menu item called window where we can set the preferences for our workbench (window->preferences).

In that I select Team -> CVS and it contains (console, EXT and Label decorations sub-items).

My question is if we customize the settings, where will the changes reflect. I mean is there an XML file somewhere in the eclipse home directory where I can see the modified entries.

I'm asking this because, if I changes the preferences to the current workspace I'm working on.. and then create a new workspace and start working in it, then the preferences should not be changed from the previous workspace.

I might sound a little bit confusing but more specifically

Can we set preferences to eclipse workbench such that it is reflected in all workspaces we work?

Appreciate anyones kind help in this regard,

ss
Hi All,

I've a slight problem with WSAD 5.1.0. When I go to repository perspective and log-in to my repository (cvs). It comes up with Head, branches and versions in the tree.

When I click on branches (right click) and select Refresh Branches, it shows me the existing projects. Now if i select one and hit 'finish', the project has to show up in the branches tree.

But that is not happening. I dont see anything under branches (+) sign doesnt expand.

Is there any reason for this behavior? When I tried the same on WSAD 5.0 it works fine. The problem comes up with WSAD 5.1.0.

Any ideas please..

Thanks,
ss
17 years ago
Hi All,

Can anyone help me with this error. I encounter this trace when I try to generate a web service for my Java bean using the wizard in wsad 5.1.0. In one of the scrrens I select "Axis runtime 1.0" instead of the default and I belive this is causing the problem.

!ENTRY org.eclipse.ui 4 4 Aug 10, 2004 15:30:55.999
!MESSAGE Unhandled exception caught in event loop.
!ENTRY org.eclipse.ui 4 0 Aug 10, 2004 15:30:55.999
!MESSAGE java.lang.StackOverflowError
!STACK 0
java.lang.StackOverflowError
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.StackOverflowError.<init>(StackOverflowError.java:51)
at java.lang.String.compareTo(String.java)
at org.eclipse.core.internal.dtree.AbstractDataTreeNode.indexOfChild(AbstractDataTreeNode.java)
at org.eclipse.core.internal.dtree.AbstractDataTreeNode.childAtOrNull(AbstractDataTreeNode.java)
at org.eclipse.core.internal.dtree.DeltaDataTree.lookup(DeltaDataTree.java)
at org.eclipse.core.internal.watson.ElementTree.includes(ElementTree.java)
at org.eclipse.core.internal.resources.Workspace.getResourceInfo(Workspace.java)
at org.eclipse.core.internal.resources.Resource.getResourceInfo(Resource.java)
at org.eclipse.core.internal.resources.Project.hasNature(Project.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.castToEARProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.classpathEntry2String(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspathForJavaProject(ClasspathUtils.java)
at com.ibm.etools.webservice.axis.consumption.util.ClasspathUtils.getClasspath(ClasspathUtils.java)


and so on...........

Appreciate your help,
ss
17 years ago
Thanks. I'm aware that WSAD 5.1.1 supports both WTE 5.1 and WTE 5.0.

My question was regrading the WSAD 5.1.0.

Concerned people from IBM mailed me that the installation program will detect the changes automatically and install the WTE 5.1 on my WSAD 5.1.0.But that did not happen. so I was wondering if there is any other way to install WTE 5.1 on my WSAD

Thanks,
ss
17 years ago
Hi,

Even we are having the same problem. did you happen to have the fix for this?

Thanks,
ss
17 years ago
hi,

I have wsad 5.1.0 installed on my local machine. WSAD 5.1.0 comes with only websphere 5.0.2 server by default. My question is, isthere any way to upgrade the server test environment to v5.1

thanks,
ss
17 years ago
Hi All,

Weh I try to run the Bean2WebService tool given in IBM's wsdk 5.1, I get the error cannot find the class in the class path. I'm sure I gave all the correct information. Here is what I've given as arguments to the tool

My Java file is located in

WSAPPDEV51/WebServices/Sample/Java Source/com/sample/TestSample.java

Where WSAPPDEV51 is the home directory of wsad workspace

Now in the Bean2WebService utility I specified

Bean2WebService -cp WSAPPDEV51/WebServices/Sample/Web Content/WEB-INF/classes/com/sample -project SampleWebService com.sample.TestSample

When doing this it throws me an error complaining about the class not found in the class path.

Could anyone please suggest what I'm doing wrong?

Thanks
17 years ago
Hi All,

I've a small question in web services and websphere studio 5.1

I've a java class that contains a couple of methods. I want to expose this as a web service.

So I read the specifictions in redbooks on how to create web services using WSAD 5.1 and start creating web services using the wizard.

My java class contains some methods, where the signatures and return types contain Java collection classes (Specifically a HashMap)

Now when i generate wsdl using the Wizard, I'm getting many error in the generated WSDL file.

One error that is coming up is
failed to read imported schema http://xm.apache.org/xml-soap

I know this is happening beacuse of my complex types, but dont know how to fix it.

Could anyone please suggest the fix.

Thanks very much,
sai
17 years ago
Hi All,

I'm planning to put together a small presentation to my team about the migration of web services from Websphere 5.0 to websphere 5.1. I was wondering if anyone could give me some pointers on the migration issues when deploying a web services on V5.0 which was created using the Websphere studio 5.1.

My little experiment:
I've developed a sample application and provided webservices capability using Websphere studio 5.0 and generated web services for the same sample application using web sphere studio 5.1

Here is what I observed during the transition from websphere 5.0 to websphere 5.1

1.) In V5.0, when we use the wizard to create a web service, it generated 4 wsdl files and a proxy along with dds.xml and soap.xml and testing jsp.
2.) I pacakage everything into an ear and imported the same ear on to my V5.1 websphere studio.
3.) when I deployed this ear on my websphere 5.1 server, everything worked smoothly without any problems.

So I believe upward comaptibility of web services in websphere is possible.

Now I created webservices for the same sample application, this time using V5.1 and exported the ear.

Now When I import the ear onto my v5.0 studio developer. It gives me some compile time errors.

I beleive there are some jars missing ad can be found at IBM web services developer pack.

Web services in websphere is not backward comapatible I guess.

Can anyone please describe the migration issues, when migrating a web services application from V5.1 to V5.0

Thanks very much
kiran
17 years ago
Hi All,

I'm having problems runnings test cases built using strutstest case in WSAD 5.0.

Heres what I've done so far...

1.) Added the strutstestcase.jar file to my classpath (Java Build path in WSAD)

2.) addedd cactus related jar (Cactus.jar, Aspectjrt.jar, commons-httpclient,commons-logging, junit) to my class path (Same Java build location in WSAD)

3.) Changed the web.xml file in my struts application to include

servlet redirector, servlettestrunner

4.) copied the CactusTestLoginAction.java from struts distribution, altered it as per my requiremnets and ran the class in the container

by giving

http://localhost:9080/ServletTestRunner?suite=CactusTestLoginAction

Now I get some weird error

NoClassDefFoundError: org/apache/struts/action/ActionServlet

I've tried my struts application without this stuff and its working perfectly.

I check the web.xml for for any incorrect tags but evrythings just fine.

Can anyone please help me with this issue.

I know the error is not with web.xml but its with class loaders.

Oh and I forgot to mention i addedd the cactus.properties file too in the WEB-INF folder

Thanks in advance,
kiran
17 years ago