Can anyone tell me what is the possible reason of this error message?

44 views
Skip to first unread message

Wei Qin

unread,
May 28, 2011, 1:36:43 AM5/28/11
to FBDK
I start the fbdk by running fbeditor.bat. I created a Basic function
block and change nothing. I clicked save as to comply the block into
XML and Java. Then when I trying to run this function block the error
message jump out said

fb.xml.XMLException
UNSUPPORTED_TYPE

In fact I cannot run any new function block that I created by running
fbeditor.bat (however the existing sample files could work). If I just
start the fbdk using editor.jar, the running is ok. Can anyone tell me
is there any setting in my computer wrong? Thanks a lot!!

Wei

The screenshot of the error message is at

http://fmn.rrimg.com/fmn053/20110528/1335/p_large_nttn_3c220001295b5c74.jpg

James Christensen

unread,
May 28, 2011, 11:31:54 AM5/28/11
to fb...@googlegroups.com
Dear Wei Qin,
It's apparent from the screenshot that you are not using the most
recent version of the FBDK. Try downloading the most recent version
from http://www.holobloc.com/doc/fbdk/ and see if that solves your
problem. The Save As Java and Run functions worked for me when running
from fbeditor.bat with the newest version of FBDK.

Also, if your home directory for the FBDK is different from \fbdk, you
will have to change the first line of the fbeditor.bat file
accordingly.
--
Best regards,
Jim Christensen

Wei Qin

unread,
May 28, 2011, 2:51:00 PM5/28/11
to FBDK
Hi Jim,

Thanks a lot for your fast response! I've downloaded the most recent
version of fbdk. This time when I try to run fbeditor.bat a new error
jump out. The fbdk program cannot even start. Please check the
screenshot of the cmd window.

http://fmn.rrimg.com/fmn052/20110529/0245/p_large_uIcg_712f0001bf255c6f.jpg

What is the possible reason of this error?
Appreciate your help!

Wei

On May 28, 10:31 am, James Christensen <james.h.christen...@gmail.com>
wrote:
> Dear Wei Qin,
> It's apparent from the screenshot that you are not using the most
> recent version of the FBDK. Try downloading the most recent version
> fromhttp://www.holobloc.com/doc/fbdk/and see if that solves your
> problem. The Save As Java and Run functions worked for me when running
> from fbeditor.bat with the newest version of FBDK.
>
> Also, if your home directory for the FBDK is different from \fbdk, you
> will have to change the first line of the fbeditor.bat file
> accordingly.
> --
> Best regards,
> Jim Christensen
>
>
>
> On Sat, May 28, 2011 at 1:36 AM, Wei Qin <weiqi...@gmail.com> wrote:
> > I start the fbdk by running fbeditor.bat. I created a Basic function
> > block and change nothing. I clicked save as to comply the block into
> > XML and Java. Then when I trying to run this function block the error
> > message jump out said
>
> > fb.xml.XMLException
> > UNSUPPORTED_TYPE
>
> > In fact I cannot run any new function block that I created by running
> > fbeditor.bat (however the existing sample files could work). If I just
> > start the fbdk using editor.jar, the running is ok. Can anyone tell me
> > is there any setting in my computer wrong? Thanks a lot!!
>
> > Wei
>
> > The screenshot of the error message is at
>
> >http://fmn.rrimg.com/fmn053/20110528/1335/p_large_nttn_3c220001295b5c...- Hide quoted text -
>
> - Show quoted text -

Wei Qin

unread,
May 28, 2011, 3:22:53 PM5/28/11
to FBDK
Hi Jim,
I found the problem why it's not working! I put the fbrt.jar file
under jdk1.6.0_23\jre\lib\ext in order to use javac command in cmd
window to comply the java file generated by function block. When I
remove fbrt.jar then fbeditor.bat works perfectly! Since every java
file contains some import heading such as "import fb.datatype.*;
import fb.rt.*;...", if I didn't put the fbrt.jar under jdk1.6.0_23\jre
\lib\ext, javac command will not recognize these packages and the
comply will fail because "package not exist". Do you know how to
comply the java file generated by function block? Thanks a lot!!

