Priyam Srivastava

Ranch Hand
+ Follow
since Oct 29, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Priyam Srivastava

Hi,

I am trying to set up 2 new servers in a clustered environment. In this I have configured a Foreign Server which is looking up to queues in different server.

The structure is like this: 1 Foreign Server with 2 Queues and 1 Connection factory with exactly same name as they present on the host server.
While starting the server, I am getting an exception:

<Nov 5, 2012 7:39:58 PM EET> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: ClonedQueueAnonymousWaiter is unable to connect to the JMS destination: MDB_QUEUE_RESPONSE. The Error was:
javax.naming.CommunicationException [Root exception is java.rmi.UnmarshalException: RJVM has already been shutdown; nested exception is:
java.io.IOException: RJVM has already been shutdown]
at weblogic.jndi.internal.ExceptionTranslator.toNamingException(ExceptionTranslator.java:74)
at weblogic.jndi.internal.WLContextImpl.translateException(WLContextImpl.java:470)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:426)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.deployment.jms.ForeignOpaqueReference.getReferent(ForeignOpaqueReference.java:221)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:377)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:856)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:209)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:254)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:411)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at weblogic.jms.common.CDS$2.run(CDS.java:486)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.jms.common.CrossDomainSecurityManager.runAs(CrossDomainSecurityManager.java:131)
at weblogic.jms.common.CDS.lookupDestination(CDS.java:480)
at weblogic.jms.common.CDS.lookupDDAndCalloutListener(CDS.java:345)
at weblogic.jms.common.CDS.access$100(CDS.java:41)
at weblogic.jms.common.CDS$DDListenerRegistrationTimerListener.timerExpired(CDS.java:193)
at weblogic.timers.internal.TimerImpl.run(TimerImpl.java:273)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
Caused by: java.rmi.UnmarshalException: RJVM has already been shutdown; nested exception is:
java.io.IOException: RJVM has already been shutdown
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:360)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1034_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:423)
... 21 more
Caused by: java.io.IOException: RJVM has already been shutdown
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:234)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
... 24 more
Caused by: java.io.IOException: RJVM has already been shutdown
at weblogic.rjvm.RJVMImpl.addPendingResponse(RJVMImpl.java:513)
at weblogic.rjvm.RJVMImpl.send(RJVMImpl.java:900)
at weblogic.rjvm.MsgAbbrevOutputStream.flushAndSend(MsgAbbrevOutputStream.java:394)
at weblogic.rjvm.MsgAbbrevOutputStream.sendRecv(MsgAbbrevOutputStream.java:404)
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:109)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
... 24 more



Weblogic is installed in Solaris machine and welogic's version is 10.3.4.0 with Java version 1.6.0 update 33. I have checked the firewall, /etc/hosts but there are no issues with that.

The JNDI Connection URL is configure like: t3://xx.xxx.x.xx,xx.xxx.x.xx:7001/
I have tried giving like this also: t3://xx.xxx.x.xx:7001,xx.xxx.x.xx:7001/ or t3://hostname1,hostname2:7001/ or t3://hostname1:7001,hostname2:7001/
but nothing worked.

The foreign servers are accessible from my Application Server when I do the telnet on the port. There is no cross domain security required. Funny thing is I have a same set-up in two other application server (in cluster again) and there on configuring the Foreign server to same IPs, I am not facing any issues at all.

Can anyone please help me with this. Searched all over the place but have no clue regarding this. Many forums mentioned about firewall and etc/hosts but that is also not case it seems.

Regards,
Priyam>
5 years ago
Hi Sha,

Why do you want to remove them ? Those classes are generated by wsdl2java tool and most of them would be internal classes. You may not be using them but probably they might be referred within the stub itself. Keeping them in the jar will not cause you any problem.

Regards,
Priyam
5 years ago
Found the solution. Needed to add bootstrap.jar in my classpath.
5 years ago
Hi All,

I am calling a web-service from my stand alone program and I am getting this error:

Unable to sendViaPost to url[http://10.10.29.160/abcd/soap11]
org.apache.axis2.AxisFault: Transport error: 404 Error: Not Found
at org.apache.axis2.transport.http.HTTPSender.handleResponse(HTTPSender.java:310)
at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:194)
at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:404)
at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:231)
at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:443)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:406)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
at net.servicestack.schemas.types.SyncReplyStub.tokenizeCard(SyncReplyStub.java:463)
at invoker.MyWebServiceInvoker.main(MyWebServiceInvoker.java:23)



But when I try to hit the same URL directly through the browser I am able to see the wsdl file. When I try to post message using Fiddler2 via Post method to same URL I am getting a proper response.

Basically this is what I have done:
From the WSDL URL: http://10.10.29.160/abcd/soap11 using Axis's WSDL2Java tool (Axis Version: axis2-1.6.2) I have created Stub which then I am using through my invoker class.

I am running the main method of my program through Eclipse (or running the same program from command prompt also gives the same error) and not using any Application Server to run my program.

If anyone can help me in this I'll be really grateful !!

Any information related to code needed let me know.

Regards,
Priyam
5 years ago
I am writing my first ever web-service calling code as a stand alone application first and then integrate with my application deployed on Weblogic. The code is something like this:



On running this through my Eclipse editor I am getting below error at this line


SERVICEFACTORY_PROPERTY::javax.xml.rpc.ServiceFactory
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/ws/security/util/AccessController
at javax.xml.rpc.FactoryFinder.find(FactoryFinder.java:193)
at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:120)
at com.xxxx.xxx.services.tools.internal.WebServiceInvoker.processRequest(WebServiceInvoker.java:211)
at com.xxxx.xxx.services.tools.internal.WebServiceInvoker.main(WebServiceInvoker.java:297)
Caused by: java.lang.ClassNotFoundException: com.ibm.ws.security.util.AccessController
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 4 more

What jar is needed for this or what am I missing ?

Thanks for help.
Priyam
5 years ago
If You are referring to variable l_user, l_passwd then this is getting populated from my Properties file for which I haven't pasted the code here.
l_user = xxxxx@abdc.com
l_passwd = xxxxxxxx
6 years ago
Referring to Java doc link that you posted:

You need to authenticate to your SMTP server. The package javadocs for the com.sun.mail.smtp package describe several methods to do this. The easiest is often to replace the call Transport.send(msg); with

String protocol = "smtp";
props.put("mail." + protocol + ".auth", "true");
...
Transport t = session.getTransport(protocol);
try {
t.connect(username, password);
t.sendMessage(msg, msg.getAllRecipients());
} finally {
t.close();
}




Ain't I doing the same thing:

smtpTransport.connect (smtpSession.getProperty ("mail.smtp.host"), 25, l_user, l_passwd);
....
smtpTransport.sendMessage (l_smtp_message,l_smtp_message.getAllRecipients());


only difference being which overloaded connect method I am using? Or am I missing something?
6 years ago
Hi,

While sending Email... I keep getting error:

530 5.7.1 Client was not authenticated

Initially I thought that the "fromaddress" that I am using requires an authentication. But that is not the case. It has been configured to send mail without any authentication. Then when I changed the configuration to enabled authentication, I am still getting the same error. I am putting the whole SMTP Debug as well as my code here. Note that my user id for authentication is same as "from address" i.e. xxxxx@abcd.com


DEBUG: setDebug: JavaMail version 1.4.1
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth true
DEBUG SMTP: trying to connect to host "192.168.21.223", port 25, isSSL false
220 MAIL1.XXXX.INT Microsoft ESMTP MAIL Service ready at Mon, 23 Jan 2012 18:23:56 +0200
DEBUG SMTP: connected to host "192.168.21.223", port: 25

EHLO venus02
250-MAIL1.XXXX.INT Hello [10.160.1.110]
250-SIZE
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-X-ANONYMOUSTLS
250-AUTH NTLM
250-X-EXPS GSSAPI NTLM
250-8BITMIME
250-BINARYMIME
250-CHUNKING
250-XEXCH50
250-XRDST
250 XSHADOW
DEBUG SMTP: Found extension "SIZE", arg ""
DEBUG SMTP: Found extension "PIPELINING", arg ""
DEBUG SMTP: Found extension "DSN", arg ""
DEBUG SMTP: Found extension "ENHANCEDSTATUSCODES", arg ""
DEBUG SMTP: Found extension "STARTTLS", arg ""
DEBUG SMTP: Found extension "X-ANONYMOUSTLS", arg ""
DEBUG SMTP: Found extension "AUTH", arg "NTLM"
DEBUG SMTP: Found extension "X-EXPS", arg "GSSAPI NTLM"
DEBUG SMTP: Found extension "8BITMIME", arg ""
DEBUG SMTP: Found extension "BINARYMIME", arg ""
DEBUG SMTP: Found extension "CHUNKING", arg ""
DEBUG SMTP: Found extension "XEXCH50", arg ""
DEBUG SMTP: Found extension "XRDST", arg ""
DEBUG SMTP: Found extension "XSHADOW", arg ""
DEBUG SMTP: Attempt to authenticate
NOOP
250 2.0.0 OK
DEBUG SMTP: use8bit false
MAIL FROM:<xxxxx@abcd.com>
530 5.7.1 Client was not authenticated
DEBUG SMTP: got response code 530, with response: 530 5.7.1 Client was not authenticated

RSET
DEBUG SMTP: EOF: [EOF]
javax.mail.MessagingException: [EOF]
at com.sun.mail.smtp.SMTPTransport.issueCommand(SMTPTransport.java:1481)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1512)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:1055)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:634)
at com.pack.prod.infra.JFMailer.sendMail(JFMailer.java:843)


