EF Error Attaching an entity of type 'Model' failed because
I pass my model from webpage to asp.net MVC Controller.When i try to update my code i take this error.I use repository pattern.I read same errors on site but i cant figure how can adapt to my code.
Error: Attaching an entity of type 'Model' failed because another entity of the same type already has the same primary key value.
public void Update(Model model)
model.AnaHesapID = Thread.CurrentPrincipal.Identity.GetAnaHesapID();
if (model.RowNumber != Guid.Empty && model.ModelID== 0)
//when i comment this i take 0 record updated error.
var oldModel= Get(calisan.RowNumber);
model.ModelID = oldModel.ModelID;
_myDal.Update(model);
//Repository Code
public virtual int Update(TEntity TObject)
//ADD LAST MODIFIED DATE IF APPLICABLE
if (TObject is LogProperties)
(TObject as LogProperties).DegistirmeTarihi = DateTime.UtcNow;
dbContext.Set<TEntity>().Attach(TObject);
var entry = dbContext.Entry(TObject);
entry.State = EntityState.Modified;
return dbContext.SaveChanges();
//Get Context
private TContext dbContext;
private int _anaHesapID;
public EfEntityRepositoryBase()
_anaHesapID = Thread.CurrentPrincipal.Identity.GetAnaHesapID();
dbContext = GetDbContext();
#region GetContext
//Update de patlıyor link: http://stackoverflow.com/questions/23201907/asp-net-mvc-attaching-an-entity-of-type-modelname-failed-because-another-ent
private TContext GetDbContext()
return this.GetDbContext(false);
protected virtual TContext GetDbContext(bool canUseCachedContext)
if (dbContext != null)
if (canUseCachedContext)
return dbContext;
else
dbContext.Dispose();
dbContext = new TContext();
return dbContext;
#endregion
//Dispose
private bool disposed = false;
protected virtual void Dispose(bool disposing)
if (!this.disposed)
if (disposing)
dbContext.Dispose();
this.disposed = true;
public void Dispose()
Dispose(true);
GC.SuppressFinalize(this);
There is plenty of talk about this out on Google. Hopefully, you'll find the solution.
https://www.google.com/#q=Error:+Attaching+an+entity+of+type++failed+because+another+entity+of+the+same+type+already+has+the+same+primary+key+value.
Similar Messages
-
JInitiator 1.3 Fatal Error Attachment to a running Virtual Machine failed
We are running forms 9i from 9ias R2. We have an outside client trying to access the application from a machine with Windows XP. They receive the following errror after downloading the Jinitiator 1.3.1.9: JInitiator 1.3 Fatal Error - Attachment to a running Virtual Machine failed. As we are using Windows 2000, we have not come across this before and I find nothing on Metalink.
Has anyone else had this problem? If so, do you have a solution?Hi,
whatever browser you are running, during installation of the Browser (Netscape 7.x) or IE (postinstall) you decided to make teh Java Plugin 1.4 your default JVM. This means the VM is started when JInitiator loads which then leads to this collision. Disable Java Plugin as a default VM and it shoudl work fine.
Frank -
Hardware: MacBook late 2009 (2.26Ghz Core 2 Duo 2 GB RAM 250GB HDD) running 10.9.4, Hackintosh MacPro (3.29Ghz i3 16GB RAM 1TB HDD) running 10.9.4, external 3 TB Seagate Backup+ drive
As you can can see from the screenshot below,
The external drive was initially plugged in a Netgear WNDR4500 router by USB to be used as NAS. I was in the middle of updating the firmware when there was a power outage. Upon reboot, the drive no longer mounts, whatever it is plugged in (router, Mac, PC, etc.).
I ran DiskUtility on the partition map and volume, same errors. Here's an what I see:
As you can see above, the "Mount" icon is greyed out and I get the error message "Partition map check failed because no slices were found". If I select "the Archive" partition, the "Mount" icon is not greyed out but clicking it doesn't do anything. My HDD is basically unreadable.
I issued a few Terminal commands to see what was the problem, here are the results:
What can I do?
Currently running analysis on TestDisk and it is 50% after 48hrs. Need some help!@ Allan Eckert: Unfortunately, reformatting is out of the question, I have 5 years of work on this!
@ Loner T: Yes, the firmware did successfully upgrade after router reboot and a bit of troubleshoot.
Thanks for the quick replies. Keep 'em coming! -
How can this error be fixed
Could be for a variety of reasons, including:
1. You Superdrive needs a clean
2. Poor quality media - most of us recommend Verbatim DVD-R, and a slow burn speed of 2x or 4x. -
ORA-39083: Object type TRIGGER failed to create with error:
i m getting these two error when i import data using impdp.
ORA-39083: Object type TRIGGER failed to create with error:
ORA-00942: table or view does not exist
i have exported (expdp) data from production db, when i importing (impdp) the dump file to the test db i m geting the above two errors.
example:
ORA-39083: Object type TRIGGER failed to create with error:
ORA-00942: table or view does not exist
Failing sql is:
CREATE TRIGGER "NEEDLE"."CC_BCK_TRG" BEFORE INSERT OR UPDATE
ON NIIL.cc_bck_mgmt REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW
DECLARE
w_date DATE;
w_user VARCHAR2(10);
BEGIN
SELECT USER,SYSDATE INTO w_user,w_date FROM DUAL;
IF INSERTING THEN
:NEW.cretuser :=w_user;
:NEW.cretdate :=w_date;
END IF;
IF UPDATING THEN
:NEW.modiuser :=w_user;
:NEW.modidate :=w_date;
END IF;
END;
status of the above trigger in pro db is valid. and source table also exist even though i m getting error when i import
please suggest me...perhaps you don't have table... (impdp created trigger before create table)
check about "NIIL.cc_bck_mgmt" table.
and then create it (trigger) manual ;)
Good Luck. -
ORA-27369: job of type EXECUTABLE failed with exit code:Operation notpermit
I am getting this error
ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted.
We have been using this for such a long time without any problems.this is the plsql scheduler :
Please help
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
job_name => 'PROD_LOAD_SL_FILES'
,start_date => TO_TIMESTAMP_TZ('2005/12/02 17:05:00.000000 -05:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
,repeat_interval => NULL
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'EXECUTABLE'
,job_action => '/home/oracle/actual/payment_files/slc_prod/load_sl_files.sh'
,comments => 'Loads SL files, uploads logs to database and sends email to Disbursement and DBA teams'
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_RUNS');
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...
WHEN OTHERS THEN
NULL;
END;
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'JOB_PRIORITY'
,value => 1);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'AUTO_DROP'
,value => FALSE);
END;
and this is part of the unix script get executed:
[oracle@USAC-S009 slc_prod]$ cat load_sl_files.sh
#!/bin/sh
# FILEME: /home/oracle/actual/paytment_files/load_sl_files.sh
# PURPOSE: Load SL files, email .log files
# INSTRUCTIONS/COMMENTS/ASSUMPTIONS: Two SL files will be pulled down
# MAINTENANCE LOG
# REV# DATE AUTHOR QA-ed BY CHANGE DESCRIPTION KEY
DATE=`/bin/date +%d%b%y_%H%M`
HOME=/home/oracle
export HOME
ORACLE_HOME=/u01/app/oracle/product/10.2
export ORACLE_HOME
ORACLE_SID=em
export ORACLE_SID
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/etc:/usr/local/bin:/u01/app/oracle/product/10.2/bin:/bin:/sbin:/usr/bin:/usr/sbin; export PATH
SL_HOME=/home/oracle/actual/payment_files/slc_prod
FILE_HOME=/opt/u02/home/usair
# Call slc.sh to load files
ssh usac09.usacad.loc > /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
/u01/app/oracle/slc.sh 2>&1
sleep 120
EOT
# Move logs from usac09 to usac-s009
#ssh usac09.usacad.loc >> /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
# /u01/app/oracle/move_logs.sh 2>&1
# sleep 15
#EOT
.............Hi!
I have shell scripts with number of mandatory parameters.
How can I write it in sql procedure in order to create exact command line that shuold be executed in Linux?
the procedure looks like :
CREATE OR REPLACE procedure CRM.run_tts (p_tts_name in varchar2 )
is
v_tts_name varchar2(2000);
v_job_name varchar2(2000);
v_source varchar2(200);
v_target varchar2(200);
Begin
v_tts_name := upper(p_tts_name);
--if p_instance_type='P' then
v_source := 'psdwh';
v_target := 'pudwh';
--end if;
if v_tts_name is not null then
v_job_name := 'run_tts_'||v_tts_name;
v_source := '/-ssid/'||v_source;
v_target := '/-tsid/'||v_target;
v_tts_name := '/-tbsname/'||v_tts_name;
DBMS_SCHEDULER.create_job (
job_name => v_job_name,
job_type => 'EXECUTABLE',
job_action => '/tmp/trans_asm',
start_date => SYSTIMESTAMP,
number_of_arguments => 3,
enabled => false,
auto_drop => false);
--dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm.sh'||' '||c_rec.id||' '||'"'||c_rec.view_name||'"'||' '||v_setnum||' '||'"'||V_MACHINE_TYPE||'"'||' '||'"'||p_mode||'"');
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>v_source);
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>2,argument_value=>v_target);
dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>3,argument_value=>v_tts_name);
-- dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/software/oracle/dba/scripts/bin/trans_asm_ps.sh');
--dbms_scheduler.set_job_argument_value(job_name=>v_job_name,argument_position=>1,argument_value=>'/tmp/test.sh');
-- trans_asm -ssid tsdwh -tsid tudwh -tbsname DW_BILLING_TTS
dbms_scheduler.enable(name=>v_job_name);
end if;
end;
the command looks like :
trans_asm -ssid psdwh -tsid pudwh -tbsname YOAV_TTS
Thank you !
Valerie -
ORA-27369: job of type EXECUTABLE failed with exit code
am getting this error
ORA-27369: job of type EXECUTABLE failed with exit code: Operation not permitted.
We have been using this for such a long time without any problems.this is the plsql scheduler :
Please help
BEGIN
SYS.DBMS_SCHEDULER.CREATE_JOB
job_name => 'PROD_LOAD_SL_FILES'
,start_date => TO_TIMESTAMP_TZ('2005/12/02 17:05:00.000000 -05:00','yyyy/mm/dd hh24:mi:ss.ff tzh:tzm')
,repeat_interval => NULL
,end_date => NULL
,job_class => 'DEFAULT_JOB_CLASS'
,job_type => 'EXECUTABLE'
,job_action => '/home/oracle/actual/payment_files/slc_prod/load_sl_files.sh'
,comments => 'Loads SL files, uploads logs to database and sends email to Disbursement and DBA teams'
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'RESTARTABLE'
,value => FALSE);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'LOGGING_LEVEL'
,value => SYS.DBMS_SCHEDULER.LOGGING_RUNS);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_FAILURES');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'MAX_RUNS');
BEGIN
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'STOP_ON_WINDOW_CLOSE'
,value => FALSE);
EXCEPTION
-- could fail if program is of type EXECUTABLE...
WHEN OTHERS THEN
NULL;
END;
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'JOB_PRIORITY'
,value => 1);
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE_NULL
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'SCHEDULE_LIMIT');
SYS.DBMS_SCHEDULER.SET_ATTRIBUTE
( name => 'PROD_LOAD_SL_FILES'
,attribute => 'AUTO_DROP'
,value => FALSE);
END;
and this is part of the unix script get executed:
[oracle@USAC-S009 slc_prod]$ cat load_sl_files.sh
#!/bin/sh
# FILEME: /home/oracle/actual/paytment_files/load_sl_files.sh
# PURPOSE: Load SL files, email .log files
# INSTRUCTIONS/COMMENTS/ASSUMPTIONS: Two SL files will be pulled down
# MAINTENANCE LOG
# REV# DATE AUTHOR QA-ed BY CHANGE DESCRIPTION KEY
DATE=`/bin/date +%d%b%y_%H%M`
HOME=/home/oracle
export HOME
ORACLE_HOME=/u01/app/oracle/product/10.2
export ORACLE_HOME
ORACLE_SID=em
export ORACLE_SID
PATH=/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/oracle/bin:/etc:/usr/local/bin:/u01/app/oracle/product/10.2/bin:/bin:/sbin:/usr/bin:/usr/sbin; export PATH
SL_HOME=/home/oracle/actual/payment_files/slc_prod
FILE_HOME=/opt/u02/home/usair
# Call slc.sh to load files
ssh usac09.usacad.loc > /home/oracle/actual/payment_files/slc_prod/slc.sh.log <<EOT
/u01/app/oracle/slc.sh 2>&1
sleep 120
EOT
.............Hi,
The user oracle who owns the scheduler already has permissions for the mailx and the same script is able to send notifications when run manully. Do I need to set additional permissions for scheduler ?
Also the db version is 10.2.0.5.
Thanks -
ORA-27369: job of type EXECUTABLE failed with exit code: 255
I created a job in the DBMS_SCHEDULER with the following code -
BEGIN
DBMS_SCHEDULER.CREATE_JOB (
job_name => 'POSPAY_CHECK_JOB',
job_type => 'EXECUTABLE',
job_action => '/dev/POSPAY_USC2_CHECK.sh',
auto_drop => FALSE,
enabled => TRUE);
END;
/ When I tried to run the job, I got this error -
"ORA-27369: job of type EXECUTABLE failed with exit code: 255 STANDARD_ERROR="execve: No such file or directory""After reviewing the job in the dba_scheduler_jobs view, I noticed that ENABLE = FALSE. When I ran the code to enable it, it STILL remained FALSE.
BEGIN
DBMS_SCHEDULER.ENABLE('POSPAY_CHECK_JOB');
END;
/ Can someone please let me know why the new job will not run?
Why can't I ENABLE it?
Thanks!Additional Info - Here is the data for the POSPAY_CHECK_JOB from the DBA_SCHEDULER_JOBS view -
select * from sys.dba_scheduler_jobs where job_name like 'POSPAY_CHECK_JOB';
OWNER APPS
JOB_NAME POSPAY_CHECK_JOB
JOB_SUBNAME
JOB_CREATOR APPS
CLIENT_ID
GLOBAL_UID
PROGRAM_OWNER
PROGRAM_NAME
JOB_TYPE EXECUTABLE
JOB_ACTION /dev/POSPAY_USC2_CHECK.sh
NUMBER_OF_ARGUMENTS 0
SCHEDULE_TYPE IMMEDIATE
JOB_CLASS DEFAULT_JOB_CLASS
ENABLED FALSE
AUTO_DROP FALSE
RESTARTABLE FALSE
JOB_PRIORITY 3
RUN_COUNT 1
FAILURE_COUNT 1
RETRY_COUNT 0
LAST_START_DATE 19-NOV-09 10.16.34.502747000 AM -06:00
LAST_RUN_DURATION 0 0:0:0.55307000
LOGGING_LEVEL RUNS
STOP_ON_WINDOW_CLOSE FALSE
INSTANCE_STICKINESS TRUE
JOB_WEIGHT 1
NLS_ENV NLS_LANGUAGE='AMERICAN' NLS_TERRITORY='AMERICA' NLS_CURRENCY='$' NLS_ISO_CURRENCY='AMERICA' NLS_NUMERIC_CHARACTERS='.,' NLS_CALENDAR='GREGORIAN' NLS_DATE_FORMAT='DD-MON-RR' NLS_DATE_LANGUAGE='AMERICAN' NLS_SORT='BINARY' NLS_TIME_FORMAT='HH.MI.SSXFF AM' NLS_TIMESTAMP_FORMAT='DD-MON-RR HH.MI.SSXFF AM' NLS_TIME_TZ_FORMAT='HH.MI.SSXFF AM TZR' NLS_TIMESTAMP_TZ_FORMAT='DD-MON-RR HH.MI.SSXFF AM TZR' NLS_DUAL_CURRENCY='$' NLS_COMP='BINARY' NLS_LENGTH_SEMANTICS='BYTE' NLS_NCHAR_CONV_EXCP='FALSE'
FLAGS 2146384 -
ORA-27369: job of type EXECUTABLE failed with exit code:No such file or dir
Hi all,
i am new with DBMS_SCHEDULER and my need is to create a job, without program and schedule, that i can call in an Apex app.
This job run a window *.bat* file via cmd.exe
I test the .bat with doubleclick and it work.
I test window run with the string c:\windows\system32\cmd.exe/c C:/mycompletepath/myfilename.bat > nul and it work.
I execute the following execute DBMS_SCHEDULER.create_job (
job_name=>'EIM_JOB',
job_type=>'EXECUTABLE',
job_action=>'c:\windows\system32\cmd.exe',
number_of_arguments=>1,
auto_drop=>FALSE,
enabled=>FALSE,
comments=>'Job Lancio EIM'
); and the job is created.
I execute this execute DBMS_SCHEDULER.set_job_argument_value('EIM_JOB',1,' /c C:/mycompletepath/myfilename.bat > nul');
execute DBMS_SCHEDULER.enable('EIM_JOB');
execute DBMS_SCHEDULER.PURGE_LOG(job_name=>'EIM_JOB');
execute DBMS_SCHEDULER.run_job('EIM_JOB');but the error ORA-27369: job of type EXECUTABLE failed with exit code: No such file or directory is raised
The argument is uge and reading about it here https://forums.oracle.com/forums/thread.jspa?threadID=701740 here https://forums.oracle.com/forums/thread.jspa?threadID=555102 and here http://www.oracle-base.com/articles/11g/SchedulerEnhancements11gR1.php_ i suppose that my problem is quite about credentials but i need some help or tips to clearly identify, verify and solve the problem.
Any kind of help will be appreciated.
Thanks
AlexHi Ravi,
thank you for your helpful reply.
I am changing my script in order to meet your advices but when i run this execute DBMS_SCHEDULER.CREATE_CREDENTIAL (
credential_name=>'SIECRMWIN',
username=>'myusername',
password=>'mypassword',
database_role=>NULL,
windows_domain=>'SIECRM',
comments=>'Windows credential to run job'); the error PLS-00302: component 'CREATE_CREDENTIAL' must be declared is raised.
My DB is Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
PL/SQL Release 10.2.0.5.0 - Production
CORE 10.2.0.5.0 Production
TNS for IBM/AIX RISC System/6000: Version 10.2.0.5.0 - Productio
NLSRTL Version 10.2.0.5.0 - ProductionWhich is my mistakes?
Searchibg the internet i found this OracleJobScheduler Windows service, how i can verify if service exist and start it on my server?
Thanks again for any kind of help.
Edited by: OraclePSP on 23-mar-2012 5.59 -
ORA-27369: job of type EXECUTABLE failed for scheduler
I help reg dbms scheduler in oracle.
I am getting below error when I call a shell script from procedure. Could you please help me out in this.
Steps Taken:
==========
1) Modified rdbms/admin/externaljob.ora file to add the below info
run_user = oracle
run_group = dba
2) And have changed the bin/extjob file must be permissions to 4750 (-rwsr-x---)
3) The shell script is having full permission(777) and is sending email to db email.
Error:
=====
ORA-27369: job of type EXECUTABLE failed with exit code: 274662
STANDARD_ERROR="Oracle Scheduler error: Config file is not owned by root or is writable by group or other or extjob is not setuid and owned by root"
Code:
=====
DBMS_SCHEDULER.create_job (
job_name => 'gatekeeper3',
job_type => 'EXECUTABLE',
job_action => '/home/cobr_sftp/var/download/test_abh.sh',
number_of_arguments => 0,
enabled => true,
--auto_drop => true,
comments => 'CREATE_PROGRAM test using a schell script'
Edited by: user11942774 on Sep 26, 2012 12:33 AMHi,
I have went through the below link and have maede the changes. But i am still getting the same error.
Could you please help me as to where i am going wrong.
Scheduler link: Guide to External Jobs on 10g with dbms_scheduler e.g. scripts,batch files
1) I have modified rdbms/admin/externaljob.ora file to add the below info
run_user = oracle
run_group = dba
2) And have changed the bin/extjob file must be permissions to 4750 (-rwsr-x---)
3) The shell script is having full permission(777) and is sending email to db email.
4) - bin/extjobo sfile should have normal 755 (rwxr-xr-x)
5) - bin/jssu should have setuid permissions i.e. with 4750 (-rwsr-x---) -
My latest MVC 5 project built with VS 2013 compiled and works fine on my PC but can not be published to server using command line aspnet_compiler. I kept getting the web.config(132): error ASPCONFIG: Could not load type 'System.Data.Entity.Design.AspNet.EntityDesignerBuildProvider'
In my web.config file, I have the following as suggested by many for solution:
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
<add assembly="System.Data.Entity.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
However, the error is persisting. I have no clue how to fix this. Hope someone can help.Hello FredVanc,
As you mentions, it could work with your develop environment, so I am wondering it is that on the server machine, the assembly is not there actually. Here are some information I found which might be helpful:
https://support.microsoft.com/en-gb/kb/958975?wa=wsignin1.0
https://social.msdn.microsoft.com/Forums/en-US/1295cfa8-751b-4e9b-a7a7-14e1ad1393b6/compiling-error?forum=adodotnetentityframework
By the way, since this issue is related with ASP.ENT project, I suggest that you could post it to the ASP.NET forum, there are web experts will help you:
http://forums.asp.net/
Regards.
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
When I create an EJB Transport Business Service, after selecting the jar that has the EJB 2.1 artefacts (Remote, Home, etc) the oepe plugin fails and can't continue.
As I understand it seems that there is a problem with the classpath of ant build.xml that oepe creates inside folder /tmp/alsbejbtransport/ to compile the bs and generate the wsdl. I checked if tools.jar is in the classpath (in eclipse) and is included, so I can't figure out wich is the problem.
I found this in Oracle, but not helps solve the problem:
BEA-398120
Error: The WSDL for the typed transport endpoint could not be accessed.
Description
There was a problem retrieving the WSDL from the typed transport service endpoint at the time of service registration
Action
Contact technical support
This is the the full stacktrace that shows eclipse.
Generate : Error during generation of the WSDL:
BUILD FAILED
java.lang.NoClassDefFoundError: com/sun/javadoc/Type
at com.bea.util.jam.provider.JamServiceFactoryImpl.createSourceBuilder(JamServiceFactoryImpl.java:205)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:158)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createClassLoader(JamServiceFactoryImpl.java:137)
at com.bea.util.jam.provider.JamServiceFactoryImpl.createService(JamServiceFactoryImpl.java:78)
at weblogic.wsee.util.JamUtil.parseSource(JamUtil.java:152)
at weblogic.wsee.tools.anttasks.JwsLoader.loadJClasses(JwsLoader.java:186)
at weblogic.wsee.tools.anttasks.JwsLoader.load(JwsLoader.java:75)
at weblogic.wsee.tools.anttasks.JwsModule.loadWebServices(JwsModule.java:569)
at weblogic.wsee.tools.anttasks.JwsModule.generate(JwsModule.java:369)
at weblogic.wsee.tools.anttasks.JwsModule.build(JwsModule.java:256)
at weblogic.wsee.tools.anttasks.JwscTask.execute(JwscTask.java:184)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
at org.apache.tools.ant.Main.runBuild(Main.java:758)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassNotFoundException: com.sun.javadoc.Type
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1400)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1341)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1088)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
... 27 more
Total time: 0 seconds
Eclipse Installation details:
*** System properties:
eclipse.application=org.eclipse.ui.ide.workbench
eclipse.buildId=M20110909-1335
eclipse.commands=-os
linux
-ws
gtk
-arch
x86_64
-showsplash
-launcher
{home}/Development/oepe-indigo/eclipse
-name
Eclipse
--launcher.library
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so
-startup
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.overrideVmargs
-exitdata
1e418010
-vm
/usr/bin/java
eclipse.home.location=file:{home}/Development/oepe-indigo/
eclipse.launcher={home}/Development/oepe-indigo/eclipse
eclipse.launcher.name=Eclipse
[email protected]/../p2/
eclipse.p2.profile=PlatformProfile
eclipse.product=org.eclipse.platform.ide
eclipse.startTime=1374623921455
eclipse.vm=/usr/bin/java
eclipse.vmargs=-Xms256m
-Xmx768m
-XX:MaxPermSize=512m
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dweblogic.home={home}/Oracle/Middleware/wlserver_10.3
-Dharvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester
-Dosb.home={home}/Oracle/Middleware/Oracle_OSB1
-Dosgi.bundlefile.limit=750
-Dosgi.nl=en_US
-Dmiddleware.home={home}/Oracle/Middleware
-jar
{home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
equinox.use.ds=true
file.encoding=UTF-8
file.encoding.pkg=sun.io
file.separator=/
guice.disable.misplaced.annotation.check=true
harvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester
http.nonProxyHosts=localhost
java.awt.graphicsenv=sun.awt.X11GraphicsEnvironment
java.awt.printerjob=sun.print.PSPrinterJob
java.class.path={home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
java.class.version=50.0
java.endorsed.dirs=/usr/lib/jvm/jdk1.6.0_45/jre/lib/endorsed
java.ext.dirs=/usr/lib/jvm/jdk1.6.0_45/jre/lib/ext:/usr/java/packages/lib/ext
java.home=/usr/lib/jvm/jdk1.6.0_45/jre
java.io.tmpdir=/tmp
java.library.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64/server:/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64:/usr/lib/jvm/jdk1.6.0_45/jre/../lib/amd64:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib
java.protocol.handler.pkgs=null|com.bea.wli.sb.resources.url|com.bea.wli.sb.resources.jca.upgrade.url|weblogic.utils|weblogic.utils|weblogic.utils|weblogic.net|weblogic.net
java.runtime.name=Java(TM) SE Runtime Environment
java.runtime.version=1.6.0_45-b06
java.specification.name=Java Platform API Specification
java.specification.vendor=Sun Microsystems Inc.
java.specification.version=1.6
java.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
java.version=1.6.0_45
java.vm.info=mixed mode
java.vm.name=Java HotSpot(TM) 64-Bit Server VM
java.vm.specification.name=Java Virtual Machine Specification
java.vm.specification.vendor=Sun Microsystems Inc.
java.vm.specification.version=1.0
java.vm.vendor=Sun Microsystems Inc.
java.vm.version=20.45-b01
javax.rmi.CORBA.PortableRemoteObjectClass=weblogic.iiop.PortableRemoteObjectDelegateImpl
javax.rmi.CORBA.UtilClass=weblogic.iiop.UtilDelegateImpl
jna.platform.library.path=/usr/lib/x86_64-linux-gnu:/lib/x86_64-linux-gnu:/lib64:/usr/lib:/lib
line.separator=
middleware.home={home}/Oracle/Middleware
oracle.eclipse.tools.weblogic.ui.isWebLogicServer=true
org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
org.eclipse.equinox.launcher.splash.location={home}/Development/oepe-indigo/plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
org.eclipse.equinox.simpleconfigurator.configUrl=file:org.eclipse.equinox.simpleconfigurator/bundles.info
org.eclipse.m2e.log.dir={home}/workspace/pragma/.metadata/.plugins/org.eclipse.m2e.logback.configuration
org.eclipse.update.reconcile=false
org.omg.CORBA.ORBClass=weblogic.corba.orb.ORB
org.omg.CORBA.ORBSingletonClass=weblogic.corba.orb.ORB
org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,OSGi/Minimum-1.2,JRE-1.1,J2SE-1.2,J2SE-1.3,J2SE-1.4,J2SE-1.5,JavaSE-1.6
org.osgi.framework.language=en
org.osgi.framework.os.name=Linux
org.osgi.framework.os.version=3.8.0
org.osgi.framework.processor=x86-64
org.osgi.framework.system.capabilities=osgi.ee; osgi.ee="OSGi/Minimum"; version:List<Version>="1.0, 1.1, 1.2",osgi.ee; osgi.ee="JavaSE"; version:List<Version>="1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6"
org.osgi.framework.system.packages=javax.accessibility,javax.activation,javax.activity,javax.annotation,javax.annotation.processing,javax.crypto,javax.crypto.interfaces,javax.crypto.spec,javax.imageio,javax.imageio.event,javax.imageio.metadata,javax.imageio.plugins.bmp,javax.imageio.plugins.jpeg,javax.imageio.spi,javax.imageio.stream,javax.jws,javax.jws.soap,javax.lang.model,javax.lang.model.element,javax.lang.model.type,javax.lang.model.util,javax.management,javax.management.loading,javax.management.modelmbean,javax.management.monitor,javax.management.openmbean,javax.management.relation,javax.management.remote,javax.management.remote.rmi,javax.management.timer,javax.naming,javax.naming.directory,javax.naming.event,javax.naming.ldap,javax.naming.spi,javax.net,javax.net.ssl,javax.print,javax.print.attribute,javax.print.attribute.standard,javax.print.event,javax.rmi,javax.rmi.CORBA,javax.rmi.ssl,javax.script,javax.security.auth,javax.security.auth.callback,javax.security.auth.kerberos,javax.security.auth.login,javax.security.auth.spi,javax.security.auth.x500,javax.security.cert,javax.security.sasl,javax.sound.midi,javax.sound.midi.spi,javax.sound.sampled,javax.sound.sampled.spi,javax.sql,javax.sql.rowset,javax.sql.rowset.serial,javax.sql.rowset.spi,javax.swing,javax.swing.border,javax.swing.colorchooser,javax.swing.event,javax.swing.filechooser,javax.swing.plaf,javax.swing.plaf.basic,javax.swing.plaf.metal,javax.swing.plaf.multi,javax.swing.plaf.synth,javax.swing.table,javax.swing.text,javax.swing.text.html,javax.swing.text.html.parser,javax.swing.text.rtf,javax.swing.tree,javax.swing.undo,javax.tools,javax.transaction,javax.transaction.xa,javax.xml,javax.xml.bind,javax.xml.bind.annotation,javax.xml.bind.annotation.adapters,javax.xml.bind.attachment,javax.xml.bind.helpers,javax.xml.bind.util,javax.xml.crypto,javax.xml.crypto.dom,javax.xml.crypto.dsig,javax.xml.crypto.dsig.dom,javax.xml.crypto.dsig.keyinfo,javax.xml.crypto.dsig.spec,javax.xml.datatype,javax.xml.namespace,javax.xml.parsers,javax.xml.soap,javax.xml.stream,javax.xml.stream.events,javax.xml.stream.util,javax.xml.transform,javax.xml.transform.dom,javax.xml.transform.sax,javax.xml.transform.stax,javax.xml.transform.stream,javax.xml.validation,javax.xml.ws,javax.xml.ws.handler,javax.xml.ws.handler.soap,javax.xml.ws.http,javax.xml.ws.soap,javax.xml.ws.spi,javax.xml.ws.wsaddressing,javax.xml.xpath,org.ietf.jgss,org.omg.CORBA,org.omg.CORBA_2_3,org.omg.CORBA_2_3.portable,org.omg.CORBA.DynAnyPackage,org.omg.CORBA.ORBPackage,org.omg.CORBA.portable,org.omg.CORBA.TypeCodePackage,org.omg.CosNaming,org.omg.CosNaming.NamingContextExtPackage,org.omg.CosNaming.NamingContextPackage,org.omg.Dynamic,org.omg.DynamicAny,org.omg.DynamicAny.DynAnyFactoryPackage,org.omg.DynamicAny.DynAnyPackage,org.omg.IOP,org.omg.IOP.CodecFactoryPackage,org.omg.IOP.CodecPackage,org.omg.Messaging,org.omg.PortableInterceptor,org.omg.PortableInterceptor.ORBInitInfoPackage,org.omg.PortableServer,org.omg.PortableServer.CurrentPackage,org.omg.PortableServer.POAManagerPackage,org.omg.PortableServer.POAPackage,org.omg.PortableServer.portable,org.omg.PortableServer.ServantLocatorPackage,org.omg.SendingContext,org.omg.stub.java.rmi,org.w3c.dom,org.w3c.dom.bootstrap,org.w3c.dom.css,org.w3c.dom.events,org.w3c.dom.html,org.w3c.dom.ls,org.w3c.dom.ranges,org.w3c.dom.stylesheets,org.w3c.dom.traversal,org.w3c.dom.views,org.w3c.dom.xpath,org.xml.sax,org.xml.sax.ext,org.xml.sax.helpers
org.osgi.framework.uuid=901615cd-f3f3-0012-11b6-a3bca4d97ac1
org.osgi.framework.vendor=Eclipse
org.osgi.framework.version=1.6.0
org.osgi.supports.framework.extension=true
org.osgi.supports.framework.fragment=true
org.osgi.supports.framework.requirebundle=true
os.arch=amd64
os.name=Linux
os.version=3.8.0-26-generic
osb.home={home}/Oracle/Middleware/Oracle_OSB1
osgi.arch=x86_64
osgi.bundlefile.limit=750
osgi.bundles=reference:file:javax.transaction_1.1.1.v201105210645.jar,reference:file:org.eclipse.equinox.simpleconfigurator_1.0.200.v20110502-1955.jar@1:start
osgi.bundles.defaultStartLevel=4
osgi.bundlestore={home}/Development/oepe-indigo/configuration/org.eclipse.osgi/bundles
osgi.configuration.area=file:{home}/Development/oepe-indigo/configuration/
osgi.framework=file:{home}/Development/oepe-indigo/plugins/org.eclipse.osgi_3.7.1.R37x_v20110808-1106.jar
osgi.framework.extensions=reference:file:javax.transaction_1.1.1.v201105210645.jar
osgi.framework.shape=jar
osgi.framework.version=3.7.1.R37x_v20110808-1106
osgi.frameworkClassPath=., file:{home}/Development/oepe-indigo/plugins/javax.transaction_1.1.1.v201105210645.jar
osgi.install.area=file:{home}/Development/oepe-indigo/
osgi.instance.area=file:{home}/workspace/pragma/
osgi.instance.area.default=file:{home}/workspace/
osgi.logfile={home}/workspace/pragma/.metadata/.log
osgi.manifest.cache={home}/Development/oepe-indigo/configuration/org.eclipse.osgi/manifests
osgi.nl=en_US
osgi.nl.user=en_US
osgi.os=linux
osgi.splashLocation={home}/Development/oepe-indigo/plugins/org.eclipse.platform_3.7.1.v201109091335/splash.bmp
osgi.splashPath=platform:/base/plugins/org.eclipse.platform
osgi.syspath={home}/Development/oepe-indigo/plugins
osgi.tracefile={home}/workspace/pragma/.metadata/trace.log
osgi.ws=gtk
path.separator=:
securerandom.source=file:/dev/./urandom
socksNonProxyHost=localhost
sun.arch.data.model=64
sun.boot.class.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/resources.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/rt.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/sunrsasign.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jsse.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/jce.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/charsets.jar:/usr/lib/jvm/jdk1.6.0_45/jre/lib/modules/jdk.boot.jar:/usr/lib/jvm/jdk1.6.0_45/jre/classes
sun.boot.library.path=/usr/lib/jvm/jdk1.6.0_45/jre/lib/amd64
sun.cpu.endian=little
sun.cpu.isalist=
sun.desktop=gnome
sun.io.unicode.encoding=UnicodeLittle
sun.java.command={home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar -os linux -ws gtk -arch x86_64 -showsplash -launcher {home}/Development/oepe-indigo/eclipse -name Eclipse --launcher.library {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505/eclipse_1407.so -startup {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.overrideVmargs -exitdata 1e418010 -vm /usr/bin/java -vmargs -Xms256m -Xmx768m -XX:MaxPermSize=512m -Dsun.lang.ClassLoader.allowArraySyntax=true -Dweblogic.home={home}/Oracle/Middleware/wlserver_10.3 -Dharvester.home={home}/Oracle/Middleware/Oracle_OSB1/harvester -Dosb.home={home}/Oracle/Middleware/Oracle_OSB1 -Dosgi.bundlefile.limit=750 -Dosgi.nl=en_US -Dmiddleware.home={home}/Oracle/Middleware -jar {home}/Development/oepe-indigo//plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
sun.java.launcher=SUN_STANDARD
sun.jnu.encoding=UTF-8
sun.lang.ClassLoader.allowArraySyntax=true
sun.management.compiler=HotSpot 64-Bit Tiered Compilers
sun.os.patch.level=unknown
svnkit.http.methods=Basic
svnkit.library.gnome-keyring.enabled=false
user.country=AR
user.dir={home}/Development/oepe-indigo
user.home={home}
user.language=es
user.name={username}
user.timezone=America/Argentina/Buenos_Aires
weblogic.home={home}/Oracle/Middleware/wlserver_10.3
Thanks!!run this one in command prompt and then convert the applet using converter tool
JC_HOME = C:\java_card_kit-2_2_2\bin\
set CLASSES=%JCHOME%\lib\apduio.jar;%JC_HOME%\lib\apdutool.jar;%JC_HOME%\lib\jcwde.jar;%JC_HOME%\lib\converter.jar;%JC_HOME%\lib\scriptgen.jar;%JC_HOME%\lib\offcardverifier.jar;%JC_HOME%\lib\api.jar;%JC_HOME%\lib\installer.jar;%JC_HOME%\lib\capdump.jar;
D:\NareshPalle\jcardRE\Smart\src>java -classpath %_CLASSES% com.sun.javacard.con
verter.Converter -out EXP JCA CAP -exportpath .\exp -applet 0x0a:0x00:0x00:0x00:0x0e:0x01:0x02:
0x03:0x04:0x05:0x06 PackageName appletName 0x01:0x02:0x03:0x04:0x05:0x0
6:0x07:0x08 1.0
or
go to following directory and run the converter tool in command prompt
step 1: cd C:\java_card_kit-2_2_2\bin\
then run this command under the above directory
step 2:converter -classdir E:\Pathof Your applet class file -out EXP JCA CAP -exportpath E:\path of exp files folder -applet AID PackageName AppletName PackAID major.minor no
For more doubts mail me....
*[removed by moderator]*
Thanks and Regards
NareshPalle
Edited by: EJP on 31/03/2012 20:09: removed your email address. Unless you like spam and unless you think these forums are provided for your personal benefit only, posting an email address here serves no useful purpose whatsoever. -
Unable to cast object of type 'Microsoft.Xrm.Sdk.Entity' to type
when I using below code :
using (ServiceContext svcContext = new ServiceContext(service))
var creditNote = svcContext.new_credit_noteSet.Where(c => c.new_credit_noteId == cnid).FirstOrDefault();
got this error:
System.InvalidCastException: Unable to cast object of type 'Microsoft.Xrm.Sdk.Entity' to type 'TCT.CRM.Model.new_credit_note'.
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at Microsoft.Xrm.Sdk.Linq.PagedItemCollection`1.MoveNext()
at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source)
at HP.Crm2013.Plugins.ServiceManage.sm_credit_note_update_post.CalculateTotalAmount(IOrganizationService service, Guid cnid)
at HP.Crm2013.Plugins.ServiceManage.sm_credit_note_update_post.Execute(IServiceProvider serviceProvider)
any help?
AwenHi Awen,
This kind of error usualy occur if we dont have enable proxytype for the CRM service.
Add the below line in your code after creating the service proxy and check :
_serviceProxy.EnableProxyTypes();
Thanks,
Seban -
Error #1034 Type Coercion fail with registerClassAlias and nested Vectors
I'm attempting to use flash.net.registerClassAlias and ByteArray.writeObject in order to serialize/deserialize data with static type information. It works as you'd expect in the general case but I've run into problems with some nested Vectors that I don't understand. Hopefully someone can point out if I'm just missing something.
For what I understand, we must register both the scalar types and a one-deep specification of a Vector for that scalar type in order to use nested Vectors. For example:
flash.net.registerClassAlias("TestStructureInner", TestStructureInner);
flash.net.registerClassAlias("VectorTestInner", Vector.<TestStructureInner> as Class);
This should allow us to read/write objects of type TestStructureInner, Vector.<TestStructureInner>, and Vector.<Vector.<TestStructureInner>> into ByteArrays. And in general it seems to work.
Attached though is a simplified test case that fails, however. The first time we deserialize the data it works. The subsequent time, however, we encounter the following runtime error #1034.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fcb9 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fbc9 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fdd1 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fce1 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fbf1 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fec1 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fad9 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304fa61 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304f9e9 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
TypeError: Error #1034: Type Coercion failed: cannot convert __AS3__.vec::Vector.<Object>@304f971 to __AS3__.vec.Vector.<__AS3__.vec::Vector.<Test0.as$30::TestStructureInner>>.
Re-registering the class aliases again via flash.net.registerClassAlias works in this test case but isn't 100% for our actual application (I'm reticent to even mention it but it seems relevant). Is there a step I'm missing here? Any light shed would be appreciated.
// mxmlc -debug Test0.as
package
import Base64; // http://code.google.com/p/jpauclair-blog/source/browse/trunk/Experiment/Base64/src/Base64.a s
import flash.net.registerClassAlias;
import flash.events.Event;
import flash.utils.ByteArray;
import flash.display.Sprite;
import flash.display.Stage;
import flash.system.System;
public class Test0 extends Sprite
static private const OPERATION_SERIALIZE:uint = 0;
static private const OPERATION_DESERIALIZE_AND_FAIL:uint = 1;
static private const OPERATION_DESERIALIZE_AND_SUCCEED:uint = 2;
static private var staticStage:Stage;
private var bar:Vector.<TestStructure>;
* common functions
static private function registerClassAliases():void
flash.net.registerClassAlias("TestStructureInner", TestStructureInner);
flash.net.registerClassAlias("VectorTestInner", Vector.<TestStructureInner> as Class);
flash.net.registerClassAlias("TestStructure", TestStructure);
static public function staticDeserialize():Object
var byteArray:ByteArray = Base64.decode("EBUAG1Rlc3RTdHJ1Y3R1cmUKEwAHZm9vEAEAH1ZlY3RvclRlc3RJbm5lcgoBEAEABAoBEAEABA oBEAEABAoBEAEABAoBEAEABAoBEAEABAoBEAEABAoBEAEABAoBEAEABA==");
byteArray.position = 0;
return byteArray.readObject();
public function Test0():void
registerClassAliases();
// Switching operation between the constants demonstrates failure/success in a couple of different ways.
// SERIALIZE is just used to prepare the base64 string for subsequent tests.
var operation:int = OPERATION_SERIALIZE_AND_FAIL;
if (operation == OPERATION_SERIALIZE)
trace("Serializing");
// outputs base64 string for subsequent tests
serialize();
else if (operation == OPERATION_DESERIALIZE_AND_FAIL)
trace("Fail case");
// perform successful one deserialization, then one failing one.
deserializeOnceThenFail();
else if (operation == OPERATION_DESERIALIZE_AND_SUCCEED)
trace("Success via re-registration");
// perform successful one deserialization, then another successful one.
deserializeOnceThenSucceed();
* serialize
// outputs base64 string we use for subsequent tests.
private function serialize():void
var baz:Vector.<TestStructure> = new Vector.<TestStructure>;
for (var i:int=0; i<10; ++i)
baz.push(new TestStructure);
var byteArray:ByteArray = new ByteArray;
byteArray.writeObject(baz);
trace(Base64.encode(byteArray));
* deserializeOnceThenFail
// perform successful one deserialization, then one failing one.
public function deserializeOnceThenFail():void
// save stage
staticStage = stage;
// the first deserialize will proceed without error.
staticDeserialize();
trace("Successful deserialize");
// add an event listener in order to invoke error on subsequent frame
stage.addEventListener(Event.ENTER_FRAME, doEnterFrameOnceThenFail);
// remove event listener and invoke again.
static private function doEnterFrameOnceThenFail(e:Event):void
staticStage.removeEventListener(Event.ENTER_FRAME, doEnterFrameOnceThenFail);
staticDeserialize();
trace("unsuccessful deserialize2");
* deserializeOnceThenSucceed
* Here, we re-call flash.net.registerClassAlias on all our class types when running.
// perform successful one deserialization, then one failing one.
public function deserializeOnceThenSucceed():void
// save stage
staticStage = stage;
// the first deserialize will proceed without error.
staticDeserialize();
trace("Successful deserialize");
// add an event listener in order to invoke error on subsequent frame
stage.addEventListener(Event.ENTER_FRAME, doEnterFrameOnceThenSucceed);
// remove event listener and invoke again.
static private function doEnterFrameOnceThenSucceed(e:Event):void
staticStage.removeEventListener(Event.ENTER_FRAME, doEnterFrameOnceThenSucceed);
registerClassAliases();
staticDeserialize();
trace("successful deserialize2");
internal class TestStructureInner
public var value:int;
internal class TestStructure
public var foo:Vector.<Vector.<TestStructureInner>> = new Vector.<Vector.<TestStructureInner>>;The error would imply that ImageAssetEvent does not inherit
DisplayEvent. Either modify the inheritance chain or listen for a
basic Event object (flash.events.Event) and cast inside the
function. -
Hi
when i tested my first session bean by IBM websphere Universal Test Client , i got the following error when execute getBookForPlatform(String workPlatform) saying error in locating entity bean Book_catalog and i tried to test Book_catalog entity bean and it's working successfuly but i do not know why seesion bean could not locate it ? :
========== the Error ===========
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: ; nested exception is:
javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
at com.ibm.CORBA.iiop.UtilDelegateImpl.mapSystemException(UtilDelegateImpl.java:156)
at com.ibm.CORBA.iiop.UtilDelegateImpl.wrapException(UtilDelegateImpl.java:684)
at javax.rmi.CORBA.Util.wrapException(Util.java:295)
at apress.wsad.techlib._TechLibFacade_Stub.getBookForPlatform(_TechLibFacade_Stub.java:267)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.etools.utc.model.ReflectionMethodModel.invoke(ReflectionMethodModel.java:68)
at com.ibm.etools.utc.servlet.InvokeServlet.invoke(InvokeServlet.java:110)
at com.ibm.etools.utc.servlet.InvokeServlet.doPost(InvokeServlet.java:366)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:555)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
Caused by: java.rmi.RemoteException: ; nested exception is:
javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapEJBException(RemoteExceptionMappingStrategy.java:379)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.mapException(RemoteExceptionMappingStrategy.java:112)
at com.ibm.ejs.container.RemoteExceptionMappingStrategy.setUncheckedException(RemoteExceptionMappingStrategy.java:202)
at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedException(EJSDeployedSupport.java:296)
at apress.wsad.techlib.EJSRemoteStatelessTechLibFacade_3526fe64.getBookForPlatform(EJSRemoteStatelessTechLibFacade_3526fe64.java:32)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at com.ibm.rmi.util.ProxyUtil$4.run(ProxyUtil.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.rmi.util.ProxyUtil.invokeWithClassLoaders(ProxyUtil.java:701)
at com.ibm.CORBA.iiop.ClientDelegate.invoke(ClientDelegate.java:1084)
at $Proxy1.getBookForPlatform(Unknown Source)
at apress.wsad.techlib._TechLibFacade_Stub.getBookForPlatform(_TechLibFacade_Stub.java:260)
... 29 more
Caused by: javax.ejb.EJBException: Error getting TechLibBook_catalogLocalHome from findByPlatform method:Error locating TechLibBook_catalogLocalHome: Context: localhost/nodes/localhost/servers/server1, name: ejb/Book_catalog: First component in name Book_catalog not found.
at apress.wsad.techlib.TechLibFacadeBean.getBookForPlatform(TechLibFacadeBean.java:92)
at apress.wsad.techlib.EJSRemoteStatelessTechLibFacade_3526fe64.getBookForPlatform(EJSRemoteStatelessTechLibFacade_3526fe64.java:22)
... 39 more
===== End of Error ======
====== the source code of session bean=======
package apress.wsad.techlib;
import javax.ejb.*;
import javax.naming.*;
import javax.rmi.*;
import java.rmi.*;
import java.lang.*;
import java.util.*;
public class TechLibFacadeBean implements javax.ejb.SessionBean
private javax.ejb.SessionContext mySessionCtx;
// Variable to keep the Home Local refernce to TechLibBook_catalog object
private TechLibBook_catalogLocalHome catalogLocalHome = null ;
// Method to get the Home Interface of the Book_catalog entity bean.
private TechLibBook_catalogLocalHome getCatalogLocalHome()
throws RemoteException
try
if (catalogLocalHome == null)
InitialContext initContext = new InitialContext();
Object objRef =initContext.lookup("ejb/Book_catalog");
catalogLocalHome = (TechLibBook_catalogLocalHome) objRef;
return (TechLibBook_catalogLocalHome) objRef;
else
return catalogLocalHome;
catch (NamingException ne)
System.out.println("Error locating TechLibBook_catalogLocalHome: " +
ne.getMessage());
throw
new RemoteException("Error locating TechLibBook_catalogLocalHome: " +
ne.getMessage());
// This business method must be promoted to the remote interface
public Vector getBookForPlatform(String workPlatform)
throws FinderException
Vector bookVector = new Vector();
TransportBean transObject;
TechLibBook_catalogLocal bookCatalogLocal = null;
Collection collBookRecords;
try
collBookRecords =
getCatalogLocalHome().findByPlatform(workPlatform);
Iterator iterator = collBookRecords.iterator();
while (iterator.hasNext())
bookCatalogLocal =
(TechLibBook_catalogLocal) iterator.next();
transObject = new TransportBean();
transObject.catalogNumber = bookCatalogLocal.getCatalog_number();
transObject.author = bookCatalogLocal.getAuthor();
transObject.bookTitle = bookCatalogLocal.getBook_title();
transObject.location = bookCatalogLocal.getLocation();
transObject.platform = bookCatalogLocal.getPlatform();
transObject.txnDate = bookCatalogLocal.getLanguage();
bookVector.addElement(transObject);
} // End of while
} // End of try
catch(FinderException fe)
System.out.println("Error executing findByPlatform method: " +
fe.getMessage());
throw
new EJBException("Error executing findByPlatform method: " +
fe.getMessage());
catch(Exception e)
System.out.println("Error getting TechLibBook_catalogLocalHome from findByPlatform method:" + e.getMessage());
throw
new EJBException("Error getting TechLibBook_catalogLocalHome from findByPlatform method:" + e.getMessage());
return bookVector;
public javax.ejb.SessionContext getSessionContext()
return mySessionCtx;
public void setSessionContext(javax.ejb.SessionContext ctx)
mySessionCtx = ctx;
* ejbCreate
public void ejbCreate() throws javax.ejb.CreateException
public void ejbActivate()
public void ejbPassivate()
public void ejbRemove()
==== End if source code =========
Please tell me what's the problem ?
with regardsi found what's the problem i made the url for lookup as the following:
lookup("java:comp/env/Book_catalog")
instead of
lookup("ejb/Book_catalog")
could anyone tell me what's the difference between 'java:comp/env/' and without it
by the way i used for lookup Datasource the following and it's working
DataSource dataSource = (DataSource)jndiContext.lookup("jdbc/TECHBOOK");
thanks
Maybe you are looking for
-
Is there a way to have itunes recognize music ratings in mp3 file
I have a large collection of music and I use a different program to save and organize my music. When I open the folders of many of my songs, the ratings are there. Why does itunes not recognize these ratings and is there an addon or any way to not ha
-
SAP BI RKF,CKF Descrptions are not reflecting in the universe
Dear Gurus, I have couple of questions 1.I have created a BI quey with 2 calculated keyfigures and 2 Restricted keyfigures. When i am creating a universe on top of the BI query, Desrptions for Calculated and Restricted keyfigures are not reflecting i
-
WLST and Jython "advanced" setup
Hi, I have a few questions concerning WLST and Jython: OS: Unix / Linux Situation: 1) Unable to include wlst-file created by using writeIniFile automatically 2) using org.python.util.jython without caching message Information: 1) wlst.py generated by
-
HRHAP00_DOC_DEF_DR
Hi experts. i have implemented the BADI HRHAP00_DOC_DEF_DR. It triggers in planning phase and in preparation. bt it does nt trigger in in process phase. any idea ...why? is this std functionality in Note 1306218 - Review Date not defaulted? rgds G Ed
-
Error in Apple Support Communities
I encountered an error while writing an extensive post and lost all my work. And because I am too busy programming I am not going to redo all my work, the asker is just going to have to suffer. This error occured while I was writing in the HTML windo