Error creating Objects with Reflection
This is the code:
try{
System.out.println("Restart - test 1 - sub == " + sub);
c = Class.forName(sub);
con = c.getDeclaredConstructor();
catch(NoSuchMethodException e){
System.out.println("Unknown event type\t" + e);
}Output:
Restart - test 1 - sub == Mouse
Unknown event type java.lang.NoSuchMethodException: Mouse.<init>()I have a Mouse class with a declared Constructor. Why can't it find the Constructor?
SquareBox wrote:
almightywiz wrote:
Your code is trying to find the default constructor for your Mouse class. If you don't have a default constructor specified, it will throw the exception you encountered. What does your constructor signature look like?
public Mouse(int weight){
this.weight = weight;
}How do I get the Constructor if it contains parameters?This is answered in your other thread: Creating objects with relfections And you even marked it correct!
Please don't post the same question multiple times. It leads to people wasting their time duplicating each others' answers, and makes for a fractured discussion.
Edited by: jverd on Apr 26, 2011 3:59 PM
Similar Messages
-
Hello
I am using Hibernate 4, Spring 3 , JSF 2.0 and Weblogic 10.3.6
When I start weblogic server and server starts successfully, however whenever it starts publishing application, I am getting the following exception.
Error creating bean with name
'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0'
defined in ServletContext resource [/WEB-INF/applicationContext.xml]:
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException:
Caused By: org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'entityManagerFactory'defined in ServletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()Ljavax/persistence/
SharedCacheMode;
Caused By: java.lang.NoSuchMethodError:
javax.persistence.spi.PersistenceUnitInfo.getSharedCacheMode()
Ljavax/persistence /SharedCacheMode; at
org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38) at
org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:525)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72) at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManager I have the following in applicationContext.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="net.test" />
<!-- Data Source Declaration -->
<bean id="DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
destroy-method="close">
<property name="driverClass" value="oracle.jdbc" />
<property name="jdbcUrl" value="jdbc:oracle:thin:@server:1521:DB" />
<property name="user" value="scott" />
<property name="password" value="tiger" />
<property name="maxPoolSize" value="10" />
<property name="maxStatements" value="0" />
<property name="minPoolSize" value="5" />
</bean>
<bean
class="org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor" />
<!-- JPA Entity Manager Factory -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="packagesToScan" value="net.test.entity" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="showSql" value="true" />
<property name="generateDdl" value="false" />
<property name="databasePlatform" value="${jdbc.dialectClass}" />
</bean>
</property>
</bean>
<bean id="defaultLobHandler" class="org.springframework.jdbc.support.lob.DefaultLobHandler" />
<!-- Session Factory Declaration -->
<bean id="SessionFactory"
class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="DataSource" />
<property name="annotatedClasses">
<list>
<value>net.test.entity.Department</value>
<value>net.test.entity.Employees</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.query.factory_class">org.hibernate.hql.internal.classic.ClassicQueryTranslatorFactory
</prop>
</props>
</property>
</bean>
<!-- Enable the configuration of transactional behavior based on annotations -->
<tx:annotation-driven transaction-manager="txManager" />
<tx:annotation-driven transaction-manager="transactionManager" />
<!-- Transaction Config -->
<bean id="txManager"
class="org.springframework.orm.hibernate4.HibernateTransactionManager">
<property name="sessionFactory" ref="SessionFactory" />
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<context:annotation-config />
<bean id="hibernateStatisticsMBean" class="org.hibernate.jmx.StatisticsService">
<property name="statisticsEnabled" value="true" />
<property name="sessionFactory" value="#{entityManagerFactory.sessionFactory}" />
</bean>
<bean name="ehCacheManagerMBean"
class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" />
<bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
<property name="locateExistingServerIfPossible" value="true" />
</bean>
<bean id="jmxExporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="server" ref="mbeanServer" />
<property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
<property name="beans">
<map>
<entry key="SpringBeans:name=hibernateStatisticsMBean"
value-ref="hibernateStatisticsMBean" />
<entry key="SpringBeans:name=ehCacheManagerMBean" value-ref="ehCacheManagerMBean" />
</map>
</property>
</bean>
</beans>
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>net.test</groupId>
<artifactId>myappp</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>myappp</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
<layout>default</layout>
</repository>
</repositories>
<properties>
<spring.version>3.1.1.RELEASE</spring.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- JSF library -->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.1.6</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- Primefaces library -->
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>afterwork</artifactId>
<version>1.0.8</version>
</dependency>
<!-- Hibernate library -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.12.1.GA</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<!-- Oracle Java Connector library -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.3</version>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<!-- Log4j library -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.4</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>1.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.extensions.cdi.core</groupId>
<artifactId>myfaces-extcdi-core-api</artifactId>
<version>1.0.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>4.0.1.Final</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerArgument>-proc:none</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.6</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<!-- source output directory -->
<outputDirectory>target/metamodel</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>In Weblogic 10.3.6 I have enabled JPA2 support by adding the following in commEnv.cmd
@rem Enable JPA 2.0 functionality on WebLogic Server
set PRE_CLASSPATH=%BEA_HOME%\modules\javax.persistence_1.1.0.0_2-0.jar;
%BEA_HOME%\modules\com.oracle.jpa2support_1.0.0.0_2-1.jarApplication which works on WLS 10.3.6 is http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_dev.zip and the one which is not working is
http://download.oracle.com/otn/nt/middleware/11g/wls/1036/wls1036_win32.exe.
How can I resolve these errors and exceptions? Any help is highly appreciable.
ThanksLooks like you might have a spelling error in your spring config, or are trying to set a read-only property. BdasInterfaceManagerImpl has been configured as having a method called setBdasInterfaceJdbcDao() : does it?
By the way, we now know that you're writing code for JP Morgan - there's a slight risk that this could bite you in the @ss at some point (there are some malicious people around) you might want to take that into consideration next time! -
Can we create objects with interface
can we create objects with interface,if yes then where we implement the
methods,can we type cast any object with inerface kind of object,if yes what kind
of objects we can type castcan we create objects with interface,if yes then where we implement the
methods
Objects are created with classes, not interfaces, which are abstract.
can we type cast any object with inerface kind of object,if yes what kind
of objects we can type cast
Objects may be cast to interfaces, but only if an object's class or one of its superclasses actually implements the interface. -
Planning 9.3 Duplicate member error: An object with the name 0000 already e
Hi All
I have 5 dimensions in my Planning applications namesly, Company, State, Product, Entity and Account
Company hase members called 0000(default) and 1000, 1001 etc
I also want add my Entity default member as 0000, but when I tried to add the memeber in my entity dimension I'm getting the Error : An object with the name 0000 already exists: Please help me to fix this
Thanks in AdvanceU won`t be able to add the duplicate item name to planning application untill it would be the 9.5 version.
By the way, NotPlanning App`s nothing like as scanty - they has already an option "Allow duplicate item names" in 9.3 version.. -
Error creating bean with name 'rbacxSchedulerService'
Hi
I am installing Oralce Identity Analytics and this with an error in the log posted below. Someone could help me. Thank you
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'indexGlobalUserGlobalUserUpdateAdvisor' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot create inner bean 'com.vaau.rbacx.search.aop.IndexAdvise#1ba7ab0' of type [com.vaau.rbacx.search.aop.IndexAdvise] while setting bean property 'advice'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.vaau.rbacx.search.aop.IndexAdvise#1ba7ab0' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot resolve reference to bean 'ftSearchProvider' while setting bean property 'searchProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ftSearchProvider' defined in ServletContext resource [WEB-INF/search-context.xml]: Cannot resolve reference to bean 'rbacxSchedulerService' while setting bean property 'rbacxSchedulerService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rbacxSchedulerService' defined in ServletContext resource [WEB-INF/scheduling-context.xml]: Cannot resolve reference to bean 'vaauSchedulerManager' while setting bean property 'vaauSchedulerManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'vaauSchedulerManager' defined in ServletContext resource [WEB-INF/scheduling-context.xml]: Cannot resolve reference to bean 'quartzSchedulerProvider' while setting bean property 'schedulerProvider'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzSchedulerProvider' defined in ServletContext resource [WEB-INF/scheduling-context.xml]: Cannot resolve reference to bean 'quartzSchedulerFactoryBean' while setting bean property 'quartzScheduler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzSchedulerFactoryBean' defined in ServletContext resource [WEB-INF/scheduling-context.xml]: Cannot create inner bean 'quartzSchedulerFactoryBeanTarget' of type [org.springframework.scheduling.quartz.SchedulerFactoryBean] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'quartzSchedulerFactoryBeanTarget' defined in ServletContext resource [WEB-INF/scheduling-context.xml]: Invocation of init method failed; nested exception is org.quartz.SchedulerConfigException: Failure occured during job recovery. [See nested exception: org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'springNonTxDataSource.quartzSchedulerFactoryBeanTarget': java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource [See nested exception: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: Cannot get Connection from Datasource]]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)Hi,
Yes - I changed the password in Oracle DB admin console and jdbc.properties but I still get the same error: ORA-01017.
The only thing I can think of is that I did not run the encryption java script but to be honest I can't think what diffence this would make.
Any other suggestions guys?
Oh the error has now changed slightly
15:00:54,797 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'certificationEventListener' defined in ServletContext resource [WEB-INF/idc-context.xml]: Cannot resolve reference to bean 'rbacxIDCService' while setting bean property 'rbacxIDCService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rbacxIDCService' defined in ServletContext resource [WEB-INF/idc-context.xml]: Cannot resolve reference to bean 'rbacxIAMService' while setting bean property 'rbacxIAMService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'rbacxIAMService' defined in ServletContext resource [WEB-INF/iam-context.xml]: Cannot create inner bean 'com.vaau.rbacx.iam.service.impl.RbacxIAMServiceImpl#2d09aa' of type [com.vaau.rbacx.iam.service.impl.RbacxIAMServiceImpl] while setting bean property 'target'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.vaau.rbacx.iam.service.impl.RbacxIAMServiceImpl#2d09aa' defined in ServletContext resource [WEB-INF/iam-context.xml]: Cannot resolve reference to bean 'oimSolution' while setting bean property 'iamSolutions' with key [TypedStringValue: value [oracle], target type [null]]; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'oimSolution' is defined
have checked these files and nothing stands out as being wrong.
Edited by: user8380428 on 09-Dec-2011 07:09 -
I can find nothing searching online. Trying to move the last user mailbox from one server to another, but it fails with this error. I have checked all mailboxes for the same GUID but can't locate it anywhere. Anybody have some suggestions?
Does anyone know if there is a way to perform a search based on mailbox GUID? Maybe I could find all objects with the same and it could lead me in the right direction.
Hi,
To find the object that belongs to a GUID, you can refer to this blog.
http://blogs.technet.com/b/ehlro/archive/2010/04/22/how-to-find-the-object-that-belongs-to-a-guid.aspx
Best Regards.
Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]
Lynn-Li
TechNet Community Support -
Create Object with "Photoshop.Application"
Cannot create an object reference to Photoshop CC using Excel 2011 and vba, is there missing files with the standard installation?
Hi;
I have been writing VBA code for many years and have always used Windows up till now, I am attempting to do things on a MAC I can easily do in Windows. I have for years used macros written by myself referencing Adobe Photoshop and also Microsoft Access from within Excel. I have used what is termed 'Late binding" to create objects for the above applications. I understand Access is not useable on the MAC but I believe I should be able to use the macros I have written with slight modifications for file locations. Typically nearly the first executable statement in these macros are as follows
Dim appRef as Object
set appRef = CreateObject("Photoshop.Application")
the second statement when executed allows me the opportunity to use Photoshop (Versions 7 -> CS5 have been successful) to reference all the procedures and functions that would appear on the desktop when using Photoshop.
According the scripting PDF manual for CS6 they use the same syntax for the VBScript examples. I believe this should work with Photoshop CC. I think when I installed the cloud version I opted for "Typical" installation" instead of maybe selecting "Custom Installation". How do I achieve the use of the above technique? As stated earlier I have used this since Photoshop 7. Any help would be greatly appreciated.
Thank you,
Robert Firman -
Casting objects with reflection possible?
I have this code:
String className = "com.xyz.MeasurementUnit";
Class provider = Class.forName(className + "Provider");
Object object = context.getContractProxy(provider);The last line returns an object of type object. I must execute the method getIsoId(...) on that object. But to do that, I think I have to cast it first to the object type MeasurementUnitProvider.
Is this possible with reflection? Is it somehow possible to solve what I want to do?If MeasurementUnitProvider is an interface that is known at compile time, then the cast can be made in the usual way MeasurementUnitProvider unitProvider = (MeasurementUnitProvider)context.getContractProxy(provider);If the interface is not known at compile time, then the object reflecting the method can be obtained from the Class object by name and parameter type. For reflective method invocation, no cast is required.
Pete -
Is it posible to create objects with different names dinamically?
Hi,
I'm creating an app that manages different wireless nodes in a network and I was thinking that I could create a class called Node which would have a constructor that every time I created an object Node, I would pass the address and some other data about the Node and the constructor will save all that data and also create a unique ID for every Node object.
Now the problem is that I need to be able to discover all the nodes in my network every time the user clicks a Ping button. So every time the users clicks Ping I need to do a ping and create as many Node objects as nodes I have in my network. The thing is I don't know how to make it create the node objects with different names so after I've created all the nodes objects I can refer to one of them.
Something like this.
int Id=0;
id++;
Node node+Id = new Node();
I think its not possible to do something like that. If it isn't how can I do to refer to one of the objects I've created?
Thanks.Twistx77 wrote:
Thanks to both of you. I'll check out the Link and if I can't find the solution there I'll make the array , I don't know how I didn't think about doing that. There are two collections you should study specifically:
First you have the ArrayList which in essense is a growable array. This means you don't have to decide in advance how big it can be.
Second there's the HashMap. It's sometimes called an associate array. Such an array doesn't have fixed position indexes like an ordinary array. Instead each index (called key) is associated with a value but the keys don't have any particular order. Still, given a certain key, finding the corresponding value in a HashMap is almost as fast as an array access. -
Creating objects with proper stereotypes
Hi,
I'm just trying to create Architecture Areas and Business Functions using VB. This all works as expected, besides of one small but important exception:
I want to create Architecture Areas and Business Functions of a given type (Stereotype).
When I create the Architecture Area or Business Function, assign the code and name, and then set the Stereotype, everything looks OK. The Stereotype is appearing on the symbol etc., but ... the graphical symbol differs from what we have configured for this element.
In the script I'm doing it this way:
L2Process = EamL2.ArchitectureAreas.CreateNew(PdEam.cls_ArchitectureArea)
L2Process.SetNameAndCode Trim(L3SubSubFolder.Name), Trim(L3SubSubFolder.Code)
L2Process.Stereotype = "Process"
The Architecture Area is created, the Stereotype is assigned:
But the graphical symbol is not the expected one, it"s rather the "default" one ...
What I have configured is:
Is there a way to create Architecture areas and Business Functions, so that the configured Custom Symbols are used? MAybe a parameter for CreateNew like in the CreateModel function, where we can set the Diagram Type?
CreateModel(PdEAM.cls_Model, EvaluateNamedPath("%_MODELS%") + L3SubSubFolder.Name + ".eam" + "|" + "Diagram=CityPlanningDiagram", omf_DontOpenView)
I can't find anything in the documentation in regards to this issue...
Thanks,
RafalHi Rafal,
Could you try creating object directly in the collection using the GetCollectionBySteretype("Process") on model ?
Something like:
Dim processes
Set processes = EamL2.GetCollectionByStereotype("Process")
Set L2Process = processes.CreateNew()
L2Process.SetNameAndCode Trim(L3SubSubFolder.Name), Trim(L3SubSubFolder.Code)
This should assign stereotype at initialization and may be fix your issue...
Marc
PS. I did not check code, take care of potential typo. -
Error creating policy with context
When I try to create a policy:
BEGIN
ctx_ddl.create_policy('sdoscan.ec_prd_prditmname','sdoscan.ec_prd_summ.prditmname','','','','','','','','','','CTXSYS.DEFAULT_STOPLIST','');
COMMIT;
END;
I get this error:
ORA-20000: ConText error:
DRG-10503: Unknown message id 10503
ORA-06512: at "CTXSYS.DRUE", line 180
ORA-06512: at "CTXSYS.CTX_DDL", line 1348
ORA-06512: at line 2
Does anyone know what this means and / or how to fix it?You could as well use this sample code
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <d2fctx.h> /* Forms API context */
#include <d2ffmd.h> /* Form module header file */
int main (int argc, char *argv[])
d2fctxa ctx_attr;
d2fctx *ctx;
d2ffmd *form;
d2fcnv *pd2fcnv;
d2fgra *pd2fgra;
text *form_name;
/* Check arguments */
if ( argc != 2 )
fprintf(stderr, "USAGE: %s <filename>\n", argv[0]);
exit(1);
/* Create Forms API context */
ctx_attr.mask_d2fctxa = (ub4)0;
if ( d2fctxcr_Create(&ctx, &ctx_attr) != D2FS_SUCCESS )
fprintf(stderr, "Error creating Forms API context\n");
exit(1);
/* Load the form module into memory */
if ( d2ffmdld_Load(ctx, &form,(text*) argv[1]) != D2FS_SUCCESS )
fprintf(stderr, "Failed to load form module: %s\n", argv[1]);
exit(1);
/* Get the name of the form module */
if ( d2ffmdg_name(ctx, form, &form_name) != D2FS_SUCCESS )
fprintf(stderr, "Error getting the name of the form module\n");
else
/* Print the name of the form, then free it */
printf ("The name of the form is %s\n", form_name);
free(form_name);
if ( d2ffmdsv_Save(ctx, form, (text *)argv[1])
!= D2FS_SUCCESS )
fprintf(stderr, "Could not save the form\n");
/* Destroy the in-memory form */
if ( d2ffmdde_Destroy(ctx, form) != D2FS_SUCCESS )
fprintf(stderr, "Error destroying form module\n");
/* Close the API and destroy context */
d2fctxde_Destroy(ctx);
return 0; -
Error : Creating PO with reference to Contract"CALL_OFF_CREATED"
Hi Experts,
I am working on Extended Classic Scenario, We have created the Contract document in SRM and it replicates to ECC system successfully. While converting the contract document into Purchase Order document in the SRM system we are facing this error msg.
Pl help on this.
Process CALL_OFF_CREATED not assigned to number type in version CALL_OFF_CREATED
Regards,
MohanHi,
Thanks for your response
I am getting this error in Portal while saving the purchase order with reference to Central Contract
While creating manual purchase order i am giving the contract number & line item, after this only we are getting this.
We are using XI system for this central contract process
Is this error relevent to the below mentioned point
The point in time when the current prices from SAP SRM are queried can be defined. This is relevant to purchase order items with reference to a central contract (call-off).
Integration with Other mySAP.com Components --> Supplier Relationship Management --> Central Contract --> Price Calculation
Pl suggest what could be the Solution
Regards,
Mohan -
Error Creating Invoices with more than 1000 positions
Hello.
I am creating invoices in SD module with VF01 transaction. When the document has more than 1000 positions an error is displayed.
The text of the error is:
Memory area p.status GUI SAPMV60A SM is too small.
área memoria p.status GUI SAPMV60A SM demasiado pequeña.
I would like to know if there is any way to correct this error. If it happens because memory is too small, how could it be increased?
Thank you.
Diana Carolina.Hi Diana
As far as I know, standard SAP has restricted the no. of line items in an accounting document to 999.
So, this is in turn impacts the no. of line items you can have on a Sales invoice,
Since every invoice line item can have atleast 2 accounting entries, the max. no. of invoice line items you can have is 499.
I dont think there is no work around for this
Rgds -
ERROR creating table with dynamic SQL :-(
Hi friends,
I have a problem when I try to create a table using dynamic SQL.
(Env.: Forms 6i, WinXP, Oracle 9i)
I only want to create a table, insert data and drop the table.
I have a user with the correct privileges (At least ....I think so), because I can to make the three actions in SQL*PLUS (CREATE TABLE, INSERT .. and DROP TABLE).
I want to do the same in Forms using dynamic SQL...
I've made a package with 3 procedures:
1st to create the table, 2nd to insert data , 3rd to drop the table.
Only the 1st fails with the error ORA-01031 (insufficient privileges).
Here it is:
PROCEDURE PRO_DM_CreaTabla(pe_nombre_tabla VARCHAR2) IS
id_cursor INTEGER;
ls_sentencia VARCHAR2(500);
v_dummy integer;
BEGIN
id_cursor := DBMS_SQL.OPEN_CURSOR;
ls_sentencia := 'CREATE TABLE '||pe_nombre_tabla||' ( campo1 VARCHAR2(100), campo2 VARCHAR2(100), campo3 VARCHAR2(100),campo4 VARCHAR2(100))';
DBMS_SQL.PARSE(id_cursor, ls_sentencia, dbms_sql.NATIVE);
v_dummy := dbms_sql.execute(id_cursor);
DBMS_SQL.CLOSE_CURSOR(id_cursor);
END;
The DROP_table procedure is exactly the same as this (with the difference of the 'CREATE' sentence, where I have a DROP sentence)... then.. why the DROP procedure works?... and.. why this CREATE procedure doesn't work?
Any ideas?
Thanks a lot.
Jose.From a different thread, Jose wrote:
V_INSERT:='INSERT INTO TMP_TABLE(field1,field3,field3,field4) VALUES (1,2,3,4)';
Forms_DDL(V_INSERT);
commit;First, try your statement in SQL Plus:
INSERT INTO TMP_TABLE(field1,field3,field3,field4) VALUES (1,2,3,4);
Then if that works, try doing this right after the Forms_DDL(V_INSERT);
If not form_success then
Message(' Insert has failed');
Raise form_trigger_failure;
Else
Forms_DDL('COMMIT');
End if; -
We are trying to create a view in Service Manager 2012 R2 using the class
System.WorkItem.Incident.View.SLAProjectionType
so we can pick up the SLA status (breached/warning) while also picking up the assigned to user, incident id, etc.
When we use the criteria of
Work Item has service level instance information [Service Level Instance Information] status equals breached.
We get the following error.... Any ideas what we are doing wrong?
An exception was thrown while processing GetProjectionsByCriteria for session ID uuid:d83a3f7b-d938-4b35-9343-54c4268cf91c;id=1197.
Exception message: Microsoft.EnterpriseManagement.Common.RelationshipPathElement
Full Exception: Microsoft.EnterpriseManagement.Common.InvalidObjectCriteriaException: Microsoft.EnterpriseManagement.Common.RelationshipPathElement
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.PickFromCandidates(List`1 candidates, RelationshipPathElement relPathElement)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.ProcessPropertyPath(SeedPathElement seedPathElement, Int32 compositeNodeId, Nullable`1 lcid)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.ProcessValueExpression(ValueExpressionValueBaseType valueExpression, Nullable`1 targetCompositeNode, Nullable`1 criteriaOperaor)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.ProcessSimpleExpression(SimpleCriteriaType simpleCriteriaType, Nullable`1 targetCompositeNode)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.ProcessExpression(BasicExpressionType basicExpression, Nullable`1 targetCompositeNode)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.ProcessExpression(BasicExpressionType basicExpression, Nullable`1 targetCompositeNode)
at Microsoft.EnterpriseManagement.DataAccessLayer.ExpressionParser.Process(ExpressionType expression)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureHelper.ApplyInstanceQueryOptionsToCompositeQuery(CompositeQuery queryRequest, QueryDefinition queryDefinition, String overrideCriteria, Pair`2[] parametersAndValues, InstanceQueryOptions
instanceQueryOptions, IList`1 seedIds, DatabaseConnection databaseConnection, String& criteriaXml)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureHelper.ExecuteQueryForProjection(Guid typeProjectionId, DatabaseConnection databaseConnection, Pair`2[] parametersAndValues, IList`1 seedIds, InstanceQueryOptions instanceQueryOptions,
String overrideCriteria, IList`1& compositeResults, IList`1& compositeResultTrimmed, IList`1& changedSeedIdList, Int32& totalResultCount, Boolean& resultSetLarge, String& criteria)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation.ExecuteQueryForProjection(Guid typeProjectionId, Pair`2[] parametersAndValues, IList`1 seedIds, InstanceQueryOptions instanceQueryOptions, IList`1& compositeResults,
IList`1& compositeResultTrimmed, IList`1& changedSeedIdList, Int32& totalResultCount)
at Microsoft.EnterpriseManagement.ServiceDataLayer.DataAccessFeatureImplementation.ExecuteQueryForProjection(Guid seedTypeId, IList`1 seedIds, InstanceQueryOptions instanceQueryOptions, IList`1& compositeResult, IList`1& compositeResultTrimmed,
IList`1& changedSeedIdList, Int32& totalResultCount)
at Microsoft.EnterpriseManagement.ServiceDataLayer.EntityObjectsService.GetProjectionsByCriteria(Guid typeProjectionId, InstanceQueryOptions instanceQueryOptions)
also in the console we get this error.
Date: 10/10/2014 11:45:13 PM
Application: Service Manager Console
Application Version: 7.5.3079.0
Severity: Error
Message: An error occurred while loading the items.
Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportException: The Full adapter threw an exception. See the FullUpdate property to see the exception.
at Microsoft.EnterpriseManagement.UI.ViewFramework.AdvancedListSupportAdapter.DoAction(DataQueryBase query, IList`1 dataSources, IDictionary`2 parameters, IList`1 inputs, String outputCollectionName)
at Microsoft.EnterpriseManagement.UI.DataModel.QueryQueue.StartExecuteQuery(Object sender, ConsoleJobEventArgs e)
at Microsoft.EnterpriseManagement.ServiceManager.UI.Console.ConsoleJobExceptionHandler.ExecuteJob(IComponent component, EventHandler`1 job, Object sender, ConsoleJobEventArgs args)
Thanks LanceFull Exception: Microsoft.EnterpriseManagement.Common.InvalidObjectCriteriaException:
Your criteria is invalid, somehow. Consider using
Advanced view Editor (or
the free version) to check your criteria XML against the out-of-the-box SLA views.
Maybe you are looking for
-
Oracle Personal Edition Install
I've been trying and trying to install personal edition on Win 98. However, the install process stalls right before it is about to initialize the starter db. It says it cannot copy the files from the source. Possibly because there isn't enough drive
-
White balance from a grey card
How to I use a grey card photo to adjust the white balance in other photos? Particularly in RAW.
-
As a 4s user who upgraded when released. We have 4 phones with Verizon with the next upgrade available Nov. 7th or so. Will Verizon be offering an early upgrade for those that would like to get the iphone 5 but maybe pay slightly more. Hard to keep u
-
Reinstalled vista 32 bit home prem HE
when i install my drivers it goes through etc,when i play my music it is so dam low and goes in and out badly i did not have this problem before on vista and now i cant fix it please help!
-
I am trying to download a movie and it says security code is wrong, when I know for sure it is right.