Blackberry Error: Jar Command Failed - blackberry

Following is the error I get
Error: jar command failed:
jar -cfm "E:\Blackberry
Workspace\Kenexa\deliverables\Standard\7.1.0\Kenexa.jar"
C:\Users\Acer\AppData\Local ... Packaging project Kenexa failed (took
8.81 seconds)
Project was just working fine, and it suddenly occurred.
I have read the forums they said to set the environmental variable for the jdk to the system and also some said to place the jre exe file in jdk something like this, I did both the options but still not working and I get this error.
But when I delete some classes it starts working and adding new classes again gives this problem, I have total of 22 classes right now, is this something related to size or limitations??
Thanks for the Help!

Answer from Blackberry Support Are you using the BlackBerry JDE or BlackBerry Java Plug-in for Eclipse?
If you are using the BlackBerry JDE you could be running into an issue where you have reached the maximum supported length for a command line (all files are listed on a command line). If this is the case you could resolve it by reducing the number of classes (as you have done) or by reducing the length of the path to your source files (move them closer to the root of your drive). Mark Sohm BlackBerry Development Advisor
So, I just have to change my workspace folder name from "Blackberry Workspace" to "Workspace". The command line was not taking long path.

Related

Neo4J windows installation

Downloaded Neo4j community version, the file named "neo4j-desktop-offline-1.1.13-setup.exe". Running the binary successfully installed. Launching the application takes me to configuration of database location "Please choose path where you want to store application data" and regardless of what path i choose, clicking "Confirm" does not do anything at all and it remains on the same screen.
Am using Windows 10.
I also got the same problem. I fixed it by adding a new PATH in environmental variables,
Advanced System Settings > Environment Variable > system variable > path > new: C:\Windows\System32\wbem
After setting, reopen the Neo4j application and it will allow you a select the path where you want to save application data.
REASON
In the developer console, you will see the following error
Uncaught (in promise) Error: Command failed: wmic logicaldisk get
size,freespace,caption 'wmic' is not recognized as an internal or
external command, operable program or batch file.
The actual WMIC binary is located at C:\Windows\System32\wbem\WMIC.exe you need to set the path if it is not yet defined.
try opening http://127.0.0.1:7477 or http://localhost:7474 in your browser
I had the same problem using Windows 7, and after trying the solutions others have suggested around fixing the Path environment variable to no avail, I found upgrading PowerShell solved the problem. To do this, I upgraded my Windows Management Framework (to 5.1 at the time of this writing) by following the appropriate link for my version of Windows from here:
https://learn.microsoft.com/en-us/powershell/scripting/windows-powershell/install/installing-windows-powershell
For Windows 7, I retrieved Win7AndW2K8R2-KB3191566-x64.zip from the Download link found here: https://www.microsoft.com/en-us/download/details.aspx?id=54616.
I unzipped and installed it, and after a reboot it worked (for Neo4j Desktop 1.4.15). Upgrades to WMF for other versions of Windows are on the same page.

Unable to run 'tcl' file on Vivado 2016.4 version

I am trying to run a .tcl file originally configured for 2014.4 on 2016.4 version of Vivado. However I am getting the following error:
while executing
"create_bd_cell -type ip -vlnv xilinx.com:ip:mig mig_0 "
(procedure "create_root_design" line 111)
invoked from within
"create_root_design """
(file "all.tcl" line 405)
The tcl file uses the part 'xcku040-ffva1156-2' and tries to access the IP 'mig' which I believe is renamed/changed on later versions. Is there any workaround for this?
Steps I have done till now:
Changed the version number to 2016.4
tried replacing target boards.
tried on the same board with an alternate IP for mig.
tried on both 2016.4 and 2015.4 versions
None of these have worked so far
Attaching the '.tcl' file for reference : all.tcl
Since with every version upgrade of the Vivado Design Suite, parts are renamed or removed, it is not possible to run a .tcl file meant for an earlier version in newer releases. So I ran the above query on Xilinx Community Forums and found a workaround:
Run this script on the previous version(2014 in this case), generate the design and then open the same design using the next major release(2015 version). The 2015 version will automatically suggest upgrades to the discontinued/renamed IPs. Repeat the same to get to 2016 version. That's the only way to get this done. Also have to keep checking if the core functionality of the IP is the same after automated upgrades by Vivado Design Suite.

OfBiz Installation Failure

