PowerDesinger 逆向生成可能遇到的坑
PowerDesinger 逆向生成可能遇到的坑
1 Could not Initialize JavaVM!
下载安装32位jdk 1.8 版本,并配置 jar.exe java.exe javac.exe javadoc.exe 指向32位jdk
重启pd
2 Non SQL Error : Could not load class com.mysql.jdbc.Driver
果断powerdesigner 对JDBC的支持不好 ,只能从系统变量中找~~
解决办法 :配置系统的classpath 路径,指定jar 包路径就好了。
3 Unable to list the user
设定powerdesigner的current dbms
DataBase->Change Current DBMS
4 Powerdesigner pdm视图看不到表注释comment问题
A: 配置comment attribute
1:Model->Extensions->2:点击Insert a row->4:右击General->A:右击ProFile->add mateclass->B:选择column->C:确定->6:右击column->extended attrubute ->8重命名,9:Data_Type:String ,10:选择Computed,11:选择read only->12:点击Get Method Script ->13:复制:%Get% = Rtf2Ascii (obj.Comment)->14:确定
B: 选择自己配置的comment attribute
1:Tools->Display Perferences->2:Table->3:Advanced
->4:Columns->5:list Columns->6:lin_column->ok
5 PowerDesigner视图显示Comment注释
双击表->1:Columns->2:Customize Columns and Filter->3:comment(我的是自己配置的comment)->4:确定
6 PowerDesigner中NAME和COMMENT的互相转换
点击Tools->Execute Commands->Edit/Run Script:复制命令,保存并运行
Option Explicit
ValidationMode = True
InteractiveMode = im_Batch
Dim mdl ' the current model
' get the current active model
Set mdl = ActiveModel
If (mdl Is Nothing) Then
MsgBox "There is no current Model "
ElseIf Not mdl.IsKindOf(PdPDM.cls_Model) Then
MsgBox "The current model is not an Physical Data model. "
Else
ProcessFolder mdl
End If
Private sub ProcessFolder(folder)
On Error Resume Next
Dim Tab 'running table
for each Tab in folder.tables
if not tab.isShortcut then
tab.name = tab.comment
Dim col ' running column
for each col in tab.columns
if col.comment="" then
else
col.name= col.comment
end if
next
end if
next
Dim view 'running view
for each view in folder.Views
if not view.isShortcut then
view.name = view.comment
end if
next
' go into the sub-packages
Dim f ' running folder
For Each f In folder.Packages
if not f.IsShortcut then
ProcessFolder f
end if
Next
end sub
第二种:卸载32位powerdesinger,安装64位powerdesinger+破解
链接:https://pan.baidu.com/s/1Uoo99J20AHvZtFeLBGwzyQ
提取码:ra0k
连接失效或者不存在,请留言博主
小结:如果你是64位系统,安装别人给你发的Powerdesinger,给你的安装包有可能是32位的,就会遇到以上这些坑
强烈建议,自己去官网下载跟自己系统匹配的安装包,以上问题都可以避免了