Tuesday, March 17, 2015

Add Access Permission to Resources

How to add access permission to web center portal resources ?

Coming soon...



Integrate Taskflow and Framework Portal

How to access your taskflow from a framework portal in WebCenter Portal environment?

Here is the step by step instructions:

Assumptions:

  • Assuming the task flow project name is CookTaskFlow and it has a task flow name cook-task-flow-definition.xml. 
  • Framework portal project name is FoodPortal.


Prerequisites:

  • Make sure that you create a test page (jspx) in CookTaskFlow project to test the task flow cook-task-flow and it is working as you expect.
  • Make sure that you create a test page (jspx) in FoodPortal to test that framework portal is working as you expect.


Integration Steps:

Step 1. Navigate to case task flow project and create the view controller jar file by using the "deploy to jar" option for the task flow and you should see that CookTaskFlow.jar has been created in ViewController/deploy folder.

Step 2. Navigate to framework portal project and create a file system connection in the Resources palette, enter the name of the resource as CookTaskFlow and enter the folder path as ViewController/deploy folder path. Make sure you test the connection before you save it.

Step 3. You should be able to see the view controller jar under CookTaskFlow file system connection in the resources palate.

Step 4. Open the jspx page where you want to add the task flow as a region and make sure this jspx has no compilation errors and it is working as a test page. Drag an drop the task flow from view controller jar from resource palate to this jspx page, it should give you a choice of selecting a region and others, select region.

Step 5. You should see a tag created, which points to the definition of the task flow you are trying to add.

Step 6. When you are trying to drag and drop the task flow in step 4, it should ask whether you want to add the task flow jar as a library and you should say yes.

With this you should be able to right click and run the jspx page.

Note: Access permission to allow the users to view the task flow can be set using jazn-data.xml file. See my other blogs on how to add permission to view a task flow or any other resource.

Wednesday, September 3, 2014

JDeveloper: An expected severe error has occured

Popup to show An expected severe error has occured in JDeveloper

The program may be unstable, which could result in data loss. Decide how you want to proceed and click OK.


  • Save and exit
  • Exit without saving
  • Continue


Error details

Uncaught exception
java.lang.OutOfMemoryError: Java heap space
  j.util.Arrays.copyOf(Arrays.java:2882)
  j.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
  j.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:390)
  j.lang.StringBuffer.append(StringBuffer.java:224)
  org.tmatesoft.svn.core.SVNErrorMessage.getFullMessage(SVNErrorMessage.java:257)
  org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:58)
  org.tmatesoft.svn.core.internal.wc.admin.SVNAdminAreaFactory.open(SVNAdminAreaFactory.java:163)
  org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.doOpen(SVNWCAccess.java:364)
  org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:272)
  org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.open(SVNWCAccess.java:265)
  org.tmatesoft.svn.core.internal.wc.admin.SVNWCAccess.openAnchor(SVNWCAccess.java:145)
  org.tmatesoft.svn.core.wc.SVNStatusClient.doStatus(SVNStatusClient.java:320)
  org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:296)
  org.tmatesoft.svn.core.javahl.SVNClientImpl.status(SVNClientImpl.java:278)
  org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:480)
  org.tigris.subversion.svnclientadapter.svnkit.SvnKitClientAdapter.getStatus(SvnKitClientAdapter.java:141)
  org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.getStatus(AbstractJhlClientAdapter.java:466)
  o.ji.vcs.svn.SVNURLInfoCacheSimpleStrategy.getURLInfo(SVNURLInfoCacheSimpleStrategy.java:79)
  o.ji.vcs.svn.SVNURLInfoCache.getPropStatus(SVNURLInfoCache.java:59)
  o.ji.vcs.svn.SVNStatusResolver.getStatus(SVNStatusResolver.java:159)
  o.ji.vcs.svn.SVNStatusResolver.populateStatuses(SVNStatusResolver.java:82)
  o.ji.vcs.generic.GenericClient$2.getImpl(GenericClient.java:531)
  o.j.vcs.spi.VCSStatusCache.getValuesImpl(VCSStatusCache.java:31)
  o.j.vcs.spi.VCSURLBasedCache.getValuesImpl(VCSURLBasedCache.java:204)
  o.j.vcs.changelist.ChangeListLocalStatusCache$2.call(ChangeListLocalStatusCache.java:78)
  o.j.vcs.spi.VCSURLBasedCache.callUnderWriteLock(VCSURLBasedCache.java:224)
  o.j.vcs.changelist.ChangeListLocalStatusCache.getValuesImpl(ChangeListLocalStatusCache.java:73)
  o.j.vcs.spi.VCSURLBasedCache.getValues(VCSURLBasedCache.java:107)
  o.j.vcs.changelist.ChangeListEventQueue.filterByStatus(ChangeListEventQueue.java:513)
  o.j.vcs.changelist.ChangeListEventQueue.processRequeryEvent(ChangeListEventQueue.java:373)
  o.j.vcs.changelist.ChangeListEventQueue.processEvent(ChangeListEventQueue.java:258)
  o.j.vcs.changelist.ChangeListEventQueue.processEvents(ChangeListEventQueue.java:685)

