Archive

Archive for the ‘Weblogic Server’ Category

Sample WSRP Producer URL

December 1, 2010 Leave a comment

Weblogic Server: RDBMS Security Store Errors

November 19, 2010 Leave a comment

Following error is thrown on Weblogic Server domain startup. Apparently as discussed in [1] and [2], this is due to incorrect test query (Table SYSTABLES applies for pointbase only).This is not a bug. Weblogic server execute test query to test jdbc connection. You can change this test query on Weblogic Server Administration Console. Open the administration console (default: http://localhost:7001/console/) and change the “Test Table Name:” field under “yourserver -> services-> jdbc -> data sources -> cgDataSource (or other data sources) -> advanced” and write your Database test query.For Instance, “Select * from dual” for Oracle.

<Sep 17, 2010 12:48:05 PM IST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM SYSTABLES" set up for pool "appsGroupSpaceDataSource" failed with exception: "java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
".>
<Sep 17, 2010 12:48:05 PM IST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM SYSTABLES" set up for pool "cgDataSource" failed with exception: "java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
".>
<Sep 17, 2010 12:48:06 PM IST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM SYSTABLES" set up for pool "cgDataSource-nonXA" failed with exception: "java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
".>
<Sep 17, 2010 12:48:06 PM IST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM SYSTABLES" set up for pool "p13nDataSource" failed with exception: "java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
".>
<Sep 17, 2010 12:48:07 PM IST> <Error> <JDBC> <BEA-001112> <Test "SELECT COUNT(*) FROM SYSTABLES" set up for pool "portalDataSource" failed with exception: "java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
".> 

References:

[1]. http://forums.oracle.com/forums/thread.jspa?threadID=1130337&tstart=0
[2].http://forums.oracle.com/forums/thread.jspa?threadID=2134807&tstart=0

Configure RDBMS Security store for Weblogic Server

November 19, 2010 Leave a comment

Nice post on configuring RDBMS Security store for Weblogic Server here

wldeploy: versioning of WebServices is not supported

November 18, 2010 1 comment

Following error is thrown when running wldeploy with redeploy flag.


<Nov 18, 2010 9:46:13 AM EST> <Error> <HTTP> <BEA-101355> <[weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.> 
<Nov 18, 2010 9:46:13 AM EST> <Error> <HTTP> <BEA-101216> <Servlet: "WebServiceServlet" failed to preload on startup in Web application: "MyProducerEARToolSupport".
javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        Truncated. see log file for complete stacktrace
> 
<Nov 18, 2010 9:46:13 AM EST> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'MyProducer [Version=b1]'.
weblogic.application.ModuleException: [HTTP:101216]Servlet: "WebServiceServlet" failed to preload on startup in Web application: "MyProducerEARToolSupport".
javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
        at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
        at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
        at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
        at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:531)
        at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1915)
        at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1889)
        at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1807)
        at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3045)
        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1397)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
        at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
        at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
        at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:54)
        at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
        at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activate(BasicDeployment.java:184)
        at weblogic.deploy.internal.targetserver.BasicDeployment.activateFromServerLifecycle(BasicDeployment.java:361)
        at weblogic.management.deploy.internal.DeploymentAdapter$1.doActivate(DeploymentAdapter.java:51)
        at weblogic.management.deploy.internal.DeploymentAdapter.activate(DeploymentAdapter.java:196)
        at weblogic.management.deploy.internal.AppTransition$2.transitionApp(AppTransition.java:30)
        at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:233)
        at weblogic.management.deploy.internal.ConfiguredDeployments.activate(ConfiguredDeployments.java:169)
        at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:123)
        at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
        at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
        at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

        at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1399)
        at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:460)
        at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:83)
        at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
        Truncated. see log file for complete stacktrace

Caused By: javax.servlet.ServletException: [HTTP:101355][weblogic.webservice.server.servlet.WebServiceServlet@2fe9b2e] Version b1 is specified for WebServices CampaignWS,PropertySetWS, but versioning of WebServices is not supported.
        at weblogic.webservice.server.servlet.WebServiceServlet.checkAppVersion(WebServiceServlet.java:173)
        at weblogic.webservice.server.servlet.WebServiceServlet.initLocal(WebServiceServlet.java:113)
        at weblogic.webservice.server.servlet.WebServiceServlet.init(WebServiceServlet.java:97)
        at javax.servlet.GenericServlet.init(GenericServlet.java:241)
        at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
        Truncated. see log file for complete stacktrace
> 

As suggested in [1], the solution is to comment out following section in weblogic-application.xml

weblogic-application.xml

<wls:library-ref>
<wls:library-name>wlp-tools-support-app-lib</wls:library-name>
<wls:specification-version>10.3.2</wls:specification-version>
<wls:implementation-version>10.3.2</wls:implementation-version>
</wls:library-ref>

References
[1]. http://kr.forums.oracle.com/forums/thread.jspa?threadID=804617

wldeploy: java.lang.NoClassDefFoundError: weblogic/Deployer

November 17, 2010 Leave a comment

Even after running setDomainEnv.sh, the wldeploy throws below NoClassDefFoundError.

Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Deployer
Caused by: java.lang.ClassNotFoundException: weblogic.Deployer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: weblogic.Deployer.  Program will exit.

An alternative way to run is to put the weblogic.jar on the classpath and run the wldeploy task as below.

java -cp /home/user/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar weblogic.Deployer -adminurl t3://localhost:7001 -username ...

wldeploy:Exclusive access to the edit lock

November 17, 2010 Leave a comment

This error is thrown when deploying an applicaton on Weblogic Server with wldeploy task.


