[Hibernate-JIRA] Created: (HBX-1014) Could not load JPA Configuration
by Reto Urfer (JIRA)
Could not load JPA Configuration
--------------------------------
Key: HBX-1014
URL: http://opensource.atlassian.com/projects/hibernate/browse/HBX-1014
Project: Hibernate Tools
Issue Type: Bug
Components: consoleconfiguration
Affects Versions: 3.2.cr1
Environment: Hibernate 3.2.4, Hibernate Annotations 3.3.0, Hibernate EntityManager 3.3.1, Oracle 10g R2
Reporter: Reto Urfer
If the project name contains a <SPACE> character, the following exception occurs when you try to browse the console configuration:
org.hibernate.console.HibernateConsoleRuntimeException: Could not load JPA Configuration
at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:499)
at org.hibernate.console.ConsoleConfiguration.access$0(ConsoleConfiguration.java:484)
at org.hibernate.console.ConsoleConfiguration$2.execute(ConsoleConfiguration.java:203)
at org.hibernate.console.execution.DefaultExecutionContext.execute(DefaultExecutionContext.java:65)
at org.hibernate.console.ConsoleConfiguration.buildWith(ConsoleConfiguration.java:185)
at org.hibernate.console.ConsoleConfiguration.build(ConsoleConfiguration.java:106)
at org.hibernate.eclipse.console.workbench.ConsoleConfigurationWorkbenchAdapter.getChildren(ConsoleConfigurationWorkbenchAdapter.java:38)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.getChildren(BasicWorkbenchAdapter.java:97)
at org.hibernate.eclipse.console.workbench.BasicWorkbenchAdapter.fetchDeferredChildren(BasicWorkbenchAdapter.java:103)
at org.eclipse.ui.progress.DeferredTreeContentManager$1.run(DeferredTreeContentManager.java:196)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.hibernate.console.HibernateConsoleRuntimeException: Could not create JPA based Configuration
at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:142)
at org.hibernate.console.ConsoleConfiguration.buildConfiguration(ConsoleConfiguration.java:496)
... 10 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.hibernate.console.ConsoleConfiguration.buildJPAConfiguration(ConsoleConfiguration.java:133)
... 11 more
Caused by: javax.persistence.PersistenceException: java.lang.IllegalArgumentException: Unable to visit JAR file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin. Cause: Illegal character in path at index 53: file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:258)
... 16 more
Caused by: java.lang.IllegalArgumentException: Unable to visit JAR file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin. Cause: Illegal character in path at index 53: file:/D:/Daten/eclipse33/LogicaCMG/workspace/Unittest JPA/bin
at org.hibernate.ejb.packaging.JarVisitor.getVisitor(JarVisitor.java:112)
at org.hibernate.ejb.Ejb3Configuration.getMainJarVisitor(Ejb3Configuration.java:266)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:239)
... 16 more
If the project is renamed so it does not contain any <SPACE> characters anymore it works fine.
This problem did not occur in Hibernate Tools 3.2 Beta11
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Commented: (HHH-1877) ClassNotFoundException on my entity-name in a join tag
by Paul Pogonyshev (JIRA)
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877?page=c... ]
Paul Pogonyshev commented on HHH-1877:
--------------------------------------
I can confirm the patch works.
> ClassNotFoundException on my entity-name in a join tag
> ------------------------------------------------------
>
> Key: HHH-1877
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1877
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.1.3
> Environment: Hibernate 3.1.3, Spring 1.2.8, Oracle 9I, Windows XP (localhost)
> Reporter: Christian Mineau
> Attachments: HBM-1877-patch.patch, HBM-1877-testcase.zip, HHH-1877.patch, testcase-HHH1877.ZIP
>
>
> I use the attribute "entity-name" in my class mapping, this is for mapping the same object many times on table(s), and all seem to work normally. I found a problem when I tried to join a table on another class mapping, like:
> <class entity-name="categoryDefault" name="ca.cie.pak.CategoryVO" table="CATEGORY">
> <id name="id" column="CATEGORY_ID" type="java.lang.Integer">
> <generator class="native"/>
> </id>
> <property name="name" column="NAME"/>
>
> <bag name="contents" where="priority = 0">
> <key column="CATEGORY_ID" />
> <one-to-many entity-name="ContentSummary"/>
> </bag>
>
> <join table="LAYOUT_CATEGORY">
> <key foreign-key="CATEGORY_ID" column="CATEGORY_ID" />
> <property name="layoutId" column="LAYOUT_ID"/>
> </join>
> </class>
> I found a ClassNotFoundException: categoryDefault. This exception is thrown when the HbmBinder.bindJoin method is called. I see the code and it tries to instantiate a class from the getEntityName and not by the className.
> Someone can answer me if this is a XML mapping error or a real bug and what I need to do.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3737) Support Hibernate 3.3 branch in Envers until 3.4.0GA is out
by Erik-Berndt Scheper (JIRA)
Support Hibernate 3.3 branch in Envers until 3.4.0GA is out
-----------------------------------------------------------
Key: HHH-3737
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3737
Project: Hibernate Core
Issue Type: Improvement
Components: envers
Affects Versions: 3.4
Reporter: Erik-Berndt Scheper
Attachments: envers-hibernate-core-3.3.x-compatibility.patch
It would be great if Envers would support the 3.3 stable branch of Hibernate at least until Hibernate 3.4.0GA is out.
I fully understand the rationale to remove the patch to support Hibernate 3.3.1 GA. The underlying bug HHH-3351 is resolved in the trunk (3.4.0), but also in the 3.3 branch. (See http://fisheye.jboss.com/changelog/Hibernate/core/trunk/envers?cs=15462 )
Therefore Envers 3.4.0 (snapshot) should be able to run perfectly fine against a 3.3.2 snapshot.
Unfortunately, with the migration from envers to Hibernate, AbstractDelegateSessionImplementor has been modified to include an unused delegation method to org.hibernate.engine.LoadQueryInfluencers, which is new in 3.4.0 (trunk).
The attached patch removes this method, so that Envers 3.4.0 snapshot compiles with Hibernate 3.3.2 snapshot. Also, I have verified that all Envers test cases pass with a 3.3.2-SNAPSHOT.
Related: it would be great to add a Maven profile to envers, so that the envers module could be compiled with a 3.3.2-snapshot dependency. But this would require a 3.3.2-snapshot published in a Jboss repository, which is sadly not available.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 11 months
[Hibernate-JIRA] Created: (HHH-3738) Problem using BTMTransactionManagerLookup with Tomcat
by Helder Sousa (JIRA)
Problem using BTMTransactionManagerLookup with Tomcat
-----------------------------------------------------
Key: HHH-3738
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3738
Project: Hibernate Core
Issue Type: Patch
Components: core
Affects Versions: 3.3.1
Environment: Hibernate 3.3.1 GA
Reporter: Helder Sousa
Attachments: BTMTransactionManagerLookup.patch
Hi.
When using Bitronix Transaction Manager with tomcat there is a problem resolving the TransactionManager by JNDI. Please take a look to this thread: http://www.nabble.com/Hibernate-JTATransactionFactory-and-BTMTransactionM...
In 5th post, Ludovic wrote: "The UserTransaction name is java:comp/UserTransaction and when a JNDI lookup happens in Tomcat, the Tomcat provider takes precedence because Tomcat registered a java: namespace handler."
So, when using BTM in Tomcat, the BTM users should configure in BTM Configuration a JNDI name that does not start with java:comp and the BTMTransactionManagerLookup class should read this configuration:
Here is the change to the BTMTransactionManagerLookup class (I attached the patch):
public String getUserTransactionName() {
try {
Class transactionManagerServiceClass = Class.forName("bitronix.tm.TransactionManagerServices");
Method getConfigurationMethod = transactionManagerServiceClass.getMethod("getConfiguration", null);
Object configurationInstance = getConfigurationMethod.invoke(null, null);
Class bitronixConfigurationClass = configurationInstance.getClass();
Method getJndiUserTransactionNameMethod = bitronixConfigurationClass
.getMethod("getJndiUserTransactionName", null);
String configuredJndiUserTransactionName = (String) getJndiUserTransactionNameMethod.invoke(
configurationInstance, null);
if (configuredJndiUserTransactionName != null && configuredJndiUserTransactionName.trim().length() >= 0) {
return configuredJndiUserTransactionName;
}
return "java:comp/UserTransaction";
}
catch (Exception e) {
throw new HibernateException("Could not obtain BTM UserTransactionName", e);
}
}
Can you apply the patch?
Best regards,
Helder Sousa
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 12 months