Wei


On May 28, 10:31 am, James Christensen <james.h.christen...@gmail.com>
wrote:
> Dear Wei Qin,
> It's apparent from the screenshot that you are not using the most
> recent version of the FBDK. Try downloading the most recent version
> fromhttp://www.holobloc.com/doc/fbdk/and see if that solves your
> problem. The Save As Java and Run functions worked for me when running
> from fbeditor.bat with the newest version of FBDK.
>
> Also, if your home directory for the FBDK is different from \fbdk, you
> will have to change the first line of the fbeditor.bat file
> accordingly.
> --
> Best regards,
> Jim Christensen
>
>
>
> On Sat, May 28, 2011 at 1:36 AM, Wei Qin <weiqi...@gmail.com> wrote:
> > I start the fbdk by running fbeditor.bat. I created a Basic function
> > block and change nothing. I clicked save as to comply the block into
> > XML and Java. Then when I trying to run this function block the error
> > message jump out said
>
> > fb.xml.XMLException
> > UNSUPPORTED_TYPE
>
> > In fact I cannot run any new function block that I created by running
> > fbeditor.bat (however the existing sample files could work). If I just
> > start the fbdk using editor.jar, the running is ok. Can anyone tell me
> > is there any setting in my computer wrong? Thanks a lot!!
>
> > Wei
>
> > The screenshot of the error message is at
>

James Christensen

unread,
May 28, 2011, 8:53:21 PM5/28/11
to fb...@googlegroups.com
Don't move fbrt.jar or any of the other files unpacked from fbdk.zip.

The FBEditor will automatically compile the java file when you do
"Save As Java" and put the compiled class file in the correct location
to run, as long as it knows where the javac.exe file is. This
parameter is set by using the "Preferences" dialog. See the following:
http://www.holobloc.com/doc/fbdk/saveas.htm
http://www.holobloc.com/doc/fbdk/preferences.htm


--
Best regards,
Jim Christensen

Wei Qin

unread,
May 29, 2011, 4:57:39 PM5/29/11
to FBDK
Hi Jim, thanks again for clear things up. I have one more doubt about
"save as Java". I have manually changed the .java code generated by
FBDK. For example, I have add my Java code into the REQ event using a
texteditor. When I reopen this function block, does it contain the
part that I just added? When I do "sava as Java" again, will FBDK
compiled those code that I added using texteditor inside .java file? I
found there is a similar question in this group before. To make my
question more clear, I've copied your manual about how to create a
SIFB.

Build and Test a Service Interface Function Block Type
Start the FBEditor.
Create a new service interface FB type in the editor by:
Opening a file containing an existing service interface function block
type such as the CLIENT.fbt and SUBSCRIBE.fbt files in the src\net
folder, or
Clicking the New=>FB Type=>ServiceInterface menu item as shown at
right.
Edit the function block's elements:
Edit the FB type's properties.
Be sure to enter package fb.rt.<mypkg>; in the Compiler Info header
field, where <mypkg> is the name of the src subdirectory you are
working in, for example, student or book.
Edit the FB type's interface.
Edit the service sequences.
When your editing is complete, save your work with the Save As...
button.
It is a good idea to save your work from time to time while editing,
too!
Generate and compile a Java® source file with the Save As... button.
Compiled code will run but do nothing useful.
Use a text editor to fill in the skeleton service_XXX(...) methods in
the generated java file, including any additional instance variables,
supporting methods, etc., as required.
Don't forget to set the QO.value field as appropriate and invoke the
serviceEvent(this) method on the appropriate event output, e.g.,
INITO.serviceEvent(this) when leaving the service_INIT(...) method.

