[Hibernate-JIRA] Created: (HSEARCH-1067) Path used in tests on Windows is illegal in certain test order executions
by Sanne Grinovero (JIRA)
Path used in tests on Windows is illegal in certain test order executions
-------------------------------------------------------------------------
Key: HSEARCH-1067
URL: https://hibernate.onjira.com/browse/HSEARCH-1067
Project: Hibernate Search
Issue Type: Bug
Components: tests
Reporter: Sanne Grinovero
Assignee: Sanne Grinovero
Fix For: 4.1.0.Final
TestConstants.indexDirPath is statically initialized, so it's initialized on first request by any test.
The path is generated by navigating back to parent of the caller stack, in an attempt to identify which module is executing the test and isolate the indexDirPath as a temporary directory of the specific module; to achieve this it's looking at 2 levels up in the invoker stack, as the first one is most commonly the SearchTestCase which is shared across modules.
In some test however this class might be invoked directly, so looking 2 levels up results in a lookup of the file resource containing a JDK class, which ultimately resolves in an illegal path when using Windows. So test execution order could have this statically initialized variable provide an illegal path for all tests.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[Hibernate-JIRA] Created: (HHH-7197) update build scripts to not use deprecated gradle apis and change manual's xml declation to use doc namespace
by Strong Liu (JIRA)
update build scripts to not use deprecated gradle apis and change manual's xml declation to use doc namespace
-------------------------------------------------------------------------------------------------------------
Key: HHH-7197
URL: https://hibernate.onjira.com/browse/HHH-7197
Project: Hibernate ORM
Issue Type: Improvement
Components: build, documentation
Reporter: Strong Liu
Assignee: Strong Liu
Fix For: 4.1.2
{quote}
The SourceSet.getClasses() method has been deprecated and will be removed in the next version of Gradle. Please use the getOutput() method instead.
The SourceSet.getClassesDir() method has been deprecated and will be removed in the next version of Gradle. Please use the getOutput().getClassesDir() method instead.
The SourceSet.setClassesDir() method has been deprecated and will be removed in the next version of Gradle. Please use the getOutput().setClassesDir() method instead.
The Configuration.getAllArtifactFiles() method has been deprecated and will be removed in the next version of Gradle. Please use the getAllArtifacts().getFiles() method instead.
{quote}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years
[Hibernate-JIRA] Created: (HHH-7196) Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister
by stanislav bashkirtsev (JIRA)
Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister
-----------------------------------------------------------------------------------------
Key: HHH-7196
URL: https://hibernate.onjira.com/browse/HHH-7196
Project: Hibernate ORM
Issue Type: Bug
Components: core
Affects Versions: 4.1.1
Environment: 4.1.1, Windows XP, In Memory HSQLDB 2.2.8
Reporter: stanislav bashkirtsev
While mapping the OTO, I've an NPE. I'm not strong in annotations and it's possible that the mapping is wrong, but anyway I'd assume that the exception should be more explanatory:
{code}23-Mar-2012 14:40:16 org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
23-Mar-2012 14:40:16 org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.1.1}
23-Mar-2012 14:40:16 org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
23-Mar-2012 14:40:16 org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
23-Mar-2012 14:40:16 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000402: Using Hibernate built-in connection pool (not for production use!)
23-Mar-2012 14:40:16 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000115: Hibernate connection pool size: 20
23-Mar-2012 14:40:16 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000006: Autocommit mode: false
23-Mar-2012 14:40:16 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000401: using driver [org.hsqldb.jdbcDriver] at URL [jdbc:hsqldb:mem:testdb]
23-Mar-2012 14:40:16 org.hibernate.service.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
INFO: HHH000046: Connection properties: {user=sa, password=****}
23-Mar-2012 14:40:16 org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.HSQLDialect
23-Mar-2012 14:40:16 org.hibernate.engine.transaction.internal.TransactionFactoryInitiator initiateService
INFO: HHH000399: Using default transaction strategy (direct JDBC transactions)
23-Mar-2012 14:40:16 org.hibernate.hql.internal.ast.ASTQueryTranslatorFactory <init>
INFO: HHH000397: Using ASTQueryTranslatorFactory
Exception in thread "main" org.hibernate.MappingException: Could not instantiate persister org.hibernate.persister.entity.SingleTableEntityPersister
at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:174)
at org.hibernate.persister.internal.PersisterFactoryImpl.createEntityPersister(PersisterFactoryImpl.java:148)
at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:820)
at org.hibernate.metamodel.source.internal.SessionFactoryBuilderImpl.buildSessionFactory(SessionFactoryBuilderImpl.java:65)
at org.hibernate.metamodel.source.internal.MetadataImpl.buildSessionFactory(MetadataImpl.java:340)
at poc.hibernate.Main.main(Main.java:37)
Caused by: java.lang.NullPointerException
at org.hibernate.tuple.PropertyFactory.buildStandardProperty(PropertyFactory.java:288)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:442)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:791)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:460)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.hibernate.persister.internal.PersisterFactoryImpl.create(PersisterFactoryImpl.java:163){code}
Test Case:
{code}@Entity
@Table(name = "AUTHOR")
public class Author {
@Id
@GeneratedValue
private Long id;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
}{code}
The original exceptions is thrown in _PropertyFactory_ on the line 288 when it appears that type variable is _null_.
{code}@Entity
@Table(name = "BOOK")
public class Book {
@Id
@GeneratedValue
private Long id;
@OneToOne
private Author author;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Author getAuthor() {
return author;
}
public void setAuthor(Author author) {
this.author = author;
}
}{code}
{code}public class Main {
public static void main(String[] args) {
Configuration configuration = new Configuration()
.setProperty("hibernate.archive.autodetection", "class")
.setProperty("hibernate.connection.driver_class", "org.hsqldb.jdbcDriver")
.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect")
.setProperty("hibernate.hbm2ddl.auto", "create")
.setProperty("hibernate.connection.url", "jdbc:hsqldb:mem:testdb")
.setProperty("hibernate.connection.username", "sa")
.setProperty("hibernate.connection.password", "")
.setProperty("connection.pool_size", "2");
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder()
.applySettings(configuration.getProperties())
.buildServiceRegistry();
MetadataSources metadataSources = new MetadataSources(serviceRegistry);
metadataSources
.addAnnotatedClass(Author.class)
.addAnnotatedClass(Book.class);
SessionFactory sessionFactory = metadataSources.buildMetadata().buildSessionFactory();
}
}{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years