Friday, December 16, 2011

Removing a page from a pdf

If you're using Assembler, which comes with LiveCycle PDFG, chances are you're already familiar with http://help.adobe.com/en_US/livecycle/9.0/ddxRef.pdf.

Here's a simple DDX for removing a page (or pages) from a pdf:

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
 <PDF result="resultDoc">
  <PDF source="inDoc" pages="1,3-last"/>
 </PDF>
</DDX>

You'll notice that you have to specify all of the pages that you want to keep, and in this scenario we deleted page two.

Wednesday, November 30, 2011

Manually Uninstalling a DSC

I can't condone manually tweaking the LiveCycle database, so I strongly encourage you to deal with Adobe Support if you ever run into a situation like this.

That being said, on a number of occasions a DSC wouldn't uninstall properly for me and thus I'm faced with the following error when trying to stop/uninstall it from Workbench or by using an Ant script:

2011-11-29 10:41:37,818 ERROR [org.jboss.ejb.plugins.LogInterceptor] RuntimeException in method: public abstract java.lang.Object com.adobe.idp.dsc.transaction.impl.ejb.adapter.EjbTransactionBMTAdapterLocal.doBMT(com.adobe.idp.dsc.transaction.TransactionCallback) throws com.adobe.idp.dsc.DSCException: java.lang.IllegalStateException: Service: YourCustomService version: 0.0 must be in a running state prior to stopping at com.adobe.idp.dsc.registry.service.impl.ServiceRegistryImpl.stop ServiceRegistryImpl.java:2003)

These are the sql scripts that will allow you to manually fix the state so that it can be uninstalled:

-- Get info about the service in question
select * from adobe.tb_sc_service where id = 'YourCustomService'
-- Chances are it's in a state of 2.
select * from adobe.tb_sc_service_configuration where service_uuid = (select uuid from adobe.tb_sc_service where id = 'YourCustomService')
-- Update the state to 0
update adobe.tb_sc_service_configuration set state = 0 where service_uuid = (select uuid from adobe.tb_sc_service where id = 'YourCustomService')

You should now be able to uninstall the dsc in Workbench.

Thursday, November 17, 2011

Adobe LiveCycle ES2.5 SQL Server JDBC Driver

To follow up with my previous post, if you're doing DSC development with a SQL Server backend and need connectivity from your development environment, you're going to want to make sure you're running the 1.6.0.14 JDK and are using the sqljdbc.jar located at [installdir]\Adobe LiveCycle ES2\lib\db\mssql.  I'm fairly certain that this is a customized version of that driver and not the ones that you can simply download from Microsoft's website.

sqljdbc alternative

If you're looking to download sqljdbc.jar or sqljdbdc.jar depending on what JRE/JDK you're running, you may want to also take a look at http://jtds.sourceforge.net/.  This driver is a bit more flexible and will work with the latest 1.6 JDK that's distributed by Apple.  You simply have to change your JNDI name to start with jdbc:jtds:sqlserver instead of jdbc:sqlserver.

Friday, September 09, 2011

Custom datatypes in LiveCycle processes

If you're trying to use custom datatypes from your dsc in the LiveCycle executeScript activity in workbench, you may run into the following error:

ERROR [com.adobe.workflow.AWS] Sourced file: inline evaluation of: ``import some.package.SomeClass; SomeClass pdfg = new SomeClass . . . '' : Typed variable declaration : Class: SomeClass not found in namespace : at Line: 2 : in file: inline evaluation of: ``import some.package.SomeClass; SomeClass pdfg = new SomeClass . . . '' : SomeClass

To resolve it, you not only need to have your class in the DataTypes section of your component.xml, but you also need to have that package defined in the Export Packages of your RunTime section of your component.xml.

Friday, May 13, 2011

Flex 3.5 and using asdocs

I just noticed that running asdocs on 3.5 will throw the following error:

Loading configuration file C:\Program Files\Adobe\Adobe Flash Builder 4\sdks\3.5.0\frameworks\flex-config.xml
Adobe ASDoc
Version 3.5.0 build 12683
Copyright (c) 2004-2007 Adobe Systems, Inc. All rights reserved.
Error: ” is not a directory
Use ‘asdoc -help’ for information about using the command line.

This is happening because the asdocs folder, and more importantly asdocs/templates folder wasn't included in the 3.5 distribution of the Flex SDK.  Simply copy asdocs from 3.4 or another 3.x sdk and it'll work.

Monday, March 21, 2011

Connecting with the Gateway

If you're working with Adobe Managed Services and try to connect via Workbench using the Adobe LiveCycle Gateway, there's a chance that port 8443 will be in use and prevent you from connecting.  If that's the case and you're running IIS, you'll have to remove it's binding to 8443.  I should add that many other services could use this port such as Apache, JBoss, etc, but if you're on a Windows 7 box it's a likely culprit.

This can be done by opening Computer Management under Administrative Tools, expanding Services and Applications, clicking on Internet Information Services, clicking on Sites, then inspect which of your sites are binding to 8443 and remove them manually (Bindings under Edit Site when the site is selected).

Thursday, March 10, 2011

Using hand cursors in the flex tree

Normally getting hand cursors to show on flex components involves setting useHandCursor="true", buttonMode="true", and mouseChildren="false". Sadly this blows up the tree as you aren't able to select anything.  The way around this is to set  useHandCursor="true" buttonMode="true" on your <mx:Tree/> component and then set super.mouseChildren = false in an itemRenderer like so:

package somepackage
{
import mx.controls.treeClasses.TreeItemRenderer;
import mx.controls.treeClasses.TreeListData;

public class ReportsTreeItemRenderer extends TreeItemRenderer
{
public function ReportsTreeItemRenderer()
{
super();
}

override public function set data(value:Object):void
{
super.data = value;

if( super.data )
{
super.mouseChildren = false;
if( TreeListData(listData).depth == 1 )
setStyle('fontWeight', 'bold');
else {
setStyle('fontWeight', 'normal');
}
}
}
}
}

Wednesday, March 09, 2011

DSC ClassNotFoundException

Quite often when deploying DSC's you'll see errors such as "Caused by: java.lang.ClassNotFoundException: No ClassLoaders found for: Map".
Quite often this is caused by not fully defined your input types such as <input-parameter name="credential" required="true" type="Map"> instead of <input-parameter name="credential" required="true" type="java.util.Map">.

Tuesday, March 08, 2011

DSC Deployment Issue

When using the LiveCycle Component tool as I've blogged about in the past, sometimes you'll run into class issues when deploying your dsc to either a LiveCycle 8.2 or ES2 server that looks like the following:
Caused by: java.lang.UnsupportedClassVersionError: Bad version number in .class file

What you can do to rectify this is to specify the version that your javac task is targeting like so:

<target name="compile" depends="prepare">
<javac destdir="${classes.dir}" classpathref="class.path" debug="on" deprecation="on" optimize="off" target="1.5">
<src path="${src.dir}"/>
</javac>
</target>