w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Run JUnit test in a maven project that depends on javaee 6 api
I just put the following dependencie: <dependency> <groupId>org.jboss.spec.javax.faces</groupId> <artifactId>jboss-jsf-api_2.1_spec</artifactId> <version>2.0.1.Final</version> <scope>provided</scope> </dependency>

Categories : Maven

Failure to find org.codehaus.mojo
The repository has been moved to https://nexus.codehaus.org/ You probably want to refer to https://nexus.codehaus.org/content/repositories/snapshots/

Categories : Java

How can find out how much space my snapshots are taking in Amazon EC2
Snapshots are persisted to S3, but are not stored in buckets owned by the user - so you won't be able to see them there. To see how much space is being used by snapshots, you should be able to log in to the AWS Console through your web browser and see it under "Elastic Block Store", or if you've installed the command-line tools by running the ec2-describe-snapshots command you will see the following parameter returned: volume-size The size of the volume As for downloading your snapshots, it's possible with the non-Windows instance snapshots, but it's also quite involved. But here's the instructions.

Categories : Amazon

Native function call in testcase using gwt-test-utils causes UnsatisfiedLinkError
You have to patch the native alrt() method by writing a custom Patcher. It's explained here : https://github.com/gwt-test-utils/gwt-test-utils/wiki/Writing-custom-Patchers

Categories : Java

lawstat runs.test valid for small samples?
I was stumbling upon the same problem, while modelling this in Excel and comparing to output of my StatGraphics software. I finally found my 'solution' in the documentation of StatGraphics. I noted it in R format (don't use R anymore but I think this is right) : Z <- (R-0.5-Rbar)/sr2 I don't yet know why the 0.5 has to be subtracted (or added in some cases), but I think it has something to do with one-sided and two-sided testing. +0.5 or -0.5 would then test one-sided (higher or lower), and without this addition I think is two-sided. Don't know if I'm right yet, but I got the same results as my StatGraphics model using -0.5. Try it out and let me know! Edit (from software documentation): Calculate the probability of observing at least k runs: use -0.5 Calculate the probability of

Categories : R

Can't find artifact in SVN repository
Maven does not resolve dependencies from source repositories such as SVN. You need an artifact repository (there are both free and paid software that can provide this, or you can install your dependency to the local filesystem). If this is a non-public artifact, you should first install it to your local repository: mvn install:install-file -Dfile=path-to-file -DgroupId=group-id -DartifactId=artifact-id -Dversion=version -Dpackaging=packaging

Categories : Java

Nexus: Could not find artifact
Most likely your local Maven repository has the fact that the component can not be found cached. You can force Maven to check for updates of snapshot versions and existence of previously not found version with the -U flag. So run mvn clean install -U Sometimes if thing are really weird it can help to completely delete the respective folder structure in your local repository. So in your example rm -rf ~/.m2/repository/com/shadow/

Categories : Maven

excel: pivot chart count number of serial samples not repeated samples
Not elegant but for want of any other answer so far: Add a helper column containing =COUNTIFS(B:B,B2,C:C,C2) and copy down to suit. Order on that helper column and restrict the PivotTable range to include only half of those entries that show up as duplicates.

Categories : Database

Unable to create positive samples from a limited set of samples for Haar training
Opencv's default function for creating samples can only create as many as you have in your info file. A lso, you should know if you use -info as opposed to -img it only resizes them to what you specified as h and w and grayscales all the images. It doesn't actually apply any transforms on them or superimpose them on background images. I'm not entirely sure what the point of the function is really...

Categories : Opencv

maven v3.0.5 cannot find sqoop artifact
EDIT - The Sqoop JAR varies based on what version of Hadoop you're using. If you want to build against some Hadoop 0.23.x variant, what you need is the following: <dependency> <groupId>org.apache.sqoop</groupId> <artifactId>sqoop</artifactId> <version>1.4.4</version> <classifier>hadoop23</classifier> </dependency> You will be able to see what classifiers are available using Eclipse. Right-click pom.xml, Maven --> Add Dependency. Type 'sqoop' in the search box, then expand the collapsed menu for org.apache.sqoop and note the options, hadoop23, hadoop100, etc.

Categories : Maven

Failed to read artifact descriptor for artifact present in my localhost Nexus repo
Ah found the issue. I was using <repositories> tag. Using Maven 3 so I needed to add <pluginRepositories> tags to my pom to get this dependency <pluginRepositories> <repository> <id>public</id> <url>http://localhost:8081/nexus/content/groups/public</url> </repository> </pluginRepositories>

Categories : Maven

How to fork an existing Meteorite package in a clean way?
2b. Edit your project's smart.json to use your version I would recommend this version, as it is the most consistent with how the smart.json was intended to be used and supported. mrt update will correctly reflect the latest from the git repo I think.

Categories : Meteor

Where to find samples for latest ServiceStack release?
Those docs appear to be from 2011, and ServiceStack has had a new API (or two) since then. You'll be better off looking at github: https://github.com/ServiceStack/ServiceStack.OrmLite In this particular case, all methods that were added to IDbCommand have been moved to IDbConnection.

Categories : C#

Maven plugin could not find artifact when using remote server
"[WARNING] The POM for com.company:my-plugin:jar:0.0.1-SNAPSHOT is missing, no dependency information available" Are you sure if the pom.xml for this plugin project exists in the plugin remote repository you are trying to pull from? If no, i probably think that should be the problem.

Categories : Eclipse

Issue pulling SNAPSHOT dependencies from Archiva snapshot repository
You are probably not activating the profile correctly before the profile in settings.xml put something like <activeProfiles> <activeProfile>default</activeProfile> </activeProfiles> Remember this about activeByDefault This profile will automatically be active for all builds unless another profile in the same POM is activated using one of the previously described methods. All profiles that are active by default are automatically deactivated when a profile in the POM is activated on the command line or through its activation config. if you want to confirm if this is the issue, look at the active profiles by running help:active-profiles

Categories : Maven

Where to find the Package Installation Wizard in VS2008 for Deploying SSIS Package?
DTSInstall.exe is the executable that is the SSIS Package Installation Wizard/Deployment Utility. It should be found at C:Program FilesMicrosoft SQL Server100DTSBinnDTSInstall.exe You can also automate deploys by using PowerShell and the SSIS APIs as I demonstrate on PowerShell SSIS deployment and maintenance

Categories : Visual Studio

android app crashes at startup, Logcat: Didn't find class "[package name]" at /data/app/[package name]
some suggestions 1) declare activity in AndroidManifest.xml file if not declared yet. 2) it seems you are trying to open MainActivity class/Activity and you added AndroidWSDLFrontEnd activity in the question, hope you are calling correct Activity, check names of respective classes in Manifest/ActivityDeclararion and at the time of starting Activity. 07-29 03:49:46.734: E/AndroidRuntime(837): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.calculate.firsttry.**MainActivity**" // here it says MainActivity not found, Check the name of your activity