<Nov 17, 2010 10:45:18 AM EST> <Warning> <Deployer> <BEA-149124> <Failures were detected while initiating deploy task for application 'MyWSRPProducer'. Error is: '[Deployer:149163]The domain edit lock is owned by another session in non-exclusive mode - this deployment operation requires exclusive access to the edit lock and hence cannot proceed. If you are using "Automatically Aquire Lock and Activate Changes" in the console, then the lock will expire shortly so retry this operation.'> 

One of the following 2 solutions can be adapted to get rid of the error:

  1. Login to Admin console at http://localhost:7001/console and be sure you click either Activate Changes or Release Configuration in the Change Center and then rerun the deploy task

  2. Using usenonexclusivelock flag on the wldeploy task to use the existing lock on the domain that has already been acquired by the user performing the action.This attribute is particularly useful when the user is using multiple deployment tools (Ant task, command line, Administration console, and so on) simultaneously and one of the tools has already acquired a lock on the domain. Valid values for this attribute are true and false. Default value is false

Weblogic Portal Remote service invocation failed

November 15, 2010 Leave a comment

Following error occurs when the Producer is not available. To get rid of this, Please check


Error invoking portlet "<Some Struts Portlet>"

The source of this error is:

java.rmi.RemoteException: Remote service invocation failed; nested exception is: 
	java.lang.NullPointerException
	at com.bea.wsrp.proxy.ProxyBase.dispatch(ProxyBase.java:696)
	at com.bea.wsrp.proxy.ProxyBase.sendMessage(ProxyBase.java:575)
	at com.bea.wsrp.proxy.ProxyBase.dispatch(ProxyBase.java:710)
	at com.bea.wsrp.proxy.WseeProxy.dispatch(WseeProxy.java:76)
	at com.bea.wsrp.proxy.ProxyBase.invoke(ProxyBase.java:483)
	at $Proxy100.getRenderDependencies(Unknown Source)
	at com.bea.wsrp.consumer.markup.GetR

WebLogic Portal: com.bea.portlet.adapter.scopedcontent.ActionLookupFailedException

November 3, 2010 Leave a comment

Weblogic Portal throws this error when a Struts Portlet containing a form is submitted.

The source of this error is:
com.bea.portlet.adapter.scopedcontent.ActionLookupFailedException
at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.handleNullActionResult(StrutsStubImpl.java:148)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:766)
at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:141)
at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.processAction(StrutsStubImpl.java:72)
at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
at com.bea.netuix.servlets.controls.content.NetuiContentNoBeehive.raiseScopedAction(NetuiContentNoBeehive.java:183)
at com.bea.netuix.servlets.controls.content.NetuiContentNoBeehive.raiseScopedAction(NetuiContentNoBeehive.java:169)
at com.bea.netuix.servlets.controls.content.NetuiContentNoBeehive.handlePostbackData(NetuiContentNoBeehive.java:227)
at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
at com.bea.netuix.nf.ControlTreeWalker.walkRecur

For Regular Struts Porlets

login.jsp

<html:form method="post" action="/login/loginAction">
. . .
. . .
</html:form>
<form-beans>
  <form-bean name="" type=""/>
  <form-bean name="" type=""/>
</form-beans>

<action-mappings>
<action path="/login/enter"  forward="/login/login.jsp"/>
<action path=""  forward=""/>
<action path=""  forward=""/>

<action path="/login/loginAction" 
type="com.vbandaru.producer.actions.LoginAction" 
name="loginForm" 
scope="request">
<forward name="success" path="/login/success.jsp"/>
<forward name="failure" path="/login/fail.jsp"/>
</action>
</action-mappings>

login.porlet

<netuix:content>
<netuix:strutsContent action="/login/enter" module=""/>
</netuix:content>

WebLogic Portal: The requested URI null could not be found on this server

November 3, 2010 Leave a comment

Weblogic Portal 10.3.2 throws this error for Struts 1.3 Porltet when “struts-adapter-1.3.jar” not on the classpath. The error vanishes once I got the jar on the classpath.

. 

The source of this error is:

com.bea.netuix.servlets.controls.content.ContentNotFoundException: The requested URI null could not be found on this server.
	at com.bea.netuix.servlets.controls.content.JspContent.beginRender(JspContent.java:584)
	at com.bea.netuix.nf.ControlLifecycle$7.visit(ControlLifecycle.java:485)
	at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:518)
	at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
	at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
	at com.bea.netuix.nf.ControlTreeWalker.walkRecursiveRender(ControlTreeWalker.java:529)
	at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:220)
	at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:399)
	at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
	at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
	at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:326)
	at com.bea.netuix.nf.UIControl.render(UIControl.java:582)

WSRP Security: Security WSRP Messages over wire in Weblogic Portal

October 21, 2010 Leave a comment

Usecases:

  1. Provide Security for WSRP portlets so that only authenticated Consumers can access the exposed portlets
  2. Provide transport layer security for WSRP messages so that SOAP Messages between WSRP Producer and WSRP consumer are encrypted

For #1, The user identity can be acheived in two ways in Weblogic Portal 10.3.2

  • SAML TokensĀ (default) link
  • User Name Tokens link

For #2, Open up, WEB-INF/wsrp-producer-config.xml inside Producer’s application and change secure attribute to true. After changes, it should look like below:

<markup secure="true" rewrite-urls="true" transport="string" accepts-mime="false"
return-markup-during-interaction="true"
isolate-session-cookies-for-local-consumer="false"/>

A packet sniffing tool like TCPMonitor can be used to verify this configuration.

keywords: Weblogic Portal 10.3.2 (11g), WSRP Producer, WSRP Consumer