Struts + hibernate project debug Summary

Source: Internet
Author: User
Tags sql error tld
Struts + hibernate project debug Summary

Javax. servlet. servletexception: cannot retrieve mapping for action/companynews

No action related to companynews is written in the struts-config.xml.

========================================================== ====
When adding a jar package in myeclipse, open the project properties and select Java build path --> libraries --> Add external jars to select the required jar package. After adding the jar package, you will find that, this package is loaded with an absolute path, and our project needs to be shared by CVS.

Commit to the CVS server. The following message is displayed for myeclipse:
2 build path entries are missing.

The solution is to close myeclipse, use NotePad to open. classpath under the project directory, manually change it to a relative path, and check whether the specified relative path actually contains the jar package,
Start myeclipse to upload the newly added jar package.

========================================================== =====
When JUnit/strutstest is used, the following error occurs:
Java. Lang. unsupportedclassversionerror: JUnit/framework/testlistener (unsupported Major. Minor version 49.0)

The reason is that if jdk1.4 is used, only versions earlier than junit3.8 can be used. If jdk1.5 is used, junit4.0 and later versions must be used.

========================================================== ============================

Cannot find actionmappings or actionformbeans collection
The reason is that there is no information about configuring the struts-config.xml in the web. xml file.

========================================================== ================================

Org. Apache. Jasper. jasperexception: the absolute URI: http://java.sun.com/jstl/core cannot be resolved in either web. xml or the jar files deployed with this application

Jar and web. xml configurations related to jstl are missing
Jstl. Jar
<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/fmt </taglib-Uri>
<Taglib-location>/WEB-INF/FMT. TLD </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/fmt-rt </taglib-Uri>
<Taglib-location>/WEB-INF/fmt-rt.tld </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/core </taglib-Uri>
<Taglib-location>/WEB-INF/C. TLD </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/core-rt </taglib-Uri>
<Taglib-location>/WEB-INF/c-rt.tld </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/ SQL </taglib-Uri>
<Taglib-location>/WEB-INF/SQL. TLD </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/sql-rt </taglib-Uri>
<Taglib-location>/WEB-INF/sql-rt.tld </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/x </taglib-Uri>
<Taglib-location>/WEB-INF/X. TLD </taglib-location>
</Taglib>

<Taglib>
<Taglib-Uri> http://java.sun.com/jstl/x-rt </taglib-Uri>
<Taglib-location>/WEB-INF/x-rt.tld </taglib-location>
</Taglib>

========================================================== ============================

Failed to load or instantiate taglibraryvalidator class: org. Apache. taglibs. Standard. TLV. jstlcoretlv

Standard. jar is not in lib

========================================================== ==============================

The role and comment keywords are used when creating an oracle table. We recommend that you do not use these two keywords as the table name and field name.
We recommend that you use toad or PLSQL developer to create a table, so that the software prompts a keyword.
========================================================== ==================================

[Error] xmlhelper-error parsing XML: XML inputstream (18) attribute name "column" associated with an element type "key" must be followed by the '= 'character.
[Error] configuration-cocould not configure datastore from input stream <org. dom4j. Condition entexception: Error on line 18 of document: attribute name "column" associated with an element type "key"

Must be followed by the '= 'character. nested exception: attribute name "column" associated with an element type "key" must be followed by the '= 'character.> org. dom4j. documentexception: Error

On line 18 of document: attribute name "column" associated with an element type "key" must be followed by the '= 'character. nested exception: attribute name "column" associated with an element

Type "key" must be followed by the '= 'character.

XML syntax error. The key syntax should be similar to this <key column = "ID">
========================================================== ==================================
Hibernate3, one-to-multiple-party object, must write private set pays = new hashset (); otherwise, the Java. Lang. nullpointerexception is returned,
Private set pays in hibernate2; but no error is reported;

========================================================== ==================================
[Debug] abstractsaveeventlistener-generated identifier: 1, using strategy: org. hibernate. Id. incrementgenerator
Org. hibernate. propertyvalueexception: Not-null property references a null or transient value: COM. XXX. yyy. Company
At org. hibernate. Engine. nullability. checknullability (nullability. Java: 72)

The setting in <similar to one> should be set to not-null = "false" and not-null = "true". The preceding error is reported.
========================================================== ======================================

Org. hibernate. transientobjectexception: Object references an unsaved transient instance-Save the transient instance before flushing: COM. XXX. yyy. Company

You also need to save other tables while saving, and then flush ()
========================================================== ======================================

Parse fatal error at line 12 column 1

The struts-config.xml file is modified with syntax errors. Check the syntax.