Categories : Android

NuGet Package Restore cannot find package, has no Source
Apparently NuGet custom feeds are set not via anything in the solution or project files, or nuget.config in the solution, but in the nuget.config in the developer's profile. Over on TeamCity, there's no check by the agent of this config file, or writing to it, to ensure it contains the feed for the TeamCity server itself. So package restore on TC using a custom TC feed won't 'just work'. You have to waste hundreds of pounds of client's money chasing your tail to discover all this and then set/copy your nuget.config from your profile into the profile of the user account running the build agent. Horrible.

Categories : Dotnet

Install-Package : Unable to find package 'WebActivator'
So easy https://www.nuget.org/packages/WebActivator Need point version of webActivator!!! PM> Install-Package WebActivator -Version 1.5.3

Categories : C#

Play framework, 2.x clean project, test fails - MAC OS
Play logger will be called by default even if you don't use it. Check your application.conf it contains something like: # Root logger: logger=ERROR # Logger used by the framework: logger.play=INFO # Logger provided to your application: logger.application=DEBUG and Play.logger uses log4j and slf4j both as you can see above . So you need to configure them properly . Check this question for setting up slf4 and log4j How to get SLF4J "Hello World" working with log4j?

Categories : Scala

Yeoman 'grunt test' fails on clean project with 'port already in use'
I created a new config property: connect.test.options.port, and set that to 9001. Now they appear to be running properly on separate ports. Note also that the Gruntfile.js is overriding the singleRun property in karma.conf.js. Comment/cut that out if you want the config in karma.conf.js to work properly. EDIT 11/4/13: The issue was reported by others as well and seems to have been addressed with changes to generator-angular.