When you get this error, probably there is an error with your application too, close the application and JDeveloper and start from scratch.

Tips to avoid this:
1. While working with JDeveloper, you need to close and open application so many times. When I want to delete an application, I will choose to Close Application rather from Jdeveloper and then delete the application folder physically later after closing JDeveloper.
2. After running JDeveloper for long, it starts consuming more memory, give it a break, close the JDeveloper and open it again.
3. Always refer the external jars as user library, create a library name to your physical path and then extend the library to add external jars to the classpath.

Tuesday, August 12, 2014

SOA Composite Cheat sheet

Declaring a new variable of XMLType
Technically it can be defined in any scope of any XMLType (if not found import it), but it is recommended to define it where it is really needed.
Create a new scope in the block where it is needed and define it, otherwise it may throw totally unrelated exceptions - you will not be able to figure out.

Initializing a new variable of XMLType already declared
Any XMLType variable must be initialized before it is getting used.


How to avoid generation of xmlns="" while doing mapping in xpaths
Declare and initialize the parent XMLType variable and while assigning or appending use the child of the newly defined variable to avoid getting xmlns="" in the xml tag.


How to append instead of assign while mapping xpaths
Do the mapping as you normally do first. Once mapping is done then right click the mapped path and convert it to append, it should create a + plus icon in the left xml xpath which shows that it got converted to append instead of assign.


Tuesday, March 18, 2014

Oracle Business Rules Cheat sheets

Section 1: Oracle Business Rules

Details:

  • When facts are modified as part of action inside business rules, business rules are getting fired again based on the new data
  • Priority/Order can be set in business rules in order to call them in a particular order
  • Business rules can be made active/inactive by checking the "Rule Active" check box
  • Inactive business rules are not getting fired and are same as commented code

Section 2: Oracle Business Rule Facts

Details:

  • Facts can be defined as RL Facts and properties (one or more) can be added to the fact.
  • While defining a property as an ArrayList, defining the property's array list item type (e.g. Person type fact) throws an undefined fact error, so its better to leave the array list item type as blank.
  • Facts can be asserted using assert new action in initial action, these assertions will not be maintained by names -
  • Facts can be created using assign new and then can be asserted, these will be available by names as well
  • Facts are directly accessible in Oracle Business Rules
  • Facts are not accessible in BRE Functions
  • Collection of facts or fact itself can be passed from Oracle BRE to function while calling the function
  • Facts need to be used in BRE, if they are not used in BRE, BRE cannot be compiled and deployed even if they are used in initial actions

Section 3: Oracle Business Rule Functions

Details:

Section 4: Oracle Business Rule Initial Action

Details:

Monday, December 30, 2013

Reset SVN (Subversion) account information in JDeveloper

Once the account info (username, password or repository url) is set in JDeveloper, SVN (subversion) plugin its hard to change any of these using jDeveloper.

Here is how these can be changed:
  1. Save your data and close JDeveloper
  2. Find the repositories.xml file, normally it is located in user's home directory and in following subdirectory: 
      .jdeveloper/system11.1.1.6.38.61.92/o.jdeveloper.subversion
  3. Rename the file repositories.xml to repositories.xml.bak
  4. Open JDeveloper and try to checkout a file, it will ask you to enter the account information again.
  5. Enter the updated account info, test access and you are done!

