Venkatesh Rangamani

Ranch Hand
+ Follow
since Aug 24, 2005
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 Venkatesh Rangamani

I got questions similar to this in my SCDJWS exam...So Beware!!!

Thanks
Venkat
Ranchers,
I am using RMH to prepare for SCDJWS. All the examples for JAXR uses IBMs UDDI. But IBM , SAP and Microsoft have shutdown their UDDI registries. How to work with UDDI registries. Are there any public registries available?? or is there tools to create a UDDI registry in my PC ?? If yes please let me know the steps to do so.

Thanks
Venkat
Hi..,
I have a problem as with regard to UDDI set up!

1) I tried to install the UDDI registry by installing JWSDP1.4 , 1.5 and deploying RegistryServer.war and Xindice.war. But the registry is not starting it is failing with exception

[#|2007-09-27T14:38:24.171+0530|SEVERE|sun-appserver-pe8.2|javax.enterprise.syst
em.container.web|_ThreadID=12;|StandardWrapperValve[RegistryServer]: Allocate ex
ception for servlet RegistryServer
javax.servlet.ServletException: RegistryServerServlet.checkDatabaseCollections()
: Command = "{filePath=D:\Setups\Sun\AppServer\domains\domain1\applications\j2ee
-modules\RegistryServer\/WEB-INF/classes/databaseBootstrap/db/authinfo, collecti
on=xindice://localhost:8080/db, extension=}", Exception: javax.servlet.ServletEx
ception: RegistryServerServlet.checkDatabaseCollections(): {filePath=D:\Setups\S
un\AppServer\domains\domain1\applications\j2ee-modules\RegistryServer\/WEB-INF/c
lasses/databaseBootstrap/db/authinfo, collection=xindice://localhost:8080/db, ex
tension=}, failed to bootstrap auth collection into existence.
at com.sun.registry_server.server.RegistryServerServlet.checkDatabaseCol
lections(RegistryServerServlet.java:1093)
at com.sun.registry_server.server.RegistryServerServlet.init(RegistrySer
verServlet.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249
)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:2
82)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.
java:165)


I am using Sun Application Server for J2EE1.4. I am unable to proceed with impementing JAXR Programs. Please help me how to go ahead with UDDI Setup.

Thanks
Venkat
14 years ago
Ranchers,
I encountered a strange problem, when try to access a Document Style webservice using Dynamic Proxy i am getting exception as below:

port: {http://com.venkat.webservice/AllInOne/targ}AllInOneIntfPort does not contain operation: justConcat
at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(ConfiguredCall.java:98)
at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(ConfiguredCall.java:69)
at com.sun.xml.rpc.client.dii.ConfiguredCall.setMethodName(ConfiguredCall.java:50)
at com.sun.xml.rpc.client.dii.DynamicProxyBuilder.buildDynamicProxyFor(DynamicProxyBuilder.java:66)
at com.sun.xml.rpc.client.dii.ConfiguredService.getPort(ConfiguredService.java:250)
at wsclient.DynProxy.main(DynProxy.java:50)


I am using Sun Application Server for J2EE 1.4 . I deployed a stateless session bean as a webservice.

But when i create a RPC Literal webservice for the same bean i am able to access the Webservice through Dynamic proxy.

Is there any bug in Sun server w.r.t accessing a Document style Web service with Dynamic proxy.

Thanks
Venkat
Peer,
I understand what you are trying to say!! you are trying to say from a design perspective. But what my doubt is, assuming that i have two such methods how does the server identifies which method to call based on the SOAP message.

Thanks
Venkat
Peer,
I am still not getting the point . Let me put it this way:
I have a Doc/Literal web service with two methods and both the methods take the same argument data type. In the sense both the method takes an argument that complies to a single schema. So the SOAP request will be the same for both the methods.As the body element of SOAP complies to a single schema. So how does the server at the receiving end identifies which web service method to call? Hope i am clear!!

Thanks
Venkat
Hi..,

In Case of Document Style webservice we dont pass the method name to be invoked in the SOAP request.If i have two methods in a webservice how does the server decides which method to call based on the SOAP request.

Thanks
Venkat
Thanks Very Much Naresh. I think its an oversight in the spec.

Venkat
I think when you call setRollbackOnly the Tx will be marked for Rollback and you perform some operation after calling setRollbackonly and finally when you issue commit, you will not be able to commit. I guess it should throw exception saying Tx is already marked for Rollback

I tried calling commit after calling setRollbackOnly for a BMT stateful session bean. I got the below Exception which is a Sub class of javax.transaction.RollbackException...:


weblogic.transaction.internal.AppSetRollbackOnlyException
at weblogic.transaction.internal.TransactionImpl.setRollbackOnly(Transac
tionImpl.java:504)
at weblogic.transaction.internal.TransactionManagerImpl.setRollbackOnly(
TransactionManagerImpl.java:337)
at com.venkat.BMTBean.txMethod(BMTBean.java:44)
at com.venkat.BMTBean_hhabj4_EOImpl.txMethod(BMTBean_hhabj4_EOImpl.java:
45)
at com.venkat.BMTBean_hhabj4_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(Activata
bleServerRef.java:90)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unknown reason - with nested exception:
[weblogic.transaction.internal.AppSetRollbackOnlyException]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(
TransactionImpl.java:1683)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(Se
rverTransactionImpl.java:325)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTran
sactionImpl.java:246)
at weblogic.transaction.internal.TransactionManagerImpl.commit(Transacti
onManagerImpl.java:303)
at com.venkat.BMTBean.txMethod(BMTBean.java:48)
at com.venkat.BMTBean_hhabj4_EOImpl.txMethod(BMTBean_hhabj4_EOImpl.java:
45)
at com.venkat.BMTBean_hhabj4_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(Activata
bleServerRef.java:90)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
dSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.jav
a:415)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)