Categories : Angularjs

Is there any way to change mywebapp-1.0-SNAPSHOT-classes.jar from attachClasses configuration in maven-war-plugin to mywebapp-1.0-SNAPSHOT.jar?
The closest approach to what you want to do is to use <classesClassifier> as <project> ... <artifactId>mywebapp</artifactId> <version>1.0-SNAPSHOT</version> ... <build> <plugins> <plugin> <artifactId>maven-war-plugin</artifactId> <version>2.3</version> <configuration> <attachClasses>true</attachClasses> <classesClassifier>someClassifier</classesClassifier> </configuration> </plugin> </plugins> </build> ... </project> but this approach will always put the classifier as your_jar-classifier.jar and if you create and empty or spaced tag, it will default to -classes

Categories : Java

Clean store in between find operations
I guess you could do the following to clean the in the store saved Phones records: App.Phones.find({}); //this will invalidate your cache But obviously this will make a new request retrieving all the phone numbers. Depending on what you want to achieve, you could use find() in the application route, then either all() or a filter() in other routes to retrieve just DE, ES etc. In other words there is no such method available to do something like: App.Phones.clean(). Update Another way (manually) I can think of to remove the records of one type from the cache could be to delete them one by one beetwen your find() operations, for example create a simple utility function which contains the below code, and call it beetwen your calls to find(): App.Phones.all().forEach(function(record) {

Categories : Ember Js

SonarQube "Could not find source for unit test: Chrome_280150095_Windows.ButtonTest in any of test directories"
Properties such as "sonar.sources" and "sonar.tests" are not taken into account while triggering the analysis with Maven. See http://docs.codehaus.org/display/SONAR/Analysis+Parameters. Hence your issue regarding source code of tests that is not found. This behavior will eventually changed when the following ticket is implemented: http://jira.codehaus.org/browse/SONAR-4536. Meanwhile, you should use the SonarQube Runner to trigger the analysis.

Categories : Javascript

How to clean up all maven projects with linux find command?
You should use apostrophe: find . -name pom.xml -exec mvn clean '{}' ; As for me, I use this command find . -name 'target' -a -type d -exec rm -rfv '{}' ; This will delete all target folders.

Categories : Linux

Can't install tutorial content for javaee7 tutorial with updatetool
Download and install the Java EE 7 SDK to get the Tutorial. The SDK installer will install and configure the Update Center and the Tutorial. The GlassFish 4.0 ZIP file isn't a supported configuration (but you can add the Tutorial to GlassFish 4.0 standalone using these instructions. In your case, it appears there's something wrong with the 32-bit compatibility libraries on 64-bit Linux when you run pkg.

Categories : Java

Quick and clean way to find when the values of two vectors are equal, possibly for different indices
Use intersect a = [5 7 10 17 35 80]; b = [6 7 15 80 27 35 77 95]; [c, ia, ib] = intersect(a, b); c are the values that are in both, ia and ib are the indexes locating them such that a(ia)==b(ib).

Categories : Matlab