Monday, April 1, 2013

Update the remote producer handle

How to update the remote producer handle?
There are multiple ways to update the remote producer handle, two of them are given here:
1. By accessing the Portal Admin Console
2. By updating the Portal database directly

Both of these methods has pros and cons.
Updating via path 1 is a standard procedure and lot of documentation can be found on the web and oracle technical documentation website. It may take lot of time to update the remote producer handles depending upon the network, firewall and number of handles itself, since every update attempted via console will try to connect to the incorrect url first and should return error as a result before one can update it.

However going via path 2 requires little courage and technical expertise. Make sure you have a database backup before you attempt this path.
Steps to update the remote producer handles directly through database:
- Find all the producer details that need to be updated
- Verify along the table pf_consumer_registry to see if you need to update the producers
- Find the PRODUCER_ID and WSDL_URL from pf_consumer_registry table
- Update the WSDL_URL for the PRODUCER_ID that needed to be updated.
- Commit the transaction and verify the same using portal admin console.

If things go wrong, feel free to restore the database.

Note: WebLogic Portal 10.3.2 & WebLogic Portal 10.3.4 has been used and tested while writing this post and they were successfully updated.

Wednesday, March 20, 2013

org.xml.sax.SAXParseException: Element type

Problem: While using tag <shellscript>  as example given below the word boundaries < and > does not work with build file and throws the error as given below:
Sample <shellscript> block:



                  echo "mybuild.xml" | grep "\.xml\>" 1> /dev/null
                  OUTPUT1=$?



Error stack trace:


BUILD FAILED
/opt/appl/project/build.xml:274: Element type "build" must be followed by either attribute specifications, ">" or "/>".
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:225)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:138)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:97)
        at org.apache.tools.ant.Main.runBuild(Main.java:683)
        at org.apache.tools.ant.Main.startAnt(Main.java:200)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: org.xml.sax.SAXParseException: Element type "build" must be followed by either attribute specifications, ">" or "/>".
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.seekCloseOfStartTag(XMLDocumentFragmentScannerImpl.java:1395)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:269)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
        at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:209)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:138)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
        at org.apache.tools.ant.Main.runBuild(Main.java:683)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        ... 2 more
--- Nested Exception ---
org.xml.sax.SAXParseException: Element type "build" must be followed by either attribute specifications, ">" or "/>".
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:195)
        at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:174)
        at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:388)
        at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1414)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.seekCloseOfStartTag(XMLDocumentFragmentScannerImpl.java:1395)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:269)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2755)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
        at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
        at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:173)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:209)
        at org.apache.tools.ant.helper.ProjectHelper2.parse(ProjectHelper2.java:138)
        at org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:96)
        at org.apache.tools.ant.Main.runBuild(Main.java:683)
        at org.apache.tools.ant.Main.startAnt(Main.java:199)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)



Cause: < is assumed to be the start tag for build.xml file i.e. in the above example <build is assumed to be the start tag and it complains about the missing closing tag >

Solution: Replace <s; with b i.e. word boundries. Start boundary \< can be replaced with \b and end boundry \> can be replaced with \b in the regular expression.

Friday, February 8, 2013

Propagation Timeout Exception

Problem: While running propagation on WebLogic Portal, it is timing out after 1 Hour/ 3600 seconds.

Error Stack Trace:

