impetus-opensource/Kundera — Issue #46: Kundera 2.0.6-SNAPSHOT errors
Author: yo2dh
Created: 2012-03-08 14:48:28+00:00
State: open

Hi.

I found the bugs.

Please, check the source codes.

In SpringSource Tool Suite's tc Server, Class folder is "C:\Program Files\springsource\...\classes".

1.There is no /" at the end of class folder.

So, run "new JarFileIterator(url.openStream(), filter); " in Reader class.

else if (!urlString.endsWith("/"))
{
return new JarFileIterator(url.openStream(), filter);
}

2. Because of "Program%20Files" folder,

if (f.isDirectory())

f.isDirectory()'s values is false.

I fixed this source code.

path = URLDecoder.decode ( url.getPath() , "UTF-8" );

3.

EntityManagerFactory emf = Persistence.createEntityManagerFactory ( "cassandraPU" );
EntityManager em = emf.createEntityManager();

@SuppressWarnings("unchecked")
List listContent = em.createQuery ( "Select q from Content q" ).getResultList();

I got the error.

Exception in thread "main" java.lang.NullPointerException
at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:922)
at com.impetus.kundera.metadata.model.ApplicationMetadata.getPersistenceUnitMetadata(ApplicationMetadata.java:114)
at com.impetus.client.cassandra.pelops.PelopsUtils.generatePoolName(PelopsUtils.java:50)
at com.impetus.client.cassandra.pelops.PelopsClient.find(PelopsClient.java:677)
at com.impetus.client.cassandra.query.CassQuery.populateEntities(CassQuery.java:100)
at com.impetus.kundera.query.QueryImpl.getResultList(QueryImpl.java:157)
at com.testkun.kunderatest.App.main(App.java:75)

The project at Kundera 2.0.5 works well.