• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

How to run adt.jar in headless mode?

Contributor ,
Jan 24, 2012 Jan 24, 2012

Copy link to clipboard

Copied

Hi,

I am facing issues packaging flex iOS applicaition in headless mode. Here is the error I am getting: After googling, I found this error might not occur when run in headless mode. I have already set the <headless-server>true</headless-server> in the air-config.xml and others.

     [java] Exception in thread "main" java.lang.InternalError: Can't connect to window server - not enough permissions.

     [java]     at java.lang.ClassLoader$NativeLibrary.load(Native Method)

     [java]     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1827)

     [java]     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724)

     [java]     at java.lang.Runtime.loadLibrary0(Runtime.java:823)

     [java]     at java.lang.System.loadLibrary(System.java:1045)

     [java]     at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)

     [java]     at java.security.AccessController.doPrivileged(Native Method)

     [java]     at java.awt.Toolkit.loadLibraries(Toolkit.java:1605)

     [java]     at java.awt.Toolkit.<clinit>(Toolkit.java:1627)

     [java]     at java.awt.Dimension.<clinit>(Dimension.java:70)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator.validateImageUri(ApplicationDescriptorValidator.java:183)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator20.validateElement(ApplicationDescriptorValidator20.java:121)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator25.validateElement(ApplicationDescriptorValidator25.java:65)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator26.validateElement(ApplicationDescriptorValidator26.java:62)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator30.validateElement(ApplicationDescriptorValidator30.java:52)

     [java]     at com.adobe.air.validator.ApplicationDescriptorValidator31.validateElement(ApplicationDescriptorValidator31.java:46)

     [java]     at com.adobe.air.validator.DescriptorValidator.endElement(DescriptorValidator.java:239)

     [java]     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)

     [java]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1782)

     [java]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2939)

     [java]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648)

     [java]     at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)

     [java]     at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:511)

     [java]     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:808)

     [java]     at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)

     [java]     at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)

     [java]     at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)

     [java]     at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)

     [java]     at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)

     [java]     at javax.xml.parsers.SAXParser.parse(SAXParser.java:198)

     [java]     at com.adobe.air.Descriptor.validateXML(Descriptor.java:182)

     [java]     at com.adobe.air.Descriptor.<init>(Descriptor.java:56)

     [java]     at com.adobe.air.ApplicationDescriptor.<init>(ApplicationDescriptor.java:84)

     [java]     at com.adobe.air.ApplicationPackager.validateApplicationDescriptor(ApplicationPackager.java:101)

     [java]     at com.adobe.air.ApplicationPackager.createPackage(ApplicationPackager.java:64)

     [java]     at com.adobe.air.ipa.IPAPackager.createPackage(IPAPackager.java:217)

     [java]     at com.adobe.air.ADT.parseArgsAndGo(ADT.java:557)

     [java]     at com.adobe.air.ADT.run(ADT.java:414)

     [java]     at com.adobe.air.ADT.main(ADT.java:464)

Please help.

Thanks,

Swathi.

TOPICS
Development

Views

2.8K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Feb 06, 2012 Feb 06, 2012

Copy link to clipboard

Copied

I had the same issue while running e.g. Jenkins as a deamon calling ant scripts that used adt.

The easy workaround for this was to start Jenkins as an OS X user and not as a deamon.

A "ps aux | grep app" can show you which user is running the application.

If you are running it as a deamon you can always shut it down with "sudo launchtl stop packagename".

Thanks,

Ignacio

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

Hi Ignacio,

Thank you for the suggestion. Our organisation requires Jenkins to run as daemon instead of OS X user. So, this is more like a workaround for us.

Thanks,

Swathi.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 15, 2012 Feb 15, 2012

Copy link to clipboard

Copied

Hi Swathi,

Can you quickly check the following:

1) Are you using the <headless-server> tag correctly, i.e. inside the <compiler> tag?

2) Are you able to run it as a normal user and the problem is only when running via Jenkins?

3) Can you check that the libraries you are trying to load are loadable via a daemon process?

4) Does your daemon process have sufficient permissions for reading/writing/executing as per your requirements?

5) Does the issue exist for an application not using native extensions(ANE) or is it specific to when using extensions?

Also, please check your firewall settings.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 04, 2012 May 04, 2012

Copy link to clipboard

Copied

Hi neh@adobe,

Why did you ask about ANE extensions? Can you elaborate?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 27, 2012 Dec 27, 2012

Copy link to clipboard

Copied

LATEST

Could Adobe provide better feedback on how to package and AIR app on a Headless environment?  The problem isn't compling the SWF it's making the .Air package.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines