Total Pageviews
2009/05/27
和四種主管溝通的小秘訣
老虎型主管注重結果導向,他就事論事並且有冒險精神。而且老虎主管通常速度很快,與他溝通要直接說重點。
溝通秘訣2:表達型--孔雀主管
與孔雀主管可以多聊家常事務,先建立個人感情再談公事會更為順利,孔雀主管非常有創意,不喜歡太死板的教條。
溝通秘訣3:親和型--無尾熊主管
無尾熊主管重視團隊的和諧氣氛、不喜歡風險,與無尾熊主管溝通要溫和,並且給他多一點決策時間。
溝通秘訣4:分析型--貓頭鷹主管
貓頭鷹主管重視品質,給他的資料要精確、有邏輯。屬下工作要按照一定步驟,並且要注意細節要正確。
http://www.cw.com.tw/article/index.jsp?id=2910
可惜他沒提到無能型的
2009/04/16
ORA-00932: inconsistent datatypes: expected - got CLOB
ORA-00932: inconsistent datatypes: expected - got CLOB
This error message result from Clob limitation:
- CLOBs don't work like strings. You can't ask for the LENGTH of a CLOB column, for example. You can work around this with PL/SQL calls but it isn't much fun.
- LOBs are not allowed in GROUP BY, ORDER BY, SELECT DISTINCT, aggregates and JOINS
Therefore, I re-designed my database schema. Save this CLOB column into another table.
ORA-01502 Oracle Index in Unusable State
Solution: rebuild this index
ALTER INDEX RESUME_PK REBUILD
After I executed this rebuild action, it turned out to be normal.
Reference
[1] http://www.mydigitallife.info/2006/01/28/ora-01502-oracle-index-in-unusable-state/
2009/04/10
2009/04/09
2009/04/07
PMD
PMD scans Java source code and looks for potential problems like:
- Possible bugs - empty try/catch/finally/switch statements
- Dead code - unused local variables, parameters and private methods
- Suboptimal code - wasteful String/StringBuffer usage
- Overcomplicated expressions - unnecessary if statements, for loops that could be while loops
- Duplicate code - copied/pasted code means copied/pasted bugs
http://pmd.sourceforge.net/
2009/04/06
Utilize Jericho HTML Parser to Resolve NCR Problem
- What is NCR (Numeric Character Reference) ?
- Scenario Description
- Problem (XML with NCR)
- Resolution Process
- Result (NCR had been decoded)
http://www.slideshare.net/junyuo/utilize-jericho-html-parser-to-resolve-ncr-problem
2009/04/02
2009/02/20
Problems running dot: exit code=-1, command='dot'
Problems running dot: exit code=-1, command='dot', arguments='"classcom_1_1htc_1_1hr_1_1tree_1_1_department_table_bean_50f82c9386b01669779a1524b380b355_cgraph.dot" -Tpng -o "classcom_1_1htc_1_1hr_1_1tree_1_1_department_table_bean_50f82c9386b01669779a1524b380b355_cgraph.png"'
I spent lots of time to resolve this odd issue, and found out its result from the wrong GraphViz version. I cannot use the latest version. As I tried graphviz-2.12.exe this version, all problems were gone. You can go to here to download this verion: http://www.graphviz.org/pub/graphviz/stable/windows/
Here is class hierarchy:
Here is call graph:
2009/02/18
Applied Apache Trinidad to show organization chart
Web Container: Glassfish
Demo
1. enter personnel request application form page
2. launch popup window to show the organization chart
3. return the selected department back to original page
sequence diagram
trinidad page -- caller page
trinidad page -- popup window
PersonnelRequestController
DepartmentTableBean
you can also check the developer guide for futher information: http://myfaces.apache.org/trinidad/devguide/tree.html
2009/02/17
java.sql.SQLException: OALL8 is in an inconsistent state
Web Container: glassfish
Database: Oracle 10g
Scenario: As I execute some functions, then it will get this error message
[#|2009-02-03T11:22:52.620+0800|INFO|sun-appserver9.1|javax.enterprise.system.stream.out|_ThreadID=15;_ThreadName=httpSSLWorkerThread-8080-1;|[TopLink Warning]: 2009.02.03 11:22:52.620--UnitOfWork(2726974)--Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b04-fcs (04/11/2008))): oracle.toplink.essentials.exceptions.DatabaseException
Internal Exception: java.sql.SQLException: OALL8 is in an inconsistent state
Error Code: 17447
Call: SELECT ID, JOB_LOC_ENG_DESC, JOB_LOC_INFORM_ENG_DESC, DOMAIN, IS_JOB_LOC, CREATETIMESTAMP, IS_INTERVIEW_LOC, JOB_LOC_NATIVE_DESC, IS_ONBOARD_LOC, JOB_LOC_INFORM_NATIVE_DESC, JOB_LOCATION_CODE, MODIFYTIMESTAMP, MODIFIER, CREATOR FROM RSDB.JOB_LOCATION WHERE (ID = ?)
bind => [22612]
Query: ReadObjectQuery(com.htc.hr.entity.JobLocation)
|#]
Root Cause: I put collection object into hashCode function, it's the root cause to cause this error. Just remove it.
Set up a simple way to backup testing server database
1. write an ant build file to generate dump file and copy to remote machine (on a daily basis)
2. create a batch file to execute my build script
3. add this batch file to scheduler service
4. result
[local machine]
[remote machine]
2009/01/14
NamedQuery of name: jobDutyJobTitle.findByJobDuty not found.
And I called this name query in my DAO class:
But as I ran my web application, it got this kind of error message (no matter the name of query or the sql statement is corrent):
java.lang.IllegalArgumentException: NamedQuery of name: jobDutyJobTitle.findByJobDuty not found. at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getDatabaseQuery(EJBQueryImpl.java:422) at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.setAsSQLReadQuery(EJBQueryImpl.java:136) at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getResultList(EJBQueryImpl.java:464) at com.htc.hr.dao.JobDutyJobTitleDAO.findByJobDuty(JobDutyJobTitleDAO.java:41) at com.htc.hr.controller.JobDutyController.showJobDutyJobTitle(JobDutyController.java:47)
The root cause is: I forgot to add this enity class declaration into persistence.xml
2009/01/06
An Introduction To JBoss RichFaces | Eclipse Zone
If it's your first time to study JBoss RichFaces, here is a good place to start.
2009/01/04
2009/01/01
2008/12/21
2008/12/14
2008/12/13
2008/12/11
Troubleshooting on Tomahawk JSCook Menu
Check Notes and Known issues.
I had faced this issue Place of Menu tag in relation to Forms:
Menus must be placed inside forms starting with Tomahawk 1.1.3.
With regard to how to do configuration in web.xml, please check http://myfaces.apache.org/tomahawk/extensionsFilter.html
2008/12/10
java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered.
1 2 3 4 5 6 7 | java.lang.IllegalStateException: ExtensionsFilter not correctly configured. JSF mapping missing. JSF pages not covered. Please see: http://myfaces.apache.org/tomahawk/extensionsFilter.html at org.apache.myfaces.renderkit.html.util.AddResourceFactory.throwExtensionsFilterMissing(AddResourceFactory.java:389) at org.apache.myfaces.renderkit.html.util.AddResourceFactory.checkEnvironment(AddResourceFactory.java:349) at org.apache.myfaces.renderkit.html.util.AddResourceFactory.getInstance(AddResourceFactory.java:279) at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.addResourcesToHeader(HtmlJSCookMenuRenderer.java:404) at org.apache.myfaces.custom.navmenu.jscookmenu.HtmlJSCookMenuRenderer.encodeBegin(HtmlJSCookMenuRenderer.java:363) at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:788) |
Solution
If you are using servlets 2.4, you cannot do a jsp:forward or request.getDispatcher().forward to any page, because the extensions filter is not executed. Instead you may want to try with a response.sendRedirect(). Therefore, I need to modify
2008/12/05
2008/11/23
Integrate Seam with Apache Trinidad, Facelets and JPA
- Seam
- Seam + JSF
- Seam Annotation in JSF Implementation
- Seam + JPA (No need to change)
- Environment Configuration
- Use Case
- Page Flow
- Class Diagram
- Sequence Diagram
http://www.slideshare.net/junyuo/integrate-seam-with-apache-trinidad-facelets-and-jpa-presentation
2008/11/06
2008/11/05
Re: [jasperreports-questions] IS_IGNORE_PAGINATION parameter
I had faced the same problem regarding exprting report to pdf in browser but bring blank page.
The root cause is the IS_IGNORE_PAGINATION had been set into FALSE, so it cannot diaplay correctly.
2008/10/29
2008/10/28
Highlighting Odd and Even Rows in JasperReports - Brian Burridge
In order to highlight odd or even rows with a background color, in JasperReports, first create a rectangle element with a background of your color choice, and send it to the background (in JasperAssistant, right click on the rectangle, choose Arrange and then Send to Back). Second, use the following expression to set when the element should appear, by placing the expression in the Print When Expression field of the rectangle element. Where the $V{PAGE_COUNT} appears, you can use that, to base it on the row number on the page, or use $V{REPORT_COUNT} to base it on the row within the report. Also, if you are using a group, you can use $V{groupname_COUNT} where groupname is replaced with the name of your group. The expression below will then test the row number within the Page, Report, or Group (whichever you selected) and if its divisible by 2, it will display the rectangle element with the background color.
2008/10/25
CAS (Central Authentication Service) Enhancement
- Why SSO (Single-Sign On)?
- Central Authentication Service (CAS)
- CAS Installation
- As-Is and To-be Process
- Modification Process
http://www.slideshare.net/junyuo/cas-enhancement-presentation
2008/10/21
Facelets with Trinidad - Myfaces Wiki
This article is used to explain how to integrate Facelets with Trinidad.
2008/10/02
CAS Demo Application Installation
including troubleshooting (CAS Demo App. cannot be running correctly)
2008/09/20
Joda Time - Java date and time API - Home
Joda-Time provides a quality replacement for the Java date and time classes. The design allows for multiple calendar systems, while still providing a simple API. The 'default' calendar is the ISO8601 standard which is used by XML. The Gregorian, Julian, Buddhist, Coptic, Ethiopic and Islamic systems are also included, and we welcome further additions. Supporting classes include time zone, duration, format and parsing.
2008/09/19
Spring + JPA + TOPLink + DAO Step by Step
- Spring + JPA + TopLink + DAO Architecture
- Spring/Persistence Config File
- Implement DAO – CRUD
- Implement ServiceBean
- Implement Client Side Code
http://www.slideshare.net/junyuo/spring-toplinkjap-dao-step-by-step-presentation
2008/09/03
Spring + JPA + DAO Step by Step
- Spring + JPA + DAO Architecture
- Spring Config File
- Implement DAO – CRUD
- Implement ServiceBean
- Implement Client Side Code
2008/08/31
Java Persistence API (JPA) Step By Step
- What is Java Persistence API
- Primary Features
- Five Steps to Implement JPA
- Download Hibernate Components
- Prepare Database, and Download JDBC Driver
- Implemented POJO entities and add annotations
- Persistence.xml
- Implemented client side code via EntityManager
http://www.slideshare.net/junyuo/java-persistence-api-jpa-step-by-step-presentation
2008/08/20
2008/06/29
Applied MyEclipse and JUnit to do Hibernate Code Gen and Testing
• Code Gen Process
• Generate DAO for the four tables
• Artifacts
• Spring Configuration File
• Apply JUnit to do DAOs Test
• JUnit Framework
• How to Test with JUnit?
• Simplified Workflow of Applying JUnit
• Testing Process
• Generate Unit Test Result via Ant
http://www.slideshare.net/junyuo/applied-myeclipse-and-junit-to-do-hibernate-code-gen-and-testing/
2008/06/20
Doxygen – Source Code Documentation Generator Tool
- What is Doxygen
- Doxygen Features
- Getting Start
- Check the result
http://www.slideshare.net/junyuo/doxygen-source-code-documentation-generator-tool/
2008/06/15
My First Web Services Example - XFire, Spring, SoapUI
- Setup Web Services Environment
- Setup Web Services IDE Environment
- Install and Validation Process
- Download Extra Jar Files
- Buzzwords
- Web Services Architecture
- Scenario
- Deployment descriptors of the Web application
- Testing Procedure
2008/04/18
2008/04/10
2008/04/03
Subclipse - the Subversion plugin for Eclipse
- What is Subclipse ?
- Subclipse Installation
- Import Source Code From SubVersion
- Troubleshooting
http://junyuo.googlepages.com/Subclipse-TheSubversionPluginForEcli.rar
2008/03/02
2008/02/21
2008/01/23
2007/12/21
Ports and protocol which had been used by Windchill
JavaRMIServlet: 5001~5010
ProjectLink Meeting port: 5620~5660
Therefore, network administrator should open these ports.
2007/12/13
Check Windchill failed queue how-to
1. Go to Site tag and click Utils
2. Go to Queue Manager page
3. Choose failed queue, ex. WfUserWorkQueue
4. pickup one queue entry which had been marked as server, and select 'show' option in dropdown list
5. check error message, ex. wt.workflow.robots.WfInternalMethod:135596
6. used sql statement to figure out which object cause this failed queue.
select t2.businessobjreference, t2.name from WfInternalMethod t1, wfprocess t2 where t1.ida2a2 = 135596 and t1.ida3parentprocessref = t2.ida2a2
7. we can get information from step6.
businessobjreference is VR:wt.doc.WTDocument:136558
name is TPV - Release Workflow_0000000046 - Electronic Component Sample Request Operation Quide A
8. go to search page: apply 0000000046 to number to be our search criteria,
then we can check the related workflow to check what's wrong
2007/12/05
Utilized JAXB to generate POJOs automatically -- Green Integration Part II
Agenda
- Scenario
- JAXB (Java Architecture for XML Binding)
- Implementation steps in Green Integration
- JAXB Usage
- JAXB Limitations
2007/11/28
Follow-up procedure, after installed partslink
1. Make sure web.xml had define ConfigFile location
1 2 3 4 | <context-param> <param-name>ConfigFile</param-name> <param-value>D:/ptc/Windchill/partslink/conf/main.properties</param-value> </context-param> |
3. login to database, execute make_schema_ora.sql script
SQL> @make_schema_ora.sql
4. Load ACL, execute command: windchill wt.load.WindchillLoader -Application=Windchill.PartsLink
Windchill Quick Backup
1. backup applicationa & configuration, i.e. D:\PTC\Windchill8\codebase
2. backup database, i.e. execute command: exp pdm8/pdm8@WINDDEV file=D:\tmp\database\WINDDEV.dmp log=D:\tmp\database\WINDDEV.log
If any problem occurred, just overwrite codebase and do database import to do system recovery
2007/11/26
Windchill Change Password
Many customers will complain about this.
Now, Windchill 8 M040 had provided.
But default, M040 disabled change password function, we need to turn it on.
Process:
1. define in site.xconf
1 2 3 | <property name="wt.org.services.userPasswordChangeEnabled" overridable="true" targetfile="codebase/wt.properties" value="true"> |
2. execute xconfmanager -p in windchill shell
3. restart tomcat, method server. And do not forgot to clean tomcat cache.
2007/11/23
OraDoclet - Database Documentation Generator
The purpose of OraDoclet is generation of the detailed database documentation
resembling the JavaDoc style. It is a custom doclet that functions either with the
JavaDoc tool or as a standalone Java application. The documentation generated
has a form of static html files and describes all objects in the given Oracle
database schema.
http://oradoclet.sourceforge.net/
OraDoclet - Database Documentation Generator
2007/11/22
2007/11/20
Java 2 Software Development Kit (J2SE SDK) - the new jre isn't working
I have instaled the new j2se development kit 5.0 and jre5.0, but my browser cannot open any applet and Sun Java console. The error is ---- " The Java Runtime Environment cannot be loaded from <\bin\server\jvm.dll> ???!!!
Solution
In your "Documents and Settings\username\Application Data" folder you'll probably find a folder named "Sun". Delete that folder (or rename it).
reference: http://forum.java.sun.com/thread.jspa?threadID=567821&forumID=17
2007/10/29
2006/09/27
[JavaScript] How to do trim() in JavaScript
<body onload="test()">
<script>
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
function test() {
var str = " a ";
alert("Original string: '" + str + "'");
str = str.trim();
alert("Incompletely stripped string: '" + str + "'");
}
</script>
reference
http://www.bigbold.com/snippets/posts/show/701
[JavaScript] How to do trim() in JavaScript
<body onload="test()">
<script>
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/, ''); };
function test() {
var str = " a ";
alert("Original string: '" + str + "'");
str = str.trim();
alert("Incompletely stripped string: '" + str + "'");
}
</script>
2006/09/08
[Windchill] How to generate mData
1. open rose
2. Tools --> Windchill --> System Generation
3. Click OK
Troubleshoot
It may show generation refuse error in the progress of system generation
Error: wt.templateutil.processor.DefaultTemplateProcessor is not Extendable, so
Solution
1. Open user.properties (under
2. add one attribute wihch named
After you add them to user.properties, you can see this kind of warning message, it means you had successfully finished system generation.
Warning: wt.templateutil.processor.DefaultTemplateProcessor is not Extendable, but is being allowed as a backward compatible override
2006/08/28
2006/08/27
[Mail] commons-mail 亂碼問題
呼叫setCharset此方法,設定編碼方式為UTF-8
public void setCharset(java.lang.String newCharset)http://jakarta.apache.org/commons/email/api-release/org/apache/commons/mail/Email.html#setCharset(java.lang.String)
[常見問題2]sent出去的mail的中文內文便成亂碼
呼叫setContent此方法,第一個參數給予訊息內容,第二個參數給予conent type,例如text/plain;charset=UTF-8
public void setContent(java.lang.Object aObject,http://jakarta.apache.org/commons/email/api-release/org/apache/commons/mail/Email.html#setContent(java.lang.Object,%20java.lang.String)
java.lang.String aContentType)
[常見問題3]sent出去的附件中文檔名變成亂碼
在EmailAttachment的物件中的setName方法中,使用MimeUtility的encodeText方法
attachment.setName(MimeUtility.encodeText("中文訊息", "UTF-8", null));
http://java.sun.com/products/javamail/javadocs/javax/mail/internet/MimeUtility.html
2006/08/15
2006/08/11
[InfoEngine] Remember to get newOid as you want to update-object
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | <ie:unit> <ie:webject name="CheckOut-Objects" type="ACT"> <ie:param name="INSTANCE" data="windchill"/> <ie:param name="AUTHORIZATION" data="${@server[]authorization[0]}"/> <ie:param name="OBJECT_REF" data="<%=objRef%>"/> <ie:param name="GROUP_OUT" data="checkoutDoc"/> </ie:webject> <% Group checkoutDoc = getGroup("checkoutDoc");; String newOid = (String)checkoutDoc.getAttributeValue(0, "obid"); System.out.println("Checkout Document ends... Update begin, new id"); System.out.println(newOid); %> <ie:failure> <%System.out.println("no document had been CheckOut");%> </ie:failure> <ie:success> <% System.out.println (getGroup("checkoutDoc").getElementCount() + " document(s) had been CheckOut"); %> </ie:success> </ie:unit> <ie:unit> <ie:webject name="Update-Objects" type="ACT"> <ie:param name="INSTANCE" data="windchill"/> <ie:param name="GROUP_OUT" data="updateDoc"/> <ie:param name="ATTRIBUTE" data="IBA|Revise_By_Drawing"/> <ie:param name="OBJECT_REF" data="<%=newOid%>"/> <ie:param name="TYPE" data="wt.doc.WTDocument"/> <ie:param name="FIELD" data="IBA|Revise_By_Drawing='N'"/> <ie:param name="AUTHORIZATION" data="${@server[]authorization[0]}"/> </ie:webject> <ie:failure> <%System.out.println("no document had been update");%> </ie:failure> <ie:success> <% System.out.println (getGroup("updateDoc").getElementCount() + " document(s) had been updated"); %> </ie:success> </ie:unit> <ie:unit> <ie:webject name="CheckIn-Objects" type="ACT"> <ie:param name="INSTANCE" data="com.ptc.vm-ase.Windchill"/> <ie:param name="ATTRIBUTE" data="IBA|Revise_By_Drawing"/> <ie:param name="GROUP_OUT" data="checkInDoc"/> <ie:param name="AUTHORIZATION" data="${@server[]authorization[0]}"/> <ie:param name="TYPE" data="wt.doc.WTDocument"/> <ie:param name="OBJECT_REF" data="<%=newOid%>"/> </ie:webject> <ie:failure> <%System.out.println("no document had been checked-in");%> </ie:failure> <ie:success> <% System.out.println (getGroup("checkInDoc").getElementCount() + " document(s) had been checked-in"); %> </ie:success> </ie:unit> |
[InfoEngine] Where to find the compiled InfoEngine Task
<Windchill_HOME>\tasks\codebase\com\infoengine\compiledTasks
2006/08/07
2006/07/20
2006/07/04
[SVN] mod_dav_svn.so is garbled- perhaps this is not an Apache module DSO
httpd: Syntax error on line 115 of D:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf: API module structure `dav_svn_module' in file D:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_dav_svn.so is garbled- perhaps this is not an Apache module DSO?
Resolution
Owning to the apache version is 2.2, it will report this kind of error message. Just change the apache version to 2.0, then this kind of error will disappear.
2006/06/06
[Windchill] Build ResourceBundle How-To
Steps.
1. open windchill shell window
2. utilize ResourceBuild
Example Usage: ResourceBuild D:\ptc\Windchill\src\wt\fc or ResourceBuild wt.fc.fcResource
--Arg1 specifies which directory or class to generate.
--Arg2 specifies if locale specific resource will be built.
--values for arguments not passed will be obtained from tools.properties.
then input the command as bellows:
ResourceBuild ext.fusheng.report.reportResource true
execution info:
D:\ptc\Windchill>echo off
CLASSPATH=
file:/D:/ptc/Windchill/codebase/
file:/D:/ptc/Windchill/srclib/SystemGeneration.jar
file:/D:/ptc/Windchill/srclib/WindchillUtil.jar
file:/D:/ptc/Windchill/srclib/CommonXml.jar
file:/D:/ptc/Windchill/srclib/CommonCore.jar
file:/D:/ptc/Windchill/srclib/Modules.jar
file:/D:/ptc/Windchill/srclib/JGL.jar
file:/D:/ptc/Windchill/srclib/xmlParserAPIs.jar
file:/D:/ptc/Windchill/srclib/xercesImpl.jar
file:/D:/ptc/Windchill/srclib/dom4j.jar
file:/D:/ptc/Windchill/srclib/SystemGeneration_L10N.jar
file:/D:/ptc/Windchill/srclib/WindchillUtil_L10N.jar
file:/D:/ptc/Windchill/srclib/CommonXml_L10N.jar
file:/D:/ptc/Windchill/srclib/CommonCore_L10N.jar
Update ResourceInfos = false
Build ResourceBundles = true
Process Locales = en_US,en_GB,fr,de,es,ja,it,ko,zh_CN,zh_TW
ext.fusheng.report.reportResource
Warning: com.sun.tools.javac.Main cannot be loaded, using external compiler instead
Execution/Launch Time = 4.0 seconds
2006/06/02
[HTML / JS] View formatted source (format source extension)
Displays formatted and color-coded source and optional CSS information for each element.
You can see exactly which CSS rules match for an element. The rules are displayed including file name and line number. The topmost element is that with the highest priority.
You can fold/unfold/hilite block elements (table, tr, td, div, span,...). Really cool feature: select a block level element of interest directly in the page and view it's source! To help you to quickly analyze the source code you can view images directly from the source and add comments to folded block elements. The code view is based on the rendered document, so you will also see dynamically (by Javascript) created and modified html elements! Works also with frames and selected text.
2006/05/31
[Windchill] Cannot do copy & paste in Applet
As I do some operation in Windchill, because of some user interface was done by applet, it is inconvenience for us if we wolud like to copy some texts then paste them into the applet.
Solution
It is the security constraints so we cannot do copy and paster in applet window.
We can find out the java.policy file in JRE
grant codeBase "http://hostname/Windchill/-" {
permission java.security.AllPermission;
};
[Windchill] IE, IE, IE Affects PTC SW
PTC notes that This issue affects all releases of Windchill and Windchill-based solutions, including Windchill PDMLink, Windchill ProjectLink, Windchill Foundation & PDM, Windchill DynamicDesignLink, and Pro/INTRALINK 8.0 and higher; ProductView clients may also be affected. Some of the problems include:
- Loading the Java plug-in from an updated Microsoft browser may cause it to exit prematurely.
- Launching ProductView Standard Edition plug-in from an updated browser may cause it to become unresponsive.
For more info, check this Web page [ptc.com].
2006/05/30
[ANT] Date of 05/28/2006 07:06 午後 Cannot be parsed correctly. It should be in MM/DD/YYYY HH:MM AM_PM format
Scenario
As I utilized ant to build program, it throwed exception as bellows:
D:\ptc\Windchill_8.0\customization\wtinstaller.xml:234: Date of 05/28/2006 07:06 午後 Cannot be parsed correctly. It should be in MM/DD/YYYY HH:MM AM_PM format.
About the timestamp in the build script is written as bellows:
<tstamp><format property="myDateTime" pattern="MM/dd/yyyy hh:mm aa"
offset="-${sinceDays}" unit="day" /></tstamp>
Solution
Owing to the locale of my environment is Japane, so it will show this kind of error message, we just need to add locale attribute to this element, and set it to be en, then we can resolve this kind of problem.
<tstamp><format property="myDateTime" pattern="MM/dd/yyyy hh:mm aa"
offset="-${sinceDays}" unit="day" locale="en"/></tstamp>
2006/05/29
2006/05/27
[Windchill] How to modify the value which in property file
s: set (set the key-value pair)
t: target (assign the property file name)
p: propogate (propogate the new value to the specific property file)
if the value has space, remember to use double quote at the start and end, i.e. name="Albert Guo"
2006/05/24
[Windchill] java.rmi.ConnectException: Connection refused to host
As I start the method server, it always throw this kind of exception message as bellows and the method server always cannot be start properly:
星期一 5/22/06 16:31:49: main: Warning: exception connecting to master LogicalIdentifierCacheMgr:
星期一 5/22/06 16:31:49: main: java.rmi.ConnectException: Connection refused to host: albert.ptcnet.ptc.com; nested exception is:
星期一 5/22/06 16:31:49: main: java.net.ConnectException: Connection timed out: connect
Solution
According to the wt.properties, it said that windchill use port 5001. But as I telnet it, telnet albert.ptcnet.ptc.com 5001, it cannot be connect it.
It may result from that port 5001 had been occupied by another applications or this port had been blocked by firewall, so I change the port from 5001 to 5002, then the problem had been resolved successfully.
[Windchill] com.infoengine.au.ServiceUnavailableException
As I start method server, it throws this kind of exception as bellows. And when I click the Product tab in the windchill, it will produce the same exception:
星期三 5/24/06 14:02:53: Thread-38: Caused by: (com.infoengine.util.IEResource/49) com.infoengine.au.ServiceUnavailableException: "ptcServiceName=com.ptc.ptcnet.albert.server.taskProcessor,dc=albert,dc=ptcnet,dc=ptc,dc=com,cn=Windchill_8.0,cn=Application Services,o=ptc": 無法使用服務。
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.au.NamingService.getConnection(NamingService.java:952)
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.procunit.adapter.Adapter.getConnection(Adapter.java:707)
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.procunit.adapter.Adapter.createConnection(Adapter.java:650)
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.procunit.adapter.Adapter.
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.SAK.Task.executeTaskRemotely(Task.java:1948)
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.SAK.Task.invoke(Task.java:1665)
星期三 5/24/06 14:02:53: Thread-38: at com.infoengine.SAK.Task.executeTask(Task.java:1851)
星期三 5/24/06 14:02:53: Thread-38: ... 10 more
Solution
Owning to the service which named
Change the value of ptcServiceName of com.ptc.ptcnet.albert.Windchill in LDAP.
[Tomcat] Disable Tomcat Cache
As I author jsp files, no matter how I refresh the browser, it always show old data. It's inconvenient for us to do debug
Solution
search this keyword org.apache.jasper.servlet.JspServlet in the web.xml(E:\ptc\tomcat5\conf)
<init-param>
<param-name>development</param-name>
<param-value>true</param-value>
</init-param>
But remember to change the value of development to false for the sake of performance.
[Oracle] SP2-0678: 資料欄或屬性類型無法經由 SQL*Plus 顯示
As I use sqlplus to do query, it showed the error message as belows:
SP2-0678: 資料欄或屬性類型無法經由 SQL*Plus 顯示
The sql statement is select * from projec2;
Owing to the column in this table include BLOB data, sqlplus cannot show the BLOB data so it will return this kind of error message.
[Windchill] Load Demo Data to Windchill
(2) windchill wt.load.WindchillLoader -All -IncludeDemo -Unattended (no intervention)
2006/05/23
[Oracle] Cannot Start OracleOraHome92Agent
Scenario
As we wanna start OracleOraHome92Agent service, it always cannot be initialized normally.
Root Cause
It's service internal error or windows internal
Solution
delete the *.q files which locate at %oracle_home%\network\agent