Tuesday, March 17, 2015

Generate Framework Portal MAR file without Jdeveloper in non Windows OS

How to generate AutoGenerated.mar file without opening Jdeveloper ?

Currently AutoGenerated.mar file can be build only in Jdeveloper in Windows OS and there is no UNIX equivalent tool provided by Oracle to create the same.

This can be achieved using custom ANT task, which I am working on and will be publishing soon to the world.

Click here to follow this link to get the source code and ant task details.

More details coming soon, thanks for visiting...


Generate TaskFlow jar without Jdeveloper in non Windows OS

How to generate task flow view controller jar file without opening Jdeveloper ?

Currently task flow jar can be build only in Jdeveloper in Windows OS and there is no UNIX equivalent tool provided by Oracle to create the same jar.

This can be achieved using custom ANT task, which I am working on and will be publishing soon to the world.

More details coming soon....



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.