Apache OfBiz is not installing correctly, and fails to compile in the command prompt.
After creating the system variable JAVA_HOME to C:\Program Files\Java\jdk1.8.0_40, and editing "Path" to be C:\Program Files (x86)\Java\jre7\bin;C:\apache-ant-1.9.4\bin, I downloaded OfBiz 13.07.01 to my C:\ folder and unzipped it there. In the command prompt, I typed the following:
C:\Users\CalS>cd C:\apache-ofbiz-13.07.01
C:\apache-ofbiz-13.07.01>ant load-seed
Then, after about 50 seconds, I get this:
BUILD FAILED
C:\apache-ofbiz-13.07.01\build.xml:229: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:248: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:39: the following error occurred while executing this line:
C:\apache-ofbiz-13.07.01\build.xml:91: compile failed; see the compiler error output for details.
Please note it has been years since I dealt with DOS, so I do not know how to access the error output.
This is after I get a few dozen errors like:
[javac16] class file for org.ofbiz.widget.ContentWorkerInterfaice not found
and
[javac16] warning: [options] bootstrap class path not set in conjunctions with -source 1.6
Under 'classes'.
Misc. I have tried 'ant run-install' and 'load-demo' commands without avail. I've followed step-by-step tutorials, but very likely missed something. Please let me know what I can do to fix this and run this program successfully. Thanks!
Please have a look at the following Apache Jira Tickets for OFBiz where your problem is addressed and was fixed, so that OFBiz could be build with java 1.8.
The build errors occur due to missing fileset entries in the build.xml for some applications (party, workeffort, product, order, ebay, and pos), see: OFBIZ-5835
A fix is available in related ticket: OFBIZ-6079
There was another bug in the current release branches (checked 14.12.01, 12.04.06, 13.07.02) that I fixed last week. The fix is already committed to the branches.
See: OFBIZ-6252
You have to compile/run with the same Java version.
Seems you have some inconsistencies: JAVA_HOME ist 1.8, Path is set to jre 7 and the warning states it is using an 1.6 compiler.
With the 13.07. Release, using Java 1.7 or 1.8 is recommended and supported.
Alright, so it looks like Apache OFBiz and Java JDK 1.8.XX don't get along. I found help on another forum that confirmed the discrepancy in compatibility between OFBiz 13.07.01/Apache ant 1.9.4 and JDK 1.8.XX. This will cause the compiling of the Apache Ant to fail (which seems to run off of JDK 1.6).
I remedied the problem by downloading the archived JDK 1.7.0_67 from Oracle, re-mapping the System Variables accordingly, and re-initializing the Command Prompt.
It works now! Thank you all for your contributions.
Though solved, let me add something important. JDK version is not always an issue in such errors. Ofbiz v13.X.X works well on JDK 1.7 and above. The error shown is a peculiar issue with Ofbiz v13.07.01 dist.
As Martin pointed out, one need to add widget jars in the classpath of order, party, product & workeffort. Add the below line
<fileset dir="../../framework/widget/build/lib" includes="*.jar"/>
in build.xml of order, party, product & workeffort under applications directory.

Blackberry application loading on simulator

while loading my application on BlackBerry simulator its displaying given below an error
Unable to start simulator. Check that the file exists. (java.lang.IllegalArgumentException: Executable name has embedded quote, split the arguments)
I had same issue whilst trying to run the demo application.
I am running Windows 7 Professional,JDK 7u21 and STS 3.2.
This is an issue with the changes made to the decoding of command strings specified to Runtime.exec method.
In summary the path configured for the simulator launch contains spaces.In my case "C:\Program Files (x86)"
To Fix this issue
Copy the simulator Dir and MDS to a new directory that has no spaces.
From the run configuration settings,enable the use of Customized Command line ,Customized Working directory and Customized MDS directory.Update the
entries to point to the new path that has no spaces.
Alternatively you can use windows shortened dir name by typing dir /X in the CMD from the directory that contains the simulator and MDS,this should give you something like PROGRAM~2
In the end ,the issue is not with the IDE or the Simulator,just java and windows not playing nice.
see Oracle JDK 7u21 release note
My solution was:
Go to debugger Configurations, Simulator, Advanced and COPY the "default command line".
Hit debug. When the alert with the error appears:
Open a shell/cmd and paste the text obtained in step 1, hit enter.
It should open the emulator an the debugger should attached without a problem.
This is not an error, this is an "upgrade" of Oracle Java due to security issues, you cannot longer execute commandlines with arguments if theyre not passed as an array..
Hope it helps.
Also:
Here is the error documentated:
http://www.oracle.com/technetwork/java/javase/7u21-relnotes-1932873.html#jruntime
Heres the patch but only for java 17 and earlier:
http://www.oracle.com/technetwork/topics/security/javacpuapr2013-1928497.html
remove the Java 7 and keep only the java 6 and it will work fine
i have the same issue and i solve it with the above solution

BlackBerry Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified

I am developing a BlackBerry Application with a number of class files in it; 16 java classes at the moment and they keep increasing as this App is complex with a lot of screen and features. I am working in Eclipse with the BlackBerry Java Plug-in. I am using BlackBerry JRE 6.0. I have recently started getting the following error:
Error: Cannot run program "jar": CreateProcess error=2, The system cannot find the file specified
I have Google for this error and many suggest this is caused by Java Environmental Variable path. However, I have checked and everything seems to be fine at my end regarding that. I have noticed that when the number of classes is increased or a class becomes more lengthy, this error occurs. I get rid of the error by reducing the number of classes in a project. I created separated projects dividing the classes between each and it compiled fine. So I can believe that there is no issue with the source code.
Can anyone guide how to overcome this error in a single project that contains several classes. Please help.
EDIT: I came across the following on BlackBerry Support Forums:
"I think the most common reason for this (assuming that you have the JDK installed) is a large number of files in the project, and/or a project directory that is very far from the root.
The issue is that the RAPC compiler calls the JAR utility, building a command line that consists of all the class files in the application. If the command line length exceeds the maximum length allowed by the system, you will get this error."
How to work around this IF this is whats causing it.
I was lucky to resolve this error. This link has been very helpful from BlackBerry Support Forums. For anyone else facing the same issue, the following steps resolved my issue:
Right Click My Computer. Go To Properties.
Click Advanced System Settings.
Click Environment Variable
Highlight PATH and click Edit. Add C:\Program Files (x86)\Java\jdk1.6.0_26\bin; to the start of the PATH.
Step 4 adds the java jar file to the PATH variable and adds it closer to the root. Adding closer to the root is helpful when compiling a project with several classes.
As the error says Cannot run program "jar" under Windows that means it cannot find the jar.exe executable file.
The problem, at least in my case, was that JAVA_HOME was pointing to the JRE on my computer (where there is no jar.exe in its "bin" folder) and not to the JDK where the jar.exe resides under its "bin" folder.
The solution was very simple - changed JAVA_HOME to point to the JDK root folder - in my case that was "C:\Program Files\Java\jdk1.7.0_15".

Resources