One Provider, many portlets

Hi Everyone,
Have created a project in JDeveloper and have created two portlets within that project. For example, we will call them portlet1 and portlet2. When I navigate to the page:
http://localhost:8988/Inquiry-InquiryPortlets/index.jsp
It displays:
Registration URL http://localhost:8988/Inquiry-InquiryPortlets/providers/
Service Name
portlet1
portlet2
This is perfect. Hoever when, I navigate to http://localhost:8988/Inquiry-InquiryPortlets/providers/ it shows:
Congratulations! You have successfully reached your Provider's Test Page.
Recognizing Portlets...
Portlet1
Recognizing component versions...
pdkjava.jar version: 9.0.4.1.0
I would like to see both of my portlets here (not just Portlet1). I.e. Be able to register one provider in portal and have multiple portlets avaliable from it. You can do this with oracle's sample portlets, I'm just not sure how they did it.
Hope my question isnt too confusing... please help.
Cheers,
Cory

Hi Cory,
i havn't faced this issue ever before so just trying to solve your problem
You can just chk the following ..
There must be two portlet entries in the provider.xml.
Example:
Portlet1 entry
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>1</id>
<name>Portlet1</name>
</portlet>
Portlet2 entry
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>2</id>
<name>Portlet1</name>
</portlet>
The thing is ID value should differ for both the portlet entries.
If still not solved then , plz post you provider.xml file content if possible.
Thnx
~Neeraj Sidhaye
Try_Catch_Finally @ Y !
Request.Response @ Gmail Dot Com

