Archive for June, 2012

Debugging LiveCycle – Working with Application Servers

- Ankush Kumar, Lead Software Engineer @ Adobe

Enabling Debugging

WebSphere

  1. Go to Websphere console -> Servers -> Application servers -> server1 -> Process Definition -> Java Virtual Machine.
  2. Enable the checkbox against Debug Mode.
  3. Fill in the following as debug arguments in the text box:
    Djava.compiler=NONE -Xdebug -Xnoagent
    -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777

Weblogic

  1. Go to Home >Summary of Servers >DocServer Server Start tab.
  2. Edit arguments and add:
    • For JRockit R28 and above -XX:
      agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787
    • For others:
      Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777

JBoss

Add following in run.conf (for Non-Windows) and run.conf.bat/run.bat (for Windows):

  • Non-Windows: JAVA_OPTS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n $JAVA_OPTS
  • Windows: set JAVA_OPTS=”-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n %JAVA_OPTS%”

Taking Thread Dump

If the server is started through a console/command line and not as a service, press a ctrl+z. The thread dump would be logged in the console window/console logs.

If the server is running as a service, do the following:

Windows

You can use a utility SendSignal. Follow the docs at this URL.

Unix

Identify the process id and then fire command

kill -3 <pid>

JBoss

Got to <jboss_home>\bin and execute following command:

twiddle.bat invoke “jboss.system:type=ServerInfo” listThreadDump > threaddump.html

Weblogic

For Weblogic 10 R3 you can use following way. Go to Weblogic Console -> Environment -> Servers On left side. Then select <your server> -> Monitoring tab -> Threads -> Dump Thread Stacks.

It will display the thread info.

Websphere 6

  1. Login to the machine where the WebSphere server is running.
  2. Open a command prompt and change directory to /WebSphere/AppServer/bin.
  3. Type wsadmin (will take a minute to connect – if authentication is enabled, it will prompt).
  4. Enter set jvm [$AdminControl completeObjectName,process=server1,*].
    • Replace server1 with the actual server you want to take a thread dump from (has to be local to this machine).
    • Enter $AdminControl invoke $jvm dumpThreads.

The thread dump is created in the profile folder for the server you created a dump for. There should be a “javacore.someText.txt” file created. If it’s a cluster, you’ll have to repeat the above steps for each server.

Websphere 7

Using JConsole. Connect the JConsole present in IBM JDK and trigger threaddump using that. You would have to follow the steps mentioned here for it to get to work.

Capturing SQL Logs

The SQL queries by UM can be logged using the default logging system for that system. Following two categories should be used:

  • com.adobe.idp.storeprovider.jdbc – Logs all the queries fired with the value populated.
  • storeprovider.stacktrace – This would also log the stacktrace of the thread which fired the query.

The logging level should be set to TRACE or the lowest for the queries to be logged. For the POF layer use the category com.adobe.pof.adapter for seeing the queries getting fired.

 

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 6.0/10 (1 vote cast)

Adding a custom service in Correspondence Management Solution

- Mayank Gupta, Computer Scientist @ Adobe

Steps to add a custom service in Correspondence Management solution are as follows:

  1. The implementation for this user story involves code changes and rebuilt. So, one is required to setup the development environment via steps mentioned @ Setting up development environment.
  2. Add your sample custom service interface and implementation class in the CorrespondenceManagementSolutionTemplate/Services project for example @ com.adobe.icc package in the source code. See the sample @ http://blogs.adobe.com/LiveCycleHelp/files/2012/06/SampleCustomService1.zip.
  3. Now define your service as a spring bean. For this, add the following entry in your CorrespondenceManagementSolutionTemplate\Services\resources\META-INF\spring\cm\adobe-cm-spring-config.xml file:
    <bean id=”sampleCustomService” class=”com.adobe.icc.SampleCustomServiceImpl” />
  4. Now expose your spring bean as a osgi-service. For this, add the following entry in your CorrespondenceManagementSolutionTemplate\Services\resources\META-INF\spring\osgi-context.xml file:
    <bp:service interface=”com.adobe.icc.SampleCustomService” ref=”sampleCustomService” >
    <bp:service-properties><entry key=”connectors.httpinvoker” value=”true” />
    <entry key=”connectors.httpinvoker.alias” value=”/sampleCustomService” />
    <entry key=”connectors.remoting” value=”true” />
    <entry key=”connectors.remoting.id” value=”sampleCustomService” />
    </bp:service-properties>
    </bp:service>
  5. Rebuild and redeploy the Solution template to view the changes. For information on rebuilding and redeploying, see Building and deploying the Solution Template.

 

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle PDF Generator – Tips and Tricks