************************************************************
Generate a JavaTM class file with an appropriate compiler .
************************************************************
Here is my question. How to generate this class file after you fill in
service_XXX()? I use javac in cmd but it always said the package
"fb.rt.*" not exist unless I put fbrt.jar under jdk1.6.0_23\jre\lib
\ext.
*************************************************************


Test the FB type by clicking the Run button. In the test window, you
can set or clear the values of the inputs, click on event input
buttons and observe the resulting event and variable outputs.
If you change the code of the block and recompile, you will have to
exit the FBEditor application and restart it in order to force a
reload of the class file.

Thanks a lot for your help!!

Wei



On May 28, 7:53 pm, James Christensen <james.h.christen...@gmail.com>
wrote:
> Don't move fbrt.jar or any of the other files unpacked from fbdk.zip.
>
> The FBEditor will automatically compile the java file when you do
> "Save As Java" and put the compiled class file in the correct location
> to run, as long as it knows where the javac.exe file is. This
> parameter is set by using the "Preferences" dialog. See the following:http://www.holobloc.com/doc/fbdk/saveas.htmhttp://www.holobloc.com/doc/fbdk/preferences.htm
> --
> Best regards,
> Jim Christensen
>
>
>
> On Sat, May 28, 2011 at 3:22 PM, Wei Qin <weiqi...@gmail.com> wrote:
> > Hi Jim,
> > I found the problem why it's not working! I put the fbrt.jar file
> > under jdk1.6.0_23\jre\lib\ext in order to use javac command in cmd
> > window to comply the java file generated by function block. When I
> > remove fbrt.jar then fbeditor.bat works perfectly! Since every java
> > file contains some import heading such as "import fb.datatype.*;
> > import fb.rt.*;...", if I didn't put the fbrt.jar under jdk1.6.0_23\jre
> > \lib\ext, javac command will not recognize these packages and the
> > comply will fail because "package not exist". Do you know how to
> > comply the java file generated by function block? Thanks a lot!!
>
> > Wei
>
> > On May 28, 10:31 am, James Christensen <james.h.christen...@gmail.com>
> > wrote:
> >> Dear Wei Qin,
> >> It's apparent from the screenshot that you are not using the most
> >> recent version of the FBDK. Try downloading the most recent version
> >> fromhttp://www.holobloc.com/doc/fbdk/andsee if that solves your
> >> problem. The Save As Java and Run functions worked for me when running
> >> from fbeditor.bat with the newest version of FBDK.
>
> >> Also, if your home directory for the FBDK is different from \fbdk, you
> >> will have to change the first line of the fbeditor.bat file
> >> accordingly.
> >> --
> >> Best regards,
> >> Jim Christensen
>
> >> On Sat, May 28, 2011 at 1:36 AM, Wei Qin <weiqi...@gmail.com> wrote:
> >> > I start the fbdk by running fbeditor.bat. I created a Basic function
> >> > block and change nothing. I clicked save as to comply the block into
> >> > XML and Java. Then when I trying to run this function block the error
> >> > message jump out said
>
> >> > fb.xml.XMLException
> >> > UNSUPPORTED_TYPE
>
> >> > In fact I cannot run any new function block that I created by running
> >> > fbeditor.bat (however the existing sample files could work). If I just
> >> > start the fbdk using editor.jar, the running is ok. Can anyone tell me
> >> > is there any setting in my computer wrong? Thanks a lot!!
>
> >> > Wei
>
> >> > The screenshot of the error message is at
>
> >> >http://fmn.rrimg.com/fmn053/20110528/1335/p_large_nttn_3c220001295b5c...Hide quoted text -
>
> >> - Show quoted text -- Hide quoted text -

James Christensen

unread,
May 29, 2011, 9:17:53 PM5/29/11
to fb...@googlegroups.com
Unfortunately, the FBDK will not automatically include the Java code
that you generated with a text editor. Once you start editing it that
way, you can't go back to using Save As Java.

