[Hibernate-JIRA] Created: (HHH-2735) Query . setLockMode cannot find the alias when the query defines a select clause
by Tamir Solomon (JIRA)
Query . setLockMode cannot find the alias when the query defines a select clause
--------------------------------------------------------------------------------
Key: HHH-2735
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2735
Project: Hibernate3
Issue Type: Bug
Reporter: Tamir Solomon
I tried to perform the following :
Query q1 = session.createQuery("select serverIP.server from ServerIP serverIP where serverIP.ip = :ipStr");
q1.setLockMode("serverIP",LockMode.NONE);
q1.setParameter("ipStr", ip);
q1.list();
and i get this error :
Frame : java.lang.IllegalArgumentException: alias not found: serverIP
at org.hibernate.loader.hql.QueryLoader.applyLocks(QueryLoader.java:299)
at org.hibernate.loader.Loader.preprocessSQL(Loader.java:189)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1529)
at org.hibernate.loader.Loader.doQuery(Loader.java:661)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
at org.hibernate.loader.Loader.doList(Loader.java:2211)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2095)
at org.hibernate.loader.Loader.list(Loader.java:2090)
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:388)
at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
--
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
13 years, 6 months
[Hibernate-JIRA] Created: (HHH-3361) LazyInitializationException generate an error message in the logs
by benoit heinrich (JIRA)
LazyInitializationException generate an error message in the logs
-----------------------------------------------------------------
Key: HHH-3361
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3361
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.3.0.CR1
Reporter: benoit heinrich
Priority: Minor
Hi,
When a LazyInitializationException is thrown a log message is automatically created by the exception class because of the line 19 in the LIE class:
LoggerFactory.getLogger( LazyInitializationException.class ).error( msg, this );
An exception should not write log messages, this is part of the application that handle the exception that should decide either or nor a log message should be created.
The exception should just carry all information with it and no more.
Actually this is causing a serious problem to one of the application I'm working on because LIE is a normal exception and is caught and handled correctly and each time a LIE is thrown by hibernate I'm getting a full stack trace in the logs (which is wrong in my case because the exception is handled correctly).
Also I don't want to change the log4j settings to ignore the LIE because I'd like to know when I get a LIE that is not caught.
So my suggestion is to simply remove the Log entry from the LIE constructor since normally this message is anyway redundant because if the exception is not caught the application will dump the exception in most of the time.
Cheers,
/Benoit
--
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
13 years, 6 months
[Hibernate-JIRA] Created: (HHH-2141) problem with JavaAssist
by Ramil Israfilov (JIRA)
problem with JavaAssist
------------------------
Key: HHH-2141
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2141
Project: Hibernate3
Type: Bug
Versions: 3.2.0.cr2
Reporter: Ramil Israfilov
I have an Java interface:
public interface Credentials {
public long getId();
public void setId(long id);
Object getCredentialsForProtocol(String protocol) throws ProtocolException;
}
and implementation class:
-------
public class BasicCredentials implements Serializable, Credentials {
private long id;
private String username;
private String password;
private static final Log log = LogFactory.getLog(BasicCredentials.class);
public BasicCredentials() {
super();
}
public BasicCredentials(String username, String password) {
super();
this.username = username;
this.password = password;
}
/**
* @return Returns the password.
*/
public String getPassword() {
return password;
}
/**
* @param password
* The password to set.
*/
public void setPassword(String password) {
this.password = password;
}
/**
* @return Returns the username.
*/
public String getUsername() {
return username;
}
/**
* @param username
* The username to set.
*/
public void setUsername(String username) {
this.username = username;
}
public Object getCredentialsForProtocol(String protocol) {
if (protocol != null && protocol.equalsIgnoreCase("HTTP")) {
return new UsernamePasswordCredentials(username, password);
}
log.error("Unsupported protoco:" + protocol);
return null;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
----
Also I have an Credentials.hbm.xml file:
<hibernate-mapping package="be.certipost.comms.accessclient">
<class name="Credentials" table="COMMS$CREDENTIALS">
<id name="id" type="long" unsaved-value="0">
<generator class="native"/>
</id>
<discriminator column="CREDENTIALS_TYPE" type="string"/>
<subclass name="BasicCredentials" discriminator-value="BC">
<property name="username" lazy="false" generated="never" type="string"></property>
<property name="password" lazy="false" generated="never" type="string"></property>
</subclass>
</class>
</hibernate-mapping>
I have deployed those claases and mapping to JBOSS 4.0.4GA: I construct EAR file which contains inside JAR file with my classes and hbm file.
And during deploying I got error:
2006-10-12 10:37:32,350 INFO [org.hibernate.cfg.Environment] Hibernate 3.2 cr2
2006-10-12 10:37:32,365 INFO [org.hibernate.cfg.Environment] hibernate.properties not found
2006-10-12 10:37:32,381 INFO [org.hibernate.cfg.Environment] Bytecode provider name : javassist
2006-10-12 10:37:32,381 INFO [org.hibernate.cfg.Environment] using JDK 1.4 java.sql.Timestamp handling
2006-10-12 10:37:32,506 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: commons-lang-2.1.jar
2006-10-12 10:37:32,506 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: datatools.jar
2006-10-12 10:37:32,506 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: ejb3-persistence.jar
2006-10-12 10:37:32,506 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: jsr173_api.jar
2006-10-12 10:37:32,506 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: CertioneCommsClient.jar
2006-10-12 10:37:32,521 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/DataInstructions.hbm.xml
2006-10-12 10:37:32,771 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.DataInstructions -> COMMS$METADATAS
2006-10-12 10:37:32,818 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/Request.hbm.xml
2006-10-12 10:37:32,943 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.Request -> COMMS$REQUESTS
2006-10-12 10:37:32,959 INFO [org.hibernate.cfg.HbmBinder] Mapping collection: be.certipost.comms.Request.acks -> COMMS$REQ_ACKS
2006-10-12 10:37:33,193 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/Response.hbm.xml
2006-10-12 10:37:33,256 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.Response -> COMMS$RESPONSES
2006-10-12 10:37:33,256 INFO [org.hibernate.cfg.HbmBinder] Mapping collection: be.certipost.comms.Response.acks -> COMMS$RESP_ACKS
2006-10-12 10:37:33,256 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/Session.hbm.xml
2006-10-12 10:37:33,506 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.Session -> COMMS$SESSIONS
2006-10-12 10:37:33,506 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/accessclient/Credentials.hbm.xml
2006-10-12 10:37:33,600 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.accessclient.Credentials -> COMMS$CREDENTIALS
2006-10-12 10:37:33,771 INFO [org.hibernate.cfg.HbmBinder] Mapping subclass: be.certipost.comms.accessclient.BasicCredentials -> COMMS$CREDENTIALS
2006-10-12 10:37:33,771 INFO [org.hibernate.cfg.Configuration] Found mapping document in jar: be/certipost/comms/accessclient/config/ClientProperties.hbm.xml
2006-10-12 10:37:33,818 INFO [org.hibernate.cfg.HbmBinder] Mapping class: be.certipost.comms.accessclient.config.ClientProperties -> COMMS$CLIENTPROPERTIES
2006-10-12 10:37:33,818 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: hibernate-annotations.jar
2006-10-12 10:37:33,834 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: quartz-all-1.5.2.jar
2006-10-12 10:37:33,834 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: jaxb-impl.jar
2006-10-12 10:37:33,850 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: jaxb-api.jar
2006-10-12 10:37:33,850 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: activation.jar
2006-10-12 10:37:33,865 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: commons-httpclient-3.0.1.jar
2006-10-12 10:37:33,865 INFO [org.hibernate.cfg.Configuration] Searching for mapping documents in jar: tmp38363CertioneCommsClient.ear
2006-10-12 10:37:33,865 INFO [org.hibernate.cfg.HbmBinder] Mapping collection: be.certipost.comms.Session.requests -> COMMS$REQUESTS
2006-10-12 10:37:33,959 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2006-10-12 10:37:33,959 INFO [org.hibernate.connection.DatasourceConnectionProvider] Using datasource: java:/CertioneCommsDS
2006-10-12 10:37:33,975 INFO [org.hibernate.cfg.SettingsFactory] RDBMS: HSQL Database Engine, version: 1.8.0
2006-10-12 10:37:33,975 INFO [org.hibernate.cfg.SettingsFactory] JDBC driver: HSQL Database Engine Driver, version: 1.8.0
2006-10-12 10:37:34,021 INFO [org.hibernate.dialect.Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
2006-10-12 10:37:34,021 INFO [org.hibernate.transaction.TransactionFactoryFactory] Transaction strategy: org.hibernate.transaction.JTATransactionFactory
2006-10-12 10:37:34,037 INFO [org.hibernate.util.NamingHelper] JNDI InitialContext properties:{}
2006-10-12 10:37:34,037 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
2006-10-12 10:37:34,037 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
2006-10-12 10:37:34,037 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
2006-10-12 10:37:34,037 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] instantiated TransactionManagerLookup
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] Automatic flush during beforeCompletion(): enabled
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] Automatic session close at end of transaction: enabled
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch size: 15
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] JDBC batch updates for versioned data: enabled
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] Scrollable result sets: enabled
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] JDBC3 getGeneratedKeys(): disabled
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] Connection release mode: after_statement
2006-10-12 10:37:34,037 INFO [org.hibernate.cfg.SettingsFactory] Maximum outer join fetch depth: 5
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Default batch fetch size: 1
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Generate SQL with comments: disabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Order SQL updates by primary key: disabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
2006-10-12 10:37:34,053 INFO [org.hibernate.hql.ast.ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Query language substitutions: {}
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Second-level cache: enabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Query cache: enabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Optimize cache for minimal puts: disabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Structured second-level cache entries: disabled
2006-10-12 10:37:34,053 INFO [org.hibernate.cfg.SettingsFactory] Query cache factory: org.hibernate.cache.StandardQueryCacheFactory
2006-10-12 10:37:34,068 INFO [org.hibernate.cfg.SettingsFactory] Statistics: disabled
2006-10-12 10:37:34,084 INFO [org.hibernate.cfg.SettingsFactory] Deleted entity synthetic identifier rollback: disabled
2006-10-12 10:37:34,084 INFO [org.hibernate.cfg.SettingsFactory] Default entity-mode: pojo
2006-10-12 10:37:34,131 INFO [org.hibernate.impl.SessionFactoryImpl] building session factory
2006-10-12 10:37:34,506 ERROR [org.hibernate.proxy.pojo.BasicLazyInitializer] Javassist Enhancement failed: be.certipost.comms.accessclient.Credentials
java.lang.RuntimeException: by java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:174)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:141)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:42)
at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:159)
at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:50)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:256)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:231)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:155)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy37.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:595)
Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:167)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:170)
... 126 more
Caused by: java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:585)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
... 127 more
2006-10-12 10:37:34,615 WARN [org.hibernate.tuple.PojoEntityTuplizer] could not create proxy factory for:be.certipost.comms.accessclient.Credentials
org.hibernate.HibernateException: Javassist Enhancement failed: be.certipost.comms.accessclient.Credentials
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:149)
at org.hibernate.proxy.pojo.javassist.JavassistProxyFactory.postInstantiate(JavassistProxyFactory.java:42)
at org.hibernate.tuple.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:159)
at org.hibernate.tuple.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:131)
at org.hibernate.tuple.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:50)
at org.hibernate.tuple.TuplizerLookup.create(TuplizerLookup.java:64)
at org.hibernate.tuple.EntityMetamodel.<init>(EntityMetamodel.java:256)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:418)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:108)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:223)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1213)
at org.jboss.hibernate.jmx.Hibernate.buildSessionFactory(Hibernate.java:231)
at org.jboss.hibernate.jmx.Hibernate.startService(Hibernate.java:155)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy37.start(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.start(XSLSubDeployer.java:197)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:997)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1007)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:808)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:755)
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:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:464)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException: by java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:174)
at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.getProxyFactory(JavassistLazyInitializer.java:141)
... 125 more
Caused by: javassist.CannotCompileException: by java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:167)
at javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:170)
... 126 more
Caused by: java.lang.NoClassDefFoundError: be/certipost/comms/accessclient/Credentials
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
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:585)
at javassist.util.proxy.FactoryHelper.toClass(FactoryHelper.java:159)
... 127 more
Strange thing that tables are created and credentials objects persisted correctly.
It is starnge that I got ERROR in log files.
--
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
13 years, 6 months
[Hibernate-JIRA] Created: (HHH-3344) DB2Dialect.getLimitString doesn't work for some queries
by Damon Horrell (JIRA)
DB2Dialect.getLimitString doesn't work for some queries
-------------------------------------------------------
Key: HHH-3344
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-3344
Project: Hibernate3
Issue Type: Bug
Reporter: Damon Horrell
Priority: Minor
If a query uses * but doesn't use a table alias then the modified query created by DB2Dialect.getLimitString is invalid.
e.g.
select * from mytable
becomes
select * from ( select rownumber() over() as rownumber_, * from mytable ) as temp_ where rownumber_ <= ?
which causes
DB2 SQL error: SQLCODE: -104, SQLSTATE: 42601, SQLERRMC: *;ver() as rownumber_,;<select_sublist>
I have worked around this for my project by extending DB2Dialect with:
public String getLimitString(String sql, boolean hasOffset) {
return "select * from ( select rownumber() over() as rownumber_, original_query.* from (" + sql
+ ") original_query ) as temp_ where rownumber_ <= ?";
}
This code will need extending to handle the hasOffset case etc.
Real code probably won't be using select * anyway so this probably isn't a big problem. My example allows the user to enter a custom query so I have to handle this situation.
--
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
13 years, 6 months
[Hibernate-JIRA] Créée: (HHH-2389) Improving DB2 dialect
by Nicolas Billard (JIRA)
Improving DB2 dialect
---------------------
Key: HHH-2389
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2389
Project: Hibernate3
Type: Improvement
Components: query-hql
Versions: 3.2.1
Environment: Development based on v 3.2.1
Reporter: Nicolas Billard
Priority: Minor
Attachments: DB2Dialect.java
The class joined to this issue overrides the DB2 dialect. The dialect included in hibernate doesn't work very well when you want to limit returned results (when you call setFirstResult and / or setMaxResults on a query) :
- the instructions "fetch first XXX row only is not used
- a temporary table is used when it's not usefull
- when you have subselects, an exception can occur if subselects have order by clause (because of the getRowNumber method, not corrected here).
This version of getLimitString() method generates faster requests (tests made on a table of 300000 rows shows that fetching rows from 20 to 30 takes 0.3 seconds with original version, 0.02 with this one).
--
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
13 years, 6 months
[Hibernate-JIRA] Created: (HHH-1994) Problem with case sensitive column and tables names and Identity mapping with postgreSQL
by Alex Samad (JIRA)
Problem with case sensitive column and tables names and Identity mapping with postgreSQL
----------------------------------------------------------------------------------------
Key: HHH-1994
URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1994
Project: Hibernate3
Type: Bug
Components: core
Versions: 3.1.3
Environment: Hibernate 3.1.3, Java 1.5.0_07 (sun) windos and linux ( 32 & 64 bit). POstgres SQL 8.1 Windows and linux
Reporter: Alex Samad
Whilst trying to insert into a table with a primary key (ID mapping) which has a identity generator. And the columns and/or the table has been defined with case sensitivey ie back ticks.
It fails to get the next serial number and thus fails any inserts.
The problem lies in dialect/PostgreSQLDialect.java
public String getIdentitySelectString(String table, String column, int type) {
return new StringBuffer().append("select currval('")
.append(table)
.append('_')
.append(column)
.append("_seq')")
.toString();
}
table is inclosed in quotes and column is inclosed in quotes which gives a name like
"table"_"Column"_seq - which fails
I would suggest a fix is to test each of table or column for " and if it exist then to strip it of both of table and column and encluse the whole name in "". This mighe break some old code where say the table is coded in case insensitive table name and case sensitive column key.
Sorry not much of a java programmer.
--
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
13 years, 6 months