- Saurabh Kumar Singh, Computer Scientist at Adobe

 

Following are a few tips and workarounds for LiveCycle PDFG. Please note that the workaround marked as unsupported are not officially supported by Adobe.

  • [Unsupported] On UNIX servers customers can use 64-bit OpenOffice to do OpenOffice based conversions. The obvious benefit from this is the performance improvement we get. To achieve this just point JAVA_HOME_32 to 64 bit version of Java. Same can achieved on widows too but you may observe immediate conversion failures for other native file formats.
  • [Unsupported] Any file which can be opened by Acrobat (like a text file) can be converted to PDF using LiveCycle PDF Generator. You just need to add the comma separated file extension (for example txt for text files) in XPS to PDF file-type setting.
  • A user/administrator can directly jump to PDF Generator UI by hitting http(s)://<server-name>:<port>/pdfgui. This way a user can skip couple of clicks on UI to land on PDF Generator user interface.

Watch this space, for a lot more upcoming tips and tricks.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

Removing Sample Data and Users from Correspondence Management Solution

- Mayank Gupta, Computer Scientist at Adobe

 

Adobe LiveCycle Correspondence Management Solution provides some sample collateral and creates some sample users so that developers can start using the application and make use of these samples to know about and learn the product capabilities. It is highly recommended to remove these sample assets and sample users when the solution is deployed on to a production server.

Steps to remove sample assets and sample users:

  1. Removing sample assets by uninstalling them from package manager:
    • Go to http://[hostname:port]/lc/crx (on author instance)
    • Login as admin
    • Click Package Manager
    • Click on Package with name “cm-sampleassets.zip”
    • Click More dropdown in action bar (This action bar has other actions like Edit Build etc.,. , More option is in the right most area of this bar)
    • Click Uninstall
    • Click Uninstall again on confirmation dialog
    • Wait for sometime till you see a message like “Package uninstalled in <some>ms” in the Activity Log
    • Now if you log on to CM Manage Assets UI , you will not see any sample assets. If you are still seeing them then restart the server.
  2. Removing sample users from CRX user administration:
    • Go to http://[hostname:port]/lc/crx (on author instance)
    • Login as admin
    • Click User Administration.
    • Note: Correspondence Management creates Todd Goldman (tgoldman), Caleb Lopez (clopez), Gloria Rios (grios), Frank Kricfalusi (fkricfalusi), Jocelyn Robinson (jrobinson), and Heather Douglas (hdouglas) as the sample users.
    • In the user administration dialog , Navigate to each of these users and click Remove user. Now you cannot log in to the Manage Assets UI with any of the above usernames.

Follow the steps mentioned above in 2 and remove sample users from publish instance as well. There is no need to uninstall sample assets from publish instance as they are installed on author instance only.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

LiveCycle PDF Generator – HTML to PDF

- Saurabh Kumar Singh, Computer Scientist at Adobe

 

LiveCycle PDF Generator supports HTML to PDF conversions. HTML document can be provided in any of following forms:

  • Submit an html file to be converted to PDF.
  • Provide http(s) URL of the html to be converted to PDF.
  • Submit a ZIP file containing an entire website (zip should contain index.html at the top level) for creating PDF.

While submitting an input HTML file, the user can provide a variety of options like:

  • The level to which spidering will be performed
  • Whether to get the entire site or not
  • Stay on same path (in terms of URL), while fetching the HTML document(s)
  • Stay on same server. It is useful when you have specified spidering level of more than 1 and at the same time does not want to create PDF from html documents linked on input html if it’s on a different server.
  • PDF page size and margin options
  • Add bookmarks
  • Enable tagging
  • Set initial views settings: It contains option like which page to open on PDF open

