My source does not compile in 1.5 because of generics in libraries
Hi,
I have a problem with my source codes written for 1.3 and 1.4 java. I have been implementing Iterator, Collection, List and extending ArrayList in many ocassions. All works as expected in 1.4 but if I try to compile it with 1.5 it does not compile. I do receive many errors which generally speaking are showing that compiler does think that X subclass is not the same as a subclass of X<?> generic which simply makes all my code to not compile.
Does anybody had similar problems with their code? Does anybody knows how to rewrite problematic code so that it will compile under BOTH 1.4 and 1.5 without -source 1.4 option?
Some examples, stripped to problematic parts:
public class CSectionList extends ArrayList
public final boolean add(Object element)
int p = Collections.binarySearch(this,element);
/** Here comes error:
cannot find symbol
symbol : method binarySearch(sztejkat.utils.CSectionList,java.lang.Object)
location: class java.util.Collections
int p = Collections.binarySearch(this,element);
if (p<0)
public class CMemoryViewTable extends JTable
/** Here comes error:
name clash: setDefaultRenderer(java.lang.Class,javax.swing.table.TableCellRenderer) in sztejkat.hdl.debugger.ui.CMemoryViewTable and setDefaultRenderer(java.lang.Class<?>,javax.swing.table.TableCellRenderer) in javax.swing.JTable have the same erasure, yet neither overrides the other
public class CMemoryViewTable extends JTable
public void setDefaultRenderer(Class columnClass,
TableCellRenderer renderer)
if (renderer!=null)
super.setDefaultRenderer(columnClass,new CCursorRenderer(renderer));
}else
super.setDefaultRenderer(columnClass,null);
}In first example it seems to not catch that my CSectionList is a List<>, while in second it does not treat Class and Class<> equally what makes compiler to think that I don't override setDefaultRenderer method what I actually wanted to do (and did in 1.4).
Please help...
regards,
Tomasz Sztejka
P.S.
Where the source compatibility have gone between 1.4 and 1.5? If it will look like this I strongly vote to NOT touch java language specification - it was very nice, simple and clear language. With autoboxing and generics it starts to do a lot of things behind my back what I don't like - this is why I moved from C++ to Java - hate what C++ did with overloaded operators. But maybe I'm just to stupid.
Hi,
I'm still not getting a good grip on generics, and still think they are not necessary.True, but when you have assembler you might not need C or Java. With assembler, you can write the most efficient programmes, but fixing a bug is not easy. With the higher level of C and Java, fewer trivial errors are made. The introduction of generics is another step towards compile-time bug prevention.
Will your request block me from having a set of different classes,
derived from different superclasses, all
implementing Comparable in the way, that they use
instanceof to check for proper relation (ie. I would
like to sorting to sort all classes A by some value
and all classes B to land in front of list)?Regarding raw classes, my request will change the erased interface of Comparable from
int compareTo(Object o);to
int compareTo(Comparable o);This would mean that all non-generic implementions of Comparable would have to be modified. I should have requested this enhancement ten years ago, but back then I did not know about Java at all :(
Where largest common superclass is Object (ie Asuper
is not instanceof Bsuper and vice-versa).
Will soring list of such objects (both A and B) will
be legal after your RFE ?Both A and B implement Comparable, so that should not be a problem.
Similar Messages
-
Compiling a vi with link to an external non NI dll = error 7 "source does not exist""
I'm trying to compile a vi using Application Builder. The vi contains a number of links to drdaq32.dll (a dll to give access to Picotech�s DrDAQ data aquisitiion unit. This is connected via the parallel port and comes with a BNC connector and a high impedance input suitable for pH probes). Communication with the dll is via code interface nodes).
System:
LabVIEW v. 6i
Windows NT4
DrDAQ and DrDAQ.dll via parallel port (lpt 1) www.picotech.com
Code interface node calls to the dll use a standard (WINAPI) calling convention and �run in UI thread�
When I try to build, I get the error
"Error 7 occured at ......drdaq32.dll - source does not exist"
The source does exist. I hav
e got the same error with the dll in the same directory as my vi and in a sub directory data.
Why does Application builder refuse to see this file ??I don't believe that this is the case.
Application builder is really very specific about what files are available and in what state. Though it is not really documented anywhere to my knowledge, the proper steps to building an application are as follows:
Before doing this, LabVIEW should be closed, and all other VIs out of memory.
1. Open your top level VI.
2. Click the run button to recompile
3. Choose "Save All" from the file menu
4. Close your top level VI and ensure that all VIs are saved properly.
5. Quit LabVIEW
6. Open LabVIEW - DO NOT open any of your VIs. Open LabVIEW from labview.exe via the start menu or other shortcut!
7. Open a new VI.
8. Open the application builder (tip, I went into the projects folder and
pulled a shortcut of the app builder out and onto my start menu, this opens the app builder fresh after LabVIEW has been exited.
9. Proceed with your build as normal.
The problem is that LabVIEW retains VIs in memory, even after they are all closed. If there is anything incomplete about these VIs, this will affect the build process. Unsaved VIs do not show up as being valid files (or something like that) to the app builder, thus if you didn't save even one single VI and try to build the application, you will get an error 7.
Step 1 is specific to your case, as recompiling ensures that all external connections are properly made.
If you still have the problem, post here and let us know. -
Compiling a vi with link to dll = error 7 "source does not exist"
I'm trying to compile a vi using Application Builder. The vi contains a link to imaq.dll (a part of the NI vision pack).
When I try to build, I get the error
"Error 7 occured at Imaq.dll - source does not exist"
But the source does exist, and it is not hidden, read-only or blocked by security policies.
Why does Application builder refuse to see this file ??
I tried copying the file to the base dir of the vi, and added it to the build from there => same problem.
System:
LabView v. 6i
Imaq v. 2.5
Windows NT4Hi Angelo,
If the vi is working properly under LV, then you can try to register the IMAQ.DLL
Execute the following command:
REGSVR32 "the complete path of IMAQ.DLL"
You should get a message that it has been registered; then try again.
Good luck,
Alberto -
Build Question: error 7 occurred at source does not exist
I have VIs built in LabVIEW 6.1. It works and built well. In LabVIEW
7, It works well. But when I try to build it. I got error.
I first use the mass conpile to compile VIs and then build the exe
with default settings. I got:
Error 7 occurred at source does not exist
Possible reason(s):
LabVIEW: File not found. The file might have been moved or deleted,
or the file path might be incorrectly formatted for the operating
system. For example, use \ as path separators on Windows, : on Mac OS,
and / on UNIX.
NI-488: Non-existent board.
But It does not point out which file does not exist.
Anyone can help me out?Hello yqin,
Here are some more KnowledgeBases that may pertain to your issue.
Error 7 When Building Applications and DLLs That Use the LabVIEW Report Generation Toolkit
Why Do I Get Error 7 When Building an Executable from a Build Script?
Error 7 at Invoke Node When Building a LabVIEW Executable
If the above KnowledgeBases do not work, we will want to try the following procedure.
1. Open your Main VI.
2. Hold + a
nd click the run arrow (forces recompile).
3. Close the VI and mass compile it.
4. Keep the VI closed and build the application from scratch (do not use a script).
5. Ensure that all VIs called dynamically are included as support files before building.
Please let me know if you have any questions,
Matt
Keep up to date on the latest PXI news at twitter.com/pxi -
Stored Procedure Help: Source does not have a runnable target
I'm an MS-SQL guy, so I'm fairly familiar with T-SQL syntax, but am having one heck of a time trying to take code I've written for SQL and transform it to work with Oracle.
Anyways, I'm using Oracle's SQL Developer, and I've got a stored procedure that calls the Alter Table statement and adds a column to it. I'm just trying to get this one to work before I move on to the other one's I have. I keep getting the message Source does not have a runnable target when I try running this command.
create or replace PROCEDURE rta_conv_addcolumn(rtatablename1 in varchar(20),
rtatablename2 in varchar(20),
rtacolumnname in varchar(256),
rtacolumninfo in varchar(256))
AS
DECLARE rtasql VARCHAR(4000);
BEGIN
IF EXISTS (SELECT * FROM user_tables WHERE table_name = rtatablename1)
AND NOT EXISTS (SELECT * FROM user_tab_columns WHERE column_name = rtacolumnname
AND table_name = rtatablename1)
AND NOT EXISTS (SELECT * FROM user_tab_columns WHERE column_name = rtacolumnname
AND table_name = rtatablename2)
Then rtasql:= 'ALTER TABLE ['+rtatablename2+'] ADD ' + rtacolumnname + ' ' + rtacolumninfo;
Execute (rtasql);
END rta_conv_addcolumn;
If I try compiling it I get the following messages, which don't make sense, since the syntax I'm using for declaring the input variables looks to be right.
Error(1,54): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
Error(2,29): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
Error(3,29): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
Error(4,29): PLS-00103: Encountered the symbol "(" when expecting one of the following: := . ) , @ % default character The symbol ":=" was substituted for "(" to continue.
Error(6,1): PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following: begin function package pragma procedure subtype type use <an identifier> <a double-quoted delimited-identifier> form current cursor external language The symbol "begin" was substituted for "DECLARE" to continue.
Error(15,5): PLS-00103: Encountered the symbol "RTA_CONV_ADDCOLUMN" when expecting one of the following: ifWhat table you want to add the column to? rtatablename1 or rtatablename2? I assumed 1 for now.
I tried to preserve your code structure so you can familiarize with it.
This piece should work, but you need to make sure you validate the parameters you concatenate to your strings when you use dynamic SQL.
That's when SQL injection takes place: when you trust the parameters you are receiving and don't validate them.
Also remember that DDL statements execute an implicit commit. Any previous DML operations you have pending will be commited by
this EXECUTE IMMEDIATE call if it succeeds.
I'd recommend some reading at the Oracle docs regarding those topics and the invoker's vs definer's rights for procedures.
It basically means that as a default behaviour, the user running the procedure "borrows" the rights and privileges of the procedure owner,
and that guy is usually super-privileged.
http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10472/subprograms.htm#LNPLS00809
CREATE OR REPLACE PROCEDURE rta_conv_addcolumn
rtatablename1 IN VARCHAR,
rtatablename2 IN VARCHAR,
rtacolumnname IN VARCHAR,
rtacolumninfo IN VARCHAR
) AS
rtasql VARCHAR(4000);
v_count NUMBER;
BEGIN
SELECT COUNT(*)
INTO v_count
FROM user_tables
WHERE table_name = upper(rtatablename1)
AND NOT EXISTS (SELECT *
FROM user_tab_columns
WHERE column_name = upper(rtacolumnname)
AND table_name = upper(rtatablename1))
AND NOT EXISTS (SELECT *
FROM user_tab_columns
WHERE column_name = upper(rtacolumnname)
AND table_name = upper(rtatablename2));
IF v_count > 0
THEN
-- is it to the rtablename1 or 2 you want to add this column to?
rtasql := 'ALTER TABLE ' || rtatablename1 ||' ADD ' || rtacolumnname || ' ' || rtacolumninfo;
EXECUTE IMMEDIATE rtasql;
END IF;
END rta_conv_addcolumn;Edited by: fsitja on Dec 11, 2009 11:21 PM -
A "for" expression that does not compile
This is a for loop from a snippet of code that does not compile in my J2SE 1.4.2 environment:
for (int i: Units.parseRange(range_, 1, pagecnt)) {
Can someone tell me what it means and what the 1.4.2 equivalent is?Does this mean there is no way that I can compile it in 1.4.2?
I mean, is there an option that enables it?Yes and No... That is, yes using the 5.0 ( 1.5.0 ) beta 2, you can compile to 5.0 ( 1.5.0 ) to 1.4 using the -source and -target switches using 1.4 features only...
but if you use 5.0 ( 1.5.0 ) features, it will not compile to 1.4 , it will give you an error stating that the feature is not supported by 1.4...
So your code snippet would need to be re-written to 1.4 code to work with 1.4.x JVMs ...
Here is an example of the For-Each aka Enhanced For loop written in 5.0 ( 1.5.0 ) beta2 :
public class ForEachArray {
public static void main ( String [] args ){
int[] ar = {1,2,3,4,5,6,7,8,9,0};
for (int i:ar){ // For-Each loop
System.out.println(i);
}Which the equivalent in 1.4 would be :
public class ForLoopArray {
public static void main ( String [] args ){
int[] ar = {1,2,3,4,5,6,7,8,9,0};
for (int i = 0; i < ar.length; i++ ){ // for loop
System.out.println(ar);
Hope this answers some of your question, now if you want help with that code snippet, naturally I will need to see some more code related to the snippet so that I can assist you in re-writing it to 1.4 version...
- MaxxDmg...
- ' He who never sleeps... ' -
Visual Composer 7.0: system (data source) does not appear
Hi...
There is a problem: system (data source) does not appear in Visual Composer 7.0
1. There is a connector MDM. It is made by PCD. It has been tested. The test is ok.
2. However, as the data source in Visual Composer a connector MDM does not appear.
3. This problem affects all types of connectors, but the Web Service Connector. Connector Web Service is always there.
What the .....?
P.S. The role of the creator of the connector is the same user of Visual Composer
Thanks...Hi...
There is a problem: system (data source) does not appear in Visual Composer 7.0
1. There is a connector MDM. It is made by PCD. It has been tested. The test is ok.
2. However, as the data source in Visual Composer a connector MDM does not appear.
3. This problem affects all types of connectors, but the Web Service Connector. Connector Web Service is always there.
What the .....?
P.S. The role of the creator of the connector is the same user of Visual Composer
Thanks... -
LV 8.5.1 AppBuilder error source does not exist
Hi,
I have a rather strange problem:
Every time I try to to build a VI that was converted from LV 7.1.1 to LV 8.5.1 I get an error that the source does not exist,
although the VI is there and the Preview-build does not throw an error :-/
When trying to build a VI created with LV 8.5.1 the build succeeds of course.
Does anybody have faced similar problems?
The VI and the project should be attached...
thx a lot,
Leo
Attachments:
SourceNotExisting4.zip 5 KB
SourceNotExisting5.zip 5 KBHi Johannes,
I have already converted and saved the VI to LV8.5.1.
Anyway, here are the steps to reproduce the problem:
1. Open the LV7.1.1-VI using LV8.5.1
2. Save it with LV 8.5.1
3. Create a new project containing the VI and having it as startup VI in an Application
4. Trying to build the application --> leads to the "source does not exist" error
Attached is the source VI (vers. 7.1.1) causing the problem.
thanks in advance,
Leo
Attachments:
Check_Pfad.vi 44 KB -
I am trying to build a stand-alone application on a target pc for which I have built a LabVIEW server that TestStand can use as an adapter.
In order to do this, I searched this site and found the topic: "How do I build and Use the LabVIEW Operator Interface as a LabVIEW ActiveX Run-time server?" After following the procedure to the letter, I ran the testexec.exe file as instructed and loaded my sequence file. As soon as I try to "Single Pass" or "Test UUT" I get an error which says "source does not existLast UI message: Start Execution". This error appears when running the testexec.exe file on the target pc or the development pc.
I have found though, th
at if I open the Operator interface through the Start: Programs>National Instruments>TestStand>Operator Interfaces>LabVIEW then the sequence file runs without these errors.
Any ideas why this is happening?Hello Robroy,
The KB you mentioned explaines how to build the LV Operator Interface (OI). So, I assumed you built the LV OI and also configured the LV adapter to use the TestStandGUILVRTS server without problems.
The error you are getting may be due to missing VIs. In other words, the LabVIEW OI may not be finding all the VIs your sequence is calling.
In order to deploy sequences that call VIs, you need to first run Tools >> Assemble VIs for Runtime Distribution. This tool gets all the VIs your sequence needs and saves in a separate directory.
For more information, you may check the TestStand User Manual chapter 17, it describes how to distribute TestStand and sequences.
Regards,
Roberto Piacentini
Applications Engineer
National Inst
ruments
www.ni.com/ask -
Error 7 occurred at source does not exist
I have VIs written in LabVIEW 6.1 and works fine. I try to use LabVIEW 7 to build it. But I got error:
Error 7 occurred at source does not exist
Possible reason(s):
LabVIEW: File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on UNIX.
NI-488: Non-existent board.
Application Builder: Error copying files.
It does not point out which file is not exsisted? Why?Hello �
From your question, I understand that you are trying to build an executable for LabVIEW 7.0 of some VIs that were built in LabVIEW 6.1.
You need to save all the VIs and subVIs that will be contained in the executable (or DLL) in LabVIEW 7.0 first. For this, the only thing you need to do is to open them in LabVIEW 7.0 and re-save them. If you want to keep copies for both versions of LabVIEW, you could even create a different folder for the version 7.0 ones. When re-saving your VIs just go to File >> Save As and browse to the directory you just created.
Then, you will be able to build the executable for LabVIEW 7.0.
Another possible solution to the problem is what is mentioned in this 5F09C86256745006E4494?OpenDocument>Knowledgebase.
Hope this helps!
S Vences
Applications Engineer
National Instruments -
Hi All,
I am getting the error "RFC destination R/3 Source does not exist., error key: RFC_ERROR_SYSTEM_FAILURE" when planning sequence (IP) is executed. Can some one help me please asap.
Regards
KiranHi,
Please go to sm59 and check if the RFC connection exists for this source system. If its there, please double click on it and on next screen, go to Menu bar and click on Test-> Connection and then test -> authorisation.
If you get any error, thats the reason. If you dont find the RFC at all, thats the reason why you got error.
You may also check WE20 for partner profile, whether it exists or not. -
Dear all,
am extracting the data from Vistex datasource,IRM/LIS_RM_IPCRASP IP CR Agreement Conditions
after activating in RSA5 i can able to see in RSA6
but while activating the data source after the extract structure has successfully generated,
the system showing data source does not exist
plz help mehi,
when i click the maintain button save button will appear,
but in my case this save button not highlighting...
when i check in ST22 the system proposed error mesage is table illegal statement,
i found this error in many forums but its not related to datasource actvation,
plz anyone giv me solution as soon as possible...
regards
Edited by: gadhatharan thirunavukkarasu on Oct 15, 2011 7:57 AM -
The ANE library is compiled to MacOS, but does not compile on Windows.
ANE lbrary FPHockeyApp http://flashpress.ru/blog/contents/ane/hockeyapp/FPHockeyApp-6.1.ane
Application:
package
import flash.display.Sprite;
import ru.flashpress.hockeyapp.FPHockeyApp;
import ru.flashpress.hockeyapp.ns.haIOS;
public class TestHockeyApp extends Sprite
public function TestHockeyApp()
super();
use namespace haIOS;
var APP_ID:String = 'you app id';
FPHockeyApp.manager.configureWithIdentifier(APP_ID);
FPHockeyApp.manager.startManager();
FPHockeyApp.manager.authenticator.authenticateInstallation();
Compiled in MacOS, but does not compile on Windows:
Why so?Windows 64-bit.
On a single MacBookPro installed OSX and Windows(not virtual). -
Source does not have a runnable target.
I am just learning Stored Procedures. I have Oracle SQL Developer Version 1.5.1 loaded, going against 11G running on Ubuntu Linux.
I try to build a very basic Stored Procedure:
CREATE OR REPLACE
PROCEDURE HR.TEST AS
BEGIN
Select * from hr.jobs
NULL;
END HR.TEST;
I always receive the following error:
Source does not have a runnable target
I always post these question in the wrong area on this Forum, so go ahead and just direct me to the correct forum if applicable.
Any ideas?
Thanks ZachAh, so Tom O'Neill was not writing about Oracle. The clue was in the title, "SQL Server Stored Procedures for Beginners". Easy to miss perhaps ;)
This is a valid procedure:
CREATE OR REPLACE PROCEDURE test
( p_salary IN jobs.min_salary%TYPE
, p_out_results OUT SYS_REFCURSOR )
AS
BEGIN
OPEN p_out_results FOR
SELECT *
FROM jobs
WHERE p_salary BETWEEN min_salary AND max_salary
ORDER BY min_salary, max_salary, job_title;
END test;Here's how you might call it from SQL*Plus:
SQL> var results refcursor
SQL> exec test(3000, :results)
PL/SQL procedure successfully completed.
SQL> print :results
JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
ST_CLERK Stock Clerk 2000 5000
PU_CLERK Purchasing Clerk 2500 5500
SH_CLERK Shipping Clerk 2500 5500
AD_ASST Administration Assistant 3000 6000
4 rows selected.or if you prefer,
SQL> set autoprint on
SQL>
SQL> exec test(3000, :results)
PL/SQL procedure successfully completed.
JOB_ID JOB_TITLE MIN_SALARY MAX_SALARY
ST_CLERK Stock Clerk 2000 5000
PU_CLERK Purchasing Clerk 2500 5500
SH_CLERK Shipping Clerk 2500 5500
AD_ASST Administration Assistant 3000 6000
4 rows selected.No idea how to call it from SQL Developer, sorry. -
Source does not support direct access
Hi Friends,
I'm trying to creat DTP for Master Data Text Datasource "0CFM_BD_CLS_TEXT (Bonds Classification (Texts))" which is belonged to CML application (Core Banking Mortgage Loans), but it's not allowing me to create DTP, it is giving the error saying that "Source does not support direct access"
FYI: i've checked tht datasource in SAP R/3 'RSA6' also, there the parameter for direct access is D and also i'mnot trying to load data remotely... how to resolve this issue?
Regards,
BalajiReddyTo get data remotely, the data source has to support remote accesbility. PL chekc this in RSA5 , RSA6.
Ravi Thothadri
Maybe you are looking for
-
Apole tv shows apple emblem blinking every 3-4 seconds. Remote only makes blinking light on remote stop flashing.
-
No posting possible in fiscal year 2015
Hi I am getting below pasted error while performing AFAB (Depreciation Run). This is the first time we are running the depreciation in the production system. We did not encounter this error in quality or development. This is a gap implementation proj
-
In iTunes I'm having problems changing the "Media Kind" in the OPTIONS menu from "Music" to "Audiobook". After going through the steps, the next time I check, the items have reverted back to "Music". What must I do to save it as an "Audiobook"?
-
DMS configuration & customization
Hi SAP Gurus, I am in realization phase of SAP DMS&ECM. So Pls. tell me from where i can get the detailed screen shots for the whole customization. Please Help... Thank email id:[email protected]
-
Frm-40733 pl sql built-in dbms_error_code failed
Dear ALL One developer is getting error message, when trying to save transaction. I searched it shows network problem. But still I didn't get the exact solutions and reason of getting this error. frm-40733 pl sql built-in dbms_error_code failed Thank