MySql To Mariadb - mariadb

I Have been using Eclipse to connect my project using mysql ..
To connect with my sql i'am using mysql connector in my context.xml file
this is my context.xml file
<Context reloadable="true" antiResourceLocking="true">
<Resource auth="Container" driverClassName="com.mysql.jdbc.Driver"
maxActive="300" maxIdle="30" maxWait="10000" name="jdbc/tds" password="xxx"
autoReconnect="true" removeAbandoned="true" logAbandoned="true" removeAbandonedTimeout="60"
type="javax.sql.DataSource" url="jdbc:mysql://192.168.1.101:3306/tds?autoConnect=true"
username="xxx" />
I want to store milliseconds also in my project ,so i migrated from mysql to mariadb..
So,I downloaded mariadb connector and added as a external jar file in my project..
and changed the context file to
<Context reloadable="true" antiResourceLocking="true">
<Resource auth="Container" driverClassName="com.mariadb.jdbc.Driver"
maxActive="300" maxIdle="30" maxWait="10000" name="jdbc/tds" password="xxx"
autoReconnect="true" removeAbandoned="true" logAbandoned="true" removeAbandonedTimeout="60"
type="javax.sql.DataSource" url="jdbc:mariadb://192.168.1.101:3306/tds?autoConnect=true"
username="xxx" />
but it gives me error in my java files,i.e in lines like this
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
Like in these lines it showing error,also same in some other java files also..
I don't know what is the problem is..

Try to change com.mariadb.jdbc.Driver for org.mariadb.jdbc.Driver in driverClassName

Related

Error invoking method. and Failed to launch JVM - Native Package will build but not launch

