Aakash Parashar

Ranch Hand
+ Follow
since Jul 25, 2005
Aakash likes ...
Hibernate Spring Java
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
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aakash Parashar

AXIS 2 - How to add policy to add actor in security header?

My Services.xml is below:


<serviceGroup>
<service name="MyWebService" targetNamespace="http://www.my.com/my/ws/">
<module ref="rampart" />
<description>
This service is to get the running Axis version
</description>
<schema schemaNamespace="http://www.my.com/my/ws/myService/" />
<parameter name="ServiceClass">com.my.ws.MyServiceImpl
</parameter>

<operation name="myService">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>

<wsp:Policy wsu:Id="UsernameTokenOverHTTP"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">

<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>

<sp:HttpToken />
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 />
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax />
</wsp:Policy>
</sp:Layout>

</wsp:Policy>
</sp:TransportBinding>


<sp:SupportingTokens
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient" />
</wsp:Policy>
</sp:SupportingTokens>

<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:passwordCallbackClass>com.my.ws.authenticate.CBHandler</ramp:passwordCallbackClass>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<parameter name="InflowSecurity">
<action>
<items>UsernameToken</items>
<passwordCallbackClass>
com.my.ws.authenticate.CBHandler
</passwordCallbackClass>
</action>
</parameter>
</service>
</serviceGroup>
5 years ago
Hi Friends,

I have implemented WS Security using Axis2 and Rampart1.6.2.

While implementing I learned that the Webservice having security headers can accept the request only when the request is sent on SSL (or HTTPS).

Now my client is having problem in Securizing (on SSL) its different communication channels, so they are asking me if its possible to sent request on HTTP on the service implementing WS Security ?

I am not getting any answer on web of this question. Can you help me out with some information, please!!
6 years ago
Hi All,

Thanks for the coming with ideas. Finally the issue is resolved.

Thanks to Ravi for showing interest in this issue.

Initially the WSDL contained the below line, and I was getting Malformed URL Exception for #UsernameTokenOverHTTPS

<portType name="CompanyPortTypeHTTP" xmlns:wsp="http://www.w3.org/ns/ws-policy" wsp:PolicyURIs="#UsernameTokenOverHTTPS">

After changing the above tag to

<portType name="CompanyPortTypeHTTP">

the issue was resolved. Now I can create client and server using this WSDL.
6 years ago
Hi Ravi,

Its Axis1.6.2 and Rampart 1.6.2.

Please PM your email id, I will send you WSDL.
6 years ago
I am also getting same error.

Anybody got solution of this?
6 years ago
The issue is resolved by clearing all queues in the MQ Manager.

Thanks everybody

Roger Sterling wrote:You need to define a backout queue.



You mean to say, its happening because of Poison Message?
MQ Issue on the Websphere 7.0.0.25 server

Same Message is getting redelivered again and again and below exception is coming in System out log. And secondly the messages are not getting processed completely. Please help.

[4/7/14 12:14:58:616 GMT+05:30] 0000001e LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
[4/7/14 12:16:14:738 GMT+05:30] 00000062 LocalExceptio E CNTR0020E: EJB threw an unexpected (non-declared) exception during invocation of method "onMessage" on bean "BeanId(myroj#myEJB.jar#MQMessageReceiverMDB, null)". Exception data: java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:599)
at com.ibm.ejs.jms.listener.ServerSessionDispatcher.dispatch(ServerSessionDispatcher.java:47)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:98)
at com.ibm.ejs.container.MDBWrapper.onMessage(MDBWrapper.java:136)
at com.ibm.ejs.jms.listener.ServerSession.run(ServerSession.java:574)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: java.lang.ClassCastException: com.ibm.msg.client.jms.DetailedJMSException incompatible with java.lang.RuntimeException
at com.ibm.msg.client.jms.internal.JmsSessionImpl.run(JmsSessionImpl.java:3018)
at com.ibm.mq.jms.MQSession.run(MQSession.java:862)
at com.ibm.ejs.jms.JMSSessionHandle.run(JMSSessionHandle.java:1055)
at com.ibm.ejs.jms.listener.ServerSession.connectionConsumerOnMessage(ServerSession.java:1082)
at com.ibm.ejs.jms.listener.ServerSession.onMessage(ServerSession.java:752)
at com.ibm.ejs.jms.listener.ServerSession.dispatch(ServerSession.java:718)
... 8 more

[4/7/14 12:16:14:761 GMT+05:30] 00000062 LocalTranCoor E WLTC0017E: Resources rolled back due to setRollbackOnly() being called.
Its Resolved. We removed one of the tld from the WAR file and server started successfully.

Thanks.
6 years ago
Receiving Message from MQ Queue
========================

MQ Manager
========
MQ Queue

Wespher Server
===========
Listener Port
JMS Queue - Referring the MQ Queue and Listener Port
JMS Queue Connection Factory - Referring the MQ Q Manager and Listener Port