How to test dart pub lib package before deploy?
It very much depends on the type of package you are looking to use. If the pub package is primarily a non-UI library then you should be able to exercise its API via a UnitTest script, a small script that has a main to kick off a bunch of unit tests (grouped or otherwise). Another option for a non-UI package is to find the source project (usually noted in the package's page on pub.dartlang.org) and download it, where if you're lucky there will be a test directory with a unit test script in it. Some UI providing packages do include unit tests in their project too. A lot of projects include an example or two you can run to see how it works and pick up some tips from their source code, so I encourage you to check out the original source of the project you're interested in. But generally (

Categories : Dart

difference between clean and clean working directory in Eclipse WTP with Tomcat
Clean: Purges all webapps and redeploys them (don't do this while the Tomcat instance is running) Clean working dir: Cleans out Tomcat's work dir, e.g. where compiled JSPs go. See here.

Categories : Java

How to run an app after running an xcode clean and clean build folder where the app now crashes
First, certain files get cached even with 'Clean Build Folder', especially for simulator. Files (especially derived nibs and images) can be left that have been deleted in the project. Command-Option-Shift-K to clean out the build folder. Quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. In the simulator, choose iOS Simulator > Reset Content and Settings. Now if it fails, it is because your code was only working because of over-cached build files. If this is the case, check where your rootViewController is pointing.

Categories : Iphone

How to clean project cache in Intellij idea like Eclipse's clean?
Try this: Go into Settings (File > Settings or ctrl+alt+S). Under Project Settings, select the "Compiler" node. On the left, uncheck "Clear output directory on rebuild". Note that this is a per project setting. If desired, change it in the project template settigs (Settings > Other Settings > Template Settings).

Categories : Java

Import package from unit test code
First you have to include a __init__.py file inside folder my_package in order to allow Python to recognize this folder as a valid module. You can create an empty __init__.py file just with one line pass, for example. Then, you can do something like this in test_a.py: import os bkp = os.getcwd() os.chdir(r'....') import my_package os.chdir(bkp) Or use the other options with PYTHONPATH or sys.path.append().

Categories : Python

Specifying in Maven the IntelliJ package prefix for source and test folders
The default in Maven is to specify the package within the src/main/java folder which means in other words to put the sources into src/main/java/com/abc/project1. Apart from that a package name which contains a thing like project1 sounds not that good.

Categories : Java

package grails.plugins.springsecurity does not exist in jUnit test
I'm not sure why this particular issue is happening, but you can't really test security with unit tests. Spring Security is implemented as a filter chain, so you need to create a request and apply the chain. This could be properly mocked, but it would be a lot of work. Your best bet is to use functional tests, with a real running server and real requests. The risk of false positives with other approaches is way too high.

Categories : Java

How to fix org.codehaus.jackson.map.exc.UnrecognizedPropertyException
This means that there are get and set methods of an object in your class and Jackson is unable to figureout the serialization and deserialization process. Use @JsonIgnore if you don't want the property to be serialized. If you would like to have this data serialized and deserialized, it could be a problem with polymorphic references. Check Jackson's Annotation guide for appropriate usage. You may be interested in @JsonTypeInfo in such cases.

Categories : Java

Eclipse m2e connector for JAX-WS org.codehaus.mojo
There is a M2E jaxws-maven-connector GitHub project: https://github.com/trajano/jaxws-maven-connector . It worked for me with Eclipse Kepler and org.codehaus.mojo:jaxws-maven-plugin:1.12. Choose Install new Software from the Help menu. Add the repository https://raw.github.com/trajano/jaxws-maven-connector/master/jaxws-connector-update-site/ (see project) Install m2e connector for jaxws and restart. Import the Maven project or update the Eclipse Maven project configuration.

Categories : Eclipse

Why the Source Package not getting identified when created using Android Test Project in Eclipse Helios
I suggest you to read the manual, in your own example or in their web There are no default classes afaik, you have to create your test class in that package

Categories : Android

Package ANE on OSX cannot find framework
The problem turned out to be wrong line endings. The script file containing the adt command line was created on a Windows machine, and contained endings. On the Mac the was taken to be part of the last file name in the command line.

Categories : Osx

Adding Android Library: Only a type can be imported. com.project.test.networktasklibrary resolves to a package
Try using: import com.project.test.networktasklibrary.*; Instead Or: import com.project.test.networktasklibrary.ExactClassName;

Categories : Java

EBS snapshots vs. WAL-E for PostgreSQL on EC2
The EBS Snapshots will give you a slightly different type of backup than then WAL-E backups. EBS backups the entire drives, which means if your EC2 Virt goes down you can just restart the virt with your last EBS snapshot and things will pickup right where you last snapshotted things. The frequency of your EBS snapshots would define how good your database backups are. The appealing thing about WAL-E is the "continuous archiving". If I needed every DB transaction backed up, then WAL-E seems the right choice. Manys apps I can envision cannot afford to lose transactions, so that seems a very prudent choice. I think your plan to snapshot the production volumes as a baseline, then use WAL-E to continuously archive the database seems very reasonable. Personally I would likely add a periodic

Categories : Postgresql

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.