WebLogic FAQ Turn

Source: Internet
Author: User
Tags parse error tld

Transferred from: http://wenku.baidu.com/link?url=lRRp2-pF2CHoSxff7ynqDKWpk9aJ7sHoOWm78_74_ Msoiqc-qjmn3kaljrqv2wnysktzjpqf951hf0k7kwwzmwaewkglr0sggyslzocdbhg

MYECLIPSE+WEBLOGIC10 configuration, configuration successful

Operation may fail due to weblogic10 instability, after restarting the machine can be used

a problem may occur when Web engineering uses Hibernate3
ClassNotFoundException:org.hibernate.hql.ast.HqlToken
Reference http://blog.chinajavaworld.com/entry.jspa?id=829
Test the local Antlr.jar package to the directory where Weblogic.jar is located, and then run OK after adding this Antlr.jar package in the path option of the MyEclipse configuration server

Additional issues and workarounds that may arise are reproduced below:
1. The configuration file was not found in Jmesa processing, corresponding to the following question 6, I was to use the archive method released after the OK

2.CXF deployment on WebLogic10.3 has been problematic:Org.apache.cxf.js.rhino.DOMPayloadProvider "failed to preload
Workaround is to change the header of the Web. xml file to <web-app xmlns= "HTTP://JAVA.SUN.COM/XML/NS/J2EE" >

3. <%@ taglib prefix="C" uri= "Http://java.sun.com/jstl/core_rt"%> unable to process, the project used in the Jstl.jar package from MyEclipse, find a put into the project Lib library, can solve

4. Avoid duplication in Lib librariesPackage

5.hibernate-validate-4.0.jar's not supported, use the package to use the previous Hibernate-validate.jar package.

Os:windows XP
WEBAPP server:tomat5.5 WebLogic Server 10 (Chinese version)
Ide:bea Workshop for WebLogic platform.


I. IDE CONSIDERATIONS
Create a Dynamic Web project, choose whether to share the Java EE Library, if sharing, you need the domain of the shared library contains the library required for the project, such as Beehive Netui;
Do not share, copy the required libraries to the Web-inf/lib directory and automatically create the relevant configuration file under Web-inf
If the following error occurred while accessing the page:
Index.jsp:2:4: The tag library could not be found using this URI. It may be because the URI is incorrect or an error occurred while parsing the. tld file.
<% @taglib uri= "http://beehive.apache.org/netui/tags-html-1.0" prefix= "Netui"%>
Please delete the redundant configuration file or re-establish a project and select the correct configuration on the second page of the wizard.

Two. WebLogic Basic knowledge
A domain can include multiple servers, an application that relies on a server to configure by deploying-〉 an application-〉 target
Wl_server is the Weblogic default domain, starting with the Start menu-〉bea products->tools->weblogic Server
To create your own domain, you can create a-〉bea products->tools->configuration Wizard from the Start menu.
Login Address: http://localhost:7001/console/login/LoginForm.jsp
Login User password: weblogic/weblogic

1. After the war was deployed, an error occurred during the test:
Error 503--service Unavailable
From RFC 2068 Hypertext Transfer Protocol--http/1.1:
.....
Workaround: After you have just activated the change, test it, and then you need to launch the application with the status "active" and then test again.

2. Error Connecting Pool test:
warning! Connectivity to backend database is not verified. This is either because required connection pool attribute "Testconnectionsonreserve" have not been enabled, or an invalid V Alue have been specified for attribute "Testtablename". Please check the server log for more details:
Configure the connection buffer pool and select test connection on hold in advanced. You need to activate the changes before you test. Otherwise the error will be added.

