Use the command:
sudo apt-get cleanThen
sudo apt-get updatesudo apt-get cleansudo apt-get updatejava.sql.SQLException: ORA-02291: integrity constraint (BOOKER.FK_ANDON_EVENT_STATUS) violated – parent key not found
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:743)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:955)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1168)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3316)
from: http://www.dba-oracle.com/t_ora_02291_integrity_constraint_string_string_violated_parent_key_not_found.htm
The Oracle docs note this on the ora-02291 error:
ORA-02291: integrity constraint (string.string) violated – parent key not found
For an insert statement, this ORA-02291 error is common when you are trying to insert a child without a matching parent, as defined by a foreign key constraint. In that case, you need to add the parent row to the table and then re-insert your child table row.
See the dba_constraints view to find the parent table.
To fully understand [primary and foreign key constraints, see the book Easy Oracle Jumpstart, to explain these concepts:
Entity integrity error
Your foreign key FK_ANDON_EVENT_STATUS will be wrong if there is no data in the column of the corresponding parent table, you should insert the parent table first, then insert the child table
Table a has a foreign key, pointing to table b, then b is the parent table of a, the foreign key refers to the column is the parent key
Today the toolbox reported the following error.
ORA-08103: object no longer exists
After checking the reason, there is a session operating the table, such as insert, update, etc.. And the toolbox operation happens to be in the select table, so the error is reported.

————————————————————————————
ORA-08103: object no longer exists error.
The later description is that one of the processes is performing truncate and insert actions sequentially while another process is doing a select action on the
The latter description is that one of the processes performs truncate and insert actions sequentially, while another process does select on the same table, resulting in ora-8103
metalink information:
fact: Oracle Server – Enterprise Edition 8
symptom: Error performing a SELECT statement
symptom: ORA-08103: object no longer exists
symptom: Table is being truncated by other session
symptom: Analyze table validate structure cascade returns no errors
cause: This ORA-08103 occurs on the next block read after the truncate
command.
The LOCK TABLE IN EXCLUSIVE MODE does not prevent the table from being
SELECTED from. Thus, when the query has started and while this query runs
and the truncate occurs, this ORA-08103 may surface on the next block read.
This is considered intended behavior.
When a TRUNCATE occurs the DATAOBJ# in OBJ$ gets increased by one and thus
may lead to this ORA-08103 ‘object no longer exists’
fix:
Possible solutions are:
– Use DELETE instead of TRUNCATE
– Use SELECT FOR UPDATE as this will try to lock the table
Also ora-08103 has other explanations:
Solution: ‘ORA-8103: Object no longer exists’ When Insert Into External Table after Truncate With Storage Performed
Applies to:
Oracle Server – Enterprise Edition – Version: 10.2.0.1 to 10.2.0.3
This problem can occur on any platform.
Symptoms
The following error can occur on an insert with SQL Loader into an external organized table after a truncate with storage option has been performed
ORA-08103: object no longer exists
SQL> insert
/*+ PARALLEL(a, 8)*/
into iad_o_ast_new a
select /*+ full(b) parallel(b,8)*/
* from iad_o_ast_ext b
where rownum<10000 ;
into iad_o_ast_new a
*
ERROR at line 3:
ORA-08103: object no longer exists
.
Changes
The table was truncated with storage option before the insert .
Cause
The bitmap information is not correct after truncating with the storage option. The solutions update the bitmap information in the tablespace.
Solution
There are two known solutions at this time.
1. Add another datafile to increase the size of the tablespace for the insert. You will need to still use the correct truncate option next time you truncate the table.
2. Drop the table and recreate it. You will need to still use the correct truncate option next time you truncate the table.
Do not truncate the table with the storage option.
Do not truncate the base table using:
truncate ;
truncate drop storage;
Use the following instead:
truncate reuse storage;
In the chapter “decision tree” of “machine learning in action”, the error typeerror: write() argument must be STR, not bytes is first prompted in the stored procedure of learning decision tree. The error message is that the parameter of write() function must be STR, not byte. I don’t understand. Look at the source code. There is an error. There is an error in compiling the sentence pickle. Dump (inputtree, FW). Let’s first look at the usage of pickle. Dump()

From the penultimate sentence, we can see that our problem lies in the variable FW, that is, the statement FW = open (file name, ‘W’). That is to say, the type of the variable FW should be bytes, so you can change ‘W’ to ‘WB’ and compile it successfully after modification. The same principle prompts Unicode decodeerror: ‘GBK’ codec can’t decode byte 0x80 in position 0: illegal multibyte sequence error, because the previously saved TXT file is written in binary, so binary should also be used when reading, Fr = open (filename) in the read file should be changed to fr = open (filename, ‘RB’). OK, problem solved! Under the test:


success!
Problem Description:
Previously, Ubuntu needed to be updated, but it was considered to be interrupted in the middle of the update, or it was easy to open and crash later, which was described in the title
When Ubuntu starts, not syncing: VFS: unable to mount root appears
The solution is as follows:
1. After boot, do not directly enter the boot option of Ubuntu, select advanced mode,
2. Then select recovery mode,
3. Select resume resume normal boot
4. After entering the system, open the terminal and input
sudo apt-get autoremove –purge
After running, update grub
sudo update-grub
Done!
Today I received a mail from the developer that the program occasionally reports an error when calling a function, but most of the time it is normal, the specific error is as follows:
12/8/2010 5:54:34 PM – Checking MERGED DFMS with Servicetag [128QPN1]
12/8/2010 5:54:34 PM – Creating Dataset
12/8/2010 5:54:34 PM – Initializing WebReference
12/8/2010 5:54:34 PM – Web reference creted, calling GetSn option
12/8/2010 5:54:34 PM – WS returned: ORA-24338: statement handle not executed
12/8/2010 5:54:34 PM – Try to fill out the datagrid with the first table
12/8/2010 5:54:34 PM – Exception Caught:System.NullReferenceException: Object reference not set to an instance of an object.
at TEST_DFMS.Form1.button4_Click(Object sender, EventArgs e)ORA-24338 statement handle not executed
Cursor not executed
Cause: A fetch or describe was attempted before executing a statement handle.
Fetching from above without executing a cursorAction: Execute a statement and then fetch or describe the data.
Do a good job of exception control, if the analysis or execution of the error to do a good job of exception control, php, jsp pages are easier to handle when the error.
The web project reports an error when executing the query:
Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:27:26,672 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:27:26,672 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:27:26,672 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:27:26,672 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:27:26,672 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:27:26,673 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:27:26,673 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:27:26,673 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:27:26,673 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:27:26,673 ERROR [STDERR] at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:27:26,673 ERROR [STDERR] at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:27:26,673 ERROR [STDERR] at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:27:26,673 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:27:26,673 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:27:26,673 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:27:26,673 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
19:27:26,673 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:27:26,673 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:27:26,673 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:27:26,673 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:27:26,673 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:27:26,673 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:27:26,673 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,673 ERROR [STDERR] at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:27:26,673 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,673 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,673 ERROR [STDERR] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:27:26,674 ERROR [STDERR] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,674 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:27:26,674 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:27:26,674 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:27:26,674 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:27:26,674 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:27:26,674 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:27:26,674 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:27:26,674 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:27:26,674 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
19:27:26,674 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:27:26,674 ERROR [STDERR] at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:27:26,674 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:27:26,674 ERROR [STDERR] at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:27:26,674 ERROR [STDERR] at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:27:26,675 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:27:26,675 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:27:26,675 ERROR [STDERR] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2271)
19:27:26,675 ERROR [STDERR] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:27:26,675 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:27:26,675 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:27:26,675 ERROR [STDERR] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:27:26,675 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:27:26,675 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:27:26,675 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:27:26,675 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:27:26,675 ERROR [STDERR] ... 47 more
19:27:26,675 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:27:26,675 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:27:26,675 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:27:26,675 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:27:26,675 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:27:26,675 ERROR [STDERR] ... 66 more
19:28:29,599 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:29,600 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:28:29,600 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:29,600 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:29,600 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:28:29,600 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:28:29,600 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:28:29,600 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:28:29,600 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:28:29,601 ERROR [STDERR] at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:28:29,601 ERROR [STDERR] at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:28:29,601 ERROR [STDERR] at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:28:29,601 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:28:29,601 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:28:29,601 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:28:29,601 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
19:28:29,601 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:28:29,601 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:28:29,601 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:28:29,601 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:28:29,601 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:28:29,601 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:28:29,601 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,601 ERROR [STDERR] at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:28:29,601 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,601 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,601 ERROR [STDERR] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:28:29,601 ERROR [STDERR] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,602 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:28:29,602 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:28:29,602 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:28:29,602 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:28:29,602 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:28:29,602 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:28:29,602 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:28:29,602 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:28:29,602 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
19:28:29,602 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:29,602 ERROR [STDERR] at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:28:29,602 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:28:29,602 ERROR [STDERR] at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:28:29,602 ERROR [STDERR] at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:28:29,603 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:28:29,603 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:28:29,603 ERROR [STDERR] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2271)
19:28:29,603 ERROR [STDERR] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:28:29,603 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:28:29,603 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:28:29,603 ERROR [STDERR] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:28:29,603 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:28:29,603 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:28:29,603 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:28:29,603 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:28:29,603 ERROR [STDERR] ... 47 more
19:28:29,604 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:28:29,604 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:28:29,604 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:28:29,604 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:28:29,604 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:28:29,604 ERROR [STDERR] ... 66 more
19:28:46,580 ERROR [STDERR] org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Connections could not be acquired from the underlying database!; nested exception is java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:46,580 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:83)
19:28:46,580 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:46,580 ERROR [STDERR] at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:80)
19:28:46,580 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertJdbcAccessException(HibernateAccessor.java:424)
19:28:46,581 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:410)
19:28:46,581 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
19:28:46,581 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374)
19:28:46,581 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:912)
19:28:46,581 ERROR [STDERR] at com.springtest.common.dao.GenericHibernateDao.find(GenericHibernateDao.java:224)
19:28:46,581 ERROR [STDERR] at com.springtest.system.service.LoginService.findTBaseUser(LoginService.java:25)
19:28:46,581 ERROR [STDERR] at com.springtest.system.action.LoginAction.login(LoginAction.java:39)
19:28:46,581 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:28:46,581 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
19:28:46,581 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
19:28:46,581 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
19:28:46,581 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)
19:28:46,581 ERROR [STDERR] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:745)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:686)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:925)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:856)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:936)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:838)
19:28:46,581 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
19:28:46,581 ERROR [STDERR] at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:812)
19:28:46,581 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
19:28:46,581 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
19:28:46,581 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,581 ERROR [STDERR] at com.springtest.common.filter.LoginFilter.doFilter(LoginFilter.java:48)
19:28:46,581 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,581 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,581 ERROR [STDERR] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
19:28:46,581 ERROR [STDERR] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,582 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
19:28:46,582 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
19:28:46,582 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
19:28:46,583 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
19:28:46,583 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
19:28:46,583 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
19:28:46,583 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
19:28:46,583 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
19:28:46,583 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
19:28:46,583 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
19:28:46,583 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
19:28:46,583 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
19:28:46,583 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
19:28:46,583 ERROR [STDERR] Caused by: java.sql.SQLException: Connections could not be acquired from the underlying database!
19:28:46,583 ERROR [STDERR] at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
19:28:46,583 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:529)
19:28:46,586 ERROR [STDERR] at com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128)
19:28:46,586 ERROR [STDERR] at org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider.getConnection(LocalDataSourceConnectionProvider.java:83)
19:28:46,586 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)
19:28:46,586 ERROR [STDERR] at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)
19:28:46,586 ERROR [STDERR] at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:161)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1700)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.doQuery(Loader.java:801)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.doList(Loader.java:2542)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.Loader.list(Loader.java:2271)
19:28:46,586 ERROR [STDERR] at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:459)
19:28:46,586 ERROR [STDERR] at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:365)
19:28:46,586 ERROR [STDERR] at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:196)
19:28:46,586 ERROR [STDERR] at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1268)
19:28:46,586 ERROR [STDERR] at org.hibernate.impl.QueryImpl.list(QueryImpl.java:102)
19:28:46,588 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:921)
19:28:46,588 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:912)
19:28:46,588 ERROR [STDERR] at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:406)
19:28:46,588 ERROR [STDERR] ... 47 more
19:28:46,588 ERROR [STDERR] Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source.
19:28:46,588 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
19:28:46,588 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
19:28:46,588 ERROR [STDERR] at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
19:28:46,588 ERROR [STDERR] at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525)
19:28:46,588 ERROR [STDERR] ... 66 more
Oracle service has been started, but an error was reported when executing the query statement. I failed to connect to the database with PLSQL tool, indicating that I did not listen. I remember that I shut down some services that you don’t often use this morning, and the PLSQL connection is normal after startup.
Baidu found that the following error information needs to be checked:
1. Wrong startup configuration: db.driverclass = oracle.jdbc.driver.oracledriver
2. Wrong database connection address: db.url = JDBC: Oracle: thin: @ 127.0.0.1:1521: orcl
3. Wrong account or password: db.user = spring
db.password = springpwd
4. No right to restrict access if the database is not started Ask. The database service or listening service is not started
5. The project does not introduce the corresponding driver jar package.
6. MySQL root does not have remote access permissions, so it needs to increase permissions.
For example, write const NSString* firstString = @"xxx";
NSString* secondString = @"yyyy";
[secondString isEqualToString:firstString];
There is a warning about sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers.
Workaround.
Change const NSString* firstString = @"xxx";
to NSString* const firstString = @"xxx";
Explanation: The former is equivalent to the pointer itself is not modifiable, the latter indicates that the content pointed to by the pointer is not modifiable, both serve to make firstString readable and unwritable only.
For example, I wrote
const NSString* firstString = @”xxx”;
NSString* secondString = @”yyy”;
[secondString isEqualToString:firstString];
The sending ‘const nsstring *’ to parameter of type ‘nsstring *’ discards qualifiers warning appears.
Solution:
Set const nsstring * firststring = @ “XXX”;
Change to nsstring * const firststring = @ “XXX”;
Explanation: the former means that the pointer itself is not modifiable, while the latter means that the content pointed to by the pointer is not modifiable. Both functions are to make the firststring only readable and not writable.
Android error: java.lang.illegalstateexception: not allowed to start service intent
Error resolution 12
Today’s test threw me a crash message:
Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=xxx }: app is in background uid UidRecord{xxx u0a136 CEM idle procs:1 seq(0,0,0)}
Can it be hard for me
once you see it, you can see that it’s a background service startup error. Just put the service in the foreground, easy
In fact, Google took a look
https://stackoverflow.com/questions/46445265/android-8-0-java-lang-illegalstateexception-not-allowed-to-start-service-inten
The problem is that Android 8.0 does not allow the creation of background services.
Solution:
Method 1:
The simplest way is to directly open the front desk service
set the service to the front desk in oncreate of your service class
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
startForeground(1, new Notification());
}
Of course, this method will show what is running on the status bar of Android 5.0 and 6.0 phones please refer to the following method
Method 2:
The method from here

first modify the service configuration in your manifest file
<service android:name=".YourService"
android:permission="android.permission.BIND_JOB_SERVICE"/>
Then change the modification inheritance of your service class to extensions jobintentservice
and add the following code
public static final int JOB_ID = 1;
public static void enqueueWork(Context context, Intent work) {
enqueueWork(context, YourService.class, JOB_ID, work);
}
@Override
protected void onHandleWork(@NonNull Intent intent) {
// your code
}
The startup service is modified as follows.
YourService.enqueueWork(context, new Intent());
However, I tested that the content in onstartcommand() does not execute. No reason has been found
I hope you can help me with the analysis.
It’s over
<service android:name=".RecentTaskService"
android:permission="xxx.xxx.xxx"
android:exported="true">
<intent-filter>
<action android:name="xxx.xxx.xxx" />
</intent-filter>
</service>
The bound service needs to set the attribute exported = true in the node;
If permission is set for the bound service, you need to declare permission when binding the service
<permission android:name="xxx.xxx.xxx" /> <uses-permission android:name="xxx.xxx.xxx" />
Solution:
sudo apt-get install libmysqlclient-dev
Then goto the path of mysql_config (/usr/bin/mysql_config)
sudo updatedblocate mysql_config
Then reinstall, it’s ok~