Unable to compile HelloCustomerJava

61 views
Skip to first unread message

Ajaya Jose

unread,
Sep 10, 2017, 7:57:43 AM9/10/17
to OpenRules
Hi,

I am trying to compile the HelloCustomer Package comes along with
standard openrule.decision pack. I ran the compile.bat exe and getting
the below Type not found error.

[eval] INCLUDE=../include/Rules.xls
     [eval] [../include/Rules.xls] has been resolved to
[file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisions/HelloCustomerJava/rules/include/Rules.xls]
     [eval] Processing
file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisions/HelloCustomerJava/rules/include/Rules.xls
     [eval] Error: Type App not found
     [eval] Invalid Code Fragment:
     [eval] =========================================
     [eval]  void main(App app)
     [eval]            ^^^
     [eval] =========================================


It is happening for me with all the packages which use Rule/Method
that pass an object[App, Customer, Vehicle etc ] from external
package.

Please review and support to resolve this issue. Logs are attached for
reference.
Regards,
Ajay
log.txt

OpenRules Support

unread,
Sep 10, 2017, 8:05:18 AM9/10/17
to OpenRules
Hi Ajaya,

The sample HelloCustomerJava demonstrates the use of Java classes App and Customer defined in the package "hello". To use these classes your Environment table (defined in the file Main.xls) should contain the statement:

     import.java | hello.*

Our standard sample contains this statement and everything works fine. Please check your file. If the problem still exists, zip and send us your entire project to analyze.

Support
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ajaya Jose

unread,
Sep 11, 2017, 1:29:31 AM9/11/17
to OpenRules
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted
Message has been deleted

Ajaya Jose

unread,
Sep 11, 2017, 8:52:48 PM9/11/17
to OpenRules
Hi,

I have the command import.java in my main.xls and still the same error.
Please find the package I am compiling.
Regards,
Ajay
Main.xls
Rules.xls
App.java
Customer.java
Main.java
build.properties
build.xml

sup...@openrules.com

unread,
Sep 11, 2017, 9:37:27 PM9/11/17
to open...@googlegroups.com

It seems it’s the same code that successfully works for us, but something is certainly wrong. Why would not zip and you send us your entire(!) project HelloCustomerJava? Do you use Eclipse? Could you double-click on run.bat and send us the entire (not partial) output protocol?

 

-------------------------------

OpenRules Support

sup...@openrules.com

http://openrules.com

--
You received this message because you are subscribed to the Google Groups "OpenRules" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openrules+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Ajaya Jose

unread,
Sep 11, 2017, 9:51:07 PM9/11/17
to OpenRules
Hi,

I am executing the command(compile) from command prompt. The run command provides me the expected result since there are class files already present.
Please find the complete package in zip [ pls rename HCustomerJava-->HelloCustomerJava.7z]

Regards,
Ajay
run.txt
HCustomerJava

Ajaya Jose

unread,
Sep 12, 2017, 1:01:04 PM9/12/17
to OpenRules
Hi,

You are right. I am able to compile the package. The classes are built as expected.
However the console log shows the below error messages, which lead me wrong inference.

     [eval] =========================================
     [eval]     at file:/C:/Rule/openrules_6.4.1.decisions/openrules.decisions/H
elloCustomerJava/rules/main/Main.xls?sheet=Methods&cell=B2&start=17&end=19&openl
=
     [eval]

     [eval] Error: Type App not found
     [eval] Invalid Code Fragment:
     [eval] =========================================
     [eval]  void DefineGreeting(App app, int hour)
     [eval]                      ^^^
     [eval] =========================================

How can I suppress this message ?

Regards,
Ajay

On Tuesday, 12 September 2017 07:07:27 UTC+5:30, support wrote:

OpenRules Support

unread,
Sep 12, 2017, 1:10:19 PM9/12/17
to OpenRules
What exactly do you do to receive these messages?

Ajaya Jose

unread,
Sep 12, 2017, 8:14:48 PM9/12/17
to OpenRules
Hi,

I run the compile.bat command from,

C:\Rule\openrules_6.4.1.decisions\openrules.decisions\HelloCustomerJava>compile.
bat

