Salve ragazzi.
E' da un paio di giorni che non riesco a risolvere questa eccezione che ho avuto:
Sto studiando il prodotto open-source OfBiz ed ho provato un codice di esempio ( che utilizza JUnit ); vi posto il cod.java.util.MissingResourceException: Can't find bundle for base name cache, locale it_IT
package org.ofbiz.angelo.testGeneric;
import junit.framework.*;
import org.ofbiz.core.util.Debug;
import org.ofbiz.core.util.UtilMisc;
import org.ofbiz.core.entity.GenericDelegator;
import org.ofbiz.core.entity.GenericValue;
import java.util.ResourceBundle;
import java.util.Locale;
public class TestGenericDelegator extends TestCase {
public TestGenericDelegator( String name ) {
super( name );
}
public void testFindByPrimaryKey(){
try {
Debug.logInfo("Entered testFindByPrimaryKey");
//Instantiate the delegator.
GenericDelegator delegator = GenericDelegator.getGenericDelegator( "access" );
assertNotNull("Error creating delegator object", delegator);
//Create an Book Entity
//String bookId = delegator.getNextSeqId("Book").toString();
String bookId = "1";
GenericValue bookValue = delegator.makeValue( "Book", UtilMisc.toMap("Id", bookId, "titolo", "Apache TomCat", "autore", "IO", "editore", "AI") );
GenericValue book = delegator.create(bookValue);
assertNotNull("Couldn't create Book entity", book);
// Find book by primary key
GenericValue foundBook = delegator.findByPrimaryKey( "Book", UtilMisc.toMap( "bookId", bookId ) );
assertNotNull( "Couldn't find Book: " + bookId, foundBook );
}catch( Exception exx ){
exx.printStackTrace();
}
}
public static void main(String[] args) {
junit.textui.TestRunner.run( TestGenericDelegator.class );
}
}
Non riesco a capire cosa voglia da me... please help me!!
Grazie e ciao