LiveCycle ES2 PDF Generator and later provides the facility to specify Adobe Acrobat Professional as the fallback to create PDF files. A downside to this fallback is that Acrobat based conversion is single-threaded, whereas LiveCycle PDFG based conversions are multi-threaded. Also, Acrobat Professional does not honor the options mentioned above.  This facility is only available on Windows. LiveCycle Administrator can also configure the Generate PDF Service to always prefer the Acrobat route. To do this navigate to Home > Services > Applications and Services > Service Management > Configure GeneratePDFService and set the “Use Acrobat WebCapture (Windows Only)” option to True.

What’s New in ES3

The HTML to PDF engine creates high fidelity PDF documents. Time taken to create the best quality PDF document may seem longer to some users. For some user a low quality PDF is acceptable, if the conversion time is faster.

In LiveCycle ES3 a new conversion engine is introduced to achieve this and get a quick turnaround time for conversions. This engine is supported on all the supported platforms of LiveCycle. Moreover this engine honors all the conversion options mentioned above. There is a bonus option of specifying header and footer text to be put in the generated PDF document. This engine acts as fallback for high quality HTML to PDF engine on UNIX machines. In order to set this new engine as the preferred route, navigate to Home > Services > Applications and Services > Service Management > Configure GeneratePDFService and set “Use ICEBrowser based Html to PDF” option to True.

 

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 9.0/10 (3 votes cast)

LiveCycle forums have gone thinner!

Adobe LiveCycle forum is a platform where LiveCycle community meets, learns, and discusses experiences about using LiveCycle. We are committed to provide the best user experience to the community when they are on the forum, and we have taken a step in that direction.

The LiveCycle forum, until sometime ago, comprised of 70 forums and sub-forums. We monitored the forums and found that the unnecessary bulk is making it difficult for the community to manage discussions and participate on the forum. As a result, most of the are inactive as it was unintuitive to drill-down to the correct forum for discussions.

As we understand the importance of a close-knit community, we have optimized the forum structure, so that it is easier for the community to search, post, and participate on the forum. The new forum structure is thin, focused, searchable, and easy to manage.

In its new look, the LiveCycle forum has relatively flat hierarchy, but with a logical grouping of discussions. The streamlined new structure includes seven top-level forums, including one forum with 14 sub-forums. The flat hierarchy relies on the tags for filtering discussions related to a specific area of LiveCycle.

The following table lists the top-level forums with their description.

Forum

Description

LiveCycle modules and development tools A top-level forum with 14 sub-forums for each LiveCycle module and development tool.
LiveCycle installation, configuration, deployment, and administration A forum for discussing issues related to LiveCycle installation, configuration, and administration. Also, you can discuss issues related to application servers and databases while installing or deploying LiveCycle.
LiveCycle Collaboration Services A dedicated forum for discussing LCCS.
Related products – Managed Services, Central Output Server, Production Print etc. In this forum, you can discuss product that do not form the core of LiveCycle, but are related to the LiveCycle technology.
General discussions – features, feedback, training, documentation etc. This forum is suitable for general discussions about LiveCycle features, learning, and documentation. Also, you can share any tips and tricks, learning experiences, and submit feature requests in this forums.
LiveCycle pre-ES (6.x and 7.x) discussions For everything related to pre-ES versions of LiveCycle.
Deprecated modules – Content Services, Mosaic, PDFG 3D, Guides etc. This is just the right place to talk about deprecated LiveCycle modules.

 

As we see it as a striking shift in how you currently interact on the LiveCycle forum, please take a note of the following things:

  • If you have bookmarked or following any LiveCycle forum, we recommend that you visit the corresponding forum in the new structure and configure it again as the URL for the forum might have changed.
  • The discussion threads are sorted by the last modified date; however, in some cases, the threads prior to streamlining might not appear in the desired sequence. It’s a known technical issue and we are trying to restore the sorting.
  • There is no impact on the URLs of individual discussions and you will continue to receive notifications for any updates to the discussions posted by you.

We hope that the streamlined forum will enhance and add value to your interactions with the community. Please visit the forum at http://forums.adobe.com/community/livecycle and let us know your valuable feedback as comments on this blog. We will continue to make improvements to the forum to give the community the engaging and best-in-class user experience.

Thanks for being such a wonderful community of experts!

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)