==========================================================

Org. hibernate. queryexception: cocould not resolve property: userid of: COM. XXX. yyy. Pay

When using the foreign key userid, you must use the userinfo. userid method.

========================================================== =
Javax. Naming. namenotfoundexception: Name hibernate_connection_factory is not bound in this context
Cause: a configuration error occurs in the hibernate database. Ing. xml file. As a result, hibernate_connection_factory cannot be bound to the database.
For example, the conflicting <property> attribute is still set in sequence-to-one.

========================================================== =

[Warn] requestprocessor-unhandled exception thrown: Class java. Lang. nullpointerexception
You must use the new object.

========================================================== ====
The query of the Group by expression must meet the following requirements:
Each item after the select clause must appear in the group by clause, unless this item uses a clustering function.

========================================================== ===
Org. hibernate. transientobjectexception: Object references an unsaved transient instance-Save the transient instance before flushing: COM. XXX. yyy. Company

To cascade and save, multiple sessions. Save ()
========================================================== ======
Java. Lang. illegalargumentexception: ID to load is required for loading
Cause:

Session. Load (company. Class, payform. getcompanyid ());
The second parameter of the load () method must be searlizable and must be of the same type as the property value of the database ing Class, even if the forced conversion fails.

========================================================== =====
[Info] defaultloadeventlistener-error configurming load command <org. hibernate. objectnotfoundexception: no row with the given identifier exists: [COM. XXX. yyy. company #0]

> Org. hibernate. objectnotfoundexception: no row with the given identifier exists: [COM. XXX. yyy. company #0]

It indicates that the object you are currently querying has a problem with the object associated with, generally because of data problems (the object associated with this object cannot be found), data errors affect normal program execution.

========================================================== ======================
Eclipse 3.1, myeclipse 4 Error
Deployment is out of date due to changes in the underlying project contents. You'll need to mannally 'reploy' the project to update the deployed archive.
Cause
Access denied to a file deployed in Tomcat affects deployment.
After restart, remove the files deployed in Tomcat. Configure and deploy again in eclipse.
Why does it need to be restarted?
Because: the Google Desktop software is indexing a MB large file I deployed and locking this large file, I guess Google Desktop needs to index this file for more than half an hour. Therefore, eclipse cannot delete and redeploy previously deployed files.

========================================================== ==============
Error lazyinitializationexception: 19-cocould not initialize proxy-the owning session was closed
 
Org. hibernate. lazyinitializationexception: cocould not initialize proxy-the owning session was closed
Solution.
Cmpy = (companyedit) ss. Load (companyedit. Class, companyid1 );
Hibernate. initialize (cmpy); // force initialize cmpy. Otherwise, after ss. Close (), cmpy disappears.

========================================================== ================
Javascript Error
Row: 56
Character: 45
Error: unended String constant
Code: 0

Is the encoding problem! It's good to save it with ANSI encoding.

========================================================== ================
[Warn] maid-SQL error: 904, sqlstate: 42000
[Error] jdbcexceptionreporter-ORA-00904: Invalid column name

[Info] defaultloadeventlistener-error configurming load command <org. hibernate. Exception. sqlgrammarexception: cocould not load an entity: [COM. XXX. yyy. sellinfo #1]

> Org. hibernate. Exception. sqlgrammarexception: cocould not load an entity: [COM. XXX. yyy. sellinfo #1]

* ** A column name in the. HBM. xml file is different from that in the database.

========================================================== ====================
Connectionmanager-unclosed connection, forgot to call close () on your session?

Cause: the transaction of the hibernate session is not closed. Or the session is not closed.

========================================================== ====================
[Warn] sellcommentdao-org. hibernate. objectdeletedexception: Deleted Object wocould be re-Saved by cascade (remove deleted object from associations): [COM. XXX. yyy. sellcomment #7]

Cause: When cascade = "Save-Update" is set for the parent object (one Party), an error is returned when the child object is directly deleted,
Processing Method: The save information requires cascade operations. The same principle is also used in delete operations.
Sellcomment = new sellcomment ();
Sellcomment = (sellcomment) Session. Load (sellcomment. Class, sellcommentid); // get the son object
Long sellinfoid = sellcomment. getsellinfo (). getsellid (); // obtain the parent ID
Sellinfo = (sellinfo) Session. Load (sellinfo. Class, sellinfoid); // obtain the parent object
Sellinfo. getsellcomments (). Remove (sellcomment); // disconnect the parent-child relationship
Sellcomment. setsellinfo (null); // cut off the child parent relationship
Session. Delete (sellcomment); // Delete the Son
Session. Flush ();

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.