result is attached.


On Tuesday, 12 September 2017 22:40:19 UTC+5:30, OpenRules Support wrote:
log.txt

sup...@openrules.com

unread,
Sep 13, 2017, 4:36:00 PM9/13/17
to open...@googlegroups.com

You would not have these problems if you use any Java IDE like Eclipse to work with your Java classes (like the most people usually do). However, using compile.bat and then run.bat you are supposed to be fine without IDE as well.

 

We tried to reproduce your error messages using only File Manager. First we deleted all *.class files inside bin/hello/ folder and then double-clicked on complie.bat. It successfully created all *.class files as you can see from this protocol:

 

Buildfile: C:\_SourceRepo\openrules.decisions\HelloCustomerJava\build.xml

 

compile.java:

    [javac] C:\_SourceRepo\openrules.decisions\HelloCustomerJava\build.xml:36: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

    [javac] Compiling 3 source files to C:\_SourceRepo\openrules.decisions\HelloCustomerJava\bin

 

compile.xls:

     [echo] dir=C:\_SourceRepo\openrules.decisions\HelloCustomerJava

     [eval] Compiling file:C:\_SourceRepo\openrules.decisions\HelloCustomerJava/rules/main/Main.xls

     [eval] INCLUDE=../include/Rules.xls

     [eval] [../include/Rules.xls] has been resolved to [file:/C:/_SourceRepo/openrules.decisions/HelloCustomerJava/rules/include/Rules.xls]

     [eval] Processing file:/C:/_SourceRepo/openrules.decisions/HelloCustomerJava/rules/include/Rules.xls

     [eval] IMPORT.JAVA=hello.*

     [eval] Completed file:C:\_SourceRepo\openrules.decisions\HelloCustomerJava/rules/main/Main.xls

 

compile:

 

BUILD SUCCESSFUL

Total time: 1 second

 

 

However, in your protocol the step “compile.java” is empty. Probably you did not install the correct version of Java: you need to install JDK not just Java Runtime – see http://decisionreasoner.com/pdf/OpenRulesInstallationGuide.pdf.

 

Please check your Java installation and try to follow our instructions again.

 

Support

 

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ajaya Jose
Sent: Tuesday, September 12, 2017 8:15 PM
To: OpenRules <open...@googlegroups.com>

--

Ajaya Jose

unread,
Sep 14, 2017, 2:10:38 PM9/14/17
to OpenRules
Thank you. It worked for me.


On Sunday, 10 September 2017 17:27:43 UTC+5:30, Ajaya Jose wrote:
Hi,

I am trying to compile the HelloCustomer Package comes along with
standard openrule.decision pack. I ran the compile.bat exe and getting
the below Type not found error.

[eval] INCLUDE=../include/Rules.xls
     [eval] [../include/Rules.xls] has been resolved to

Ajaya Jose

unread,
Sep 15, 2017, 2:33:45 PM9/15/17
to OpenRules
Hello,

I am creating a web application using HelloJsp web sample. My package build successfully with out compilation error.
 However, I am not able connect this through tomcat server and gives error
HTTP Status 404 - /HelloJsp/

Attaching my packge pls rename this as HelloJsp1 --> HelloJsp.7z

Regards,
Ajay
HelloJsp1

sup...@openrules.com

unread,
Sep 15, 2017, 2:51:25 PM9/15/17
to open...@googlegroups.com

Ajay,

 

HTTP Status 404 means Page Not Found Error. You application was not correctly deployed. We tried again to run our standard openrules.web/HelloJsp/deply.bat. It successfully deployed the project by creating the folder apache-tomcat/webapps/HelloJsp. When we double-click on run.html it successfully rans the web application. We can see that you modified build.properties to point to your Tomcat at C:\apache-tomcat-7.0.75. Check that its webapps contains HelloJsp.

 

Support

 

 

From: open...@googlegroups.com [mailto:open...@googlegroups.com] On Behalf Of Ajaya Jose
Sent: Friday, September 15, 2017 2:34 PM
To: OpenRules <open...@googlegroups.com>

--

Reply all
Reply to author
Forward
0 new messages