ERROR org.hibernate.util.JDBCExceptionReporter
Hi Guys,
In my earlier post [my post in this forum|http://forums.sun.com/thread.jspa?threadID=5334777&tstart=0] i was getting one exception .
I resolved the issue by setting the value of <property name="hibernate.c3p0.max_statements">0</property> to 0.
But now i'm getting a new error
ERROR org.hibernate.util.JDBCExceptionReporter - The last packet successfully received from the server was86384 seconds ago.The last packet sent successfully to the server was 86384 seconds ago, which is longer than the server configured value of 'wait_timeout'. You should consider either expiring and/or testing connection validity before use in your application, increasing the server configured values for client timeouts, or using the Connector/J connection property 'autoReconnect=true' to avoid this problem.
the time out seetings in hibernate-config file is
<property name="hibernate.c3p0.timeout">18000</property>
and mysql default wait_timeout=28800.Is anyone among you aware what the hell is happening with connection.
BalusC wrote:
Rather post Hibernate related questions at a forum devoted to Hibernate. You will get a better answer sooner.I have posted this in hibernate forum also [http://forum.hibernate.org/viewtopic.php?t=991039]
Similar Messages
-
SQL Error: 12519, SQLState: 66000
ERROR 2013-11-29 10:47:19,601 org.hibernate.util.JDBCExceptionReporter - Listener refused the connection with the following error:Below solution was given for similar issue. Hope it works with you.
I think it is not using C3p0 by default.
Please try add this property to your hibernate.cfg.xml.
<property name="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property> -
Error org.hibernate.ObjectNotFoundException
Hi,
I encountered error below in 10g database.The same application works
fine in 9i database. Any idea the cause the of the problem?
org.hibernate.ObjectNotFoundException: No row with the given identifier exists:
Thanks a lot.Hi,
Below is the error log i got :
Check 254c1360e30701136c1edec40138 exists in the db.
org.hibernate.ObjectNotFoundException: No row with the given identifier exists: [com.wgc.rms.bo.req.StepDetailBean#254c
1360e30701136c1edec40138]
at org.hibernate.ObjectNotFoundException.throwIfNull(ObjectNotFoundException.java:27)
at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:65)
at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:98)
at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:158)
at com.wgc.rms.bo.req.StepDetailBean$$EnhancerByCGLIB$$a090041d.getEstimatedStartDate(<generated>)
at com.wgc.rms.bo.req.JobRequest.DWR_CanStartStep(JobRequest.java:392)
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 uk.ltd.getahead.dwr.impl.ExecuteQuery.execute(ExecuteQuery.java:239)
at uk.ltd.getahead.dwr.impl.DefaultExecProcessor.handle(DefaultExecProcessor.java:48)
at uk.ltd.getahead.dwr.impl.DefaultProcessor.handle(DefaultProcessor.java:83)
at uk.ltd.getahead.dwr.AbstractDWRServlet.doPost(AbstractDWRServlet.java:162)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:118)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
This is the coding involved:
public int DWR_CanStartStep(String stepDetailId, String startDateStr,
String gmtOffsetStr) {
// gmt offset needed since the method cannot get it from the request
* Can start now?
* * is step ontime? is the resources ok to start? yes - send ok no -
* send not ok
* Is step overdue? is the resources ok to start? no - send not ok yes -
* send ok but should reschedule?
* Is step early? is the resources ok to start? no - send not ok yes -
* send ok but should reschedule?
int gmtOffset = Integer.parseInt(gmtOffsetStr);
DateTimeUtil dateTimeUtilDo = new DateTimeUtil();
Date startDate = new Date();
if (!StringUtils.isEmpty(startDateStr)) {
startDate = dateTimeUtilDo.uiToBackend(startDateStr, gmtOffset);
Date newEndDate = null; // the new end date adjusted according to the
// new start date
Long timeDiff = null;
try {
Session session = HibernateUtil.getSession();
Slot slotDo = new Slot();
StepDetailBean stepDetail = (StepDetailBean) session.load(
StepDetailBean.class, stepDetailId);
System.out.println("start2");
timeDiff = startDate.getTime()
- stepDetail.getEstimatedStartDate().getTime();
newEndDate = new Date(stepDetail.getEstimatedEndDate().getTime()
+ timeDiff);
System.out.println("start3");
if (!canStartStepNow(session, stepDetail, startDate)) {
logger.debug("DWR return value:" + DWR_STEP_START_FAILED
+ " Step failed to start!");
System.out.println("start4");
HibernateUtil.closeSession();
return DWR_STEP_START_FAILED; // step cannot start, regardless
// what was the date given
// (late, early, ontime- doesnt
// matter)
} else if (startDate.getTime() > stepDetail.getEstimatedStartDate()
.getTime()
+ (STEP_START_GRACE_PERIOD_MIN * 60000)) {
Set<SlotStateBean> slotStateList = stepDetail.getSlotState();
if (slotStateList == null || slotStateList.size() == 0) {
logger.debug("DWR return value:"
+ DWR_STEP_START_LATE_SUCCESS
+ " Step is starting late 1");
System.out.println("start5");
HibernateUtil.closeSession();
return DWR_STEP_START_LATE_SUCCESS;// step can start but
// it's starting late
} else {
boolean allSlotStateHasThisStepDetailAndStartsWithinOperationHours = true;
EACH_SLOT_STATE: for (SlotStateBean eachSlotState : slotStateList) {
// startDate
SlotBean eachSlot = (SlotBean) session.load(
SlotBean.class, eachSlotState.getSlotId());
DriverBean parentDriver = (DriverBean) session.load(
DriverBean.class, eachSlot.getDriverId());
ZoneBean parentZone = (ZoneBean) session.load(
ZoneBean.class, parentDriver.getZoneId());
EquipmentBean parentEquipment = (EquipmentBean) session
.load(EquipmentBean.class, parentZone
.getEquipmentId());
if (!withinEquipmentOpHours(session, parentEquipment,
startDate, newEndDate)) {
logger
.debug("test start or end beyond equipment operational hours");
allSlotStateHasThisStepDetailAndStartsWithinOperationHours = false;
break EACH_SLOT_STATE;
if (!noClashingSlotState(session, eachSlot, stepDetail,
startDate, newEndDate)) {
allSlotStateHasThisStepDetailAndStartsWithinOperationHours = false;
break EACH_SLOT_STATE;
} // for each
if (allSlotStateHasThisStepDetailAndStartsWithinOperationHours) {
logger.debug("DWR return value:"
+ DWR_STEP_START_LATE_SUCCESS
+ " step is starting late 2 ");
HibernateUtil.closeSession();
System.out.println("start9");
return DWR_STEP_START_LATE_SUCCESS;// step can start
// but it's starting
// late
} else {
logger.debug("DWR return value:"
+ DWR_STEP_START_LATE_SUCCESS
+ " step starting late but CANNOT start");
HibernateUtil.closeSession();
return DWR_STEP_START_FAILED; // step cannot start,
// regardless what was
// the date given (late,
// early, ontime- doesnt
// matter)
} else if (startDate.getTime() < stepDetail.getEstimatedStartDate()
.getTime()
- (STEP_START_GRACE_PERIOD_MIN * 60000)) {
Set<SlotStateBean> slotStateList = stepDetail.getSlotState();
if (slotStateList == null || slotStateList.size() == 0) {
logger.debug("DWR return value:"
+ DWR_STEP_START_EARLY_SUCCESS
+ " Step is starting early 1");
HibernateUtil.closeSession();
return DWR_STEP_START_EARLY_SUCCESS;// step can start but
// it's starting late
} else {
boolean allSlotStateHasThisStepDetailAndStartsWithinOperationHours = true;
EACH_SLOT_STATE: for (SlotStateBean eachSlotState : slotStateList) {
SlotBean eachSlot = (SlotBean) session.load(
SlotBean.class, eachSlotState.getSlotId());
DriverBean parentDriver = (DriverBean) session.load(
DriverBean.class, eachSlot.getDriverId());
ZoneBean parentZone = (ZoneBean) session.load(
ZoneBean.class, parentDriver.getZoneId());
EquipmentBean parentEquipment = (EquipmentBean) session
.load(EquipmentBean.class, parentZone
.getEquipmentId());
if (!withinEquipmentOpHours(session, parentEquipment,
startDate, newEndDate)) {
logger
.debug("test start or end beyond equipment operational hours");
allSlotStateHasThisStepDetailAndStartsWithinOperationHours = false;
break EACH_SLOT_STATE;
if (!noClashingSlotState(session, eachSlot, stepDetail,
startDate, newEndDate)) {
allSlotStateHasThisStepDetailAndStartsWithinOperationHours = false;
System.out.println("start15");
break EACH_SLOT_STATE;
if (allSlotStateHasThisStepDetailAndStartsWithinOperationHours) {
logger.debug("DWR return value:"
+ DWR_STEP_START_EARLY_SUCCESS
+ " step is starting early 2 ");
HibernateUtil.closeSession();
return DWR_STEP_START_EARLY_SUCCESS;// step can start
// but it's starting
// late
} else {
logger.debug("DWR return value:"
+ DWR_STEP_START_EARLY_SUCCESS
+ " step starting early but CANNOT start");
HibernateUtil.closeSession();
return DWR_STEP_START_FAILED; // step cannot start,
// regardless what was
// the date given (late,
// early, ontime- doesnt
// matter)
} else {
logger.debug("DWR return value:" + DWR_STEP_START_SUCCESS
+ " starting on time SUCCESS");
HibernateUtil.closeSession();
return DWR_STEP_START_SUCCESS; // step can start and is on time
} catch (Exception e) {
e.printStackTrace();
System.out.println("start19");
logger
.warn("DWR canStartStep exception occured. "
+ e.getMessage());
} finally {
try {
HibernateUtil.closeSession();
} catch (Exception e) {
logger.debug("Staring failed for some reason");
return DWR_STEP_START_FAILED;
Please help.
Thanks. -
Org.hibernate.exception.GenericJDBCException: could not execute query
while executing sql statements with hibernate oracle this type of errors
org.hibernate.exception.GenericJDBCException: could not execute query
ava.sql.SQLException: ORA-01001: cursore non valido can any one suggest
a solution for this.
ThanksThis is likely due to a commit/rollback being executed after the statement has been executed but befofre the result set has been processed by the application. In TimesTen, unlike Oracle, commit/rollback closes all open cursors on the connection. This could be a case of using the wrong Hibernate dialect. Are you using a TimesTen dialect in Hibernate?
Chris -
Hi,
We are migrating to weblogic server. While deploying the EAR in Production WebLogic server I am getting the following - "Class Not found Exception" . I have local version of weblogic server which is coupled with eclipse is not giving me any error when I deploy the same EAR, but only production weblogic server is giving error. In the production environment we are using clusters. and we have staging environment also.
It would be great if someone let me know how to get rid of this error. Thanks in advance
Environment:
Java - 1.6
Hibernate - 3
Spring - 2
Web Logic - 10.3.5
WebLogic-Application.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-application xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-application" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-application http://xmlns.oracle.com/weblogic/weblogic-application/1.2/weblogic-application.xsd">
<!--weblogic-version:10.3.5-->
<wls:application-param>
<wls:param-name>webapp.encoding.default</wls:param-name>
<wls:param-value>UTF-8</wls:param-value>
</wls:application-param>
<wls:prefer-application-packages>
<wls:package-name>antlr.*</wls:package-name>
</wls:prefer-application-packages>
</wls:weblogic-application>
Stack trace from the server:
<<WLS Kernel>> <> <0000K1E1LgQ5e_5_rPt1iY1HwEvb000009> <1375698508586> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/jboss-spring.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/jboss-spring.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
####<05.08.2013 12:28 Uhr MESZ> <Error> <Deployer> <FE0APP216> <WLS_FORMS> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <0000K1E1LgQ5e_5_rPt1iY1HwEvb000009> <1375698508601> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1375698508071' for task '6'. Error is: 'weblogic.application.ModuleException: '
weblogic.application.ModuleException:
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:201)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:249)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:427)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:28)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:637)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:164)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:69)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
Caused By: java.lang.NoClassDefFoundError: org/hibernate/MappingException
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getDeclaredConstructor(Class.java:1985)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:54)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:481)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:181)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1872)
at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3153)
at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1508)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:636)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:205)
at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:58)
at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:140)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)Hello,
I recommend not the xmlpull jar file, but the xpp3-*.jar file found with your Enterprise installation. It's in the "external" subfolder where you got your other Enterprise jar files.
You'll have to remove the xmlpull jar, since they'd version conflict.
Sincerely,
Ted Ueda -
Hi.
i want to know meaning of following Error and how to remove it.
ORA-01722
WARN [org.hibernate.dialect.Oracle9Dialect] The Oracle9Dialect dialect has been deprecated; use either Oracle9iDialect or Oracle10gDialect instead
Regards,
Pradeep Kr. Sharma
Edited by: user13389551 on Jul 12, 2010 11:27 PM
Edited by: user13389551 on Jul 13, 2010 3:26 AMORA-01722: invalid number
Cause: The attempted conversion of a character string to a number failed because the character string was not a valid numeric literal. Only numeric fields or character fields containing numeric data may be used in arithmetic functions or expressions. Only numeric fields may be added to or subtracted from dates.
Action: Check the character strings in the function or expression. Check that they contain only numbers, a sign, a decimal point, and the character "E" or "e" and retry the operation. -
Hi All,
I am using Oracle 11g and I am trying to delete some records from database using some GUI. In that case I am getting following error:
java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets are not enabled. When I restart the application's service, this error is going away and deletion is working fine.
Other related jars that I am using is as follow:
ojdbc5.jar
hibernate-3.0.5.jar
I am attaching the stack trace as well:
<log4j:event logger="org.hibernate.AssertionFailure" timestamp="1263964931355" sequenceNumber="24" level="ERROR" thread="SocketListener0-2">
<log4j:message><![CDATA[an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)]]></log4j:message>
<log4j:throwable><![CDATA[org.hibernate.AssertionFailure: scrollable result sets are not enabled
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
at org.hibernate.loader.Loader.scroll(Loader.java:1634)
at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443)
at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291)
at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960)
at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62)
at com.sample.persistence.WorklistItemDAO.purge(WorklistItemDAO.java:145)
at com.sample.server.worklistmanager.WorklistManager.purge(WorklistManager.java:695)
at com.sample.server.webservices.CCGPIWorklistHandler.purge(CCGPIWorklistHandler.java:329)
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.apache.xmlrpc.Invoker.execute(Invoker.java:130)
at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
at com.sample.server.webservices.XmlRpcServlet.service(XmlRpcServlet.java:63)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
at org.mortbay.http.HttpServer.service(HttpServer.java:909)
at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
]]></log4j:throwable>
</log4j:event>
Thanks
ShivHi All,
anybody got a chance to look into it?
--Shiv -
Error 500--Internal Server Error org.apache.tapestry
Hi.
I am getting the following error when access an application. Application give no error during deployment. Only get this error when trying to logon to the application.
How do I resolve this issue?
Thanks
Sayef
Error 500--Internal Server Error
org.apache.tapestry.ApplicationRuntimeException: Could not load class com.vitechinc.v3.core.view.HomeService from weblogic.utils.classloaders.ChangeAwareClassLoader@12816cb finder: weblogic.utils.classloaders.CodeGenClassFinder@19a917d annotation: [email protected]: com.vitechinc.v3.core.view.HomeService
at org.apache.tapestry.util.DefaultResourceResolver.findClass(DefaultResourceResolver.java:107)
at org.apache.tapestry.engine.AbstractEngine.createServiceMap(AbstractEngine.java:1868)
at org.apache.tapestry.engine.AbstractEngine.setupForRequest(AbstractEngine.java:1346)
at com.vitechinc.core.VitechEngine.setupForRequest(VitechEngine.java:53)
at com.vitechinc.v3.core.view.V3Engine.setupForRequest(V3Engine.java:282)
at org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:824)
at org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197)
at org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:226)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:124)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:283)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at com.vitechinc.core.locale.ExtractLocaleFilter.doFilterInternal(ExtractLocaleFilter.java:43)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.springframework.orm.hibernate.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:170)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at org.apache.tapestry.RedirectFilter.doFilter(RedirectFilter.java:106)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:42)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3368)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(Lweblogic.security.acl.internal.AuthenticatedSubject;Lweblogic.security.acl.internal.AuthenticatedSubject;Ljava.security.PrivilegedAction;)Ljava.lang.Object;(Unknown Source)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2117)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2023)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1359)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
Caused by: java.lang.ClassNotFoundException: com.vitechinc.v3.core.view.HomeService
at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
at org.apache.tapestry.util.DefaultResourceResolver.findClass(DefaultResourceResolver.java:103)
... 30 moreThe "com.vitechinc.v3.core.view.HomeService" class isn't part of the deployment package.
-
Org.hibernate.MappingException: invalid configuration in hibernate
hi,
i am new to hibernate.
while i am executing small program, below error occur.
what can i do to solve this problem, plz help me.
Error Code
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception occur:invalid configuration
org.hibernate.MappingException: invalid configuration+
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1493)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
at FirstExample.main(FirstExample.java:12)
Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
... 3 more
Exception in thread "main" java.lang.NullPointerException
at FirstExample.main(FirstExample.java:26)Thank u .
I did all configuration properly by some guideline.
But i got new error in my program.
please reply me.
This is my program
*{color:#3366ff}Test.java{color}*
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import event.Sample;
public class Test {
public static void main(String a[])throws HibernateException
Session session=null;
try
SessionFactory sessionFactory=new Configuration().configure().buildSessionFactory();
session=sessionFactory.openSession();
System.out.println("Insert record ");
Sample s=new Sample();
s.setId(3);
s.setName("Sundar");
session.save(s);
System.out.println("Sucessfully Saved");
}catch(Exception e)
System.out.println("Exception occur:"+e.getMessage());
e.printStackTrace();
}finally
session.flush();
session.close();
*{color:#3366ff}Java Bean Sample.java{color}*
package event;
public class Sample {
private int id;
private String name;
public int getId() {
return id;
public void setId(int id) {
this.id = id;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
*{color:#3366ff}{color:#ff0000}hibernate.cfg.xml file{color}*
*<?xml version="1.0" encoding="utf-8"?>*
*<!DOCTYPE hibernate-configuration PUBLIC*
*"-//Hibernate/Hibernate Configuration DTD 3.0//EN"*
*"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">*
*<hibernate-configuration>*
* <session-factory>*
* <!-- local connection properties -->*
* <property name="hibernate.connection.url">*
* jdbc:mysql://localhost:3306/test*
* </property>*
* <property name="hibernate.connection.driver_class">*
* com.mysql.jdbc.Driver*
* </property>*
* <property name="hibernate.connection.username">root</property>*
* <property name="hibernate.connection.password">server</property>*
* <!-- property name="hibernate.connection.pool_size"></property -->*
* <!-- dialect for MySQL -->*
* <property name="dialect">*
* org.hibernate.dialect.MySQLDialect*
* </property>*
* <property name="hibernate.show_sql">false</property>*
* <property name="hibernate.transaction.factory_class">*
* org.hibernate.transaction.JDBCTransactionFactory*
* </property>*
* <mapping resource="event/Sample.hbm.xml" />*
* </session-factory>*
*</hibernate-configuration>*
*{color:#ff0000}{color:#000000}Sample.hbm.xml file{color}*
*<?xml version="1.0" encoding="utf-8"?>*
*<!DOCTYPE hibernate-mapping PUBLIC*
* "-//Hibernate/Hibernate Mapping DTD//EN"*
* "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >*
*<hibernate-mapping package="event">*
* <class name="Sample" table="sample" >*
* <meta attribute="sync-DAO">true</meta>*
* <property name="Id" column="id" type="integer" not-null="false" length="11" />*
* <property name="Name" column="name" type="string" not-null="false" length="50" />*
* </class>*
*</hibernate-mapping>*
*{color}{color}*
*{color:#3366ff}
This is my error.{color}*
log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.
Exception occur:Could not parse mapping document from resource event/Sample.hbm.xml
org.hibernate.InvalidMappingException: Could not parse mapping document from resource event/Sample.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:575)
at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593)
at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
at Test.main(Test.java:15)
Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:572)
... 7 more
Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:465)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:505)
... 8 more
Exception in thread "main" java.lang.NullPointerException
at Test.main(Test.java:29) -
Exception in JPA (NoClassDefFoundError: org/hibernate/AnnotationException)
Hi,
I´m having a serious problem when using JPA. I´m using Weblogic Server 10 and developing in Weblogic Workshop Studio. When I start the WLS in Workshop, all works fine, but when I use the "publish" over my WLS Server in Workshop because I change any class in the project (and I need to republish the project to send the changed class to WLS), the following error is reported when I try to use the JPA:
Caused by: javax.ejb.EJBTransactionRolledbackException: EJB Exception: : java.lang.NoClassDefFoundError: org/hibernate/AnnotationException
at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:353)
at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1115)
at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1265)
at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:150)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:884)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:186)
Why the AnnotationException class is no more found after a publish in a started Weblogic Server ?
Thanks in advance,
Sergio Stateri Jr.
[email protected]Sergio,
there are at least three implementation for JPA available: OpenJPA, TopLink, and Hibernate. The first two are or can easily installed in WLS. If you intend to use Hibernate as the persistence provider you should ensure that all libraries are in the class path of your application.
--olaf -
Org.hibernate.AnnotationException: Cannot find the expected secondary table
Hello
My detailed problem is on the topic:
http://forum.java.sun.com/thread.jspa?threadID=5123752&tstart=0
Rest of the classes are the same but I have changed my persistence.xml to:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="cname" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:/OracleDS</jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.ejb.autodetection" value="class"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle9Dialect"/>
</properties>
</persistence-unit>
</persistence>I am still getting the exception:
org.hibernate.AnnotationException: Cannot find the expected secondary table: no CUSTOMER available for entities.Customer
at org.hibernate.cfg.Ejb3Column.getJoin(Ejb3Column.java:293)
at org.hibernate.cfg.Ejb3Column.getTable(Ejb3Column.java:272)
at org.hibernate.cfg.annotations.SimpleValueBinder.make(SimpleValueBinder.java:222)
at org.hibernate.cfg.AnnotationBinder.bindId(AnnotationBinder.java:1728)
at org.hibernate.cfg.AnnotationBinder.processElementAnnotations(AnnotationBinder.java:1171)
at org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:706)Can anyone please tell me why I am getting this exception?
Thanks!Did you ever find a solution for this problem? I'm getting the same errors.
-
Org.hibernate.MappingException: broken column mapping
I have 2 tables I'm trying to do a left outer join.
Code:
"FROM Family AS f INNER JOIN f.personVersion AS pv
LEFT OUTER JOIN pv.personDetails"
I see this as a one-to-one relationship between the foreign key in Person_Details and the Primary Key in Person_Version
PERSON_VERSION
KEY TYPE COLUMN NAME REF TABLE REF COLUMN
PK_PERSON_VERSION Primary PERSON_VERSION_ID
FK1_PRSN_VRSN Foreign EVENT_ID EVENT EVENT_ID
PERSON_DETAILS
KEY TYPE COLUMN NAME REF TABLE REF COLUMN
PK_PERSON_DETAILS Primary PERSON_ID, PERSON_VERSION_ID
FK1_PERSON_DTLS Foreign PERSON_VERSION_ID PERSON_VERSION PERSON_VERSION_ID
My Person_Version class :
Code:
@Entity public class PersonVersion extends BaseEntity { private static final long serialVersionUID = 1L; private PersonDetails personDetails; ...... }
My ORM.xml:
Code:
<entity class="com.PersonVersion"> <table name="person_version" /> <sequence-generator name="SEQ" sequence-name="SQ_person_version" allocation-size="1"/> <attribute-override name="id"> <column name="person_version_id" column-definition="NUMBER(38)"/> </attribute-override> <attributes> <basic name="eventId"> <column name="event_id" column-definition="NUMBER(38)" /> </basic> <one-to-one fetch="EAGER" name="personDetails" optional="true"> <join-column name="person_version_id" insertable="false" updatable="false"/> <cascade> <cascade-refresh/> </cascade> </one-to-one> </attributes> </entity>
When I start my server I get the following error:
Reason: javax.persistence.PersistenceException: org.hibernate.MappingException: broken column mapping
for: personDetails.id of: com.PersonVersion
Has anyone run into this issue?SHIBA wrote:
Hi All,
I have two tables Emp and Dept with primary key of Dept table is Foregn key of Emp table
I had created hibernate mapping file ,hibernate configuration file and POJO clasess using Reverse Engineering.
i'm using spring framework for this.
when i try to access dept information on page.
it throws an exception as follows
Initialization of bean failed; nested exception is org.hibernate.MappingException: entity class not found : Emp
My guess is that your hibernate.cfg.xml does not contain an .hbm.xml for both Dept and Emp.
% -
My Code:
<%@ page import="com.tcs.utilities.ExceptionHandler" %>
<%@ page import="com.tcs.core.UserProfile" %>
<%@ page import="com.tcs.core.HelpDeskUserProfile" %>
<%@ page import="com.tcs.exception.InvalidSessionException" %>
<%@ page import="com.tcs.constants.HelpDeskConstants" %>
<%@ page import="com.tcs.utilities.LogHandler" %>
<%@ page import="com.tcs.jsp.SessionDataContainer" %>
<%@ page import="com.tcs.jsp.ContentModel" %>
<%@ page import="com.tcs.jsp.helpdesk.HelpDeskSearchResultCM" %>
<%@ page import="com.tcs.jsp.helpdesk.HelpDeskSearchResultCmd" %>
<%@ page import="com.tcs.constants.CoreConstants" %>
<%@ page import="com.tcs.constants.ExceptionTokens" %>
<%@ page errorPage="s_error.jsp" %>
<%@ include file="session_validation.jsp" %>
<%
System.out.println("recieved flag");
LogHandler log = LogHandler.init();
%>
<%
System.out.println("recieved flag");
UserProfile profile = (UserProfile)session.getValue(HelpDeskConstants.SESSION_PROFILE);
if(null == profile)
throw new InvalidSessionException();
if(session.isNew())
throw new InvalidSessionException();
try{System.out.println("going for search");
HttpSession sesshome = request.getSession(false);
if(null == sesshome.getValue(HelpDeskConstants.SESSION_PROFILE) ) {
throw new Exception ();
System.out.println("going for search within");
HelpDeskUserProfile objPrfl = (HelpDeskUserProfile) sesshome.getValue(HelpDeskConstants.SESSION_ADMIN);
if (!objPrfl.isAdminFlag())
throw new Exception();
System.out.println("going for search1");
HelpDeskSearchResultCM cm = new HelpDeskSearchResultCM();
HelpDeskSearchResultCmd cmd = new HelpDeskSearchResultCmd();
System.out.println("going for search2");
cm = (HelpDeskSearchResultCM) cmd.execute( request, response );
System.out.println("going for search2.5");
SessionDataContainer.put(session.getId(),cm);
System.out.println("going for search3");
String pag="s_helpDeskSearchResult.jsp?hidComingFrom="+"SearchMenus";
%>
<jsp:forward page="<%=pag%>"/>
<!--jsp:forward page="s_helpDeskSearchResult.jsp" />
<jsp:param name="hidComingFrom" value="SearchMenus" />
</jsp:forward -->
<%
} catch(Exception e) {
/*log.error(e,"p_helpDeskSearchResult.jsp",CoreConstants.HELPDESK);
ExceptionHandler.handleJSPException(e, ExceptionTokens.HD_GET_DATA_ERROR,
"p_helpDeskSearchResult.jsp");*/
System.out.println("Exception is " + e.getMessage());
%>
I get the following error when i run this code.
ERROR [org.jboss.web.localhost.Engine] StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: /p_helpDeskSearchResult.jsp(68,5) jsp.error.badaction
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:428)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
at org.apache.jasper.compiler.Parser.parseAction(Parser.java:671)
at org.apache.jasper.compiler.Parser.parseElements(Parser.java:803)
at org.apache.jasper.compiler.Parser.parse(Parser.java:122)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:199)
at org.apache.jasper.compiler.ParserController.parse(ParserController.java:153)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:227)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:369)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:473)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:190)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.jboss.web.tomcat.security.JBossSecurityMgrRealm.invoke(JBossSecurityMgrRealm.java:220)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.tc4.statistics.ContainerStatsValve.invoke(ContainerStatsValve.java:76)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:65)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:577)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:536)Hi,
This forum is related to sun java studio creator . Could you please post this to appropriate forum
Regards
CreatorTeam -
NoDefClassFoundError: /org/hibernate/Session
Hi, I have this problem:
I have an applet that it's working correctly inside eclipse. But when I try to export it to the Web Server (Apache) I get this error. This is the directory structure:
/ # root folder of the application
|
-> index.html #where I invoke the applet by <applet> tag
->editor.jar #the application
|
->editor # all the sources and .class
->lib #all the libs, where is hibernate3.jar, where is org.hibernate.Session.class
->.classpath #classpath definitionHere is the classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/ant-antlr-1.6.5.jar"/>
<classpathentry kind="lib" path="lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="lib/asm-attrs.jar"/>
<classpathentry kind="lib" path="lib/asm.jar"/>
<classpathentry kind="lib" path="lib/cglib-2.1.3.jar"/>
<classpathentry kind="lib" path="lib/commons-collections-2.1.1.jar"/>
<classpathentry kind="lib" path="lib/commons-logging-1.0.4.jar"/>
<classpathentry kind="lib" path="lib/dom4j-1.6.1.jar"/>
<classpathentry kind="lib" path="lib/ehcache-1.2.jar"/>
<classpathentry kind="lib" path="lib/hibernate3.jar"/>
<classpathentry kind="lib" path="lib/jaas.jar"/>
<classpathentry kind="lib" path="lib/jaxen-1.1-beta-7.jar"/>
<classpathentry kind="lib" path="lib/jdbc2_0-stdext.jar"/>
<classpathentry kind="lib" path="lib/jta.jar"/>
<classpathentry kind="lib" path="lib/log4j-1.2.11.jar"/>
<classpathentry kind="lib" path="lib/xerces-2.6.2.jar"/>
<classpathentry kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="lib" path="lib/mysql-connector-java-5.0.4-bin.jar"/>
<classpathentry kind="lib" path="lib/images.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>any idea? need more information? just ask for it.
thanks,
regards,
NeuquinoHello
The applet code/ editor jar should be outside the web-inf folder as applet is a client side program it will not have access to the jar files in the web-inf/lib folder .
how did u make ur editor.jar
make sure when u build the jar u do it this way
org and com are classes of other packages used in the applet.
jar cvf editor.jar test1.class test2.class org com
Here is what you have to do
1.Put the editor.jar in the root folder or out side web-inf in a different folder.
2. Try to access to access it with ur index.html -
Hi,
I wanted to perform a query like this: Query q = entityManager.createQuery ("select userName from manageUsers where username=123");
I'm guessing "manageUsers " isn't mapped but i don't know where to map this.
ThanksBanke wrote:
First are you using JPA with hibernate as the provider or are you using hibernate directly?
I guess the first, you can map this either by annotations on your entity bean or you can specify them in the xml file orm.xml.Thanks for your reply, i've fixed this but now i want to test a delete query but i keep getting:
23:45:36,203 ERROR [STDERR] java.lang.IllegalStateException: org.hibernate.hql.QueryExecutionRequestException: Not supported for DML operations [delete from project.ws.manageUsers mu where name = 123]
I've tried searching with google but the results were not what i hoped for. I'm guessing my query is wrong but im not sure how to change the query so that i can delete something from my db , what does the error message means "DML operations" ?
code: Query q = entityManager.createQuery("delete from manageUsers mu where name = 123");
Thanks
Maybe you are looking for
-
When my 2011 27" iMac is shutting down and the screen is all black and about 10 seconds from shutting completely off, about 50 white pixels appear on the lower left side of the screen and make a wave pattern for a few seconds. I have a video but am u
-
Passing Parameters to a Report Component
How can I prompt for From and To dates and pass these parameters to a report component to limit the number of detail set records retrieved
-
Importing Complex JavaBean model into WebDynpro
Hi, I am trying to get Data from the EJB, in my Case, Command Bean to WebDynpro. So i followed this thread: <a href="/people/balaramnaidu.bankuru/blog/2006/04/23/importing-complex-javabean-model-into-webdynpro-by-creating-relationships-for-the-model-
-
Unable to go ahead with an approved change request.
Hi experts, Iam facing an issue in Solman Configuration in Charms Scenario.We have created 2 users: Requester & Change Manager.We are able to successfully create the change request. It is also successfully approved by the change manager(
-
Can anyone please tell me how to scan an image as tif form? the only options i see under scan are pdf or jpeg