I'm trying to use the "Itext" applications. I've downloaded the "jar" file from http://sourceforge.net/projects/itext/ and trying to launch the file: itextpdf-5.5.5.jar but get an error:
"no main manifest attribute, in itextpdf-5.5.5.jar"
Could you please help me and explain how can I launch it? It seems that there is no declared main class in the manifest.
Related
When I run my app in sbt console my-app/run (my-app is a module), I get this error
java.io.FileNotFoundException: file:.../target/bg-jobs/sbt_eea980c4/job-3/target/aaa32a5e/b2227e4f/my-app_2.13-0.1.0-SNAPSHOT.jar!/my_file.csv
My directory structure is my-app->src->main->resources->my_file.csv. The way I am accessing the file in my code is:
val file = new File(getClass.getResource("/my_file.csv").getPath)
What am I missing here?
sbt stuck your resources in a jar, so you can't access them as a file. You can use getClass().getResourceAsStream("/my_file.csv") instead.
I found this viper template generator. I inhaled everything but now I faced with an permission issue.
When I try to execute swift template generate MyModule --use viper-module command I got this:
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/
XcodeDefault.xctoolchain/usr/bin/swift-template (Permission denied)
Before this error I got another one:
error: unable to invoke subcommand: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/swift-template (No such file or directory)
Not sure if I am on a right way but I just copied swift-template folder into the path /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/
I found this one work for VIPER Template in Swift 5.
https://github.com/zafarivaev/VIPER-Template
How To Install
Clone the repository
Navigate to Xcode Templates folder: ~/Library/Developer/Xcode/Templates/.
If 3. Templates folder doesn't exist, create it
Copy and paste the VIPER Module.xctemplate in Templates folder
Use
Open Xcode
File -> New -> File or ⌘ N
Scroll down till you see VIPER Module template and choose it.
Set a name for your module. Examples: Home, Auth, SignIn
I have a problem with Symfony 4, I want generate entities from an existing database with the command :
php bin/console doctrine:mapping:import --force AppBundle xml
But an error appears :
Bundle "AppBundle" does not exist or it is not enabled. Maybe you forgot to add it in the registerBundles() method of your App\Kernel.php file?
I try to import in the file kernel.php in registerBundles() :
new AppBundle/AppBundle();
but undefined class and when I create it in src/AppBundle/AppBundle.php :
<?php
namespace AppBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class AppBundle extends Bundle
{
}
nothing change and when I retry the command :
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "AppBundle" from namespace "App".
Did you forget a "use" statement for another namespace? in /var/www/html/symfony/Mission3/src/Kernel.php:30
I would like to know if it's possible to create a bundle like that or if it exists an other command to generate entities from an existing database.
in SF4, The main application component is named 'App' by default and is not a bundle.
You have to manually create a dummy bundle under src\ directory in order to use old doctrine:command related to bundle.
see how to manually create a bundle here
After that, you can import/generate mappings/entities using doctrine:commands and use them in the App main module space, or in those bundles.
The SF4 maker tool don't provide bundle creation yet ... But I suppose the SF4 developers consider it's not an urge must have requirement, because they want us to focus on putting most code in the bundle less App main module.
In symfony 4 'AppBundle' is doesn't exist anymore. Try use 'App' instead 'AppBundle'
I downloaded the OfBiz Java application and the following line throws an MissingResourceException:
ResourceBundle res = ResourceBundle.getBundle(settingsResourceName);
The value of settingsResourceName is "cache", but I cannot find any file called cache.properties or cache_en.properties.
Where should I be looking? I'm new to Java. All my research on SO says there should be such a file.
I imported OfBiz in Eclipse using the Import menu option and selecting Existing Project from File System (I'm not in front of my dev machine so I don't remember the exact wording). But I chose the root folder of the downloaded OfBiz.
I then added the appropriate VM Arguments in the Run Configuration to get it to run properly at least. And that's it, on the first Run I got the above error. I think it has to do with a missing class path but I don't know what to add to class path.
Here is the stack trace:
ERROR StatusLogger No log4j2 configuration file found. Using default configuration: logging only errors to the console.
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.apache.ofbiz.base.util.Debug.<clinit>(Debug.java:68)
at org.apache.ofbiz.base.container.ContainerLoader.load(ContainerLoader.java:61)
at org.apache.ofbiz.base.start.StartupControlPanel.loadStartupLoaders(StartupControlPanel.java:202)
at org.apache.ofbiz.base.start.StartupControlPanel.start(StartupControlPanel.java:69)
at org.apache.ofbiz.base.start.Start.main(Start.java:84)
Caused by: java.util.MissingResourceException: Can't find bundle for base name cache, locale en
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1564)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1387)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:773)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:174)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:170)
at org.apache.ofbiz.base.util.cache.UtilCache.setPropertiesParams(UtilCache.java:166)
at org.apache.ofbiz.base.util.cache.UtilCache.<init>(UtilCache.java:124)
at org.apache.ofbiz.base.util.cache.UtilCache.createUtilCache(UtilCache.java:769)
at org.apache.ofbiz.base.util.UtilProperties.<clinit>(UtilProperties.java:75)
... 5 more
UPDATE:
My mistake, I found two files both called cache.properties in the following folders:
ofbiz-trunk/build/resources/main
ofbiz-trunk/framework/base/config
But these are folders, not packages. I tried putting them in the .classpath but that did not work, I still kept getting the same error.
As suspected, I knew it was because of a missing reference to a class path. After looking at a section on this page: http://www.opensourcestrategies.com/ofbiz/ofbiz_eclipse.php, I learned that I was supposed to go to the Java Build Path and in the Libraries tab, click on Add Class Folder, then point that to ofbiz-trunk/framework/base/config. Which is where I have one of the cache.properties files.
I an trying to compile the WunderRadio app source code available here http://dev.wunderground.com/support/wunderradio/wunderradio.1.9lgpl.zip. After making all the modifications to the project to compile on iOS5 i get the following error:
Lexical or Preprocessor Issue 'interface.h' file not found.
Of course i tried getting the interface.h from the lame library that i previously downloaded, and added it to the project with no luck. Apparently its not the right file.
What am i missing ?
I found this file at:
http://code.google.com/p/live-converter/source/browse/trunk/include/interface.h?r=13