Similar Messages

  • How do I add multiple portlets to one provider?

    Hello,
    I'm using JDeveloper 10g. Created an Application Workspace which holds several projects (java/jsp porlets). I would like all of these portlets to be under one provider rather than registering a provider for each project. Do I choose one project and add information to the provider.xml file for my other portlets? If anyone could help, it would be appreciated...
    TIA

    [Matthew:  think I understand. Is it safe to use a provider for each portlet? If I had a hundred portlets would it effect system hardware requirements with multitude of providers running? Now I'm trying to determine if I should combine each project or if I should leave them seperate. Thanks again...]
    Matthew - Would be good if you could hit "reply" to the last concerned post. I had some trouble trying to find whether you had posted any more questions ;-)
    here's my response to your last post:
    There is definitely a performance hit when you have just one portlet under one provider. First - You will have to undergo 100 provider registrations and I'm sure that can drive anybody crazy ;-)
    Secondly, for each provider, there is a ProviderDefinition object created in memory. In your case, there would be 100 such objects created at any point in time (assuming 100 are in use). had you classified portlets under say 10 such providers, you will definitely save memory. For each instance of the provider registration, you have one ProviderInstance object created. So even if all these 100 providers are registered once on Portal A, you will have 100 instances of this object. When registered on portal B, 100 more will be created. This will be sufficiently less if you had just 10 top level providers.
    As a best practice, you might want to group related portlets under one provider e.g. If you are having a bunch of SAP, Oracle, PeopleSoft portlets, you could create three top level providers and just add those portlets accordingly. Just an example though. the classification is totaly based on what binds two portlets together and is something that will have to be decided by you.
    Just my 0.02$
    Regards,
    Abhinav

  • How to have one provider with multiple portlets in JDev 11g

    Hi,
    I am trying to create Oracle PDK Portlets using JDeveloper 11g but for each portlet JDeveloper is creating a provider. As In JDeveloper 10.1.3.4 we can have one provider with multiple portlets in it. But JDev 11g creates provider for each portlet. How can we have one provider with multiple portlets in JDev 11g. Is it something changed in 11g version or am I doing it wrong. As the Help says we can have multiple portlets in one provider but when creating portlets it does not do that. Any help is appreciated.
    Thanks

    Hi,
    I am trying to create Oracle PDK Portlets using JDeveloper 11g but for each portlet JDeveloper is creating a provider. As In JDeveloper 10.1.3.4 we can have one provider with multiple portlets in it. But JDev 11g creates provider for each portlet. How can we have one provider with multiple portlets in JDev 11g. Is it something changed in 11g version or am I doing it wrong. As the Help says we can have multiple portlets in one provider but when creating portlets it does not do that. Any help is appreciated.
    Thanks

  • Can i fill one provider with more than one application?

    Hi,
    I have so many application. Currently, we adding one provider with one portlet. So, we just want to know is it possible to add one portlet fill with many application?
    The idea is we want to reduce provider in portal.
    Thank you.

    No, you can only sync with one. If you sync with another it will erase the device in order to mirror the other iTunes library.

  • Unable to read one-to-many relations using Hibernate

    Hi,
    I am trying with a very simple one-to-many relationship. When I am storing the objects, there are no problems. But when I am trying to read out the collection, it says invalid descriptor index. Please help.
    Regards,
    Hibernate version:
    hibernate-3.1rc2
    Mapping documents:
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
         <class name="Parent">
              <id name="id">
                   <generator class="identity"/>
              </id>
              <set name="children">
                   <key column="parent_id"/>
                   <one-to-many class="Child"/>
              </set>
         </class>
         <class name="Child">
              <id name="id">
                   <generator class="identity"/>
              </id>
              <property name="name"/>
         </class>
    </hibernate-mapping>
    Code between sessionFactory.openSession() and session.close():
    The Parent class:
    public class Parent
         private Long id ;     
         private Set children;
         Parent(){}
         public Long getId()
              return id;
         public void setId(Long id)
              this.id=id;
         public Set getChildren()
              return children;
         public void setChildren(Set children)
              this.children=children;
    The Child class:
    public class Child
         private Long id;
         private String name;
         Child(){}
         public Long getId()
              return id;
         private void setId(Long id)
              this.id=id;
         public String getName()
              return name;
         public void setName(String name)
              this.name=name;
    The Main class:
    public class PCManager
         public static void main(String[] args)
              PCManager mgr = new PCManager();
              List lt = null;
              if (args[0].equals("store"))
                   mgr.createAndStoreParent(new HashSet(3));
              else if (args[0].equals("list"))
                   mgr.listEvents();
              HibernateUtil.getSessionFactory().close();
         private void createAndStoreParent(HashSet s)
              HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
              Parent p1 = new Parent();
              int size = 3;
              for (int i=size; i>0; i--)
                   Child c = new Child();
                   c.setName("Child"+i);
                   s.add(c);
              p1.setChildren (s);
              Iterator elems = s.iterator();
              do {     
                   Child ch = (Child) elems.next();
                   HibernateUtil.getSessionFactory().getCurrentSession().save(ch);
              }while(elems.hasNext());
              HibernateUtil.getSessionFactory().getCurrentSession().save(p1);
              HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();
         private void listEvents()
              HibernateUtil.getSessionFactory().getCurrentSession().beginTransaction();
              Parent result = (Parent) HibernateUtil.getSessionFactory().getCurrentSession().load(Parent.class, new Long(1));
              System.out.println("Id is :"+ result.getId());
              Set children = result.getChildren();
              Iterator elems = children.iterator();
              do {     
                   Child ch = (Child) elems.next();
                   System.out.println("Child Name"+ ch.getName());
              }while(elems.hasNext());
              HibernateUtil.getSessionFactory().getCurrentSession().getTransaction().commit();          
    Full stack trace of any exception that occurs:
    When I run with "hbm2ddl.auto" property as validate and trying to list the contents, I get the following out put.
    C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Da
    ction=list
    Buildfile: build.xml
    clean:
    [delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    [mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
    2\MyHibernate\bin
    copy-resources:
    [copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    compile:
    [javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
    hibernate-3.1rc2\MyHibernate\bin
    run:
    [java] 09:09:23,433 INFO Environment:474 - Hibernate 3.1 rc2
    [java] 09:09:23,449 INFO Environment:489 - loaded properties from resource
    hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
    .cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
    ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
    te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
    substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
    he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
    nate.connection.pool_size=1}
    [java] 09:09:23,465 INFO Environment:519 - using java.io streams to persis
    t binary types
    [java] 09:09:23,465 INFO Environment:520 - using CGLIB reflection optimize
    r
    [java] 09:09:23,481 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
    p handling
    [java] 09:09:23,559 INFO Configuration:1257 - configuring from resource: /
    hibernate.cfg.xml
    [java] 09:09:23,559 INFO Configuration:1234 - Configuration resource: /hib
    ernate.cfg.xml
    [java] 09:09:23,872 INFO Configuration:460 - Reading mappings from resourc
    e: PCMapping.hbm.xml
    [java] 09:09:24,013 INFO HbmBinder:266 - Mapping class: Parent -> Parent
    [java] 09:09:24,045 INFO HbmBinder:266 - Mapping class: Child -> Child
    [java] 09:09:24,045 INFO Configuration:1368 - Configured SessionFactory: n
    ull
    [java] 09:09:24,061 INFO Configuration:1014 - processing extends queue
    [java] 09:09:24,061 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:09:24,061 INFO HbmBinder:2233 - Mapping collection: Parent.child
    ren -> Child
    [java] 09:09:24,076 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:09:24,076 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:09:24,155 INFO DriverManagerConnectionProvider:41 - Using Hibern
    ate built-in connection pool (not for production use!)
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:42 - Hibernate co
    nnection pool size: 1
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:45 - autocommit m
    ode: false
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:80 - using driver
    : sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
    [java] 09:09:24,170 INFO DriverManagerConnectionProvider:86 - connection p
    roperties: {}
    [java] 09:09:24,264 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
    version: 08.00.0194
    [java] 09:09:24,264 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
    e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
    [java] 09:09:24,296 INFO Dialect:100 - Using dialect: org.hibernate.dialec
    t.SQLServerDialect
    [java] 09:09:24,311 INFO TransactionFactoryFactory:31 - Using default tran
    saction strategy (direct JDBC transactions)
    [java] 09:09:24,327 INFO TransactionManagerLookupFactory:33 - No Transacti
    onManagerLookup configured (in JTA environment, use of read-write or transaction
    al second-level cache is not recommended)
    [java] 09:09:24,327 INFO SettingsFactory:125 - Automatic flush during befo
    reCompletion(): disabled
    [java] 09:09:24,327 INFO SettingsFactory:129 - Automatic session close at
    end of transaction: disabled
    [java] 09:09:24,343 INFO SettingsFactory:144 - Scrollable result sets: ena
    bled
    [java] 09:09:24,343 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
    isabled
    [java] 09:09:24,343 INFO SettingsFactory:160 - Connection release mode: au
    to
    [java] 09:09:24,358 INFO SettingsFactory:184 - Maximum outer join fetch de
    pth: 1
    [java] 09:09:24,358 INFO SettingsFactory:187 - Default batch fetch size: 1
    [java] 09:09:24,358 INFO SettingsFactory:191 - Generate SQL with comments:
    disabled
    [java] 09:09:24,358 INFO SettingsFactory:195 - Order SQL updates by primar
    y key: disabled
    [java] 09:09:24,358 INFO SettingsFactory:338 - Query translator: org.hiber
    nate.hql.ast.ASTQueryTranslatorFactory
    [java] 09:09:24,374 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
    slatorFactory
    [java] 09:09:24,374 INFO SettingsFactory:203 - Query language substitution
    s: {no='N', yes='Y'}
    [java] 09:09:24,374 INFO SettingsFactory:209 - Second-level cache: enabled
    [java] 09:09:24,374 INFO SettingsFactory:213 - Query cache: disabled
    [java] 09:09:24,374 INFO SettingsFactory:325 - Cache provider: org.hiberna
    te.cache.HashtableCacheProvider
    [java] 09:09:24,374 INFO SettingsFactory:228 - Optimize cache for minimal
    puts: disabled
    [java] 09:09:24,374 INFO SettingsFactory:233 - Cache region prefix: hibern
    ate.test
    [java] 09:09:24,405 INFO SettingsFactory:237 - Structured second-level cac
    he entries: disabled
    [java] 09:09:24,437 INFO SettingsFactory:257 - Echoing all SQL to stdout
    [java] 09:09:24,452 INFO SettingsFactory:264 - Statistics: disabled
    [java] 09:09:24,452 INFO SettingsFactory:268 - Deleted entity synthetic id
    entifier rollback: disabled
    [java] 09:09:24,452 INFO SettingsFactory:283 - Default entity-mode: POJO
    [java] 09:09:24,593 INFO SessionFactoryImpl:155 - building session factory
    [java] 09:09:24,938 INFO SessionFactoryObjectFactory:82 - Not binding fact
    ory to JNDI, no JNDI name configured
    [java] 09:09:24,954 INFO SchemaValidator:99 - Running schema validator
    [java] 09:09:24,954 INFO SchemaValidator:107 - fetching database metadata
    [java] 09:09:24,954 INFO Configuration:1014 - processing extends queue
    [java] 09:09:24,954 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:09:24,954 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:09:24,954 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:09:24,985 WARN JDBCExceptionReporter:71 - SQL Error: 0, SQLState
    : S1002
    [java] 09:09:24,985 ERROR JDBCExceptionReporter:72 - [Microsoft][ODBC SQL S
    erver Driver]Invalid Descriptor Index
    [java] 09:09:25,001 ERROR SchemaValidator:129 - Error closing connection
    [java] java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid transaction state
    [java] Initial SessionFactory creation failed.org.hibernate.exception.Gener
    icJDBCException: could not get table metadata: Child
    [java] java.lang.ExceptionInInitializerError
    [java] at HibernateUtil.<clinit>(Unknown Source)
    [java] at PCManager.listEvents(Unknown Source)
    [java] at PCManager.main(Unknown Source)
    [java] Caused by: org.hibernate.exception.GenericJDBCException: could not g
    et table metadata: Child
    [java] at org.hibernate.exception.SQLStateConverter.handledNonSpecificE
    xception(SQLStateConverter.java:91)
    [java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    [java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    [java] at sun.jdbc.odbc.JdbcOdbc.SQLDisconnect(JdbcOdbc.java:2988)
    [java] at sun.jdbc.odbc.JdbcOdbcDriver.disconnect(JdbcOdbcDriver.java:9
    80)
    [java] at sun.jdbc.odbc.JdbcOdbcConnection.close(JdbcOdbcConnection.jav
    a:739)
    [java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
    idator.java:125)
    [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
    pl.java:299)
    [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
    tion.java:1145)
    [java] at HibernateUtil.<clinit>(Unknown Source)
    [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateCon
    verter.java:79)
    [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
    tionHelper.java:43)
    [java] at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExcep
    tionHelper.java:29)
    [java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
    DatabaseMetadata.java:100)
    [java] at org.hibernate.cfg.Configuration.validateSchema(Configuration.
    java:946)
    [java] at org.hibernate.tool.hbm2ddl.SchemaValidator.validate(SchemaVal
    idator.java:116)
    [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryIm
    pl.java:299)
    [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configura
    tion.java:1145)
    [java] ... 3 more
    [java] Caused by: java.sql.SQLException: [Microsoft][ODBC SQL Server Driver
    ]Invalid Descriptor Index
    [java] at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6879)
    [java] at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7036)
    [java] at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3862)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultS
    et.java:5561)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
    ava:338)
    [java] at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.j
    ava:395)
    [java] at PCManager.listEvents(Unknown Source)
    [java] at PCManager.main(Unknown Source)
    [java] at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata
    .java:30)
    [java] at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(
    DatabaseMetadata.java:85)
    [java] ... 7 more
    [java] Exception in thread "main"
    [java] Java Result: 1
    BUILD SUCCESSFUL
    Total time: 4 seconds
    Name and version of the database you are using:
    Microsoft SQLServer2000
    The generated SQL (show_sql=true):
    When the program is run with "hbm2ddl.auto" property as create, I get the following output.
    C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc2\MyHibernate>ant run -Daction=store
    Buildfile: build.xml
    clean:
    [delete] Deleting directory C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    [mkdir] Created dir: C:\Documents and Settings\mirza\Desktop\hibernate-3.1rc
    2\MyHibernate\bin
    copy-resources:
    [copy] Copying 4 files to C:\Documents and Settings\mirza\Desktop\hibernate
    -3.1rc2\MyHibernate\bin
    compile:
    [javac] Compiling 5 source files to C:\Documents and Settings\mirza\Desktop\
    hibernate-3.1rc2\MyHibernate\bin
    run:
    [java] 09:12:54,820 INFO Environment:474 - Hibernate 3.1 rc2
    [java] 09:12:54,836 INFO Environment:489 - loaded properties from resource
    hibernate.properties: {hibernate.cglib.use_reflection_optimizer=true, hibernate
    .cache.provider_class=org.hibernate.cache.HashtableCacheProvider, hibernate.dial
    ect=org.hibernate.dialect.SQLServerDialect, hibernate.max_fetch_depth=1, hiberna
    te.jdbc.use_streams_for_binary=true, hibernate.format_sql=true, hibernate.query.
    substitutions=yes 'Y', no 'N', hibernate.proxool.pool_alias=pool1, hibernate.cac
    he.region_prefix=hibernate.test, hibernate.jdbc.batch_versioned_data=true, hiber
    nate.connection.pool_size=1}
    [java] 09:12:54,852 INFO Environment:519 - using java.io streams to persis
    t binary types
    [java] 09:12:54,852 INFO Environment:520 - using CGLIB reflection optimize
    r
    [java] 09:12:54,867 INFO Environment:550 - using JDK 1.4 java.sql.Timestam
    p handling
    [java] 09:12:54,946 INFO Configuration:1257 - configuring from resource: /
    hibernate.cfg.xml
    [java] 09:12:54,946 INFO Configuration:1234 - Configuration resource: /hib
    ernate.cfg.xml
    [java] 09:12:55,259 INFO Configuration:460 - Reading mappings from resourc
    e: PCMapping.hbm.xml
    [java] 09:12:55,400 INFO HbmBinder:266 - Mapping class: Parent -> Parent
    [java] 09:12:55,447 INFO HbmBinder:266 - Mapping class: Child -> Child
    [java] 09:12:55,447 INFO Configuration:1368 - Configured SessionFactory: n
    ull
    [java] 09:12:55,447 INFO Configuration:1014 - processing extends queue
    [java] 09:12:55,447 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:55,447 INFO HbmBinder:2233 - Mapping collection: Parent.child
    ren -> Child
    [java] 09:12:55,463 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:55,479 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:41 - Using Hibern
    ate built-in connection pool (not for production use!)
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:42 - Hibernate co
    nnection pool size: 1
    [java] 09:12:55,557 INFO DriverManagerConnectionProvider:45 - autocommit m
    ode: false
    [java] 09:12:55,573 INFO DriverManagerConnectionProvider:80 - using driver
    : sun.jdbc.odbc.JdbcOdbcDriver at URL: jdbc:odbc:MySQL
    [java] 09:12:55,573 INFO DriverManagerConnectionProvider:86 - connection p
    roperties: {}
    [java] 09:12:55,651 INFO SettingsFactory:77 - RDBMS: Microsoft SQL Server,
    version: 08.00.0194
    [java] 09:12:55,667 INFO SettingsFactory:78 - JDBC driver: JDBC-ODBC Bridg
    e (SQLSRV32.DLL), version: 2.0001 (03.85.1117)
    [java] 09:12:55,682 INFO Dialect:100 - Using dialect: org.hibernate.dialec
    t.SQLServerDialect
    [java] 09:12:55,698 INFO TransactionFactoryFactory:31 - Using default tran
    saction strategy (direct JDBC transactions)
    [java] 09:12:55,714 INFO TransactionManagerLookupFactory:33 - No Transacti
    onManagerLookup configured (in JTA environment, use of read-write or transaction
    al second-level cache is not recommended)
    [java] 09:12:55,714 INFO SettingsFactory:125 - Automatic flush during befo
    reCompletion(): disabled
    [java] 09:12:55,714 INFO SettingsFactory:129 - Automatic session close at
    end of transaction: disabled
    [java] 09:12:55,729 INFO SettingsFactory:144 - Scrollable result sets: ena
    bled
    [java] 09:12:55,729 INFO SettingsFactory:152 - JDBC3 getGeneratedKeys(): d
    isabled
    [java] 09:12:55,745 INFO SettingsFactory:160 - Connection release mode: au
    to
    [java] 09:12:55,745 INFO SettingsFactory:184 - Maximum outer join fetch de
    pth: 1
    [java] 09:12:55,745 INFO SettingsFactory:187 - Default batch fetch size: 1
    [java] 09:12:55,745 INFO SettingsFactory:191 - Generate SQL with comments:
    disabled
    [java] 09:12:55,745 INFO SettingsFactory:195 - Order SQL updates by primar
    y key: disabled
    [java] 09:12:55,745 INFO SettingsFactory:338 - Query translator: org.hiber
    nate.hql.ast.ASTQueryTranslatorFactory
    [java] 09:12:55,777 INFO ASTQueryTranslatorFactory:21 - Using ASTQueryTran
    slatorFactory
    [java] 09:12:55,792 INFO SettingsFactory:203 - Query language substitution
    s: {no='N', yes='Y'}
    [java] 09:12:55,792 INFO SettingsFactory:209 - Second-level cache: enabled
    [java] 09:12:55,792 INFO SettingsFactory:213 - Query cache: disabled
    [java] 09:12:55,792 INFO SettingsFactory:325 - Cache provider: org.hiberna
    te.cache.HashtableCacheProvider
    [java] 09:12:55,808 INFO SettingsFactory:228 - Optimize cache for minimal
    puts: disabled
    [java] 09:12:55,808 INFO SettingsFactory:233 - Cache region prefix: hibern
    ate.test
    [java] 09:12:55,808 INFO SettingsFactory:237 - Structured second-level cac
    he entries: disabled
    [java] 09:12:55,839 INFO SettingsFactory:257 - Echoing all SQL to stdout
    [java] 09:12:55,839 INFO SettingsFactory:264 - Statistics: disabled
    [java] 09:12:55,839 INFO SettingsFactory:268 - Deleted entity synthetic id
    entifier rollback: disabled
    [java] 09:12:55,839 INFO SettingsFactory:283 - Default entity-mode: POJO
    [java] 09:12:55,980 INFO SessionFactoryImpl:155 - building session factory
    [java] 09:12:56,325 INFO SessionFactoryObjectFactory:82 - Not binding fact
    ory to JNDI, no JNDI name configured
    [java] 09:12:56,341 INFO Configuration:1014 - processing extends queue
    [java] 09:12:56,341 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:56,341 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:56,341 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:56,356 INFO Configuration:1014 - processing extends queue
    [java] 09:12:56,356 INFO Configuration:1018 - processing collection mappin
    gs
    [java] 09:12:56,356 INFO Configuration:1027 - processing association prope
    rty references
    [java] 09:12:56,372 INFO Configuration:1049 - processing foreign key const
    raints
    [java] 09:12:56,372 INFO SchemaExport:153 - Running hbm2ddl schema export
    [java] 09:12:56,388 DEBUG SchemaExport:171 - import file not found: /import
    .sql
    [java] 09:12:56,388 INFO SchemaExport:180 - exporting generated schema to
    database
    [java] 09:12:56,403 DEBUG SchemaExport:283 -
    [java] alter table Child
    [java] drop constraint FK3E104FC976A59A
    [java] 09:12:56,466 DEBUG SchemaExport:283 -
    [java] drop table Child
    [java] 09:12:56,544 DEBUG SchemaExport:283 -
    [java] drop table Parent
    [java] 09:12:56,654 DEBUG SchemaExport:283 -
    [java] create table Child (
    [java] id numeric(19,0) identity not null,
    [java] name varchar(255) null,
    [java] parent_id numeric(19,0) null,
    [java] primary key (id)
    [java] )
    [java] 09:12:56,779 DEBUG SchemaExport:283 -
    [java] create table Parent (
    [java] id numeric(19,0) identity not null,
    [java] primary key (id)
    [java] )
    [java] 09:12:56,873 DEBUG SchemaExport:283 -
    [java] alter table Child
    [java] add constraint FK3E104FC976A59A
    [java] foreign key (parent_id)
    [java] references Parent
    [java] 09:12:56,952 INFO SchemaExport:200 - schema export complete
    [java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5701, SQL
    State: 01000
    [java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
    erver Driver][SQL Server]Changed database context to 'master'.
    [java] 09:12:56,952 WARN JDBCExceptionReporter:48 - SQL Warning: 5703, SQL
    State: 01000
    [java] 09:12:56,952 WARN JDBCExceptionReporter:49 - [Microsoft][ODBC SQL S
    erver Driver][SQL Server]Changed language setting to us_english.
    [java] 09:12:56,983 INFO SessionFactoryImpl:432 - Checking 0 named queries
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Child
    [java] (name)
    [java] values
    [java] (?) select
    [java] scope_identity()
    [java] Hibernate:
    [java] insert
    [java] into
    [java] Parent
    [java] default
    [java] values
    [java] select
    [java] scope_identity()
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] Hibernate:
    [java] update
    [java] Child
    [java] set
    [java] parent_id=?
    [java] where
    [java] id=?
    [java] 09:12:57,390 INFO SessionFactoryImpl:831 - closing
    [java] 09:12:57,390 INFO DriverManagerConnectionProvider:147 - cleaning up
    connection pool: jdbc:odbc:MySQL
    BUILD SUCCESSFUL
    Total time: 5 seconds
    Debug level Hibernate log excerpt:
    Included in the above description.

    That's not the right mapping for the 1:m relationship in Hibernate.
    First of all, I believe the recommendation is to have a separate .hbm.xml file for each class, so you should have one for Parent and Child.
    Second, you'll find the proper syntax for a one-to-many relationship here:
    http://www.hibernate.org/hib_docs/v3/reference/en/html/tutorial.html#tutorial-associations
    See if those help.
    The tutorial docs for Hibernate are quite good. I'd recommend going through them carefully.
    %

  • Creating a single context index on a one-to-many and lookup table

    Hello,
    I've been successfully setting up text indexes on multiple columns on the same table (using MULTI_COLUMN_DATASTORE preferences), but now I have a situation with a one-to-many data collection table (with a FK to a lookup table), and I need to search columns across both of these tables. Sample code below, more of my chattering after the code block:
    CREATE TABLE SUBMISSION
    ( SUBMISSION_ID             NUMBER(10)          NOT NULL,
      SUBMISSION_NAME           VARCHAR2(100)       NOT NULL
    CREATE TABLE ADVISOR_TYPE
    ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_NAME         VARCHAR2(50)        NOT NULL
    CREATE TABLE SUBMISSION_ADVISORS
    ( SUBMISSION_ADVISORS_ID    NUMBER(10)          NOT NULL,
      SUBMISSION_ID             NUMBER(10)          NOT NULL,
      ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      FIRST_NAME                VARCHAR(50)         NULL,
      LAST_NAME                 VARCHAR(50)         NULL,
      SUFFIX                    VARCHAR(20)         NULL
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (1, 'Some Research Paper');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (2, 'Thesis on 17th Century Weather Patterns');
    INSERT INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME) VALUES (3, 'Statistical Analysis on Sunny Days in March');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (1, 'Department Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (2, 'Department Co-Chair');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (3, 'Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (4, 'Associate Professor');
    INSERT INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME) VALUES (5, 'Scientist');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (1,1,2,'John', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (2,1,2,'Jane', 'Doe', 'PhD');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (3,2,3,'Johan', 'Smith', NULL);
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (4,2,4,'Magnus', 'Jackson', 'MS');
    INSERT INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX) VALUES (5,3,5,'Williard', 'Forsberg', 'AMS');
    COMMIT;I want to be able to create a text index to lump these fields together:
    SUBMISSION_ADVISORS.FIRST_NAME
    SUBMISSION_ADVISORS.LAST_NAME
    SUBMISSION_ADVISORS.SUFFIX
    ADVISOR_TYPE.ADVISOR_TYPE_NAME
    I've looked at DETAIL_DATASTORE and USER_DATASTORE, but the examples in Oracle Docs for DETAIL_DATASTORE leave me a little bit perplexed. It seems like this should be pretty straightforward.
    Ideally, I'm trying to avoid creating new columns, and keeping the trigger adjustments to a minimum. But I'm open to any and all suggestions. Thanks for for your time and thoughts.
    -Jamie

    I would create a procedure that creates a virtual document with tags, which is what the multi_column_datatstore does behind the scenes. Then I would use that procedure in a user_datastore, so the result is the same for multiple tables as what a multi_column_datastore does for one table. I would also use either auto_section_group or some other type of section group, so that you can search using WITHIN as with the multi_column_datastore. Please see the demonstration below.
    SCOTT@orcl_11gR2> -- tables and data that you provided:
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION
      2  ( SUBMISSION_ID           NUMBER(10)          NOT NULL,
      3    SUBMISSION_NAME           VARCHAR2(100)          NOT NULL
      4  )
      5  /
    Table created.
    SCOTT@orcl_11gR2> CREATE TABLE ADVISOR_TYPE
      2  ( ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      3    ADVISOR_TYPE_NAME      VARCHAR2(50)          NOT NULL
      4  )
      5  /
    Table created.
    SCOTT@orcl_11gR2> CREATE TABLE SUBMISSION_ADVISORS
      2  ( SUBMISSION_ADVISORS_ID      NUMBER(10)          NOT NULL,
      3    SUBMISSION_ID           NUMBER(10)          NOT NULL,
      4    ADVISOR_TYPE_ID           NUMBER(10)          NOT NULL,
      5    FIRST_NAME           VARCHAR(50)          NULL,
      6    LAST_NAME           VARCHAR(50)          NULL,
      7    SUFFIX                VARCHAR(20)          NULL
      8  )
      9  /
    Table created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      3    VALUES (1, 'Some Research Paper')
      4  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      5    VALUES (2, 'Thesis on 17th Century Weather Patterns')
      6  INTO SUBMISSION (SUBMISSION_ID, SUBMISSION_NAME)
      7    VALUES (3, 'Statistical Analysis on Sunny Days in March')
      8  SELECT * FROM DUAL
      9  /
    3 rows created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      3    VALUES (1, 'Department Chair')
      4  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      5    VALUES (2, 'Department Co-Chair')
      6  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      7    VALUES (3, 'Professor')
      8  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
      9    VALUES (4, 'Associate Professor')
    10  INTO ADVISOR_TYPE (ADVISOR_TYPE_ID, ADVISOR_TYPE_NAME)
    11    VALUES (5, 'Scientist')
    12  SELECT * FROM DUAL
    13  /
    5 rows created.
    SCOTT@orcl_11gR2> INSERT ALL
      2  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      3    VALUES (1,1,2,'John', 'Doe', 'PhD')
      4  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      5    VALUES (2,1,2,'Jane', 'Doe', 'PhD')
      6  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      7    VALUES (3,2,3,'Johan', 'Smith', NULL)
      8  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
      9    VALUES (4,2,4,'Magnus', 'Jackson', 'MS')
    10  INTO SUBMISSION_ADVISORS (SUBMISSION_ADVISORS_ID, SUBMISSION_ID, ADVISOR_TYPE_ID, FIRST_NAME, LAST_NAME, SUFFIX)
    11    VALUES (5,3,5,'Williard', 'Forsberg', 'AMS')
    12  SELECT * FROM DUAL
    13  /
    5 rows created.
    SCOTT@orcl_11gR2> -- constraints presumed based on your description:
    SCOTT@orcl_11gR2> ALTER TABLE submission ADD CONSTRAINT submission_id_pk
      2    PRIMARY KEY (submission_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE advisor_type ADD CONSTRAINT advisor_type_id_pk
      2    PRIMARY KEY (advisor_type_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_advisors_id_pk
      2    PRIMARY KEY (submission_advisors_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT submission_id_fk
      2    FOREIGN KEY (submission_id) REFERENCES submission (submission_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD CONSTRAINT advisor_type_id_fk
      2    FOREIGN KEY (advisor_type_id) REFERENCES advisor_type (advisor_type_id)
      3  /
    Table altered.
    SCOTT@orcl_11gR2> -- resulting data:
    SCOTT@orcl_11gR2> COLUMN submission_name FORMAT A45
    SCOTT@orcl_11gR2> COLUMN advisor      FORMAT A40
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  sa.advisor_type_id = a.advisor_type_id
    10  AND    sa.submission_id = s.submission_id
    11  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    Statistical Analysis on Sunny Days in March   Scientist Williard Forsberg AMS
    5 rows selected.
    SCOTT@orcl_11gR2> -- procedure to create virtual documents:
    SCOTT@orcl_11gR2> CREATE OR REPLACE PROCEDURE submission_advisors_proc
      2    (p_rowid IN           ROWID,
      3       p_clob     IN OUT NOCOPY CLOB)
      4  AS
      5  BEGIN
      6    FOR r1 IN
      7        (SELECT *
      8         FROM      submission_advisors
      9         WHERE  ROWID = p_rowid)
    10    LOOP
    11        IF r1.first_name IS NOT NULL THEN
    12          DBMS_LOB.WRITEAPPEND (p_clob, 12, '<first_name>');
    13          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.first_name), r1.first_name);
    14          DBMS_LOB.WRITEAPPEND (p_clob, 13, '</first_name>');
    15        END IF;
    16        IF r1.last_name IS NOT NULL THEN
    17          DBMS_LOB.WRITEAPPEND (p_clob, 11, '<last_name>');
    18          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.last_name), r1.last_name);
    19          DBMS_LOB.WRITEAPPEND (p_clob, 12, '</last_name>');
    20        END IF;
    21        IF r1.suffix IS NOT NULL THEN
    22          DBMS_LOB.WRITEAPPEND (p_clob, 8, '<suffix>');
    23          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r1.suffix), r1.suffix);
    24          DBMS_LOB.WRITEAPPEND (p_clob, 9, '</suffix>');
    25        END IF;
    26        FOR r2 IN
    27          (SELECT *
    28           FROM   submission
    29           WHERE  submission_id = r1.submission_id)
    30        LOOP
    31          DBMS_LOB.WRITEAPPEND (p_clob, 17, '<submission_name>');
    32          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r2.submission_name), r2.submission_name);
    33          DBMS_LOB.WRITEAPPEND (p_clob, 18, '</submission_name>');
    34        END LOOP;
    35        FOR r3 IN
    36          (SELECT *
    37           FROM   advisor_type
    38           WHERE  advisor_type_id = r1.advisor_type_id)
    39        LOOP
    40          DBMS_LOB.WRITEAPPEND (p_clob, 19, '<advisor_type_name>');
    41          DBMS_LOB.WRITEAPPEND (p_clob, LENGTH (r3.advisor_type_name), r3.advisor_type_name);
    42          DBMS_LOB.WRITEAPPEND (p_clob, 20, '</advisor_type_name>');
    43        END LOOP;
    44    END LOOP;
    45  END submission_advisors_proc;
    46  /
    Procedure created.
    SCOTT@orcl_11gR2> SHOW ERRORS
    No errors.
    SCOTT@orcl_11gR2> -- examples of virtual documents that procedure creates:
    SCOTT@orcl_11gR2> DECLARE
      2    v_clob  CLOB := EMPTY_CLOB();
      3  BEGIN
      4    FOR r IN
      5        (SELECT ROWID rid FROM submission_advisors)
      6    LOOP
      7        DBMS_LOB.CREATETEMPORARY (v_clob, TRUE);
      8        submission_advisors_proc (r.rid, v_clob);
      9        DBMS_OUTPUT.PUT_LINE (v_clob);
    10        DBMS_LOB.FREETEMPORARY (v_clob);
    11    END LOOP;
    12  END;
    13  /
    <first_name>John</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
    Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
    <first_name>Jane</first_name><last_name>Doe</last_name><suffix>PhD</suffix><submission_name>Some
    Research Paper</submission_name><advisor_type_name>Department Co-Chair</advisor_type_name>
    <first_name>Johan</first_name><last_name>Smith</last_name><submission_name>Thesis on 17th Century
    Weather Patterns</submission_name><advisor_type_name>Professor</advisor_type_name>
    <first_name>Magnus</first_name><last_name>Jackson</last_name><suffix>MS</suffix><submission_name>The
    sis on 17th Century Weather Patterns</submission_name><advisor_type_name>Associate
    Professor</advisor_type_name>
    <first_name>Williard</first_name><last_name>Forsberg</last_name><suffix>AMS</suffix><submission_name
    Statistical Analysis on Sunny Days inMarch</submission_name><advisor_type_name>Scientist</advisor_type_name>
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- user_datastore that uses procedure:
    SCOTT@orcl_11gR2> BEGIN
      2    CTX_DDL.CREATE_PREFERENCE ('sa_datastore', 'USER_DATASTORE');
      3    CTX_DDL.SET_ATTRIBUTE ('sa_datastore', 'PROCEDURE', 'submission_advisors_proc');
      4  END;
      5  /
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> -- index (on optional extra column) that uses user_datastore and section group:
    SCOTT@orcl_11gR2> ALTER TABLE submission_advisors ADD (any_column VARCHAR2(1))
      2  /
    Table altered.
    SCOTT@orcl_11gR2> CREATE INDEX submission_advisors_idx
      2  ON submission_advisors (any_column)
      3  INDEXTYPE IS CTXSYS.CONTEXT
      4  PARAMETERS
      5    ('DATASTORE     sa_datastore
      6        SECTION GROUP     CTXSYS.AUTO_SECTION_GROUP')
      7  /
    Index created.
    SCOTT@orcl_11gR2> -- what is tokenized, indexed, and searchable:
    SCOTT@orcl_11gR2> SELECT token_text FROM dr$submission_advisors_idx$i
      2  /
    TOKEN_TEXT
    17TH
    ADVISOR_TYPE_NAME
    AMS
    ANALYSIS
    ASSOCIATE
    CENTURY
    CHAIR
    CO
    DAYS
    DEPARTMENT
    DOE
    FIRST_NAME
    FORSBERG
    JACKSON
    JANE
    JOHAN
    JOHN
    LAST_NAME
    MAGNUS
    MARCH
    PAPER
    PATTERNS
    PHD
    PROFESSOR
    RESEARCH
    SCIENTIST
    SMITH
    STATISTICAL
    SUBMISSION_NAME
    SUFFIX
    SUNNY
    THESIS
    WEATHER
    WILLIARD
    34 rows selected.
    SCOTT@orcl_11gR2> -- sample searches across all data:
    SCOTT@orcl_11gR2> VARIABLE search_string VARCHAR2(100)
    SCOTT@orcl_11gR2> EXEC :search_string := 'professor'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string) > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'doe'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'paper'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> -- sample searches within specific columns:
    SCOTT@orcl_11gR2> EXEC :search_string := 'chair'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN advisor_type_name') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'phd'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN suffix') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Some Research Paper                           Department Co-Chair John Doe PhD
    Some Research Paper                           Department Co-Chair Jane Doe PhD
    2 rows selected.
    SCOTT@orcl_11gR2> EXEC :search_string := 'weather'
    PL/SQL procedure successfully completed.
    SCOTT@orcl_11gR2> SELECT s.submission_name,
      2           a.advisor_type_name || ' ' ||
      3           sa.first_name || ' ' ||
      4           sa.last_name || ' ' ||
      5           sa.suffix AS advisor
      6  FROM   submission_advisors sa,
      7           submission s,
      8           advisor_type a
      9  WHERE  CONTAINS (sa.any_column, :search_string || ' WITHIN submission_name') > 0
    10  AND    sa.advisor_type_id = a.advisor_type_id
    11  AND    sa.submission_id = s.submission_id
    12  /
    SUBMISSION_NAME                               ADVISOR
    Thesis on 17th Century Weather Patterns       Professor Johan Smith
    Thesis on 17th Century Weather Patterns       Associate Professor Magnus Jackson MS
    2 rows selected.

  • Multiple struts app in one provider

    I have two Struts Application, which have been converted into two PDK Portlets, as per the tutorials provider in the OTN site.
    The problem is that, I want the two portlets to talk to each other.. preferably by session. But, as i noticed that, the two portlets belong to two different providers, so it is not possible to share any data between them.
    Can I have two or more pdk struts portlets in one Provider.
    If there is any other way to share information between two Pdk struts portlets, please tell me...
    it would be of great help.
    Thanks
    Sam

    I have been trying to do something similar, but I keep receiving the following exception:
    java.lang.NoSuchFieldError: appConfig
    at oracle.jbo.html.struts11.BC4JRequestProcessor.processContent(BC4JRequestProcessor.java:148)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:233)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    My web.xml looks like:
    <servlet>
    <servlet-name>bc4jaction</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>mapping</param-name>
    <param-value>oracle.jbo.html.struts11.BC4JActionMapping</param-value>
    </init-param>
    <init-param>
    <param-name>BC4JDefinition</param-name>
    <param-value>Struts</param-value>
    </init-param>
    <!--<init-param>-->
    <!-- <param-name>config</param-name>-->
    <!-- <param-value>/WEB-INF/struts-config-documentservices.xml</param-value>-->
    <!--</init-param>-->
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>config/documentservices</param-name>
    <param-value>/WEB-INF/struts-config-documentservices.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>

  • One to Many Again :(

    The problem that we currently have is to do with One-To-Many mappings. 1:1 and M:M work perfectly well. Only 1:M relations are not working properly the way we anticipate it to work.
    Consider the example:
    PurchaseOrder and LineItems. Each purchase order might have more than one LineItem and so PurchaseOrder class will have a list of LineItems and we map this list using 1:M mapping within the workbench.
    Toplink Behavior:
    In case of insert the foreign key in the child record is null and so it fails to insert.
    And some forums suggested that we have a backward relation. ie the child object should contain a parent object, which my opinion is very wrong because we are not really achieving 1:M relation, rather we are doing many 1:1 relations. Moreover having a parent object in the child and each parent having a list to me sounds like it might end-up in a circular reference ??
    Has anybody had any luck setting up 1:M properly without backward relation? Please share your experiences and workarounds.
    Regards,
    Murali

    Murali,
    Our FAQ covers this briefly listing alternatives:
    http://www.oracle.com/technology/products/ias/toplink/technical/tl10g_faq.htm#OneToOneBack
    I strongly recommend mapping all FKs as 1:1. In an ORM system these are actually the governing relationships and the 1:M are the optional associations. Mapping the 1:1 back-ref will create a much needed circular reference, which is easily managed in the model.
    The other options provided are also completely supported but will not provide the flexibility and performance of the 1:M + 1:1 solution.
    This approach is in line with all leading ORM solutions and is what you will find in the upcoming EJB3 specification as well.
    Cheers,
    Doug

  • JPA One-To-Many Parent-Child Mapping Problem

    I am trying to map an existing legacy Oracle schema that involves a base class table and two subclass tables that are related by a one-to-many relationship which is of a parent-child nature.
    The following exception is generated. Can anybody provide a suggestion to fix the problem?
    Exception [EclipseLink-45] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.DescriptorException
    Exception Description: Missing mapping for field [BASE_OBJECT.SAMPLE_ID].
    Descriptor: RelationalDescriptor(domain.example.entity.Sample --> [DatabaseTable(BASE_OBJECT), DatabaseTable(SAMPLE)])
    The schema is as follows:
    CREATE TABLE BASE_OBJECT(
    "BASE_OBJECT_ID" INTEGER PRIMARY KEY NOT NULL,
    "NAME" VARCHAR2(128) NOT NULL,
    "DESCRIPTION" CLOB NOT NULL,
    "BASE_OBJECT_KIND" NUMBER(5,0) NOT NULL );
    CREATE TABLE SAMPLE(
    "SAMPLE_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_TEXT" VARCHAR2(128) NOT NULL )
    CREATE TABLE SAMPLE_ITEM(
    "SAMPLE_ITEM_ID" INTEGER PRIMARY KEY NOT NULL,
    "SAMPLE_ID" INTEGER NOT NULL,
    "QUANTITY" INTEGER NOT NULL )
    The entities are related as follows:
    SAMPLE.SAMPLE_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample to the base class
    SAMPLE_ITEM.SAMPLE_ITEM_ID -> BASE_OBJECT.BASE_OBJECT_ID - The PKs that are used to join the sample item to the base class
    SAMPLE_ITEM.SAMPLE_ID -> SAMPLE.SAMPLE_ID - The FK that is used to join the sample item to the sample class as a child of the parent.
    SAMPLE is one to many SAMPLE_ITEM
    The entity classes are as follows:
    @Entity
    @Table( name = "BASE_OBJECT" )
    @Inheritance( strategy = InheritanceType.JOINED )
    @DiscriminatorColumn( name = "BASE_KIND", discriminatorType = DiscriminatorType.INTEGER )
    @DiscriminatorValue( "1" )
    public class BaseObject
    extends SoaEntity
    @Id
    @GeneratedValue( strategy = GenerationType.SEQUENCE, generator = "BaseObjectIdSeqGen" )
    @SequenceGenerator( name = "BaseObjectIdSeqGen", sequenceName = "BASE_OBJECT_PK_SEQ", allocationSize = 1 )
    @Column( name = "BASE_ID" )
    private long baseObjectId = 0;
    @Entity
    @Table( name = "SAMPLE" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ID"))
    @DiscriminatorValue( "2" )
    public class Sample
    extends BaseObject
    @OneToMany( cascade = CascadeType.ALL )
    @JoinColumn(name="SAMPLE_ID",referencedColumnName="SAMPLE_ID")
    private List<SampleItem> sampleItem = new LinkedList<SampleItem>();
    @Entity
    @Table( name = "SAMPLE_ITEM" )
    @PrimaryKeyJoinColumn( name = "SAMPLE_ITEM_ID" )
    @AttributeOverride(name="baseObjectId", column=@Column(name="SAMPLE_ITEM_ID"))
    @DiscriminatorValue( "3" )
    public class SampleItem
    extends BaseObject
    @Basic( optional = false )
    @Column( name = "SAMPLE_ID" )
    private long sampleId = 0;
    Edited by: Chris-R on Mar 2, 2010 4:45 PM

    Thanks for the thoroughness. There was a mistake in moving the code over for the forum. The field names are correct throughout the original source code.
    BASE_OBJECT_ID is used throughout.
    I suspect the problem lies in the one-to-many sampleItem(s) relationship that is based upon the subclassed item class. (The relationship is actually "sampleItems" in the real code and somehow got changed in the move over.)
    The problem may lie in the mapping of the attribute override in the child class to the referencing of the item class from the parent side of the relationship in the Sample class.
    I further suspect this may be specific to Eclipselink based upon other postings I've seen on the web that have similar problems...
    Any thoughts?
    Edited by: Chris-R on Mar 3, 2010 9:56 AM

  • Need an approach regarding reporting for a one-to-many primary-child relationship, where there are more than three child objects for a primary object for reporting purpose

    Business Scenario- We have a parent organization with 6 different Business Units.One BU requires 9 stages for for Opportunity(Tender) Tracking.The client requirement is to show the basic details of the tender at the header level and to show details specific to individual sales stage as different tabs.There will be multiple opportunity members added as opportunity team and will be responsible for capturing details specific to individual sales stage(tab). The Tab should be enabled and disabled based on the role. Reporting is required against each stage with specific fields of child objects against each opportunity.
    We created multiple children entities under the oportunity(one to many mapping) but we are unable to add more than 3 child objects for a primary object for reporting purpose.
    Kindly suggest what needs to be done to meet the requirement

    Can you provide the exact steps you took to  "created multiple children entities under the oportunity" ?
    Jani Rautiainen
    Fusion Applications Developer Relations
    https://blogs.oracle.com/fadevrel/

  • How to create one to many relation database based on existing Tables?

    Let say I have got 10 tables. Out of these 10 tables one table is used to navigate to other tables and at the some time providing some useful information. Therefore other 9 Tables have the identical structure.
    The question is, how can I convert these 10 tables into 2 tables, ie each row of first table correspond to the different data of the other table (one to many relation)?

    Hello,
    >>The question is, how can I convert these 10 tables into 2 tables, ie each row of first table correspond to the different data of the other table (one to many relation)?
    I do not quite understand what you ask and I doubt if Entity Framework supports this scenario, since you mentions these tables already exist, after importing them to the designed windows, we cannot modify them or it would throw an error shows the database
    and model is mismatched.
    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.

  • One of the portlets showing Error: The listener returned the following Mess

    Hi All,
    One of the portlet is showing an error message
    Error: The listener returned the following Message: 500 Internal Server Error, with no specific error message in log file, the log file also shows similar message as "POST /****/**** HTTP/1.1" 200 2348", may i request for your valuable advises/suggestions in this regard.
    Thanks in advance.

    rit, the command is not doing the trick since its already full version,
    PS C:\Users\lyncadmin> Get-CsServerVersion
    Microsoft Lync Server 2013 (5.0.8308.0): Volume license key installed.
    only one server in one pool, total two pools.
    Lync 2013 is on Win 2008 R2, and the event in system im inclining to since i have tried all,
    Log Name:      System
    Source:        Schannel
    Date:          12/30/2013 9:26:34 AM
    Event ID:      36888
    Task Category: None
    Level:         Error
    Keywords:      
    User:          SYSTEM
    Computer:      ACS465-BH102.me.ykgw.net
    Description:
    The following fatal alert was generated: 10. The internal error state is 1203.
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="Schannel" Guid="{1F678132-5938-4686-9FDC-C8FF68F15C85}" />
        <EventID>36888</EventID>
        <Version>0</Version>
        <Level>2</Level>
        <Task>0</Task>
        <Opcode>0</Opcode>
        <Keywords>0x8000000000000000</Keywords>
        <TimeCreated SystemTime="2013-12-30T06:26:34.877077500Z" />
        <EventRecordID>64911</EventRecordID>
        <Correlation />
        <Execution ProcessID="556" ThreadID="620" />
        <Channel>System</Channel>
        <Computer>ACS465-BH102.me.ykgw.net</Computer>
        <Security UserID="S-1-5-18" />
      </System>
      <EventData>
        <Data Name="AlertDesc">10</Data>
        <Data Name="ErrorState">1203</Data>
      </EventData>
    </Event>
    Praveen | MCSE Messaging 2003

  • Copy package(One to many)

    Hi friends,
    Using copy package i'm tring to load actual data to Budg_01,selections
    source selection-> desination selection
    Actual -> Budg_01
    inputcurr(all) -> same
    R_ACCT(all) -> same
    enitty(GLOBAL)->same
    time(2010.JAN) -> 2010.JUL,2010.AUG,2010.SEP,2010.OCT,2010.NOV.2010.DEC,2011.JAN,...2011.JUN
    here  system not allowing to do one to many(next button is disabled). I tried with 12 times coping same month in source time(i.e
    2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN,2010.JAN)
    Even then system copying to only one month i.e starting month of destination time selection.
    Could anyone share any ideas how can do this? via input form that we have one option.
    if you have code related script, can u plesase share?
    thanks,
    naresh

    Hi Naresh,
    You can use a script logic to do this:
    *XDIM_MEMBERSET CATEGORY = ACTUAL
    *XDIM_MEMBERSET ENTITY = GLOBAL
    *XDIM_MEMBERSET TIME = 2010.JAN
    *WHEN R_ACCT
    *IS *
       *REC(TIME = 2010.JUL)
       *REC(TIME = 2010.AUG)
       *REC(TIME = 2010.SEP)
       *REC(TIME = 2010.OCT)
       *REC(TIME = 2010.NOV)
       *REC(TIME = 2010.DEC)
       *REC(TIME = 2011.JAN)
       *REC(TIME = 2011.FEB)
       *REC(TIME = 2011.MAR)
       *REC(TIME = 2011.APR)
       *REC(TIME = 2011.MAY)
       *REC(TIME = 2011.JUN)
    *ENDWHEN
    I can try to make the script dynamic, if you can provide me inputs on that.
    Hope this helps.

  • On WLC 'one-to-many' means one VLAN mapped to multiple SSIDs possible?

    Does the Cisco Wireless LAN Controller Architecture includes this feature (configuration possibility)?

    Thanks all for the provided infos. We have now the same requirements for two customers -> One-to-Many (One VLAN mapped to multiple SSIDs).
    Can anybody who has realised such a set up provide some more details how to proceed?
    The link from David describes the other way around, several VLANs mapped to one SSID. By the way, we where able to implement this, but it is only supported in centralized mode, local mode (Flex Connect it doesn't work).
    For any advise how to proceed for "One VLAN mapped to multiple SSIDs" would be very appreciated.
    Thanks Erich

  • One to many relationship leads to recursion?

    Hi,
    I've created a web services function which returns an object retrieved from a database using the persistence api (the class was generated by the Netbeans 5.5 "Entity Class from Database" feature.
    I can successfully return an object which has no foreign keys. However, when I try to retrieve an entity which is on either side of a 1:N relationship, I receive a stackOverflowError.
    Here's my sample schema (I'm using Derby bundled with SJAS 9 for testing)
    create table Address (
       Id int not null,
       StreetName varchar(255),
       City varchar(255),
       PostalCode varchar(255),
       Party int,
       primary key (Id)
    create table Party (
       Id int,
       Name varchar(255),
       primary key(Id)
    alter table Address add constraint foreign key (Party) references Party;So as you can see, one Party might have many addresses.
    I can retrieve either an Address or Party from the database using something like:
    em.createNamedQuery("Party.findById")
       .setParameter("id", 1)
       .getSingleResult();When I try to return it, I get a stackOverflowError in the server log. I'm using the default Toplink provider so enabling full logging on this, I can see the SQL.
    When retrieving an address, it selects all of the address fields and correctly binds the supplied Id value. It then performs a select on the Party table using the Address.Party value. This in turn causes it to attempt to retrieve an Address. After three queries, the error is thrown.
    I can't see why the above schema should cause this problem. Where an Address is requested, I would expect it to retrieve the address fields, including the value of the Party field but not the Party object itself. On the other hand. when a Party is retrieved, I would expect it to recurse through and return a collection of Address objects.
    Have I misunderstood this or am I missing some fundamental point about JAX-WS?
    Thanks for your help,
    -Phil

    You have to set both sides of the relations...
    for example to do this in a more seamless manner:
    public UserProfile
         public void addLog (UserActivityLog activity)
              logs.add (activity);
              if (!equals (activity.getUserProfile ()))
                   activity.setUserProfile (this);
    Now this is the most primitive of ways to maintain two sided relations.
    There are a lot of other patterns to get around this.
    If you want to set the UserActivityLog to a specific UserProfile without
    having a firm reference to ther UserProfile, you should get the object
    from the database/persistenceManager... as you are using application
    identity, you can do something like pm.getObjectById.
    JDO does not do magic references. If you set something to null, it will
    remain null until you set it.
    Srini wrote:
    Hi Guys
    I am trying to create a one to many relationship between 2 JDOs.
    UserProfile - User JDO having user info
    UserActivityLog - JDO having user log info
    UserProfile -- UserActivityLog
    1 many
    UserProfile - has a collection of UserActivityLog objects
    UserActivityLog - has a reference to UserProfile
    Qn 1:
    I created a UserProfile along with a collection of 2 UserActivityLog
    objects.
    Navigation:
    Now given a UserProfile object,i am able to get the UserActivityLog objects.
    But given a UserActivityLog object ,i get a NULL UserProfile object.
    Issues:
    Why this is happening???Do i need to set the reference for "UserProfile" in
    UserActivityLog before inserting???
    If so,then how do i add a UserActivityLog to an existing
    UserProfile???cos,if i create a UserActivityLog with reference to
    UserProfile ,then it will throw a Duplicate Key violation for UserProfile as
    it is already persisted in DB.
    It will be great if you can direct me to some one to many relationship
    examples already implemented.
    Thanks
    Srini
    Stephen Kim
    [email protected]
    SolarMetric, Inc.
    http://www.solarmetric.com

Maybe you are looking for