Java Code
==========
MDB will listen to the JMS Queue (given above)
MDB will receive message from JMS Queue (JMS Queue will receive message from MQ Queue ) and will process.

Sending Message to MQ Queue
====================
Use com.ibm.mq api to connect to
1. MQ Queue Manager
2. MQ Queue
3. Send Message in Queue
4. Close the session.

Yes Harneet what ever you said is correct. My Application was started properly but only problem is unable to access JSP pages from the client and HTML pages are accessing properly.
it was working in another environment with one JVM , it is Websphere - JVM.
I deployed the App in Deployment Manger then automatically App will deploy on the Cluster Members. If I stop cluster then all the cluster Members will stop and start.
6 years ago
Thanks for reply Harneet Singh.

same application is working fine in one environment(only one JVM). This is not working in the Cluster environment.

I tested the app with setting class path in application lib and shared Lib . Both are not working.

I restarted all the servers after deploying App and setting libs
6 years ago

Hi Forum,

We are using Clustered server of WAS ND7.0.0.25 and trying to deploy our EAR on it. but its giving below error. We are not able to access JSPs. Can you please analyze it and come back with solution.


[12/24/13 20:20:02:365 IST] 0000001b WASSessionCor I SessionContextRegistry getSessionContext SESN0176I: Will create a new session context for application key default_hostiph
[12/24/13 20:20:03:947 IST] 0000001b FfdcProvider W com.ibm.ws.ffdc.impl.FfdcProvider logIncident FFDC1003I: FFDC Incident emitted on /usr2/SIR08396/mydomain/logs/ffdc/server1_649f9f_13.12.24_20.20.03.14454232.txt com.ibm.ws.webcontainer.webapp.WebApp.initializeExtensionFactories 883
[12/24/13 20:20:03:960 IST] 0000001b webapp E com.ibm.ws.webcontainer.webapp.WebApp initializeExtensionProcessors SRVE0280E: Extension processor failed to initialize in factory [com.ibm.ws.jsp.webcontainerext.ws.WASJSPExtensionFactory@a0e4a6]: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagExtraInfo
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:363)
at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:347)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:83)
at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
at com.ibm.ws.bootstrap.ExtClassLoader.loadClass(ExtClassLoader.java:111)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:62)
at com.ibm.ws.classloader.ProtectionClassLoader.loadClass(ProtectionClassLoader.java:58)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:543)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at com.ibm.ws.jsp.taglib.TldParser.endElement(TldParser.java:420)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLNSDTDValidator.endNamespaceScope(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at com.ibm.ws.jsp.translator.visitor.xml.ParserFactory.parseDocument(ParserFactory.java:102)
at com.ibm.ws.jsp.taglib.TldParser.parse(TldParser.java:315)
at com.ibm.ws.jsp.taglib.TldParser.parseTLD(TldParser.java:266)
at com.ibm.ws.jsp.taglib.TagLibraryCache.loadWebXmlMap(TagLibraryCache.java:185)
at com.ibm.ws.jsp.taglib.TagLibraryCache.<init>(TagLibraryCache.java:106)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionProcessor.<init>(AbstractJSPExtensionProcessor.java:210)
at com.ibm.ws.jsp.webcontainerext.ws.WASJSPExtensionProcessor.<init>(WASJSPExtensionProcessor.java:77)
at com.ibm.ws.jsp.webcontainerext.ws.WASJSPExtensionFactory.createProcessor(WASJSPExtensionFactory.java:267)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionFactory.createExtensionProcessor(AbstractJSPExtensionFactory.java:76)
at com.ibm.ws.webcontainer.webapp.WebApp.initializeExtensionProcessors(WebApp.java:1352)
at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:373)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:299)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:100)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:166)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:732)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:617)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:376)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:668)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1127)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1319)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:611)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:944)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:740)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2051)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:385)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:328)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$300(CompositionUnitMgrImpl.java:113)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:895)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:349)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1646)
Caused by: java.lang.ClassNotFoundException: javax.servlet.jsp.tagext.TagExtraInfo
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
... 70 more

[12/24/13 20:20:04:006 IST] 0000001b webapp
6 years ago
Inlining the exception trace. ITs not related to LONG data type because we insert all columns as Varchar.

15-Aug 16:13:54.0530| FATAL | [Default : 0] | com.polaris.iph.file.workflow.helper.FileWFManagerHelper:txnBatchForward
(818) | txnBatchForward() | SQLException while inserting Batch & Txns
java.sql.BatchUpdateException: ORA-01461: can bind a LONG value only for insert into a LONG column at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException
(DatabaseError.java(Compiled Code))
at oracle.jdbc.driver.OraclePreparedStatement.executeBatch
(OraclePreparedStatement.java(Compiled Code)) at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.pmiExecuteBatch
(WSJdbcStatement.java:1173)
at com.ibm.ws.rsadapter.jdbc.WSJdbcStatement.executeBatch
(WSJdbcStatement.java:516)