Binding Factory Class

Dear people,
I am relatively new in Oracle JDeveloper ( using it last 3 months ) and during my last task I am facing a problem to which i can not find the solution...
I am trying to set up a factory class from which i will get a Dynamic Table Binding depending on the given data. The problem I am facing has to do with getting a NullPointerException whenever I am trying to use my given panelBinding. Although i search numerous questions and answers in the forum and read a number of different examples given by the Aces I cant find a solution to this. Here is my code...
*public class BindingFactory  {*
*public BindingFactory() {*
public   JUPanelBinding panelBinding = new JUPanelBinding("BindingFactoryPageDef");
public  JUTableBinding create  (String objName,
String attributes,
String[] attributesNeeded
*) throws Exception {*
JTable myTable = new JTable();
*/*Locating and Loading AppModule*/*
ApplicationModule am = Configuration.createRootApplicationModule("model.EmpRegistryAppModule","EmpRegistryAppModuleLocal");++
panelBinding.setApplicationModule(am);
*/* Creating VO from Data given in method call */*
ViewObject myVO  = am.createViewObjectFromQueryStmt(objName, "SELECT " + attributes + " FROM " + objName );
*/*Executing the VO Query to produce the Rowset*/*
myVO.executeQuery();
*/*Creating the rowSet iterator */*
RowSetIterator rsi = myVO.createRowSetIterator("DynamicIterator");
JUMetaObjectManager.setErrorHandler(new JUErrorHandlerDlg());
JUMetaObjectManager mgr = JUMetaObjectManager.getJUMom();
mgr.setJClientDefFactory(null);
BindingContext binding = new BindingContext();
binding.put(DataControlFactory.APP_PARAM_ENV_INFO, new JUEnvInfoProvider());
binding.setLocaleContext(new DefLocaleContext(null));
HashMap map = new HashMap(4);
map.put(DataControlFactory.APP_PARAMS_BINDING_CONTEXT, binding);
mgr.loadCpx("view.DataBindings2.cpx" , map);
*/* This is where Null Pointer is coming from...*/*
---->     DCDataControl app = panelBinding.getBindingContext().findDataControl("EmpRegistryAppModuleDataControl");
app.setClientApp(DCDataControl.JCLIENT);
JUIteratorBinding itBinding = new JUIteratorBinding(app, rsi);
myTable.setModel((TableModel)panelBinding.bindUIControl(objName+"ViewObject2",myTable));
JUTableBinding tb = new JUTableBinding(myTable, itBinding ,attributesNeeded);
return tb;
Any Ideas?
Thanks in advance for your time and help.
Regards,
Pelopidas
Edited by: Zouridakis Pelopidas on Dec 23, 2010 6:22 AM
Edited by: Zouridakis Pelopidas on Dec 28, 2010 3:11 AM
Edited by: Zouridakis Pelopidas on Dec 28, 2010 3:26 AM
Edited by: Zouridakis Pelopidas on Dec 29, 2010 1:41 AM

Hi all,
Since I finally managed to set this up properly, i am posting my code here in order to share with everyone, since i couldnt find many similar examples!
It works fine in Oracle JDev 10.1.3.5.
To sum up, this is a factory class which receive the name of your entity object and dynamically creates a binded table ready for use.
import java.util.HashMap;
import javax.swing.JTable;
import javax.swing.table.TableModel;
import model.Employees1DefImpl;
import oracle.adf.model.BindingContext;
import oracle.adf.model.DataControlFactory;
import oracle.adf.model.binding.DCDataControl;
import oracle.jbo.ApplicationModule;
import oracle.jbo.ViewObject;
import oracle.jbo.common.DefLocaleContext;
import oracle.jbo.server.EntityDefImpl;
import oracle.jbo.uicli.binding.JUUtil;
import oracle.jbo.uicli.controls.JUErrorHandlerDlg;
import oracle.jbo.uicli.jui.JUEnvInfoProvider;
import oracle.jbo.uicli.jui.JUPanelBinding;
import oracle.jbo.uicli.jui.JUTableBinding;
import oracle.jbo.uicli.mom.JUMetaObjectManager;
*public class BindingFactory  {*
*public BindingFactory() {*
public JUPanelBinding panelBinding = new JUPanelBinding("BindingFactoryPageDef");
public  JTable createDynamicBindedTable   (String objName,
String[] attributesNeeded
*) throws Exception {*
JTable myTable = new JTable();
JUMetaObjectManager.setErrorHandler(new JUErrorHandlerDlg());
JUMetaObjectManager mgr = JUMetaObjectManager.getJUMom();
mgr.setJClientDefFactory(null);
BindingContext binding = new BindingContext();
binding.put(DataControlFactory.APP_PARAM_ENV_INFO, new JUEnvInfoProvider());
binding.setLocaleContext(new DefLocaleContext(null));
HashMap map = new HashMap(4);
map.put(DataControlFactory.APP_PARAMS_BINDING_CONTEXT, binding);
mgr.loadCpx("view.DataBindings2.cpx" , map);
DCDataControl app = binding.findDataControl("EmpRegistryAppModuleDataControl");
*/*Locating and Loading AppModule*/*
ApplicationModule am = (ApplicationModule)app.getDataProvider();
panelBinding.setApplicationModule(am);
*/* Creating VO from Data given in method call */*
ViewObject myVO  = am.createViewObjectOnEntity(objName+"Success", "model."+objName );
*/*Executing the VO Query to produce the Rowset*/*
myVO.executeQuery();
app.setClientApp(DCDataControl.JCLIENT);
TableModel tableModel = JUTableBinding.createAttributeListBinding( panelBinding, myTable,
objName+"Success", null, objName + "Iter", attributesNeeded );
myTable.setModel(tableModel);
return myTable;
*public JUPanelBinding getPanelBinding() {*
return panelBinding;
*public void setBindingContext(BindingContext bindCtx) {*
*if (panelBinding.getPanel() == null) {*
panelBinding = panelBinding.setup(bindCtx, this);
panelBinding.refreshControl();
*try {*                  
registerProjectGlobalVariables(bindCtx);
panelBinding.refreshControl();
*} catch (Exception ex) {*
panelBinding.reportException(ex);
*private void registerProjectGlobalVariables(BindingContext bindCtx) {*
JUUtil.registerNavigationBarInterface(panelBinding, bindCtx);
*private void unRegisterProjectGlobalVariables(BindingContext bindCtx) {*
JUUtil.unRegisterNavigationBarInterface(panelBinding, bindCtx);
*public void bindNestedContainer(JUPanelBinding ctr) {*
*if (panelBinding.getPanel() == null) {*
ctr.setPanel(this);
panelBinding.release(DCDataControl.REL_VIEW_REFS);
panelBinding = ctr;
registerProjectGlobalVariables(panelBinding.getBindingContext());
*try {*
*} catch (Exception ex) {*
ex.printStackTrace();
ctr.reportException(ex);
Thanks for your time and help,
Pelopidas

Similar Messages

  • WARNING: Could not bind factory to JNDI

    Hi i am using tomcat server5.5
    Eclipse 3.2 and adding tomcat plug-in's to my Eclipse
    i created JNDI on tomcat server i got this type of error
    plez any one can help me
    i got this type WARNING
    WARNING: Could not bind factory to JNDI
    javax.naming.NamingException: Context is read only
    how can i over come this worning
    the server show message like
    INFO: Factory name: java:hibernate/SessionFactory
    May 2, 2007 9:12:24 AM org.hibernate.util.NamingHelper getInitialContext
    INFO: JNDI InitialContext properties:{}
    May 2, 2007 9:12:24 AM org.hibernate.util.NamingHelper bind
    INFO: Creating subcontext: java:hibernate
    May 2, 2007 9:12:24 AM org.hibernate.impl.SessionFactoryObjectFactory addInstanc
    e
    WARNING: Could not bind factory to JNDI
    javax.naming.NamingException: Context is read only
    at org.apache.naming.NamingContext.checkWritable(NamingContext.java:901)
    at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:5
    15)
    at org.apache.naming.NamingContext.createSubcontext(NamingContext.java:5
    36)
    at org.apache.naming.SelectorContext.createSubcontext(SelectorContext.ja
    va:421)
    at javax.naming.InitialContext.createSubcontext(InitialContext.java:423)
    at org.hibernate.util.NamingHelper.bind(NamingHelper.java:69)
    at org.hibernate.impl.SessionFactoryObjectFactory.addInstance(SessionFac
    toryObjectFactory.java:90)
    at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:
    303)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.jav
    a:1213)
    at com.gssamerica.expensereporting.business.dao.HibernateUtil.<clinit>(H
    ibernateUtil.java:38)
    at com.gssamerica.expensereporting.business.dao.RoleHome.roleList(RoleHo
    me.java:159)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .cacheRoles(LookupCacheListener.java:168)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .contextInitialized(LookupCacheListener.java:48)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    May 2, 2007 9:12:24 AM org.hibernate.cache.UpdateTimestampsCache <init>
    INFO: starting update timestamps cache at region: org.hibernate.cache.UpdateTime
    stampsCache
    May 2, 2007 9:12:24 AM org.hibernate.cache.EhCacheProvider buildCache
    WARNING: Could not find configuration [org.hibernate.cache.UpdateTimestampsCache
    ]; using defaults.
    May 2, 2007 9:12:24 AM org.hibernate.cache.StandardQueryCache <init>
    INFO: starting query cache at region: org.hibernate.cache.StandardQueryCache
    May 2, 2007 9:12:24 AM org.hibernate.cache.EhCacheProvider buildCache
    WARNING: Could not find configuration [org.hibernate.cache.StandardQueryCache];
    using defaults.
    Roles Cached......
    ##################>.SessionImpl(PersistenceContext[entityKeys=[],collectionKeys=
    []];ActionQueue[insertions=[] updates=[] deletions=[] collectionCreations=[] col
    lectionRemovals=[] collectionUpdates=[]])
    Currencies Cached.......
    Countries Cached.......
    JNDI DATASOURCE USED ........................................
    Instance Created .................
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '
    ' for connect URL 'null'
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:780)
    at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource
    .java:540)
    at com.gssamerica.expensereporting.ui.common.SQLManager.getConnection(SQ
    LManager.java:93)
    at com.gssamerica.expensereporting.business.dao.CacheHome.getExpenseIds(
    CacheHome.java:63)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .cacheExpenseId(LookupCacheListener.java:191)
    at com.gssamerica.expensereporting.business.listener.LookupCacheListener
    .contextInitialized(LookupCacheListener.java:51)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    Caused by: java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getDriver(DriverManager.java:243)
    at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou
    rce.java:773)
    ... 20 more
    Connection Error - Exchange Rates cannot be Stored in Database
    Expense Ids Cached......
    Statuses Cached......
    May 2, 2007 9:12:27 AM org.apache.catalina.startup.ContextConfig applicationConf
    ig
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].
    StandardHost[localhost].StandardContext[SCWCDProj]
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    log4j:ERROR Could not read configuration file from URL [file:E:/WebExpenses/Test
    ValidationsTomcat/WEB-INF/classes/log4j.properties].
    java.io.FileNotFoundException: E:\WebExpenses\TestValidationsTomcat\WEB-INF\clas
    ses\log4j.properties (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at java.io.FileInputStream.<init>(FileInputStream.java:66)
    at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection
    .java:70)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLCon
    nection.java:161)
    at java.net.URL.openStream(URL.java:1007)
    at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurato
    r.java:433)
    at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.
    java:336)
    at org.springframework.util.Log4jConfigurer.initLogging(Log4jConfigurer.
    java:70)
    at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebC
    onfigurer.java:151)
    at org.springframework.web.util.Log4jConfigListener.contextInitialized(L
    og4jConfigListener.java:51)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
    t.java:3827)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
    343)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
    at org.apache.catalina.core.StandardService.start(StandardService.java:4
    80)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
    3)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
    log4j:ERROR Ignoring configuration file [file:E:/WebExpenses/TestValidationsTomc
    at/WEB-INF/classes/log4j.properties].
    May 2, 2007 9:12:30 AM org.apache.catalina.core.StandardContext start
    SEVERE: Error listenerStart
    May 2, 2007 9:12:31 AM org.apache.catalina.core.StandardContext start
    SEVERE: Context startup failed due to previous errors
    May 2, 2007 9:12:32 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(E:\WebExpenses\JSFDataBaseConnection\WEB-INF\lib\servlet-a
    pi.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
    javax/servlet/Servlet.class
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:35 AM org.apache.catalina.startup.ContextConfig applicationConf
    ig
    INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].
    StandardHost[localhost].StandardContext[WebServicesApp]
    May 2, 2007 9:12:37 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(E:\WebExpenses\JSFApplication\WEB-INF\lib\servlet-api.jar)
    - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/s
    ervlet/Servlet.class
    May 2, 2007 9:12:39 AM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    May 2, 2007 9:12:39 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\admin.xml
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.util.LocalStrings', returnNull=tru
    e
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.action.ActionResources', returnNul
    l=true
    May 2, 2007 9:12:40 AM org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.webapp.admin.ApplicationResources', retur
    nNull=true
    May 2, 2007 9:12:42 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\balancer.xml
    May 2, 2007 9:12:43 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\jsp-examples.xml
    May 2, 2007 9:12:43 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\manager.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\ROOT.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\servlets-examples.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\tomcat-docs.xml
    May 2, 2007 9:12:44 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\TomcatJNDIProj.xml
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:45 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat 5.0\conf\Catalina
    \localhost\webdav.xml
    May 2, 2007 9:12:46 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /struts2-blank-2.0.1 from URL f
    ile:C:/Tomcat 5.0/webapps/struts2-blank-2.0.1
    May 2, 2007 9:12:47 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization started
    May 2, 2007 9:12:47 AM org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    May 2, 2007 9:12:47 AM org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    May 2, 2007 9:12:47 AM org.springframework.beans.factory.xml.XmlBeanDefinitionRe
    ader loadBeanDefinitions
    INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applic
    ationContext.xml]
    May 2, 2007 9:12:47 AM org.springframework.context.support.AbstractRefreshableAp
    plicationContext refreshBeanFactory
    INFO: Bean factory for application context [Root WebApplicationContext]: org.spr
    ingframework.beans.factory.support.DefaultListableBeanFactory defining beans [];
    root of BeanFactory hierarchy
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext refresh
    INFO: No beans defined in application context [Root WebApplicationContext]
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default [o
    [email protected]]
    May 2, 2007 9:12:48 AM org.springframework.context.support.AbstractApplicationCo
    ntext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
    lticaster': using default [org.springframework.context.event.SimpleApplicationEv
    entMulticaster@2f7cfe]
    May 2, 2007 9:12:48 AM org.springframework.ui.context.support.UiApplicationConte
    xtUtils initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using default [org.s
    [email protected]3]
    May 2, 2007 9:12:48 AM org.springframework.beans.factory.support.DefaultListable
    BeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory
    .support.DefaultListableBeanFactory defining beans []; root of BeanFactory hiera
    rchy]
    May 2, 2007 9:12:48 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Using context class [org.springframework.web.context.support.XmlWebApplica
    tionContext] for root WebApplicationContext
    May 2, 2007 9:12:48 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization completed in 1638 ms
    May 2, 2007 9:12:49 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /HibElearning from URL file:C:\
    Tomcat 5.0\webapps\HibElearning
    May 2, 2007 9:12:50 AM org.apache.catalina.loader.WebappClassLoader validateJarF
    ile
    INFO: validateJarFile(C:\Tomcat 5.0\webapps\HibElearning\WEB-INF\lib\servlet-api
    .jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: ja
    vax/servlet/Servlet.class
    log4j:WARN No appenders could be found for logger (org.apache.commons.beanutils.
    ConvertUtils).
    log4j:WARN Please initialize the log4j system properly.
    May 2, 2007 9:12:51 AM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /reddy from URL file:C:\Tomcat
    5.0\webapps\reddy
    May 2, 2007 9:12:52 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization started
    May 2, 2007 9:12:52 AM org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    May 2, 2007 9:12:52 AM org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    May 2, 2007 9:12:52 AM org.springframework.beans.factory.xml.XmlBeanDefinitionRe
    ader loadBeanDefinitions
    INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/applic
    ationContext.xml]
    May 2, 2007 9:12:52 AM org.springframework.context.support.AbstractRefreshableAp
    plicationContext refreshBeanFactory
    INFO: Bean factory for application context [Root WebApplicationContext]: org.spr
    ingframework.beans.factory.support.DefaultListableBeanFactory defining beans [];
    root of BeanFactory hierarchy
    May 2, 2007 9:12:52 AM org.springframework.context.support.AbstractApplicationCo
    ntext refresh
    INFO: No beans defined in application context [Root WebApplicationContext]
    May 2, 2007 9:12:53 AM org.springframework.context.support.AbstractApplicationCo
    ntext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default [o
    [email protected]]
    May 2, 2007 9:12:53 AM org.springframework.context.support.AbstractApplicationCo
    ntext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
    lticaster': using default [org.springframework.context.event.SimpleApplicationEv
    entMulticaster@fae78f]
    May 2, 2007 9:12:53 AM org.springframework.ui.context.support.UiApplicationConte
    xtUtils initThemeSource
    INFO: Unable to locate ThemeSource with name 'themeSource': using default [org.s
    [email protected]3]
    May 2, 2007 9:12:53 AM org.springframework.beans.factory.support.DefaultListable
    BeanFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory
    .support.DefaultListableBeanFactory defining beans []; root of BeanFactory hiera
    rchy]
    May 2, 2007 9:12:53 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Using context class [org.springframework.web.context.support.XmlWebApplica
    tionContext] for root WebApplicationContext
    May 2, 2007 9:12:53 AM org.springframework.web.context.ContextLoader initWebAppl
    icationContext
    INFO: Root WebApplicationContext: initialization completed in 1279 ms
    May 2, 2007 9:12:53 AM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    May 2, 2007 9:12:54 AM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    plez any one can help me as early as possible

    Maybe this resoruce will be helpful.

  • Unable to load your custom module provider's module-factory-class

    I am having a problem while I deploy my application. it gives me following error:
    Unable to load your custom module provider's module-factory-class com.bea.p13n.descriptor.module.ConfigModuleFactory
    Dont know how to resolve it. the class is in p13n_system.jar file, I have added that jar as a library in deployment but still it shows the same error.
    Added it in classpath as well but same error. (Dont know exactly how to add in class path, i have added just in "Start Server" tab's classpath)
    Any help will be greatly appreciated

    Below link might be helpful.
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=1049509&tstart=0
    Regards,
    Anandraj
    http://weblogic-wonders.com/

  • Why use Factory classes

    Why do we use Factory classes such BorderFactory, to get an instance of Border class, why cant we directly create an object of such classes like we do with regular concrete classes

    Why do we use Factory classes such BorderFactory, to
    get an instance of Border class, why cant we directly
    create an object of such classes like we do with
    regular concrete classesFactory methods (I mean static create methods here) have two advantages.
    First, the library designer doesn't have to expose concrete classes to the outside world, just interfaces. This adds flexibility.
    Second, the library designer is free to make object creations more flexible. The create method may take parameters that doesn't exactly correspond to a constructor of one specific class.

  • Initializing Factory class with Digital Signature

    Hi All,
    I am trying to Initialize the Factory class using digital signature. These are the steps I fallowed.
    1. Created a Java application "Application1" in Jdeveloper.
    2. Copied config, ext, lib folder from the Design console directory to the Application1/Project1 folder.
    3. added the lib and ext jars to the project properties.
    4. Modified the run/debug profile in the project properties to point to the xlconfig file in config folder.
    5. added the "-DXL.HomeDir=. -Djava.security.auth.login.config=config\authwl.conf" in the java options.
    Java code:
    public class SignatureLogin {
    public static void main(String[] args) throws Exception {
    Properties jndi =
    ConfigurationClient.getComplexSettingByPath("Discovery.CoreServer").getAllSettings();
    tcSignatureMessage signedMsg = tcCryptoUtil.sign("xelsysadm", "PrivateKey");
    tcUtilityFactory factory = new tcUtilityFactory(jndi, signedMsg);
    tcUserOperationsIntf usrIntf = (tcUserOperationsIntf)factory.getUtility("Thor.API.Operations.tcUserOperationsIntf");
    System.out.println("signature login complete");
    // Do something with usrIntf here
    Map filter = new HashMap();
    filter.put("Users.Key", "7464");
    tcResultSet rSet = usrIntf.findAllUsers(filter);
    rSet.goToRow(0);
    System.out.println(rSet.toString());
    factory.close();
    System.out.println("logout complete");
    System.exit(0);
    Then ran the java class. I am able to get the connection but when I am using findAllUsers(map) method to search the usr table I am get a nullpointer exception.
    Exception in thread "main" java.lang.NullPointerException
         at Thor.API.Operations.tcUserOperationsClient.findAllUsers(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at Thor.API.Base.SecurityInvocationHandler$1.run(Unknown Source)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.security.Security.runAs(Security.java:41)
         at Thor.API.Security.LoginHandler.weblogicLoginSession.runAs(Unknown Source)
         at Thor.API.Base.SecurityInvocationHandler.invoke(Unknown Source)
         at $Proxy0.findAllUsers(Unknown Source)
         at com.ssi.utils.custom.code.SignatureLogin.main(SignatureLogin.java:26)
    I need some help to fix this.
    Thanks

    Hi,
    Were you able to resolve the issue as I am facing same issue.
    I have a custom application deployed on same weblogic managed server where OIM is installed but when I try to find user in OIM it gives me null pointer exception.
    I have even checked the username with which connection is established using ioUtilityFactory.getUserName() and it gives me the correct user.
    Thanks
    Edited by: user1105482 on 26-Apr-2011 04:38

  • Abap Objects-Factory classes

    Hi All,
    We are thinking of developing some factory classes in ABAP.Cud u suggest some ? May be analogous to those factory classes in other programming languages also.

    Hi Hema,
    I thing you can go for a Validation Factory that has lots and lots of validation functions like basic validations ( e.g. decimal number, email address etc.) and business validations ( that contains templets for validations which could be overwritten for a specific application).
    This is actually a very usefull functionality that is usually written again and again for all development projects.
    Best regards,
    Guru.
    PS : Don't forget to give points

  • Unusual use of interface defining static factory class with getInstance

    This question is prompted by a recent New to Java forum question ask about the differences between Interfaces and Abstract classes. Of course one of the standard things mentioned is that interfaces cannot actually implement a method.
    One of my past clients, one of the 500 group, uses interfaces as class factories. The interface defines a pubic static class with a public static method, getInstance, that is called to generate instances of a class that implements the interface.
    This architecture was very object-oriented, made good use of polymorphism and worked very well. But I haven't seen this architecture used anywhere else and it seemed a little convoluted.
    Here is a 'pseudo' version of the basic interface template and use
    -- interface that defines public static factory class and getInstance method
    public interface abc {
        public static class FactoryClass
            public static abc getInstance ()
                return (abc) FactoryGenerator(new abcImpl(), abc.class);
    -- call of interface factory to create an instance
    abc myABC = abc.Factory.getInstance();1. Each main functional area ('abc' in the above) has its own interface factory
    2. Each main functional area has its own implementation class for that interface
    3. There is one generator (FactoryGenerator) that uses the interface class ('abc.class') to determine which implementation class to instantiate and return. The generator class can be configured at startup to control the actual class to return for any given interface.
    I should mention that the people that designed this entire architecture were not novices. They wrote some very sophisticated multi-threaded code that rarely had problems, was high performance and was easy to extend to add new functionality (interfaces and implementing classes) - pretty much plug-n-play with few, if any, side-effects that affected existing modules.
    Is this a best-practices method of designing factory classes and methods? Please provide any comments about the use of an architecture like this.

    Thanks for the feedback.
    >
    I don't see how 'the generator class can be configured at startup to control the actual class to return for any given interface' can possibly be true given this pseudo-code.
    >
    I can see why that isn't clear just from what is posted.
    The way it was explained to me at the time is that the interface uses standard naming conventions and acts like a template to make it easy to clone for new modules: just change 'abc' to 'def' in three places and write a new 'defImpl' class that extends the interface and the new interface and class can just 'plug in' to the framework.
    The new 'defImpl' class established the baseline functionality that must be supported. This line
    return (abc) FactoryGenerator(new abcImpl(), abc.class);uses the initial version of the new class that was defined, 'abcImpl()', when calling the FactoryGenerator and it acted as a 'minimum version supported'. The generator class could use configuration information, if provided, to provide a newer class version that would extend this default class. Their reasoning was that this allowed the framework to use multiple versions of the class as needed when bugs got fixed or new functionality was introduced.
    So the initial objects would be an interface 'abc' and a class 'abcImpl'. Then the next version (bug fixes or enhancements) would be introduced by creating a new class, perhaps 'abcImpl_version2'. A configuration parameter could be passed giving 'abcImpl' as the base class to expect in the FactoryGenerator call and the generator would actually create an instance of 'abcImpl_version2' or any other class that extended 'abcImpl'.
    It certainly go the job done. You could use multiple versions of the class for different environments as you worked new functionality from DEV, TEST, QA and PRODUCTION environments without changing the basic framework.
    I've never seen any Java 'pattern' that looks like that or any pattern where an interface contained a class. It seemed really convoluted to me and seems like the 'versioning' aspect of it could have been accomplished in a more straightforward manner.
    Thanks for the feedback. If you wouldn't mind expanding a bit on one comment you made then I will mark this ANSWERED and put it to rest.
    >
    I don't mind interfaces containing classes per se when necessary
    >
    I have never seen this except at this one site. Would you relate any info about where you have seen or used this or when it might be necessary?

  • Connection Factory class for Distributed Transaction?

    Definition of Managed Datasources goes like this at URL: http://download.oracle.com/docs/cd/B31017_01/web.1013/b28958/datasrc.htm#CHDDADCE
    Managed data sources are managed by OC4J. This means that OC4J provides critical system infrastructure such as global transaction management, connection pooling, and error handling.
    In the same document, I could also see a section for configuring Connection Pool, that uses 'factory-class' as 'oracle.jdbc.pool.OracleDataSource' as shown below:
    <connection-pool name="myConnectionPool">
    <connection-factory
    factory-class="oracle.jdbc.pool.OracleDataSource"
    user="scott"
    password="tiger"
    This configuration has worked well for my web application where I was using a single instance of Oracle database. In a new application I've to use two separate instance of Oracle databases and there is a need of distributed transaction.
    I know, I've to create two separate datasources for the two separate Oracle instances.
    My question is: Since now my transaction will be distributed in nature, do I need to use any other factory-class for configuring XA aware Datasources on OC4J? Or whether the same factory-class (oracle.jdbc.pool.OracleDataSource) will work even for distributed transactions?

    Here is the link for using Oracle RAC with WLS
    http://e-docs.bea.com/wls/docs81/jdbc/oracle_rac.html

  • Proper object oriented design for factory class

    I have a factory class (UserFactory) it is capable of creating two types of classes (Customer and Employee) that extend User. User is an abstract class.
    At present any class could create a Customer of an Employee.
    How do I restrict access to the constructors of Customer and Employee only to UserFactory?
    I don't want to make both of these classes interfaces (in which case I could just have UserFactory implement both of them).
    Here is an example of how they are set up at present:
    public abstract class User {
    public class Customer extends User{
    public Customer{
    public class Employee extends User {
    public Employee {
    public class UserFactory ???? {
    private static UserFactory c_userFactory = null;
    private UserFactory (){
    public UserFactory getInstance(){
    //private clone method too
    public Customer createCustomer(){
    public Employee createEmployee(){
    Oh and I don't want to create two separate factory classes for Employee and Customer. In C++ there is a concept of friend classes that would have worked nicely in this case.
    Thanks for any and all suggestions,
    Tim

    So correct me if I'm wrong but your suggestion would be something along the lines of:
    public abstract class User {
    public class Customer extends User{
    protected Customer(){
    public class Employee extends User {
    protected Employee (){
    public class UserFactory ???? {
    private static UserFactory c_userFactory = null;
    private UserFactory (){
    public UserFactory getInstance(){
    //private clone method too
    public Customer createCustomer(){
    public Employee createEmployee(){
    public class AccessForCustomer extends Customer {
    public class AccessForEmployee extends Employee {
    Is the above about what you were talking about? I haven't used inner classes before, so I'm a bit curious. Does this mean no class other than UserFactory or derivatives thereof can access the two classes AccessForCustomer and AccessForEmployee?
    Thanks,
    Tim

  • SAAJ 1.2 factory class for Weblogic 9 ?

    Whats the name of the SAAJ factory class to use in WLS 9.0
    to use SAAJ 1.2 functionality ?
    I tried
    System.setProperty("javax.xml.soap.SOAPFactory",
    "com.bea.saaj.SOAPFactoryImpl");
    but I keep getting a class not found exception. When I use the
    default factory I get a method not supported.
    Any ideas ?
    /s

    How about
    System.setProperty("javax.xml.soap.MessageFactory", "weblogic.xml.saaj.MessageFactoryImpl");
    System.setProperty("javax.xml.soap.SOAPFactory", "weblogic.xml.saaj.SOAPFactoryImpl");
    Jong

  • Factory class and static members

    I don't understand very well why sometimes you can find a factory class (for example for the xml parsers). What's its aim?
    And why sometuimes, instead of a constructor, some classes have only static methods that returns a reference to that object?
    Anyone can tell me?
    Thanks

    Static memebers can be used in places where instances of its enclosing class is not neccesary.Only a method is required to be executed. Let me tell you with an example,
    class ConnectionPool {
    public static giveConnection(int index) {
    In the above example, our objective is to use only the method public static giveConnection(int index) {} , and not any of the other attributes of this class. You have 2 ways to use this method : One is, you can instantiate ConnectionPool p = new ConnectionPool(); . Second is , just use ConnectionPool.giveConnection(2);
    The first solution may create instance and obstruct your performance. Seond one does not do that. All invokers of this method do not instantiate and occupy space.
    Usually, factory classes have static members. Because these classes are used as a supporting processing factory. Theses members can be considered as utility methods. Hence static property will better suit for them. This answer will also tell you that the use of constructors here is not neccessary.
    Hope this has helped you.
    Rajesh

  • Factory-class in data-sources.xml managed-data-source

    OracleAS_1\j2ee\home\config has
    data-sources.xml
    Using managed-data-source.
    For connection-pool, connection-factory factory-class If I use OracleDriver instead of OracleDataSource, what difference would it have? In terms of performance?
    Thanks.

    Oops, a case issue...
    class="oracle.jdbc.pool.Oracle[b]OCIConnectionPool"

  • Java Factory Classes

    What is the importance of using Factory Classes?How are they different from other Java classes?

    What is the importance of using Factory Classes?How
    are they different from other Java classes? Factory is a design pattern. The idea is that you
    don't do new of a class all over your program. Instead
    you call a static method of the class which
    instatiates the class for you. So new objects are
    created within the class itself. The class has become
    a "factory" of objects of itself.
    The discussion about how-to do conditional compiling and integrate the fact that you are developing cross-platform into the code is a good example of a possible use
    Another reason you might want to implement a factory, is when a certain object is very resource hungry in some way and you can reduce and regulate the instantiations of the class by using a factory to keep handig out a set of objects. The object must be usuable in this manner though.

  • What is Factory class?

    hi friends,
    what is Factory class?
    How we can differentiate Factory class from norma java class?
    thanks,
    ramu.

    I'll take "Questions I can answer myself" for 500 thanks Alex.

  • Which is a factory class ?

    which is a factory class  here ?  Connection class or DriverManager class
    Connection con=null;
    Statement stmt=null;
    try {
         Class.forName("oracle.jdbc.driver.OracleDriver");
         con = DriverManager.getConnection("myServer", "user","password");
         stmt = con.createStatement();
    } catch(Exception e) {}

    user575089 wrote:
    I think DriverManager class. It takes inputs and returns a different connection object for different database url.
    But if I think other way , it could be Connection class as well ...They're both factories. Connection is a great example of the Abstract Factory Pattern, whereas DriverManager looks like it could just have a factory method of getConnection().
    Hence, I'm in a doubt....I think factory class should have a factory method which should take input and gives an output object depending upon input fed to it.Factory Method and Abstract Factory are two different but related patterns. Where a factory method will just return you an instance, possibly depending on some input (but not necessarily), Abstract Factory is used to create a class hierarchy of related classes.
    You can see Abstract Factory clearly when you display the actual class of the connection you get from the DriverManager.
    Depending on the database it would return for example MySQLConnection class, which would then give you MySQLStatement objects. But in your code you don't need to worry about the actual classes, since you can just use the abstract hierarchy of Connection / Statement / ResultSet etc.

Maybe you are looking for

  • Bt openzone/FON connection issue

    Ok so I often use this specific btopenzone wifi hotspot, used it for a couple hours every now and again for ages. Hit a problem now though my laptoop no longer connects to it. it sees it i click connect but it just keeps coming up no internet connect

  • Unable to Deploy war file in 6.1/sp1/solaris

    We are using wl 6.1/sp1 solaris. What I can gather is when the server trying to parse the dtd for weblogic.xml..for some reason it does not find the local copy of th e dtd? any clues how I can fix this. Any help is appreciated. java.net.ConnectExcept

  • Without Wi-Fi, how can I connect?

    I am a teacher and I would like to use my Ipad Mini as an interactive whiteboard while presenting lessons. Unfortunately, we don't have Wi-Fi in our building. How can I connect to my desktop and control it with my Ipad Mini while walking around the r

  • Integration DIRECTORY not STARTING

    HI all, I am able to login to Integration reepository (IR). If i right click and do save as the file is saved as <b>.JNLP</b> file . I am not able to login to Integartion Directory (ID). If i right click and do save as the file is saved as <b>.HTML</

  • Need advice before buying MBP please!!

    Hi everyone, sorry this is AGAIN a "need help before buying" post. I'm basically looking to buy a MBP for movie production : I will do data transfer (footage into USB3 to TB2 drives/USB3 drives). And maybe some playback of very large 4K video files.