My Java code goes like this:


Any idea what I am doing wrong. Once again with authentication and no authentication, I keep getting this same error.

Regards,
Priyam
6 years ago
Hi...

I am facing a problem that when I am trying to open a temporary BLOB, I am getting a ClassCastException. Below is a part of stack trace:


java.lang.ClassCastException: weblogic.jdbc.rmi.SerialConnection_weblogic_jdbc_rmi_internal_ConnectionImpl_weblogic_jdbc_wrapper_PoolConnection_oracle_jdbc_driver_T4CConnection_1034_WLStub
at oracle.sql.BLOB.createTemporary(BLOB.java:684)


I am using Weblogic 10.3.4.0 with Jrocket 1.6 Update 24 in my JAVA_HOME.

Initially I thought this is a JDBC driver problem, then I tried with ojdbc14.jar, ojdbc5.jar, ojdbc6.jar but same result.

With more googling I found some other reasons like
Problem which seems to be that despite the fact that method BLOB.createTemporary takes a java.sql.Connection object as a parameter, it only works if the Connection is an oracle.jdbc.driver.OracleConnection object. If it's not an oracle.jdbc.driver.OracleConnection, then I get a ClassCastException.

I also found out that the problem happens because when I run my code in Weblogic and get the database connection via a DataSource object that I lookup via JNDI, the connection is not a real OracleConnection object, but an object that wraps the real OracleConnection.


Now the question is how do I solve this? In My DataSource->Connection Pool-> I have unchecked the "Wrap Data Types" and it still it doesn't work.

I would love to paste the code of how I am opening the Connection to be more understandable but due to my Company policy I cannot. Hope you all understand.

Feel free to ask me whatever details you want, but need a urgent solution for this.

Regards,
Priyam
6 years ago
Oops..seems to me I posted it in a wrong forum. I'll move it to JDBC forum.
6 years ago
Hi...

I am facing a problem that when I am trying to open a temporary BLOB, I am getting a ClassCastException. Below is a part of stack trace:



I am using Weblogic 10.3.4.0 with Jrocket 1.6 Update 24 in my JAVA_HOME.

Initially I thought this is a JDBC driver problem, then I tried with ojdbc14.jar, ojdbc5.jar, ojdbc6.jar but same result.

With more googling I found some other reasons like

Problem which seems to be that despite the fact that method BLOB.createTemporary takes a java.sql.Connection object as a parameter, it only works if the Connection is an oracle.jdbc.driver.OracleConnection object. If it's not an oracle.jdbc.driver.OracleConnection, then I get a ClassCastException.

I also found out that the problem happens because when I run my code in Weblogic and get the database connection via a DataSource object that I lookup via JNDI, the connection is not a real OracleConnection object, but an object that wraps the real OracleConnection.



Now the question is how do I solve this? In My DataSource->Connection Pool-> I have unchecked the "Wrap Data Types" and it still it doesn't work.

I would love to paste the code of how I am opening the Connection to be more understandable but due to my Company policy I cannot. Hope you all understand.

Feel free to ask me whatever details you want, but need a urgent solution for this.

Regards,
Priyam
6 years ago
I am compiling a jsp file using ojspc.bat file in Oracle Application Server.
Since the default path to ojspc.bat is:

ORACLE_HOME_2/j2ee/home/jsp/bin/ojspc

So I have set the path for the ojspc.bat file as:
D:\OraHome_2\j2ee\home&gt;set path=D:\OraHome_2\jdk\bin;d:\OraHome_2\j2ee\home\jsp\bin

The jsp file that I need to compile is at location D:\OraHome_2\j2ee\CorpServer\applications\netbanking\Corporate

Hence while compiling I am giving the command:

D:\OraHome_2\j2ee\home&gt;ojspc -appRoot d:\OraHome_2\j2ee\CorpServer\applications\netbanking\Corporate\CorpLogin.jsp

I am getting an error like::

Unable to access ojspc.jar file

So I even set the classpath as::

D:\OraHome_2\j2ee\home&gt;set classpath=d:\OraHome_2\j2ee\home;.;d:\OraHome_2\j2ee\home\ojspc.jar

as the ojscp.jar file can be found in \orahome\j2ee\home (in my case it is orahome_2)

but still I am getting Unable to access jar file \j2ee\home\ojspc.jar

What am I missing here???

(PS: I HAVE to compile JSPs using ojspc)

8 years ago
JSP
yeah you did
hopefully you understood the explanation
when you call new objecttest()--- it prints "here" call to super() prints nothing.
and when you call new Object()--- your custom Object class constructor gets called and "james" is printed.

hence "here james"
The output will be "here james" which is correct. This is beacuse call to super() results in the constructor of alpha class Object's constructor being called and not your custom made Object class. Also your objecttest is not extending your custom made Object class.

By creating a Object class doesn't mean that you are replacing the Object class in Java API with that of yours.