HTH

Thanks
Venkat
[ June 14, 2007: Message edited by: Venkatesh Rangamani ]
Aaron,
The object which are referenced by the serializing object are also serialized PROVIDED they are serializable ie they implement java.io.Serializable, if they dont implement this interface then you will get a NonSerializableException whenever you try to serialize the object. So to successfully serialize an object which has a reference to a non serializable object you need to make the refrence of non seriazlible object as null before Serializing OR make the reference as transient .

HTH

Thanks
Venkat.
[ June 12, 2007: Message edited by: Venkatesh Rangamani ]
Juan,
What i think is java:comp/env is accessible only when we access the bean from the server side component say a JSP or another EJB. If you want to access the Bean from outside the Server like a main program then you need to have a specific name and cannot use java:comp/env. So change your JNDI name of the bean and do a plain lookup. Please let me know if this does/doesnt solve your issue.

Thanks
Venkat
Ranchers,
I had a doubt in CMR from the beginning, i am able to create a Relation between two beans which have only remote view. My Code works fine. but in Pg 386 in HFEJB it says the CMR field needs to implement Local Interface. i dont get the point. Can someone clarify.

I am using Weblogic 8.1 App Server.

Thanks
Venkat
Naresh

When there is no transaction context, you cannot access resource manager.

The Spec doesnt say so, the spec says there should be either Tx Context or Security Context to access the Resource manager and other beans!

So in afterCompletion we have security context (as calling gerCallerPrincipal) is allowed, so this means we should be able to access the Resource managers also. Am i Clear?

Thanks
Venkat
Ranchers,
I just wrote an Remote Steteful Session EJB as follows:

try{
con=getJDBCConnection();
ps =con.prepareStatement("UPDATE emp set ename='$'||ename");
int res = ps.executeUpdate();
if(res>0){
System.out.println("SUCCESS....");
}
else{
System.out.println("FAILURE....");
}
String str = null;
str.charAt(i); //Wantedly threw a NullPointerException
}catch(RuntimeException e){
System.out.println("RollBack Status in RemoteEJB is " + sc.getRollbackOnly() + System.currentTimeMillis());
throw e;
} catch (SQLException e) {
System.out.println("RollBack Status in RemoteEJB in SQLExcp is " + sc.getRollbackOnly());
e.printStackTrace();
throw new EJBException(e);
}


I basically did a DB Update and then threw a NullPointerException. The Client received the RemoteException. But my doubt is that the transaction was not rolledback as the SOP in the catch shows getrollbackonly as FALSE. I saw the below exception in console

javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSX
AResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: ORA-01013: us
er requested cancel of current operation



And i also found that the EJB has Locked the row in the table, i manually killed the session. So this means the update has not rolledback and the transaction is hanging in the middle. Why is not the transaction olledback after the bean threw a SystemException?

Thanks
Venkat