If you are using javac from a command line, the way to use fbrt.jar
without moving it is to include it in the -classpath directive of the
command line; you should also include the fbdk/lib directory there.
See http://download.oracle.com/javase/1,5.0/docs/tooldocs/windows/classpath.html.

Wei Qin

unread,
May 29, 2011, 10:35:20 PM5/29/11
to FBDK
Thanks so much! That answered my question. Thanks again for you
patient help!

Wei

On May 29, 8:17 pm, James Christensen <james.h.christen...@gmail.com>
wrote:
> Unfortunately, the FBDK will not automatically include the Java code
> that you generated with a text editor. Once you start editing it that
> way, you can't go back to using Save As Java.
>
> If you are using javac from a command line, the way to use fbrt.jar
> without moving it is to include it in the -classpath directive of the
> command line; you should also include the fbdk/lib directory there.
> Seehttp://download.oracle.com/javase/1,5.0/docs/tooldocs/windows/classpa....
> >> parameter is set by using the "Preferences" dialog. See the following:http://www.holobloc.com/doc/fbdk/saveas.htmhttp://www.holobloc.com/do...
> >> --
> >> Best regards,
> >> Jim Christensen
>
> >> On Sat, May 28, 2011 at 3:22 PM, Wei Qin <weiqi...@gmail.com> wrote:
> >> > Hi Jim,
> >> > I found the problem why it's not working! I put the fbrt.jar file
> >> > under jdk1.6.0_23\jre\lib\ext in order to use javac command in cmd
> >> > window to comply the java file generated by function block. When I
> >> > remove fbrt.jar then fbeditor.bat works perfectly! Since every java
> >> > file contains some import heading such as "import fb.datatype.*;
> >> > import fb.rt.*;...", if I didn't put the fbrt.jar under jdk1.6.0_23\jre
> >> > \lib\ext, javac command will not recognize these packages and the
> >> > comply will fail because "package not exist". Do you know how to
> >> > comply the java file generated by function block? Thanks a lot!!
>
> >> > Wei
>
> >> > On May 28, 10:31 am, James Christensen <james.h.christen...@gmail.com>
> >> > wrote:
> >> >> Dear Wei Qin,
> >> >> It's apparent from the screenshot that you are not using the most
> >> >> recent version of the FBDK. Try downloading the most recent version
> >> >> fromhttp://www.holobloc.com/doc/fbdk/andseeif that solves your
> >> >> problem. The Save As Java and Run functions worked for me when running
> >> >> from fbeditor.bat with the newest version of FBDK.
>
> >> >> Also, if your home directory for the FBDK is different from \fbdk, you
> >> >> will have to change the first line of the fbeditor.bat file
> >> >> accordingly.
> >> >> --
> >> >> Best regards,
> >> >> Jim Christensen
>
> >> >> On Sat, May 28, 2011 at 1:36 AM, Wei Qin <weiqi...@gmail.com> wrote:
> >> >> > I start the fbdk by running fbeditor.bat. I created a Basic function
> >> >> > block and change nothing. I clicked save as to comply the block into
> >> >> > XML and Java. Then when I trying to run this function block the error
> >> >> > message jump out said
>
> >> >> > fb.xml.XMLException
> >> >> > UNSUPPORTED_TYPE
>
> >> >> > In fact I cannot run any new function block that I created by running
> >> >> > fbeditor.bat (however the existing sample files could work). If I just
> >> >> > start the fbdk using editor.jar, the running is ok. Can anyone tell me
> >> >> > is there any setting in my computer wrong? Thanks a lot!!
>
> >> >> > Wei
>
> >> >> > The screenshot of the error message is at
>
> >> >> >http://fmn.rrimg.com/fmn053/20110528/1335/p_large_nttn_3c220001295b5c...quoted text -
Reply all
Reply to author
Forward
0 new messages