Category Archives: How to Fix

Failed to load resource: net::ERR_ CACHE_ READ_ Failure solution

When using elasticsearch word segmentation plug-in, kibana is used as the client management, and an error kibana did not load properly. Check the server output for more information

Failed to load resource: Net:: err_ CACHE_ READ_ FAILURE。 Cache read failed.

The reason is that I cleared the browser’s cache before and restarted the computer, which resulted in kibana’s failure to read the cache.

Solution: force the browser cache to refresh again.

When OFBiz project starts, caused by: org.codehaus.groovy . control.MultipleCompilationErrorsException : startup failed:

Error in console:

Caused by: org.ofbiz.base . util.GeneralException : Error loading Groovy script at [ component://zxdoc/webapp/zxdoc/WEB-INF/actions/index/PrepareBrowserInfo.groovy ]:  (startup failed:
component://zxdoc/webapp/zxdoc/WEB-INF/actions/index/PrepareBrowserInfo.groovy : 4: A transform used a generics containing ClassNode org.ofbiz.service . engine.GroovyBaseScript for the super class PrepareBrowserInfo directly. You are not supposed to do this. Please create a new ClassNode referring to the old ClassNode and use the new ClassNode instead of the old one. Otherwise the compiler will create wrong descriptors and a potential NullPointerException in TypeResolver in the OpenJDK. If this is not your own doing, please report this bug to the writer of the transform.

Translation: convert to include classnode org.ofbiz.service Generics of. Engine. Write groovybasescript directly for the superclass preparebrowserinfo. You shouldn’t do that. Create a new class node that references the old class node and use the new class node instead of the old class node. Otherwise, the compiler will create incorrect descriptors and potential nullpointerexceptions in openjdk’s typeresolver. If you did not do this yourself, report this error to the author of the transformation.
 @ line 4, column 1.
   UserAgent ua = UserAgent.parseUserAgentString ( request.getHeader (“User-Agent”));

Problems error:

Description    Resource    Path    Location    Type
Multiple Groovy compilers found on classpath. Continuing with compilation will produce unpredictible results. Remove a compiler before continuing.
Found 2.2 and 2.5    ofbiz-release14.12        ofbiz-release14.12    Groovy compiler mismatch problem

 

Solution of server not running yetexception in HBase

I encountered a server not running yetexception error while working today. The symptom is that it is normal to enter HBase shell, but this error will be thrown when executing any instruction.

There is no error message when checking the log. At first I thought there was HBase process not up, but the JPS command showed that all started.

It’s a little tricky.. Because the test server was restarted a few days ago, and then I did some other work on it. So it is suspected that the problem is port occupancy.. However.. Neither..

I had no choice, so I moved out the ultimate solution: reloading Hadoop and HBase. After the official configuration is completed. HBase is miraculously good..

I once suspected that it was my configuration.. However.. Neither..

Finally found a solution on the Internet, because Hadoop is in a safe mode. So HBase operation will be abnormal. I’m not sure how it works. The solution is to manually exit safe mode

./hadoop dfsadmin -safemode leave 

Then restart HBase and solve the problem

org.springframework.orm . hibernate3. Hibernatequeryexception: XXX is not mapped solution

There are several reasons as follows:
1

1. The HBM file association in spring is not configured well.

2. The fields in the HBM file are missing.

Solution:

1. Add fully qualified domain name when writing HQL (not recommended)

2. Configure HBM Association in spring (20 has been like this for several times)
in this paper, we introduce a new method to configure HBM Association in spring

When Tomcat starts: IOException while loading persistent sessions: java.io.EOFException Solutions for

This is due to the fact that when Tomcat was shut down abnormally last time, some active sessions were persisted (as some temporary files). When it was restarted, Tomcat tried to recover the persistent data of these sessions, but failed to read them. This exception does not affect the use of the system.

Solution: all the files in Catalina directory can be deleted.
all the files in Catalina directory can be deleted

Solution to report undefined a error when using jquery

When the project uses easyUI, the foreground reports an error, type error: A is undefined. I see that the error location is actually the source code of JQ… It’s impossible. I searched a lot of information on the Internet, but I didn’t solve the problem. After nearly a month’s thinking, I seem to have found the cause of this problem. It may not be right. It only represents personal profile. If there is a positive solution, please let me know. Thank you.

The error screenshot is as follows:

The reasons are as follows: I have such a piece of code in JS:

 $('#cargo_info').datagrid().datagrid('getPager');

Note that this code is not put in any function, nor is it wrapped with $(function () {}). Just this sentence is put directly in JS code. This is all the cases that report this error in my project. My preliminary analysis is because JS thinks that there is no method to call this sentence, so it reports an error.

Solution: wrap the isolated statements in JS with $(function () {}), or write them in a function,

<pre name="code" class="javascript">$(function(){
    $('#cargo_info').datagrid().datagrid('getPager');
})


Like this, you can’t make a mistake at the front desk

Solution of toast not displaying in Android

Today, in the test, toast could not be displayed. I analyzed several possibilities

1. There is a problem with the context. The corresponding context may be incorrect

2. The value of message is null

But I checked it several times and there was no problem…. Looking up information on the Internet, I said that I couldn’t update UI in sub thread, but I didn’t open thread… After a night of silence. I found the problem. After using toast, I didn’t call the show method… That’s why I don’t show it. It’s too sloppy…

Solution to the problem of multiple parameters when using pipeline under Linux

When doing the project today, we encountered a problem, that is, how to use the pipeline under the Linux command. We will certainly use the simple pipeline, just like this form

<span style="font-size:18px;">ls -a | grep *test</span>

Today’s problem is a bit complicated. It is to scan the system log in real time, from the last line after scanning to the end of the file, and match keywords. If they match, an alarm will be given. I use awk with grep command to achieve

Awk command is used to select log segment output as the input of grep command

awk 'NR>= beginLineNum&& NR<endLineNum logFileName  | grep -nE  pattern ;

But how to get the total row number of the current log becomes a problem. The command to get the total row number is

wc -l logFileName

But the result after WC is to be placed in the position of Ender linenum, which can not be realized by | method. After query, it is found that it can be realized by using the ‘` symbol (` symbol is the key under the ESC key on the keyboard)

