Using beans, compile error
Hi I created a bean called Employee, it belongs to package bean. This class compiles but when I import bean.Employee in other class as "import bean.Employee", I get error saying package bean not found. What am I missing?
looks like a classpath problem,
check if your classpath contains the package bean.
kind regards,
Koen
Similar Messages
-
Hello.
I am, for the first time, attempting to modularize my scripts to use script libraries. I am running into a compile issue where the compiler doesn't recognize the lines that are supposed to locate my script libraries. I am running under Yosemite, with Script Editor version 2.7.
I have created a folder called "Script Libraries" in the computer location "/Library/Scripts", and put a script file called "SpeakLib.scpt" in this folder. SpeakLib.scpt compiles and runs correctly, and contains only handler subroutines.
I am now attempting to use the SpeakLib library, but I get a compile error: Can't get script "SpeakLib".
The new script contains only the code to use the script library and call a single function from that library.
The error is for the following line, which is at the top of my new script:
use myLib : script "SpeakLib"
If instead, I do not put the above line in the text of my new script but put the text:
tell script "SpeakLib"
SpeakMessage("Hello world")
end tell
I get the same compile error on the tell script "SpeakLib" line.
Just in case it was needed, I placed the following line at the top of the new script, but it made no difference:
use AppleScript
Can anyone tell me what I am doing wrong?
Thanks in advance.Haven't used this myself but looking at the documentation for it I see
Creating a Library
The basic requirement for a script to be a script library is its location: it must be a script document in a “Script Libraries” folder in one of the following Library folders. When searching for a library, the locations are searched in the order listed, and the first matching script is used:
If the script that references the library is a bundle, the script’s bundle Resources directory. This means that scripts may be packaged and distributed with the libraries they use.
If the application running the script is a bundle, the application’s bundle Resources directory. This means that script applications (“applets” and “droplets”) may be packaged and distributed with the libraries they use. It also enables applications that run scripts to provide libraries for use by those scripts.
The Library folder in the user’s home directory, ~/Library. This is the location to install libraries for use by a single user, and is the recommended location during library development.
The computer Library folder, /Library. Libraries located here are available to all users of the computer.
The network Library folder, /Network/Library. Libraries located here are available to multiple computers on a network.
The system Library folder, /System/Library. These are libraries provided by OS X.
so it looks to me like the Script Libraries folder should be in /Library (for your example) not in /Library/Scripts.
That is it should be /Library/Script Libraries and not /Library/Scripts/Script Libraries.
regards
from
Introduction to AppleScript Language Guide -
JSP Compile Error when using dynamic ID in logic:iterate and bean:size
Hello,
I try to create a dynamic table with logic:iterate and bean:size tag. Dynamic means the attributes are written by scriptlet. Eg.:
<logic:iterate id="customerBean" name="<%= formName %>" property="<%= propertyName%>" length="<%= sRowSize%>">When I replace the id Attribute with propertyName I get compile errors, such as
the compiler doesn't know the value at runtime:
Unable to compile class for JSP An error occurred at line: 179 in the jsp file: /pages/formContent.jsp Generated servlet error: _newCustomer.java:1046: Missing term. java.lang.Object <%= propertyName %> = null; ^
Whats wrong ?
Thanks for your helpSolution: don't use a runtime expression for the id attribute.
The id attribute is used to declare
- an attribute in scope
- a scriptlet variable on the page
These are only available for the duration of the <logic:iterate> tag
The "id" is only used in your programming. You don't need to make it dynamic. -
Compilation error when using @DisableWarnings
Hi,
I have a stateless EJB 3.0 session bean, and I am trying to add the following lines of code in it:
@DisableWarnings { WarningCode[] value(); }
enum WarningCode { BEA_010001, BEA_010200, BEA_010202, BEA_010054 }
Iam getting a compilation error like this:
- The annotation @DisableWarnings must define the attribute value
- Syntax error on token "@", interface expected after this token
I am also tring to add this:
@TransactionTimeoutSeconds { int value() default 30; }
I am again getting compilation errors.
I am using Eclipse ganymede.
Can any body please help me regarding this.
Thank you,
SowmyaHi,
It looks like you are specifying the annotations incorrectly in your bean class. Try the following:
@DisableWarnings({WarningCode.BEA_010001, WarningCode.BEA_010200, WarningCode.BEA_010202, WarningCode.BEA_010054 })
@TransactionTimeoutSeconds(30)
- Matt -
Compiler error when useing switch statements in an inner class
I have defined several constants in a class and want to use this constans also in an inner class.
All the constants are defined as private static final int.
All works fine except when useing the switch statement in the inner class. I get the compiler error ""constant expression required". If I change the definition from private static final to protected static final it works, but why?
What's the difference?
Look at an example:
public class Switchtest
private static final int AA = 0;
protected static final int BB = 1;
private static int i = 0;
public Switchtest()
i = 0; // <- OK
switch(i)
case AA: break; //<- OK, funny no problem
case BB: break; //<- OK
default: break;
private class InnerClass
public InnerClass()
i = 0; // <- OK: is accessible
if (AA == i) // <- OK: AA is seen by the inner class; i is also accessible
i = AA + 1;
switch(i)
case AA: break; // <- STRANGE?! Fail: Constant expression required
case BB: break; // <- OK
default: break;
}Thank's a lot for an explanation.Just a though:
Maybe some subclass of Switchtest could decalare its own variable AA that is not final, but it can not declare its own BB because it is visible from the superclass. Therefore the compiler can not know for sure that AA is final. -
Compilation Error while using string (Please help)
Hi,
I am using "Sun WorkShop Compiler C++ SPARC Version 5.000". Compiling code which contains a "string variable" throws the following error:
"/opt/WS5/SC5.0/include/CC/./new", line 32: Error: The prior declaration for ope
rator new(unsigned) has no exception specification.
"/opt/WS5/SC5.0/include/CC/./new", line 34: Error: The prior declaration for ope
rator delete(void*) has no exception specification.
"/opt/WS5/SC5.0/include/CC/./new", line 36: Error: The prior declaration for ope
rator new[](unsigned) has no exception specification.
"/opt/WS5/SC5.0/include/CC/./new", line 38: Error: The prior declaration for ope
rator delete[](void*) has no exception specification.
4 Error(s) detected.
The command used for compilation is :
/opt/WS5/bin/CC -compat=4 -I/opt/WS5/SC5.0/include/CC -features=%all try.cpp
Would help if I could get some comments on the above.
Thanks and Regards,
M ShettyThere is a requirement that I use the Workshop 5.0
compilere with option "-compat=4".
The program I am trying to compile contains:
#include <string>
int main()
string test = "aaa";
return 0;
There is no "string" in "-compat=4". You need to
do something like this:
// --- start test.cc ---
#include <rw/cstring.h>
int main()
RWCString test = "aaa";
return 0;
// --- end test.cc ---
CC -compat=4 -library=rwtools7 test.cc -
hi i am trying to install NI-VISA driver on SUSE LINUX 11.1.
the error message it shows is
******************************** ERROR ****************************************
* The version of gcc in the path does not match the version of gcc used to *
* compile the currently running kernel. This can cause unpredictable *
* behavior in kernel drivers and should be fixed. *
* gcc version: Linux) *
* kernel compiled with: 4.3.2 *
******************************** ERROR ****************************************
my kernel source version is
linux-8nes:/home/admin # rpm -qi kernel-source
Name : kernel-source Relocations: /usr/src
Version : 2.6.27.29 Vendor: openSUSE
Release : 0.1.1 Build Date: Sun 16 Aug 2009 03:43:52 PM IST
Install Date: Sat 24 Oct 2009 02:13:12 AM IST Build Host: rinck
Group : Development/Sources Source RPM: kernel-source-2.6.27.29-0.1.1.src.rpm
Size : 309251954 License: GPL v2 only
Signature : RSA/8, Sun 16 Aug 2009 03:57:25 PM IST, Key ID b88b2fd43dbdc284
Packager : http://bugs.opensuse.org
URL : http://www.kernel.org/
Summary : The Linux Kernel Sources
Description :
Linux kernel sources with many fixes and improvements.
Authors:
Linus Torvalds <[email protected]>
see /usr/src/linux/CREDITS for more details.
Source Timestamp: 2009-08-15 17:53:59 +0200
GIT Revision: 8a413546901c407e96f7fba18574cceeb40452af
GIT Branch: SLE11_BRANCH
Distribution: openSUSE 11.1
i had also installed GCC 4.3.2.
it shows the error message as i had posted.
please kindly help me on this.
Thanks and regards,
P.karthickCheck this solution
-
Hello experts,
I'm totally new to C#. I'm trying to modify existing code to automatically rename a file if exists. I found a solution online as follows:
string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
string tempFileName = fileName;
int count = 1;
while (allFiles.Contains(tempFileName ))
tempFileName = String.Format("{0} ({1})", fileName, count++);
output = Path.Combine(folderPath, tempFileName );
string fullPath=output + ".xml";
However, it gives the following compilation errors
for the Select and Contain methods respectively.:
'System.Array' does not contain a definition for 'Select' and no extension method 'Select' accepting a first argument of type 'System.Array' could be found
(are you missing a using directive or an assembly reference?)
'System.Array' does not contain a definition for 'Contains' and no extension method 'Contains' accepting a first argument of type 'System.Array' could be
found (are you missing a using directive or an assembly reference?)
I googled on these errors, and people suggested to add using System.Linq;
I did, but the errors persist.
Any help and information is greatly appreciated.
P. S. Here are the using clauses I have:
using System;
using System.Data;
using System.Windows.Forms;
using System.IO;
using System.Collections.Generic;
using System.Text;
using System.Linq;Besides your issue with System.Core, you also have a problem with the logic of our code, particularly your variables. It is confusing what your variables represent. You have an infinite loop, so the last section of code is never reached. Take a look
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
namespace consAppFileManipulation
class Program
static void Main(string[] args)
string fullPath = @"c:\temp\trace.log";
string folderPath = @"c:\temp\";
string fileName = "trace.log";
string output = "";
string fileNameOnly = Path.GetFileNameWithoutExtension(fullPath);
string extension = Path.GetExtension(fullPath);
string path = Path.GetDirectoryName(fullPath);
string newFullPath = fullPath;
string[] allFiles = Directory.GetFiles(folderPath).Select(filename => Path.GetFileNameWithoutExtension(filename)).ToArray();
string tempFileName = fileName;
int count = 1;
//THIS IS AN INFINITE LOOP
while (allFiles.Contains(fileNameOnly))
tempFileName = String.Format("{0} ({1})", fileName, count++);
//THIS CODE IS NEVER REACHED
output = Path.Combine(folderPath, tempFileName);
fullPath = output + ".xml";
//string fullPath = output + ".xml";
UML, then code -
Compiler errors when using dynamic text in a class
I have created a MovieClip with a custom class that has a dynamic text field (called "textArea"), which I want to modify by the Component Inspector, as well as via a custom method using:
textArea.text = newText;
It works fine in all cases and there are no problems, but the compiler still wants to give me the error:
1120: Access of undefined property textArea.
The error doesn't appear when I remove the component parameters (so that it's just a normal MovieClip). It still works, even with the error, so I'm not sure why it wants to complain. Am I doing something wrong or is it just being bitchy?By defining them in the class and using the class name under component definition:
[Inspectable(name="Text", type=String, defaultValue="")]
public function set text(setText:String)
textArea.text = setText;
public function get text():String
return textArea.text;
A problem I run into is that the compiler errors prevent the parameters from being defined so I comment out every line that has to do with textArea, define the component, then uncomment them so that it'll work when it runs. -
JSP Compilation Error when using OC4J out of the box
Hello.
After installing Java jdk 1.5.0_05, setting ORACLE_HOME, setting JAVA_HOME, rebooting, and installing OC4J standalone straight out of the box, I have deployed a simple web project that consists of just one JSP. I receive the following error message:
NOTIFICATION J2EE JSP-0008 Unable to dispatch jsp Page: oracle.jsp.provider.JspCompilationException: Errors compiling: C:\LocalApps\OC4J\j2ee\home\application-deployments\oc4j_jsp\persistence\_pages\\_Test.java<pre></pre>
I have deployed a number of Flex2 applications without incident. What am I missing here? Another odd thing is that my organization has OAS running and it can render JSPs fine.
Any help is appreciated thanks,
Mike
P.S. I have gone back and set the JSP debug switches, but they do not yeild much more info. Here is the stacktrace:
NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP Page : oracle.jsp.provider.JspCompileException: <H3>Errors compiling:C:\LocalApps\OC4J\j2ee\home\application-deployments\oc4j_jsp\oc4j_jsp\persistence\_pages\\_Test.java</H3><pre></pre>
at oracle.jsp.app.JspJavacCompiler.compile(JspJavacCompiler.java:304)
at oracle.jsp.runtimev2.JspPageCompiler.attemptCompilePage(JspPageCompiler.java:731)
at oracle.jsp.runtimev2.JspPageCompiler.compileBothModes(JspPageCompiler.java:456)
at oracle.jsp.runtimev2.JspPageCompiler.compilePage(JspPageCompiler.java:413)
at oracle.jsp.runtimev2.JspPageInfo.compileAndLoad(JspPageInfo.java:705)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:694)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:414)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
at java.lang.Thread.run(Unknown Source)I had the very same Problem, and I spent a lot of time on it.
When installing Oc4j as a service using Javaservice opnesource, I had no problem, even using J.D.K 1.6:
%JSEXE% -install %JSNAME% %JVMDIR%\jvm.dll -XX:PermSize=128m -XX:MaxPermSize=256m -Xmx1024M -Xms1024M -Djava.class.path=%OC4J_HOME%\oc4j.jar -start oracle.oc4j.loader.boot.BootStrap -params -config %OC4J_HOME%\config\server.xml -out %OC4J_HOME%\log\OC4J_service_stdout.log -err %OC4J_HOME%\log\OC4J_service_stderr.log -current %JSBINDIR% -auto -description OC4JService
Then I wanted to install it using "ServiceMill" or "Javaservice Wrapper", becuase it has a better control on the process and I had that awfull compilation error.
I guess it is because ServiceMills uses java.exe and javaservice the .dll to launch the oc4j, no idea.
Anyway, thank you very much!!!!!
Antonio -
Compiler error in 9.0.3 when deploying using jdk1.4.1rc
Hi, I'm trying to deploy an application into iAS9.0.3. The server is started with jdk1.4.1rc. However, I'm getting a compiler error (see below). When compiling with jdk1.3.1 everything is working fine, but I need to use the new API's in 1.4. Can anyone help me out here? Will 9.0.3 be certified for jdk 1.4 when the production version is released?
Thanks
/Johannes
Auto-deploying OPS-EJB (No previous deployment found)... OPS_StatelessSessionBeanWrapper0.java:11: cannot access java.lang.Object
bad class file: D:\j2sdk1.4.1\jre\lib\rt.jar(java/lang/Object.class)
class file has wrong version 48.0, should be 47.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
public class OPS_StatelessSessionBeanWrapper0 extends com.evermind.server.ejb.RemoteStatelessSessionEJBObject implements com.novamedia.ops.ejb.OPS
^
1 error
Error compiling D:\eclipse-projects\ops-application\OPS-EJB: Syntax error in sourceOC4J 9.0.3 production will be certified with JDK 1.4.
You can try the work arounds discussed in http://forums.oracle.com/forums/message.jsp?id=767439 to get it working with JDK 1.4
regards
Debu -
Sqlserver_utilities use for migrating MS SQL to 9i - compilation error
I've seen lot of questions about compilation error in the sqlserver_utilities particularly on Oracle 9i database where some procedure and functions are not compiled and required rewritten. The main issues seem to be with new features or tables/views not available in pre-10g such as regex, DBA_IND_STATISTICS, etc. Even though there is a IF clause (
IF NOT DBMS_DB_VERSION.VER_LE_9_2 THEN) to prevent execution, however, it won't work for compilation standpoint.
My question is that do we need to comment this section out or rewrite to work for 9i - for example, DBA_IND_STATISTICS view for last_analyzed is not in 9i, but we can use last_analyzed in USER_INDEXES. Is that the only option (manual labor work :-) to resolve this issue for 9i database?
Thanks in advance,
ICI think you made the right choice to go with 10g, 9i is obsolete anyway.
The Migration Workbench come with SQL Developer might only work with 10g because it's built pretty new in 2007.
You can try the older version of standalone Oracle Migration Workbench
http://www.oracle.com/technology/tech/migration/workbench/index.html
It support 9i, The Oracle Migration Workbench is a tool that simplifies the process of migrating
Informix, and DB2 databases to the Oracle platform (Oracle9i and Oracle10g). Again, I still believe go with 10g is better choice. -
Compiler error using compareTo
I get a compiler error when I use compareTo with the Character class. I confirmed the error with following code from The Java Tutorial:
public class CharacterDemo {
public static void main(String args[]) {
Character a = new Character('a');
Character a2 = new Character('a');
Character b = new Character('b');
// ******* Problem is here ************
int difference = a.compareTo(b);
if (difference == 0) {
System.out.println("a is equal to b.");
} else if (difference < 0) {
System.out.println("a is less than b.");
} else if (difference > 0) {
System.out.println("a is greater than b.");
System.out.println("a is "
+ ((a.equals(a2)) ? "equal" : "not equal")
+ " to a2.");
System.out.println("The character " + a.toString() + " is "
+ (Character.isUpperCase(a.charValue()) ? "upper" : "lower")
+ "case.");
The compilier is complaining that compareTo is not part of the Character class. I am compiling with whatever compilier was installed with Suse Linux 7.1. The code compiles fine on my university's Unix system that I can dial into.
I figure my Linux version must have some old compiler. But to be honest, I am also new to Linux and am having trouble figuring out what I am compiling with. Can any expert out there give me advice on identifying/updating the Java technology I am using. Thanks in advance.
JimCheck the jdk version using the java command:
java -versionwhich will output the jdk version you're using. -
Hi All,
I am upgrading from OAS 9.0.4 to 10.1.2 where Forms 10g application is deployed.
When I try to recompile with frmcmp.sh :
frmcmp.sh userid=system/oracle123@odb module_type=FORM module=menu1.fmb
I get errors :
Compiling Procedure GET_PATH...
Compilation error on procedure GET_PATH:
PL/SQL ERROR 201 at line 4, column 32
Identifier 'APPS_MENU1_DET' must be declared
PL/SQL ERROR 0 at line 4, column 3
SQL Statement ignored
Compilation error have occured.
Form not created
What cause this error ?
FYI, on the above compilation I connect to different database/schema, not the one
which is used by the Form, is this the reason of th error ?
During compilation, Do I have to connect to the database/schema I used when develop the form ?
DO I have to create all tables in the schema first before compilation ?
Tnank you for your hwlp,
xtanto
PS. When I compile the same Form with F90genm.sh on OAS 9.0.4, NO ERROR.From my experience it's a really bad idea to install OCS into a AS IM. When it comes to upgrades and patches you'll pull your hair out!
Why not install OCS first and then install the BI into the OCS AS server... I have not checked the certification matrix but that might be a better solution to look into. -
Getting Compilation error when used SET or MULTISET operator on nested tabl
Dear All,
I am getting Compilation error when used SET or MULTISET operator on nested tables inside a procedure.
This is working fine in other DB installations of 10g but does not work in another 10g DB.
it says "wrong number of parameter or datatype used in SET"
Can any one suggest what went wrong here?
Thanks in advance.Can any one suggest what went wrong here?Only if you would post the query and Oracle versions on both databases.
Besides, this forum deals with issues in Oracle product installation. So post this query in SQL PL/SQL forum for better response.
Maybe you are looking for
-
Attach file via RFC on an object in SAP R/3 4.6c
Hi experts, I have to attach a file via a RFC into a Business Object of PM module; could be an Order (IW32) or a Note (IW22). I had tried the sample codes I saw in here, but none of them proved to be useful - some were not in use for me because of th
-
iPhone Safari block all calls When i goin to internet in Safari or AppStore at iPhone, people dont colled me.. Internet(1) + phone talk(2) = only (1) or (2)! I buy iphone becose i ned internet and i must every minute talkin by phone, when people call
-
A few GoLIve questions saved up. Using GL 7 on a Mac. 1. JPEGs IN TRASH No idea how I got 150 or so JPEG files in the Mac Trash. Maybe I did it for some reason and forgot. These files are also in my site window and work properly within GL. Is there a
-
Date format in flat file recon
Hi, I am trying to do Flat file reconciliation but i am getting some error related to date format. I have tried format like 20 march 2009, 02-02-2010,20 Mar 2009,2010-01-01,2010/01/01 can any one please suggest me which format i need to use. Thanks
-
Downloading jars during runtime (Applet).
I was wondering if someone could give me some example codes on having an applet downloading a jar file from a remote system and loading the jar contents into memory. Do you use JarURLConnection with ClassLoader? or is there something else that I can