3.JDBC Jndi Error:
Javax.naming.NameNotFoundException:Unable to resolve ' jdbc_fbysss. Resolved "; Remaining name ' Jdbc_fbysss '
First, in the console click on the left side of the control bar service-&GT;JDBC Create a new data source, the data source name does not matter, Jndi name must be noted, such as named Jdbc_fbysss, and the JDBC source must rely on a server. Otherwise, it cannot be started.
For spring projects, modify the Applicationcontext.xml datasource, (Tomcat's connection pool is not needed here).
<!--data source buffer pool-<bean id= "DataSource" class= "Org.springframework.jndi.JndiObjectFactoryBean" >
<property name= "Jndiname" value= "Jdbc_fbysss"/><!--both are the same--
<property name= "Resourceref" >
<value>false</value>
</property>
</bean>

4.xml Checksum Error
(1) Hbm.xml
Org.dom4j.DocumentException:unknown Protocol:platform. Nested Exception:unknown Protocol:platform
This check is workshop when exporting, the Hbm.xml file generates an error. Just change it.
(2) Struts-config.xml
An exception occurred during the formal deployment:
ERROR Digester []: Parse Error at line 2 column
15:document root element "Struts-config", must match DOCTYPE root "null".
Org.xml.sax.SAXParseException:Document root element "Struts-config", must match
DOCTYPE root "null".
Need to add <! to the second row in Struts-config.xml DOCTYPE struts-config Public "-//apache software foundation//dtd struts Configuration 1.2//en" "http://s Truts.apache.org/dtds/struts-config_1_2.dtd ">

5.SERVLETAPI Implementation inconsistencies
Found a strange phenomenon in Tomcat, a subclass of a servlet that automatically executes the Init method of the parent class without declaring the Init method, and WebLogic does not.
The solution is to explicitly declare init,super.init ();

6. Inexplicable NULL pointer error
Complete error message:
Java.io.filenotfoundexception:f:\bea\wlserver_10.0\samples\domains\workshop\servers\cgserver\tmp\_wl_user\prj_ Fbysss\mlh5uz\war (Access denied. )
At Java.io.FileInputStream.open (Ljava.lang.String;) V (Native Method)
At Java.io.fileinputstream.<init> (fileinputstream.java:106)
At Workshop.util.filesystem.file.WlFileSystem.getInputStream (wlfilesyste
m.java:148)
At Workshop.util.filesystem.FS.getInputStream (fs.java:262)
At Javelin.jsp.JspParser.readStaticInclude (jspparser.java:3261)
At Javelin.jsp.JspParser.parseStaticInclude (jspparser.java:3198)
At Javelin.jsp.JspParser.processImplicitIncludes (jspparser.java:3289)
At Javelin.jsp.JspParser.jspParse (jspparser.java:703)
At Javelin.jsp.jspparser._parse (jspparser.java:504)
At Javelin.jsp.JspParser.parse (jspparser.java:497)
At Javelin.jsp.JspAnalyzer.parseFile (jspanalyzer.java:113)
At Javelin.jsp.JspAnalyzer.parse (jspanalyzer.java:101)
at Javelin. Proxysourcefile.parse (proxysourcefile.java:117)
at Javelin. Sourcefile.getast (sourcefile.java:542)
at Javelin. Sourcefile.getast (sourcefile.java:516)
at Javelin. Proxysourcefile.codegen (proxysourcefile.java:215)
at Javelin. Sourcefile.codegen (sourcefile.java:310)
At Javelin.client.clientutilsimpl$codegenjob.run (clientutilsimpl.java:11
05)
At Javelin.client.Job.performJob (job.java:81)
At Javelin.client.threadpool$workerthread.run (threadpool.java:215)
<2008-8-23 07:15 P.M. 11 sec cst> <Error> <HTTP> <BEA-101017> <[weblogic.servlet.
[Email protected]-APPNAME:PRJ_FBYSSS, Name: ' Prj_fbysss ', Context-path: '/prj_fbysss] Root cause of servletexception.
Java.lang.NullPointerException
At Javelin.jsp.JspAnalyzer.parse (jspanalyzer.java:104)
at Javelin. Proxysourcefile.parse (proxysourcefile.java:117)
at Javelin. Sourcefile.getast (sourcefile.java:542)
at Javelin. Sourcefile.getast (sourcefile.java:516)
at Javelin. Proxysourcefile.codegen (proxysourcefile.java:215)
truncated. See log file for complete StackTrace
>

Finally found is the Web. Xml <include-coda/> a wrong, remove it, very strange.
<taglib>
<taglib-uri>http://www.sss.com/select</taglib-uri>
<taglib-location>/WEB-INF/tlds/select.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://www.sss.com/tree</taglib-uri>
<taglib-location>/WEB-INF/tlds/tree.tld</taglib-location>
</taglib>
<!--Web project configuration--
<jsp-property-group>
<description>
Web project configuration
</description>
<display-name>JSPConfiguration</display-name>
<url-pattern>*.jsp</url-pattern>
<el-ignored>false</el-ignored>
<page-encoding>gbk</page-encoding>
<scripting-invalid>false</scripting-invalid>
<!--this sentence actually caused webloic Error!!!! Include-coda/-->
</jsp-property-group>
</jsp-config>

7. Class Conflict issues

(1) Jstl Parse failed
The Index.jsp:1:1:validator class "Org.apache.taglibs.standard.tlv.JstlCoreTLV" failed with the following exception: "Java.lang.ClassCastException: Weblogic.xml.jaxp.RegistrySAXParserFactory ".
<% @page contenttype= "TEXT/HTML;CHARSET=GBK" language= "java"%>
Project Properties-〉 the settings in the project facet are recorded in the. setting/org.eclipse.wst.common.project.facet.core.xml file.
The last is to set the prefer-web-inf-classes to False.

(2) HQL Statement Execution failed
Org.springframework.orm.hibernate3.HibernateQueryException:ClassNotFoundException: Org.hibernate.hql.ast.HqlToken
This condition is a package version conflict and must be set to True for Prefer-web-inf-classes.
In this way, some packages need to be true, some need false, how to do? WebLogic is disgusting indeed. JSTL package has been put WebApp under, set prefer-web-inf-classes set to Ture not yet, had to take the following slightly troublesome method:
In the Workshop development environment, the server directory that is started is
F:\bea\wlserver_10.0\samples\domains\workshop\bin
Modifying the startup script Startweblogic.cmd
Locate the set classpath=%save_classpath%, and add the following
@REM SSS added
Set Pre_classpath=%wl_home%\server\lib\antlr-2.7.6rc1.jar;
Set classpath=%pre_classpath%;%classpath%
Where the Antlr-2.7.6rc1.jar package needs to be copied to F:\bea\wlserver_10.0\server\lib.
When you are officially released, you need to modify the startup script in the corresponding domain directory
Like F:\bea\user_projects\domains\fbysssDomain\bin\startWebLogic.cmd.
8. Deployment issues
The following error occurred during deployment:
<2008-8-23 07:37 P.M. 42 sec cst> <Warning> <Deployer> <BEA-149124> <
Failures were detected while initiating redeploy task for application ' Prj_fbysss '. Error is: '
[deployer:149163] The domain edit lock is owned by another session in Non-exclusi
ve Mode-this deployment operation requires exclusive access to the edit lock a
nd hence cannot proceed. ' >
Workaround: Enter Http://localhost:7001/console, release the configuration, and deploy again.
Note: Update War: You must delete the app and activate the changes before overwriting.
However, the method of obtaining the resource path with the war mode and Tomcat is different, there are notorious getrealpath and other problems, the transplant is difficult, so it is better to use the directory method.
How to do this: first unzip the war, then select the directory deployment in the WebLogic console.

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.