So the way to do it is

awk 'NR>= beginLineNum&& NR<`wc -l logfileName` logFileName  | grep -nE  pattern ;

When executing commands in Linux, the commands in ‘will be executed first, and then other commands will be executed

“As standard input, the return value of the command inside is input into the command outside.

When MyEclipse starts tomcat, the console doesn’t jump out

Today, I encountered a problem. Originally, when I started Tomcat through MyEclipse, the tab would automatically jump to the console to display some startup logs, but I couldn’t jump today, as shown in the figure below

The reason is due to the problem of setting, there are two solutions

1、

As shown in the figure above, click on the chart as shown in my picture.

2. Click windows – & gt; preferences – & gt; run/debug – & gt; console

Check the two show’s beginning, and it’s OK.

Just choose one of the two methods above. After setting, you can see that when we start tomcat, the next tab will automatically jump to console

An unable to locate appropriate constructor on class solution appears

Today, when using hibernate operation, the query operation also made this error. I couldn’t figure out the solution. Finally, I found the ending method on the Internet, which should not be regarded as the method. That’s the reason.

First, I use the following HQL statement

String hql="select new PO(。。。。) from 。。。";

This error is largely due to the time format. The reasons are as follows

1. In Oracle, what is the return time of using hibernate query java.util.Date Yes.

2. When using struts1, the time plug-ins in the foreground must be string in the form, otherwise an error will be reported.

3. Use BeanUtils.copyProperties Method, the string time in form can only be converted to java.sql.Date Type.

4. Due to the reason of 3, the time type of Po entity class should be java.sql.Date Type.

5. Oracle return java.util.Date , Po is java.sql.Date So the problem arises.

The current solution is to transform in the construction method, and another method is to implement string to java.util.Date But what I’m doing now is an old project. There was a lot of code before, and it would be troublesome if I made a mistake. So it’s relatively safe to use the construction method to convert.

We have to make complaints about the problems in our project, which are basically caused by the time type related to the database, and the conflict of jar packages in the project.

The solution of Hibernate query returning all null lists

Today, when I was working on a project, I used HQL to look up the database, but all the returned results were null. Note that the returned list is not null, but there are values in the list. The size of the list is the total number of records, but when I traverse the list output, all the elements in the list are null. I suspect that there is something wrong with my conditions. I have removed all the conditions, leaving only one sentence:

String hql = "from CarMaintain t";

It’s worth the rest of the sentence, but it’s still the result. I searched the information on the Internet, and all of them were wrong answers. Without exception, I said it was impossible… Then how did I meet… Others are unreliable, so we have to find our own problems.

I began to analyze, why only this sentence has this situation, and other sentences are OK?I found that the table in question has no primary key. Yes, that’s the reason. When there is no primary key, hibernate’s reverse engineering will automatically construct a composite primary key for us, so I started to check hbm.xml The file and configuration are correct. What’s the problem?I collapsed all afternoon for it. The reason is due to the internal mechanism of hibernate,

In my table without primary key, the fields in the composite primary key constructed by hibernate have null values, so no matter how you look it up, it is null in the end. When you break the point, you will see [null, null, null,….]

resolvent:

1. Create a new field, use it as the primary key, and hbm.xml The file is modified correctly

2. All fields contained in the composite primary key cannot be null in the database

It took a long time to solve this problem. I hope I can help you.