Can anyone shed any light more specifically on where my problem resides, and how to fix it?
I'm running:
Windows 7
Eclipse Mars.2 Release (4.5.2)
I've followed the instructions closely and repeatedly for Marco's Tutorial on code.makery.ch (code.makery.ch/library/javafx-8-tutorial/part7/)
I've deployed an earlier native package of this program before, with some trouble, but eventually successfully after adding
-vm
C:\Program Files\Java\jdk1.8.0_91\bin\javaw.exe
to eclipse.ini
After finally getting the ant build to run successfully,
do-deploy:
[copy] Copying 2 files to C:\Users\administrator.SUNDANCE\IdeaProjects\POA 1.1 Build Master\POA 1.1 - Try 1\build\dist\libs
[mkdir] Created dir: C:\Users\administrator.SUNDANCE\IdeaProjects\POA 1.1 Build Master\POA 1.1 - Try 1\build\build\classes\META-INF
Using base JDK at: C:\Program Files\Java\jdk1.8.0_91\jre
Using base JDK at: C:\Program Files\Java\jdk1.8.0_91\jre
Installer (.exe) saved to: C:\Users\administrator.SUNDANCE\IdeaProjects\POA 1.1 Build Master\POA 1.1 - Try 1\build\deploy\bundles
BUILD SUCCESSFUL
Total time: 56 seconds
My main file looks like this:
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
/**
* Created by Brad on 5/20/2016.
* Solely used to load the FXML and set the icons. Everything else is done in Controller.java
*/
public class Main extends Application {
public static FXMLLoader loader;
//Icon from https://icons8.com
#Override
public void start(Stage primaryStage) throws Exception{
loader = new FXMLLoader();
loader.setLocation(Main.class.getResource("view/Arrivals_Layout1.fxml"));
Parent root = loader.load();
primaryStage.getIcons().add(new Image(ClassLoader.getSystemResourceAsStream("resources/images/Pallet-96.png")));
primaryStage.getIcons().add(new Image(ClassLoader.getSystemResourceAsStream("resources/images/pallet_96_allsizes.ico")));
primaryStage.setTitle("Purchase Order Arrivals");
primaryStage.setScene(new Scene(root));
primaryStage.setMinWidth(820);
primaryStage.setMinHeight(375);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}
My Package Explorer looks something like this, if it helps
My PATH: C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\IBM\Client Access\Emulator;C:\Program Files (x86)\IBM\Client Access\Shared;C:\Program Files (x86)\IBM\Client Access\;C:\Program Files\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies\;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files\TortoiseHg\;C:\Program Files (x86)\Inno Setup 5
The build.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project name="POA 1.1 - Try 1" default="do-deploy" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<target name="init-fx-tasks">
<path id="fxant">
<filelist>
<file name="${java.home}\..\lib\ant-javafx.jar"/>
<file name="${java.home}\lib\jfxrt.jar"/>
<file name="${basedir}"/>
</filelist>
</path>
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpathref="fxant"/>
</target>
<target name="setup-staging-area">
<delete dir="externalLibs" />
<delete dir="project" />
<delete dir="projectRefs" />
<mkdir dir="externalLibs" />
<copy todir="externalLibs">
<fileset dir="C:\Program Files\Java\sqljdbc_4.2\enu">
<filename name="sqljdbc42.jar"/>
</fileset>
</copy>
<copy todir="externalLibs">
<fileset dir="C:\Users\administrator.SUNDANCE\IdeaProjects\POA 1.1 Build Master\POA 1.1 - Try 1\build\dist">
<filename name="POA 1.1 - Try 1.jar"/>
</fileset>
</copy>
<mkdir dir="project" />
<copy todir="project">
<fileset dir="C:\Users\administrator.SUNDANCE\IdeaProjects\POA 1.1 Build Master\POA 1.1 - Try 1">
<include name="src/**" />
</fileset>
</copy>
<mkdir dir="projectRefs" />
</target>
<target name='do-compile'>
<delete dir="build" />
<mkdir dir="build/src" />
<mkdir dir="build/libs" />
<mkdir dir="build/classes" />
<!-- Copy project-libs references -->
<copy todir="build/libs">
<fileset dir="externalLibs">
<include name="sqljdbc42.jar"/>
<include name="POA 1.1 - Try 1.jar"/>
</fileset>
</copy>
<!-- Copy project references -->
<!-- Copy project sources itself -->
<copy todir="build/src">
<fileset dir="project/src">
<include name="**/*"/>
</fileset>
</copy>
<javac includeantruntime="false" source="1.8" target="1.8" srcdir="build/src" destdir="build/classes" encoding="Cp1252">
<classpath>
<fileset dir="build/libs">
<include name="*"/>
</fileset>
</classpath>
</javac>
<!-- Copy over none Java-Files -->
<copy todir="build/classes">
<fileset dir="project/src">
<exclude name="**/*.java"/>
</fileset>
</copy>
</target>
<target name="do-deploy" depends="setup-staging-area, do-compile, init-fx-tasks">
<delete file="dist"/>
<delete file="deploy" />
<mkdir dir="dist" />
<mkdir dir="dist/libs" />
<copy todir="dist/libs">
<fileset dir="externalLibs">
<include name="*" />
</fileset>
</copy>
<fx:resources id="appRes">
<fx:fileset dir="dist" includes="POA 1.1 - Try 1.jar"/>
<fx:fileset dir="dist" includes="libs/*"/>
<fx:fileset dir="dist" includes="resources/**"/>
</fx:resources>
<fx:application id="fxApplication"
name="Purchase Order Arrivals"
mainClass="Main"
version="1.1"
/>
<mkdir dir="build/classes/META-INF" />
<fx:jar destfile="dist/POA 1.1 - Try 1.jar">
<fx:application refid="fxApplication"/>
<fileset dir="build/classes">
</fileset>
<fx:resources refid="appRes"/>
<manifest>
<attribute name="Implementation-Vendor" value="Ugma Development"/>
<attribute name="Implementation-Title" value="Purchase Order Arrivals"/>
<attribute name="Implementation-Version" value="1.1"/>
<attribute name="JavaFX-Feature-Proxy" value="None"/>
</manifest>
</fx:jar>
<mkdir dir="deploy" />
<!-- Need to use ${basedir} because somehow the ant task is calculating the directory differently -->
<fx:deploy
embedJNLP="false"
extension="false"
includeDT="false"
offlineAllowed="true"
outdir="${basedir}/deploy"
outfile="POA 1.1 - Try 1" nativeBundles="exe"
updatemode="background" >
<fx:platform basedir="${java.home}"/>
<fx:info title="POA 1.1 - Try 1" vendor="Ugma Development"/>
<fx:application refId="fxApplication"/>
<fx:resources refid="appRes"/>
</fx:deploy>
</target>
</project>
The .exe is generated and installs the program in /AppData.
The program will compile and run fine in Eclipse, but when I run the installed version, I get:
Error invoking method.
first and then after clicking OK
Failed to launch JVM
I've tried seemingly everything:
I've read multiple similar questions, and have scoured the internet, but have yet to vault this problem. Examples of the many I've read with vague or no answers:
Error invoking method, failed to launch jvm
javafx native pakage error invoking method
Because he is less masterful in deployment, Marco himself said to come ask the mighty world of Stack Exchange:
http://code.makery.ch/library/javafx-8-tutorial/part7/#comment-2233862311
Again, any specific light on where my problem resides, and how to fix it?
I figured it out!
The way I found the problem:
After double, triple checking the dependencies and seeing that it both compiled and then built fine, I suspected the jar file which is located at build/deploy/{yourProjectName}.jar
EDIT: If you're getting the errors only once it is installed, it makes sense to run the jar in the installation directory. ( AppData/Local/{ApplicationTitle}/app/{yourProjectName}.jar )
I ran it on the command line to see if it was throwing an exception:
To easily navigate to the directory I noted where I had saved my project in Explorer and then copied that to the command line.
Open command prompt
Win + r
cmd + Enter
Navigate to the directory
cd {ProjectPath}\build\deploy
Run the jar file
java -jar "{YourJar}.jar"
Because I executed the jar via the command prompt, java had somewhere to show me the exception!
C:\Users\administrator.SUNDANCE\IdeaProjects\PODTester_Layout8\build\deploy>java
-jar "PODTester_Layout8.jar"
java.io.FileNotFoundException: src\resources\Carrier List.txt (The system cannot
find the path specified)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileReader.<init>(Unknown Source)
Upon reviewing my code, I figured that it wasn't finding the file because of the explicit reference to src. I fixed that and lo and behold! Upon rebuilding, the installed application worked!
So in summary:
If your native package throws you a
Error invoking method.
and a
Failed to launch JVM
run your jar file via the command prompt to see if it throws exceptions.
Now if you want details about my specific problem and the process I went through to fix it, here you go:
The Problem:
I thought it might've been something to do with dependencies (especially with me including the sqljdbc driver), but it turns out it wasn't a dependency issue. The problem was that the .jar was throwing an exception only once installed. What made the error so hard to understand was the oh-so-generic "Could not invoke method." which gave me little new information.
To mitigate future similar problems I added a showExceptionDialog() method (inspired by Marco Jacob's work) :
/**
* Shows a dialog box when an exception occurs instead of just doing nothing.
*
* Once installed this will help to diagnose problems instead of letting
* them go unnoticed.
*
* #param e the exception to print; it's stacktrace will be shown as well
*/
public static void showExceptionDialog(Exception e) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("Exception Dialog");
alert.setHeaderText("An error occurred:");
String content = "Error: ";
if (null != e) {
content += e.toString() + "\n\n";
}
alert.setContentText(content);
Exception ex = new Exception(e);
//Create expandable Exception.
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
ex.printStackTrace(pw);
String exceptionText = sw.toString();
//Set up TextArea
TextArea textArea = new TextArea(exceptionText);
textArea.setEditable(false);
textArea.setWrapText(true);
textArea.setPrefHeight(600);
textArea.setPrefWidth(800);
//Set expandable Exception into the dialog pane.
alert.getDialogPane().setExpandableContent(textArea);
alert.showAndWait();
}
Specific details about my problem:
In my program I had a file called Carrier List.txt being read and written to, and it was stored in the resources folder.
In IntelliJ and Eclipse it compiled just fine because it could find src/resources/Carrier List.txt just fine. Things would have been just fine when I manually copied the resources folder as per Marco Jacob's Deployment Tutorial, but I explicitly referenced
src/resources/Carrier List.txt
in my code instead of just
resources/Carrier List.txt

BizTalk ListApp command line

I used the following code in c# to get policies\rules from deployed application in BizTalk server.
BTSTask.exe ListApp -ApplicationName:"EAISolution" -ResourceSpec:"c:\EAISolution.PolicyInf
o.xml" /Server:VHYDTRBELSUP-02 /Database:BizTalkMgmtDb
From above command I got the output as below
<?xml version="1.0" encoding="utf-16" ?>
<ResourceSpec xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" ApplicationName="EAISolution" xmlns="http://schemas.microsoft.com/BizTalk/ApplicationDeployment/ResourceSpec/2004/12">
<Resources>
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="EAIOrchestration, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" />
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="EAIServices, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" />
<Resource Type="System.BizTalk:BizTalkAssembly" Luid="FFSchemasTest, Version=1.0.0.0, Culture=neutral, PublicKeyToken=97e0f507fd7fd10d" />
<Resource Type="System.BizTalk:Rules" Luid="RULE/ProcessPurchaseOrder/1.0" />
<Resource Type="System.BizTalk:BizTalkBinding" Luid="Application/EAISolution" />
</Resources>
</ResourceSpec>
and from BizTalk server I got the below output using policy export in BizTalk server administration
<?xml version="1.0" encoding="utf-8" ?>
<brl xmlns="http://schemas.microsoft.com/businessruleslanguage/2002">
<ruleset name="ProcessPurchaseOrder">
<version major="1" minor="0" description="" modifiedby="username" date="2013-05- 27T12:04:55.6121122+05:30" />
<configuration />
<bindings>
<xmldocument ref="xml_31" doctype="RuleTest.PO" instances="16" selectivity="1" instance="0">
<selector>/*[local-name()='PurchaseOrder' and namespace-uri() ='http://EAISolution.PurchaseOrder']/*[local-name()='Item' and namespace-uri()='']</selector>
<selectoralias>/PurchaseOrder/Item</selectoralias>
<schema>....\PO.xsd</schema>
</xmldocument>
<xmldocument ref="xml_32" doctype="RuleTest.PO" instances="16" selectivity="1" instance="0">
<selector>/*[local-name()='PurchaseOrder' and namespace-uri()='http://EAISolution.PurchaseOrder']
</selector>
<selectoralias>/PurchaseOrder</selectoralias>
<schema>....\PO.xsd</schema>
</xmldocument>
</bindings>
<rule name="ApprovalRule" priority="0" active="true">
<if>
<compare operator="less than or equal to">
<vocabularylink uri="3f0e9bcc-6212-4e6a-853c-e517f157a626" element="d4eb2deb-06d3-42c4-af49-ceb21331b1cc" />
<lhs>
<function>
<xmldocumentmember xmldocumentref="xml_31" type="int" sideeffects="false">
<field>*[local-name()='Quantity' and namespace-uri()='']</field>
<fieldalias>Quantity</fieldalias>
</xmldocumentmember>
</function>
</lhs>
<rhs>
<constant>
<int>500</int>
</constant>
</rhs>
</compare>
</if>
<then>
<function>
<xmldocumentmember xmldocumentref="xml_32" type="string" sideeffects="true">
<field>*[local-name()='Status' and namespace-uri()='']</field>
<fieldalias>Status</fieldalias>
<argument>
<constant>
<string>Approved</string>
</constant>
</argument>
</xmldocumentmember>
</function>
</then>
</rule>
</ruleset>
</brl>
So please let me know how to get the output of second using command line.
BTSTask will only export the policy as part of an MSI (see below).
You could then extract the MSI (see How to extract msu/msp/msi fileds from the command line) to get the policy file.
From How to Import a Policy
BTSTask does not provide a specific command for importing (or exporting) policies; however you can use the ExportApp command of BTSTask to selectively export only the policies in an application that you want, including no other application artifacts. Then you can use the ImportApp command to import the .msi file into an application in a different BizTalk group. This is the approach described in this topic. When you do this, the policy is automatically imported and published in the BizTalk group and added to the specified application.
The below steps will get export the policy, but as part of an MSI.
From How to Export a Policy
Use the BTSTask ListApp command with the /ResourceSpec option to generate an XML file that lists the artifacts in the BizTalk application from which you want to export a policy, as described in ListApp Command.
Edit the XML file generated in the previous step, deleting all of the artifacts except for the policy or policies that you want to export.
Use the BTSTask ExportApp command, and specify the modified XML file for the /ResourceSpec parameter. For more information, see ExportApp Command.
BTSTask exports the specified policies and all of their associated vocabularies into an application .msi file.

deploying javafx 1.3 application with swing.filechooser

I have a Java application and I integrated JavaFX 1.3 on it. I have spent more than three days trying to deploy it as a Web Start Application and it is impossible.
I have a jar running with the console (javafx -jar MatchTestCaseGenerator-2.0-jar-with-dependencies.jar) but when I try to execute the jnlp I have the following error:
java.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:374)
at java.security.AccessController.checkPermission(AccessController.java:546)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1285)
at java.lang.System.getProperty(System.java:667)
at sun.awt.shell.ShellFolderManager.get(ShellFolderManager.java:57)
at sun.awt.shell.ShellFolder.get(ShellFolder.java:227)
at javax.swing.filechooser.FileSystemView.getDefaultDirectory(FileSystemView.java:404)
at javax.swing.JFileChooser.setCurrentDirectory(JFileChooser.java:552)
at javax.swing.JFileChooser.<init>(JFileChooser.java:334)
at javax.swing.JFileChooser.<init>(JFileChooser.java:286) ...
I have the jar file signed and verified and my JNLP file is like that:
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="file:/Users/ana/Projects/Java/workspace/Match Test Case Generator 2.0/target" href="MatchTestCaseGenerator.jnlp">
<information>
<title>Match Test Case Generator</title>
<vendor>KV </vendor>
<homepage href=""/>
<description>some_description</description>
<offline-allowed/>
<shortcut>
<desktop/>
</shortcut>
</information>
<resources>
<j2se version="1.6+"/>
<extension name="JavaFX Runtime" href="http://dl.javafx.com/1.3/javafx-rt.jnlp"/>
<jar href="MatchTestCaseGenerator-2.0-jar-with-dependencies.jar" main="true"/>
</resources>
<application-desc main-class="com.sun.javafx.runtime.main.Main" progress-class="com.javafx.progressbar.ProgressManager">
<argument>MainJavaFXScript=com.knowledgevalues.mtcg.javafx.MainFx</argument>
</application-desc>
</jnlp>
Am I missing something? should I introduces a policy file in the jar?? I'm totally lost
Thank you very much in advance for any help.
Try to add next section to your jnlp file:
<security>
<all-permissions/>
</security>
The final solution was to remove all the folders that included javafx classes except the Main class.
With that, it worked without problems!!

How do I connect to SQLite with Simple.Data.SQLite

I wrote this code in Webmatrix 2.0 beta:
string Dbfile=HttpContext.Current.Server.MapPath("data/db.db3");
var Db = Simple.Data.Database.OpenFile(Dbfile);
Simple.Data.SimpleDataException: No ADO Provider found.
why??
I'm sure that I have included the reference:
packages.config
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Simple.Data.Ado" version="0.16.1.0" />
<package id="Simple.Data.Core" version="0.16.1.0" />
<package id="Simple.Data.Sqlite" version="0.16.0.0" />
<package id="System.Data.SQLite" version="1.0.80.0" />
</packages>
In my test application conn is the physical path including the the db filename and calling
cn = Database.OpenConnection(conn);
works for me. When I used OpenFile I also received the No ADO Provider error.
I am using (from NuGet):
Simple.Data.Core 0.16.1.0
Simple.Data.Ado 0.16.1.0
System.Data.SQLite 1.0.80.0
Simple.Data.Sqlite 0.16.0.0
System.Data.SQLite 1.0.80.0
Getting the dlls required for the System.Data.SQlite can be hassle. If you want to do it quickly then download the Nuget extension for VS 2010. Then you can get the dlls from the extensions console.
Make sure you read the extension installations instructions.

Flex 4.5.1 runtime ReferenceError: Error #1065: Variable ... is not defined

Ok, I need some help on this one. I upgraded from Flash Builder 4 to Flash Builder 4.5 and have switched my project to the 4.5.1 sdk. I use an ant script to build my project, so I modified it to use the appropriate flexTasks.jar, mxmlc, etc...
Now, if I start out with a blank bin-debug folder, then build and run the app everything works fine. However, if I then make a code change and build (without deleting the bin-debug) then run the app I get a runtime error:
ReferenceError: Error #1065: Variable ... is not defined.
at flash.display::MovieClip/nextFrame()
at mx.managers::SystemManager/deferredNextFrame()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:284]
at mx.managers::SystemManager/preloader_preloaderDocFrameReadyHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\managers\SystemManager.as:2633]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()[E:\dev\4.5.1\frameworks\projects\framework\src\mx\preloaders\Preloader.as:515]
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
Again, if I delete the bin-debug folder and compile again it runs with no problems.
The variable it complains about is always a Class variable that points to an image file used as an icon. The code I use to create the var:
[Embed(source="/assets/icons/close-32x32.png")]
public var closeIcon:Class;
The file exists, and I verified that when it gives that error the file is in the bin-debug/assets/icons folder and the src/assets/icons/ folder.
After the error is thrown, if I hit the continue button in Flash Builder it then throws the same error again on the next Class variable pointing to an image file.
Any ideas? The delete/recompile takes several minutes, so obviously this is driving me mad.
Edit: Ant task that compiles in debug mode:
<target name="compile-debug">
<echo>Compile MXML</echo>
<mxmlc
file="${SRC_DIR}/${MAIN_SOURCE_FILE}"
debug="true"
optimize="false"
output="${DEBUG_DIR}/${APP_ROOT_FILE}"
append="true"
actionscript-file-encoding="UTF-8"
keep-generated-actionscript="false"
link-report="MyReport.xml"
maxmemory="2048m"
incremental="true">
<!-- Get default compiler options. -->
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<load-config filename="${FLEX_HOME}/frameworks/air-config.xml"/>
<!-- List of path elements that form the roots of ActionScript class hierarchies. -->
<source-path path-element="${FLEX_HOME}/frameworks"/>
<!-- Include Themes -->
<!-- NOTE: Spark theme required -->
<theme dir="${FLEX_HOME}/frameworks/themes/Spark/">
<include name="spark.css" />
</theme>
<theme dir="${FLEX_HOME}/samples/themes/spark_graphite/">
<include name="spark_graphite.css" />
</theme>
<!-- List of SWC files or directories that contain SWC files. -->
<compiler.library-path dir="${FLEX_HOME}/frameworks" append="true">
<include name="libs" />
<include name="../bundles/{locale}" />
</compiler.library-path>
<!-- uncomment if you have external libs (swc files) -->
<library-path dir="${LIB_DIR}/riaspace/" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${LIB_DIR}/AlivePDF/" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${LIB_DIR}/coltware/" append="true">
<include name="*.swc" />
</library-path>
</mxmlc>
</target>
Where FLEX_HOME = < path to flash builder >/sdks/4.5.1
The answer is buried in the middle of Maxim's post that he referenced in a comment above:
--> Try turning off incremental compilation.
I had the same issue here with a simple mimeType='application/octet-stream' embed, and when reading Maxim's text this jumped out because I'd recently changed my custom build tools to use inremental compilation: "Embed sometimes fails during incremental compilation"
The result of this failure is that the .swf contains something like this:
<DefineBinaryData id='1' length='1024' />
which looks like it's empty, instead of this (from the working file):
<DefineBitsLossless2 id='1' encoding='base64'>
(.. in my case, 1024 bytes of base64-encoded data)
</DefineBitsLossless2>
(This solved it for me, so a big thank-you to Maxim. I hope it solves it for you too.)
I had the same problem, so I "Clean"ed the project and then re ran. It worked.
I have Flash Builder 4.7 and am using sdk 4.5.1A.
I was using Flash Player debugger version 15 before Christmas of 2014 and everything was working. I had Firefox set up as the default browser. However, in 2015, Adobe has a new player so I upgraded to version 16 and that's when I got the same problem. After much struggle, I found that the problem had to do with the new version of Firefox Flash player debugger. I had to switch the default browser to Internet Explorer and installed the Internet Explorer Flash player debugger. Prior to debugging, I had to clean and update first. Then everything worked again!

Resources