Caused By: javax.ejb.EJBException: nested exception is: javax.ejb.EJBException: SQL Error while performing get operation on portlet instance: SQL [select DEF.MARKUP_DEFINITION_ID, DEF.IS_FORKABLE, INST.INTERSECTION_ID, DEF.PORTLET_LABEL, INST.PORTLET_LABEL, DEF.CONTENT_URI, DEF.BACKING_FILE, DEF.IS_PUBLIC, INST.PORTLET_DEFINITION_ID, INST.THEME_DEFINITION_ID, INST.TITLE_BAR_ORIENTATION, INST.DEFAULT_MINIMIZED, INST.INSTANCE_TYPE, INST.PARENT_PORTLET_INSTANCE_ID, DEF.FORK_RENDER, DEF.IS_CACHEABLE, DEF.CACHE_EXPIRES, DEF.PORTLET_FILE, DEF.IS_PORTLET_FILE_DELETED, DEF.HELP_URI, DEF.EDIT_URI, DEF.WEBAPP_NAME, INST.CREATION_DATE, INST.MODIFIED_DATE, DEF.CREATION_DATE, DEF.MODIFIED_DATE, PPV.PRODUCER_HANDLE, PPV.PORTLET_HANDLE, PPV.PORTLET_STATE_CHANGE, PPV.REQUIRES_URL_TEMPLATES, PPV.TEMPLATES_STORED_IN_SESSION, PPV.PORTLET_STATE, PPV.IS_PRODUCER_OFFERED, INST.TITLE_KEY from PF_PORTLET_DEFINITION DEF, PF_PORTLET_INSTANCE INST left outer join PF_PROXY_PORTLET_INSTANCE_V PPV on PPV.PORTLET_INSTANCE_ID = INST.PORTLET_INSTANCE_ID where INST.PORTLET_INSTANCE_ID = ? and DEF.PORTLET_DEFINITION_ID = INST.PORTLET_DEFINITION_ID] portletInstanceId [1,456,041] database error code [0] SQL state [null].; nested exception is: java.sql.SQLException: The transaction is no longer active - status: 'Marked rollback. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 36002 seconds 
BEA1-5C8E244BF578F5B2D7B1]'. No further JDBC access is allowed within this transaction.
at com.bea.netuix.application.manager.persistence.jdbc.ExportImportManagerImpl.updateDesktopView(ExportImportManagerImpl.java:144)
at com.bea.netuix.application.manager.persistence.jdbc.ExportImportManager_7mrwg_EOImpl.updateDesktopView(ExportImportManager_7mrwg_EOImpl.java:366)
at com.bea.propagation.netuix.online.util.PortalXIPHelper.importDesktop(PortalXIPHelper.java:292)
at com.bea.propagation.netuix.online.util.PortalXIPHelper.addOrUpdateDesktopDefinitionInternal(PortalXIPHelper.java:254)
at com.bea.propagation.netuix.online.util.PortalXIPHelper.addDesktopDefinition(PortalXIPHelper.java:193)
at com.bea.propagation.netuix.online.util.PortalXIPHelper.updateDesktopDefinition_Standard(PortalXIPHelper.java:211)
at com.bea.propagation.netuix.online.updater.PortalDesktopDefnNodeUpdater.updateNode(PortalDesktopDefnNodeUpdater.java:123)
at com.bea.propagation.framework.tool.resolver.TreeResolver.processUpdate(TreeResolver.java:868)
at com.bea.propagation.framework.tool.resolver.TreeResolver.processElectionsIterative(TreeResolver.java:509)
at com.bea.propagation.framework.tool.resolver.TreeResolver.processElections(TreeResolver.java:408)
at com.bea.propagation.framework.tool.resolver.TreeResolver.resolveTree(TreeResolver.java:317)
at com.bea.propagation.framework.tool.servlet.InventoryManagementServlet.commitOperation(InventoryManagementServlet.java:816)
at com.bea.propagation.framework.tool.servlet.InventoryManagementServlet.doOperation(InventoryManagementServlet.java:301)
at com.bea.propagation.framework.tool.servlet.InventoryManagementServlet.doPost(InventoryManagementServlet.java:201)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at com.bea.p13n.servlets.PortalServletFilter.doFilter(PortalServletFilter.java:338)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)


Main cause: 
Since the propagation is running more than one hour (predefined timeout limit), it is getting timeout after one hour and transactions are being rolled back.

Other possible reasons:
Propagating between two domains which are separated by a firewall, could result in increased time for transactions going over the firewall. Firewall could consume as much as 400% time of actual propagation transactions depending upon the network configurations in enterprise environments. 

Proposed solutions:
Solution 1. Scope the propagation and/or use policy file for propagation to complete within 1 Hour.
Solution 2. Remove the firewall between the propagation domains (source and target), this may or may not save significant amount of time during propagation transactions.
Solution 3. Increase the transaction time out for propagation itself - this requires little more work, details to follow in upcoming posts.

These are the few possible solutions, there could be more like changing the way propagation works e.g. change the proliferation mode to ASYNC or OFF or so.