Composite-id + hibernate

hello frnd,
i give more about my prblm....
this is code that i fetch record...(main)
xml_config xConfig = new xml_config();
Criteria cri = session.createCriteria(xml_config.class);
String s="CA";
//Query q = session.createQuery("from xml_config config where config.country_cd='CA'");
cri.add(Restrictions.like("country_cd", s));
cri.add(Restrictions.like("Dtd_version", "1.0"));
List q = cri.list();//error line by eclipse ide
Iterator itr = q.iterator();
ArrayList<String> v = new ArrayList<String>();
while(itr.hasNext())
xConfig = (zespl_xml_config)itr.next();
v.add(xConfig.getDtd_FileName());
System.out.println("ICH FLAG "+xConfig.getICHFlag());
System.out.println("Dtd file Name "+xConfig.getDtd_FileName());
and this my mapping file
<?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="HibernateUtil.zespl_xml_config" table="zespl_gifnoc_lmx">
<composite-id>
<key-property name="country_cd" column="dc_yrtnuoc"/>
<key-property name="Dtd_type" column="epyt_dtd"/>
<key-property name="Dtd_version" column="noisrev_dtd"/>
<key-property name="Dtd_FileName" column="eman_elif_dtd"/>
</composite-id>
<property name="ICHFlag" column="galf_hci"/>
<property name="xls_FileName" column="eman_elif_lsx"/>
</class>
</hibernate-mapping>
and the output errror is ......
Hibernate: select this_.dc_yrtnuoc as dc1_0_, this_.epyt_dtd as epyt2_0_, this_.noisrev_dtd as noisrev3_0_, this_.eman_elif_dtd as eman4_0_, this_.dc_yrtnuoc as dc1_1_0_, this_.epyt_dtd as epyt2_1_0_, this_.noisrev_dtd as noisrev3_1_0_, this_.eman_elif_dtd as eman4_1_0_, this_.galf_hci as galf5_1_0_, this_.eman_elif_lsx as eman6_1_0_ from zespl_gifnoc_lmx this_ where this_.dc_yrtnuoc like ? and this_.noisrev_dtd like ?
java.lang.ClassCastException: HibernateUtil.xml_config
at org.hibernate.loader.Loader.getKeyFromResultSet(Lo ader.java:650)
at org.hibernate.loader.Loader.getRowFromResultSet(Lo ader.java:277)
at org.hibernate.loader.Loader.doQuery(Loader.java:38 4)
at org.hibernate.loader.Loader.doQueryAndInitializeNo nLazyCollections(Loader.java:203)
at org.hibernate.loader.Loader.doList(Loader.java:149 9)
at org.hibernate.loader.Loader.list(Loader.java:1482)
at org.hibernate.loader.criteria.CriteriaLoader.list( CriteriaLoader.java:111)
at org.hibernate.impl.SessionImpl.list(SessionImpl.ja va:1246)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl. java:299)
at HibernateDemo.Main.main(Main.java:87)
and my java bean is...
public class xml_config
String country_cd;
String ICHFlag;
String Dtd_type;
String Dtd_version;
String Dtd_FileName;
String xls_FileName;
public String getCountry_cd() {
return country_cd;
public void setCountry_cd(String country_cd) {
this.country_cd = country_cd;
public String getDtd_FileName() {
return Dtd_FileName;
public String getDtd_type() {
return Dtd_type;
public String getDtd_version() {
return Dtd_version;
public String getICHFlag() {
return ICHFlag;
public String getXls_fileName() {
return xls_FileName;
public void setDtd_FileName(String dtd_FileName) {
Dtd_FileName = dtd_FileName;
public void setDtd_type(String dtd_type) {
Dtd_type = dtd_type;
public void setDtd_version(String dtd_version) {
Dtd_version = dtd_version;
public void setICHFlag(String flag) {
ICHFlag = flag;
public String getXls_FileName() {
return xls_FileName;
public void setXls_FileName(String xls_FileName) {
this.xls_FileName = xls_FileName;
if any one have solution then please help me...
thanx and regards,
PanDev84
Message was edited by:
pandev84

thanx forIf you can't be bothered to spell out words like "thanks" and "please" I don't see why I should spell out answers for you.
but after changing code To what? I AM NOT PSYCHIC.
problem remains same...If you have the same problem, you have the same bug. Your code is wrong in the same way. Perhaps you didn't compile the new code? I don't know.
If you have a different problem, you have a different bug. I haven't seen your code, and you haven't described the problem or pasted the error messages. I have no idea what the problem is.
please tell what r conditions to use <composite-id>The fields have to collectively form a primary key. That's the only condition.
i have only one table with four primary keys noFour primary key fields. It's impossible to have multiple primary keys in a table.
pls help me and give proper solution to solve my
problem."That didn't work, I did something, fix it?" I'm becoming disinclined to help someone who's being quite this unhelpful.
And what is with the naming convention? What on earth posessed you to do that?
D. (quite cranky today).

Similar Messages

  • Composite Key in Toplink Mapping File - equivalent to Hibernate?

    Hi,
    I have a POJO TestEntity which refers to primary key TestEntityKey. In Hibernate mapping hbm file, we define the entry as:
              <composite-id name="id" class="TestEntityKey">
                   <key-property name ="testEntityCode" column = "TEST_ENT_CODE" type = "string" />
              </composite-id>
    Please confirm how to create the composite id in Toplink means kindly help that how to map my id to key:
    <opm:primary-key>
         <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
    </opm:primary-key>
    Thanks!

    Hey.. Thanks!
    I am clear about the concept about defining annotation based composite key. Also, I read in the documentation that I'll be needing to define as direct, aggregate or one-to-one. But, I am not able to define and run the same in the project mapping xml of toplink.
    It would be great if you can share some sample code for defining the same. For e.g. in my mentioned example, there is TestEntity POJO having 'id' as the attribute which gets populated with the testEntityCode of the TestEntityKey POJO. Please suggest the same for the same:
    <opm:primary-key>
    <opm:attribute-name>id</opm:attribute-name>
    <opm:field table="TEST_ENTITY_B" name="TEST_ENT_CODE" xsi:type="opm:column"/>
    </opm:primary-key>
    Thanks!

  • Hibernate mapping composite-id

    Hello
    I have a table which has a primary key with two elements. My hibernate-tools plugin in Eclipse generated the mapping file with a composite-id
    which maps to a class with those two parameters. But hibernate gives me: "org.hibernate.MappingException: component class not found: CountrylanguageId"
    How can I get hibernate to see this class ?

    Did you create the CountrylanguageId java class?

  • How to use composite entities which driven by different PU via hibernate

    Hi experts,
    There are 2 different persistence unit in my project.
    PU_A: Application entities, that can execute all crud operations.
    PU_B: This one has some views which contains outside data. I can just read data from here
    But i want to create foreign key in some entities which are in PU_A by using immutable-entity which managed by PU_B persistence-unit.
    If you could view on following snippets. I have IncomingPaperwork entity which is driven by PU_A and ProjectView which is driven by PU_B.
    After i applied this issue; When deploy the application exception that is below occured :
    30-Jan-2013 15:13:05 o'clock EET> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
    weblogic.application.ModuleException:
         at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:326)
         at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)
         at weblogic.servlet.internal.WebAppModule.initPersistenceUnitRegistry(WebAppModule.java:411)
         at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:365)
         at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
         Truncated. see log file for complete stacktrace
    Caused By: org.hibernate.AnnotationException: @OneToOne or @ManyToOne on com.acme.model.entity.IncomingPaperwork.projectView references an unknown entity: com.acme.integrationmodel.entity.ProjectView
         at org.hibernate.cfg.ToOneFkSecondPass.doSecondPass(ToOneFkSecondPass.java:81)
         at org.hibernate.cfg.AnnotationConfiguration.processEndOfQueue(AnnotationConfiguration.java:456)
         at org.hibernate.cfg.AnnotationConfiguration.processFkSecondPassInOrder(AnnotationConfiguration.java:438)
         at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:309)
         at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1162)
         Truncated. see log file for complete stacktrace
    >
    [03:13:05 PM] #### Deployment incomplete. ####
    Is there a way to achieve this? Any suggestions?
    Thanks in advance
    ___persistence.xml___
    <persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
    version="2.0">
    <persistence-unit name="PU_A" transaction-type="JTA">
    <description>This unit manages all application entities</description>
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>jdbc/A_DS</jta-data-source>
    <class>com.acme.model.entity.IncomingPaperwork</class>
    <properties>
    <property name="hibernate.jndi.url" value="t3://localhost:7101"/>
    <!--DataSource-->
    <property name="hibernate.connection.datasource"
    value="jdbc/A_DS"/>
    <property name="hibernate.transaction.manager_lookup_class"
    value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
    <property name="hibernate.dialect"
    value="org.hibernate.dialect.Oracle10gDialect"/>
    <property name="hibernate.hbm2ddl.auto" value="update"/>
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.format_sql" value="true"/>
    <property name="hibernate.use_sql_comments" value="true"/>
    <property name="hibernate.current_session_context_class" value="jta"/>
    <property name="hibernate.archive.autodetection" value="jar,class"/>
    </properties>
    </persistence-unit>
    <persistence-unit name="PU_B" transaction-type="JTA">
    <description>This unit manages all integration entities</description>
    <provider>org.hibernate.ejb.HibernatePersistence</provider>
    <jta-data-source>jdbc/B_DS</jta-data-source>
    <class>com.acme.integrationmodel.entity.ProjectView</class>
    <properties>
    <property name="hibernate.jndi.url" value="t3://localhost:7101"/>
    <!--DataSource-->
    <property name="hibernate.connection.datasource"
    value="jdbc/B_DS"/>
    <property name="hibernate.transaction.manager_lookup_class"
    value="org.hibernate.transaction.WeblogicTransactionManagerLookup"/>
    <property name="hibernate.dialect"
    value="org.hibernate.dialect.Oracle10gDialect"/>
    <property name="hibernate.hbm2ddl.auto" value="validate"/>
    <property name="hibernate.show_sql" value="true"/>
    <property name="hibernate.format_sql" value="true"/>
    <property name="hibernate.use_sql_comments" value="true"/>
    <property name="hibernate.current_session_context_class" value="jta"/>
    </properties>
    </persistence-unit>
    </persistence>
    ___IncomingPaperwork.class___
    import com.arsivist.structure.BaseEntity;
    import com.acme.integrationmodel.entity.ProjectView;
    import com.acme.model.entity.listener.EntityListener;
    import com.acme.model.entity.listener.IncomingPaperworkListener;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.EntityListeners;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.JoinColumn;
    import javax.persistence.ManyToOne;
    import javax.persistence.SequenceGenerator;
    import javax.persistence.Table;
    @Entity(name = "IncomingPaperwork")
    @Table(name = "INCOMINGPAPERWORKS")
    @SequenceGenerator(name = "INCOMINGPAPERWORK_SEQ", sequenceName = "INCOMINGPAPERWORK_SEQ", allocationSize = 1)
    @EntityListeners( { EntityListener.class, IncomingPaperworkListener.class })
    public class IncomingPaperwork extends BaseEntity
    private Company company;
    private ProjectView projectView;
    public IncomingPaperwork()
    entityName = "IncomingPaperwork";
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "INCOMINGPAPERWORK_SEQ")
    @Column(name = "ID")
    public int getId()
    return id;
    public void setId(int id)
    this.id = id;
    public void setCompany(Company company)
    this.company = company;
    @ManyToOne(targetEntity = com.acme.model.entity.Company.class, cascade = { })
    @JoinColumn(name = "COMPANYID", nullable = false)
    public Company getCompany()
    return company;
    public void setProjectView(ProjectView projectView)
    this.projectView = projectView;
    @ManyToOne(targetEntity = com.acme.integrationmodel.entity.ProjectView.class, cascade = { })
    @JoinColumn(name = "PROJECTVIEWID")
    public ProjectView getProjectView()
    return projectView;
    ___ProjectView.class___
    import com.arsivist.structure.BaseEntityView;
    import javax.persistence.Column;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import org.hibernate.annotations.Immutable;
    import org.hibernate.annotations.Subselect;
    @Entity(name = "ProjectView")
    @Immutable
    @Subselect("SELECT * FROM ProjectView")
    public class ProjectView extends BaseEntityView
    private String code;
    private String name;
    public ProjectView()
    entityName = "ProjectView";
    public ProjectView(int id, String name)
    entityName = "ProjectView";
    this.id = id;
    this.name = name;
    @Id
    @Column(name = "ID")
    public int getId()
    return id;
    public void setId(int id)
    this.id = id;
    public void setCode(String code)
    this.code = code;
    @Column(name = "CODE")
    public String getCode()
    return code;
    public void setName(String name)
    this.name = name;
    @Column(name = "NAME")
    public String getName()
    return name;
    @Override
    public String toString()
    return "" + getName();
    Edited by: webyildirim on Jan 30, 2013 5:36 AM

    Not quite what I meant - I was suggesting you load the entity immediately after reading it from PU_B, or anytime before associating it into PU_A, so before the merge. What you have not shown though is any code on how you are obtaining IntegrationDepartment and integrating it into PU_A, or what you mean by it is returning a refreshed version of Topic. This problem could also be the result of how your provider works internally - this is a TopLink/EclipseLink forum post so I cannot really tell you why you get the exception other than it would be expected to work as described with EclipseLink as the JPA provider.
    So the best suggestions I can come up with are prefetch your entity, try posting in a hibernate forum, or try using EclipseLink/TopLink so someone here might be better able to help you with any problems that arise.
    Best Regards,
    Chris

  • Xf86-video-intel vs hibernate

    I have recently updated by laptop with xorg7.3 (ie, xorg-server 1.4 +
    xf86-video-intel (instead of xf86-video-i810) + xrand 1.2).  After a
    long struggling period I have managed to make all these new things
    working reasonably well on my Dell X1 laptop. However I still have
    one open issue: hibernate scripts no longer work. The laptop hibernate
    correctly. It also to wake up but X crashes when it restarts with the
    following error message:
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    Ring at virtual 0xa79b1000 head 0x0 tail 0x10 count 4
        0001ff80: 00000000
        0001ff84: 00000000
        0001ff88: 00000000
        0001ff8c: 00000000
        0001ff90: 00000000
        0001ff94: 00000000
        0001ff98: 00000000
        0001ff9c: 00000000
        0001ffa0: 00000000
        0001ffa4: 00000000
        0001ffa8: 00000000
        0001ffac: 00000000
        0001ffb0: 00000000
        0001ffb4: 00000000
        0001ffb8: 00000000
        0001ffbc: 00000000
        0001ffc0: 00000000
        0001ffc4: 00000000
        0001ffc8: 00000000
        0001ffcc: 00000000
        0001ffd0: 00000000
        0001ffd4: 00000000
        0001ffd8: 00000000
        0001ffdc: 00000000
        0001ffe0: 00000000
        0001ffe4: 00000000
        0001ffe8: 00000000
        0001ffec: 00000000
        0001fff0: 00000000
        0001fff4: 00000000
        0001fff8: 00000000
        0001fffc: 00000000
        00000000: 02000011
    Ring end
    space: 131048 wanted 131064
    FatalError re-entered, aborting
    lockup
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    Is there any body here that could give some hints? Thanks in advance.
    Manuel
    Here is a description of my config:
    Laptop: DELL X1
    Kernel: 2.6.23.1
    Video driver: Intel i915
    xorg-server: 1.4
    xf86-video-intel: 2.1.1-2
    Xorg.conf:
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    #*    Default Layout                                                   */
    Section "ServerLayout"
        Identifier     "Default"
        Screen         0 "Default" 0 0
            Option            "AIGLX" "true"
        InputDevice    "Keyboard0" "CoreKeyboard"
        InputDevice    "USB Mouse" "SendCoreEvents"
        InputDevice    "Synaptics" "SendCoreEvents"
    #*    !!! WARNING                                                      */
    #* xorg <=7.2 used AlwaysCore.                                         */
    #* It has been replaced in xorg-7.3 with SendCoreEvents                */
    #*     InputDevice    "USB Mouse" "AlwaysCore"                        */
    #*     InputDevice    "Synaptics" "AlwaysCore"                        */
    EndSection
    #*    Server flags                                                     */
    Section "ServerFlags"
        Option "AllowMouseOpenFail"  "true"
    EndSection
    #*    Files                                                            */
    Section "Files"
        FontPath     "/usr/share/fonts/misc"
        FontPath     "/usr/share/fonts/75dpi"
        FontPath     "/usr/share/fonts/100dpi"
        FontPath     "/usr/share/fonts/TTF"
        FontPath     "/usr/share/fonts/Type1"
        FontPath     "/usr/share/fonts/MathML"
    #    FontPath     "/usr/share/fonts/ttf-bitstream-vera"
    EndSection
    #*    DRI                                                              */
    Section "DRI"
        Mode 0666
    EndSection
    #*    Modules                                                          */
    Section "Module"
            Load        "ddc"
        Load        "dbe"
        Load        "dri"
        Load        "extmod"
        Load        "glx"
        Load        "bitmap"
        Load        "type1"
        Load        "freetype"
        Load        "record"
        Load        "vbe"
            Load        "synaptics"
            Load        "int10"
    EndSection
    #*    Xorg extensions                                                  */
    Section "Extensions"
            Option      "Composite" "Enable"
            Option         "GLX" "Enable"
            Option      "RENDER" "Enable"
    EndSection
    #*    Keyboard                                                         */
    Section "InputDevice"
        Identifier  "Keyboard0"
        Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbRules" "xorg"
        Option      "XkbModel" "inspiron"
        Option      "XkbLayout" "us,fr"
        Option      "XKbOptions" "grp:alt_shift_toggle"
    EndSection
    #*    Mice                                                             */
    Section "InputDevice"
        Identifier  "Synaptics"
        Driver      "synaptics"
            Option      "CorePointer"
        Option      "Device"        "/dev/input/mice"
        Option      "SHMConfig"        "on"
            Option      "Protocol"          "auto-dev"
        Option      "LeftEdge"        "1700"
        Option      "RightEdge"        "5150"
        Option      "TopEdge"        "1700"
        Option      "BottomEdge"    "4200"
        Option      "FingerLow"        "25"
        Option      "FingerHigh"    "30"
        Option      "MaxTapTime"    "180"
        Option      "MaxTapMove"    "220"
        Option      "VertScrollDelta"    "100"
        Option      "MinSpeed"        "0.06"
        Option      "MaxSpeed"        "0.25"
        Option      "AccelFactor"    "0.0020"
        Option      "TapButton1"    "1"
        Option      "TapButton2"    "2"
        Option      "TapButton3"        "3"
        Option        "LTCornorButton"    "0"
        #Option        "LBCornorButton"    "0"
        #Option        "RTCornorButton"    "0"
        #Option        "RBCornorButton"    "0"
    EndSection
    Section "InputDevice"
        Identifier  "PS/2 Mouse"
        Driver      "mouse"
        Option      "Protocol" "IMPS/2"
        Option      "Device" "/dev/misc/psaux"
        Option      "Emulate3Buttons" "true"
        Option      "Emulate3Timeout" "70"
        Option        "SendCoreEvents"  "true"
    EndSection
    Section "InputDevice"
        Identifier  "USB Mouse"
        Driver      "mouse"
        Option      "Device" "/dev/input/mice"
        Option      "SendCoreEvents" "true"
        Option      "Protocol" "IMPS/2"
        Option      "ZAxisMapping" "4 5"
            Option      "Buttons" "5"
    EndSection
    #*    Screen                                                           */
    Section "Screen"
        Identifier "Default"
        Device     "intel"
            Option     "XAANoOffscreenPixmaps"
        Monitor    "generic"
        DefaultColorDepth 24
        SubSection "Display"
            Depth 16
            Modes "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
            Depth 24
            Modes "1280x1024" "1024x768" "800x600" "640x480"
        EndSubSection
    EndSection
    #*    Graphic card                                                     */
    #*    !!! WARNING                                                      */
    #* xorg <=7.2 used i810 video driver.                                  */
    #* It has been replaced in xorg-7.3 with xf86-video-intel              */
    Section "Device"
        Identifier  "intel"
        Driver        "intel"
        BusID        "PCI:0:2:0"
            Screen      0
            VideoRam    131072
            Option      "DPMS" "true"
            Option      "DDC" "true"
            Option      "XVideo" "true"
            Option         "XAANoOffscreenPixmaps" "true"
          Option      "DRI" "true"
    EndSection
    #*    Monitor                                                          */
    Section "Monitor"
        Identifier    "generic"
        HorizSync        27 - 96
        VertRefresh      40 - 160
        Option         "DPMS"
            Option          "Enable" "true"
    EndSection
    #*    Modes                                                            */
    Section "Modes"
        Identifier "Modes[0]"
            Modeline "1280x768" 80.14 1280 1344 1480 1680 768 769 772 795 -HSync +Vsync
    EndSection
    Section "Modes"
            Identifier "Modes[1]"
            ModeLine "1600x1024" 127.34 1600 1672 2032 2176 1024 1026 1038 1064
            ModeLine "1600x1024" 125.02 1600 1672 2032 2176 1024 1026 1038 1064
            ModeLine "1280x1024" 99.28 1280 1336 1616 1728 1024 1026 1038 1064
    EndSection
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    .xinitrc file:
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    #*=====================================================================*/
    #*    serrano/house/X/xrandr.sgi-1600x1024                             */
    #*    Author      :  Manuel Serrano                                    */
    #*    Creation    :  Wed Nov  7 11:35:38 2007                          */
    #*    Last change :  Sun Nov 11 08:44:36 2007 (serrano)                */
    #*    Copyright   :  2007 Manuel Serrano                               */
    #*    Using xrandr 1.2 to select the VGA output                        */
    #*=====================================================================*/
    mode=`xrandr | \
          grep "VGA connected" | \
          awk '{print $3}' | \
          sed -e "s/+[0-9]+[0-9]//"`
    if [ "$X_VGA_LAYOUT " != " " ]; then
      mode=$X_VGA_LAYOUT;
    fi
    if [ "$?" = "0" -a "$mode " != " " ]; then
      xrandr --output LVDS --off
      xrandr --newmode 1600x1024 108.00 1600 1616 1656 1704 1024 1027 1030 1056 -hsync -vsync
      xrandr --addmode VGA 1600x1024
      xrandr --output VGA --mode 1600x1024
    else
      xrandr --output LVDS --on
    fi
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    The X log that shows the problem:
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----
    _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
    _XSERVTransOpen: transport open failed for inet6/smith:0
    _XSERVTransMakeAllCOTSServerListeners: failed to open listener for inet6
    X.Org X Server 1.4.0
    Release Date: 5 September 2007
    X Protocol Version 11, Revision 0
    Build Operating System: Linux 2.6.24-rc1-ARCH i686
    Current Operating System: Linux smith 2.6.23.1 #1 Sun Oct 21 23:05:01 CEST 2007 i686
    Build Date: 07 November 2007  11:19:12AM
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
    Module Loader present
    Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
    (==) Log file: "/var/log/Xorg.0.log", Time: Sun Nov 11 08:14:07 2007
    (==) Using config file: "/etc/X11/xorg.conf"
    (==) ServerLayout "Default"
    (**) |-->Screen "Default" (0)
    (**) |   |-->Monitor "generic"
    (**) |   |-->Device "intel"
    (**) |-->Input Device "Keyboard0"
    (**) |-->Input Device "USB Mouse"
    (**) |-->Input Device "Synaptics"
    (**) Option "AllowMouseOpenFail" "true"
    (**) Option "AIGLX" "true"
    (==) Automatically adding devices
    (==) Automatically enabling devices
    (==) Including the default font path /usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1.
    (**) FontPath set to:
        /usr/share/fonts/misc,
        /usr/share/fonts/75dpi,
        /usr/share/fonts/100dpi,
        /usr/share/fonts/TTF,
        /usr/share/fonts/Type1,
        /usr/share/fonts/MathML,
        /usr/share/fonts/misc,
        /usr/share/fonts/100dpi:unscaled,
        /usr/share/fonts/75dpi:unscaled,
        /usr/share/fonts/TTF,
        /usr/share/fonts/Type1
    (==) RgbPath set to "/usr/share/X11/rgb"
    (==) ModulePath set to "/usr/lib/xorg/modules"
    (**) Extension "Composite" is enabled
    (**) Extension "GLX" is enabled
    (**) Extension "RENDER" is enabled
    (II) Open ACPI successful (/var/run/acpid.socket)
    (II) Loader magic: 0x81d4540
    (II) Module ABI versions:
        X.Org ANSI C Emulation: 0.3
        X.Org Video Driver: 2.0
        X.Org XInput driver : 2.0
        X.Org Server Extension : 0.3
        X.Org Font Renderer : 0.5
    (II) Loader running on linux
    (II) LoadModule: "pcidata"
    (II) Loading /usr/lib/xorg/modules//libpcidata.so
    (II) Module pcidata: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        ABI class: X.Org Video Driver, version 2.0
    (--) using VT number 7
    (II) PCI: PCI scan (all values are in hex)
    (II) PCI: 00:00:0: chip 8086,2590 card 1028,01a3 rev 03 class 06,00,00 hdr 00
    (II) PCI: 00:02:0: chip 8086,2592 card 1028,01a3 rev 03 class 03,00,00 hdr 80
    (II) PCI: 00:02:1: chip 8086,2792 card 1028,01a3 rev 03 class 03,80,00 hdr 80
    (II) PCI: 00:1c:0: chip 8086,2660 card 0000,0000 rev 03 class 06,04,00 hdr 81
    (II) PCI: 00:1d:0: chip 8086,2658 card 1028,01a3 rev 03 class 0c,03,00 hdr 80
    (II) PCI: 00:1d:1: chip 8086,2659 card 1028,01a3 rev 03 class 0c,03,00 hdr 00
    (II) PCI: 00:1d:2: chip 8086,265a card 1028,01a3 rev 03 class 0c,03,00 hdr 00
    (II) PCI: 00:1d:3: chip 8086,265b card 1028,01a3 rev 03 class 0c,03,00 hdr 00
    (II) PCI: 00:1d:7: chip 8086,265c card 1028,01a3 rev 03 class 0c,03,20 hdr 00
    (II) PCI: 00:1e:0: chip 8086,2448 card 0000,0000 rev d3 class 06,04,01 hdr 81
    (II) PCI: 00:1e:2: chip 8086,266e card 1028,01a3 rev 03 class 04,01,00 hdr 00
    (II) PCI: 00:1e:3: chip 8086,266d card 14f1,5423 rev 03 class 07,03,00 hdr 00
    (II) PCI: 00:1f:0: chip 8086,2641 card 1028,01a3 rev 03 class 06,01,00 hdr 80
    (II) PCI: 00:1f:1: chip 8086,266f card 1028,01a3 rev 03 class 01,01,8a hdr 00
    (II) PCI: 00:1f:3: chip 8086,266a card 1028,01a3 rev 03 class 0c,05,00 hdr 00
    (II) PCI: 01:00:0: chip 14e4,1677 card 1028,01a3 rev 01 class 02,00,00 hdr 00
    (II) PCI: 02:01:0: chip 1180,0476 card 2000,0000 rev b3 class 06,07,00 hdr 82
    (II) PCI: 02:01:1: chip 1180,0552 card 1028,01a3 rev 08 class 0c,00,10 hdr 80
    (II) PCI: 02:01:2: chip 1180,0822 card 1028,01a3 rev 17 class 08,05,01 hdr 80
    (II) PCI: 02:03:0: chip 8086,4220 card 8086,2721 rev 05 class 02,80,00 hdr 00
    (II) PCI: End of PCI scan
    (II) Intel Bridge workaround enabled
    (II) Host-to-PCI bridge:
    (II) Bus 0: bridge is at (0:0:0), (0,0,3), BCTRL: 0x0008 (VGA_EN is set)
    (II) Bus 0 I/O range:
        [0] -1    0    0x00000000 - 0x0000ffff (0x10000) IX[b]
    (II) Bus 0 non-prefetchable memory range:
        [0] -1    0    0x00000000 - 0xffffffff (0x0) MX[b]
    (II) Bus 0 prefetchable memory range:
        [0] -1    0    0x00000000 - 0xffffffff (0x0) MX[b]
    (II) PCI-to-PCI bridge:
    (II) Bus 1: bridge is at (0:28:0), (0,1,1), BCTRL: 0x0002 (VGA_EN is cleared)
    (II) Bus 1 non-prefetchable memory range:
        [0] -1    0    0xdfd00000 - 0xdfdfffff (0x100000) MX[b]
    (II) Subtractive PCI-to-PCI bridge:
    (II) Bus 2: bridge is at (0:30:0), (0,2,3), BCTRL: 0x0002 (VGA_EN is cleared)
    (II) Bus 2 I/O range:
        [0] -1    0    0x00002000 - 0x00002fff (0x1000) IX[b]
    (II) Bus 2 non-prefetchable memory range:
        [0] -1    0    0xdfc00000 - 0xdfcfffff (0x100000) MX[b]
    (II) Bus 2 prefetchable memory range:
        [0] -1    0    0x60000000 - 0x63ffffff (0x4000000) MX[b]
    (II) PCI-to-ISA bridge:
    (II) Bus -1: bridge is at (0:31:0), (0,-1,-1), BCTRL: 0x0008 (VGA_EN is set)
    (II) PCI-to-CardBus bridge:
    (II) Bus 3: bridge is at (2:1:0), (2,3,6), BCTRL: 0x0740 (VGA_EN is cleared)
    (II) Bus 3 I/O range:
        [0] -1    0    0x00002000 - 0x000020ff (0x100) IX[b]
        [1] -1    0    0x00002400 - 0x000024ff (0x100) IX[b]
    (II) Bus 3 prefetchable memory range:
        [0] -1    0    0x60000000 - 0x63ffffff (0x4000000) MX[b]
    (--) PCI:*(0:2:0) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3, Mem @ 0xdff00000/19, 0xc0000000/28, 0xdfec0000/18, I/O @ 0xec38/3
    (--) PCI: (0:2:1) Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller rev 3, Mem @ 0xdff80000/19
    (II) Addressable bus resource ranges are
        [0] -1    0    0x00000000 - 0xffffffff (0x0) MX[b]
        [1] -1    0    0x00000000 - 0x0000ffff (0x10000) IX[b]
    (II) OS-reported resource ranges:
        [0] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [1] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [2] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [3] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [4] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [5] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
    (II) Active PCI resource ranges:
        [0] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [1] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [2] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [3] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [4] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [5] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [6] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [7] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [8] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [9] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [10] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [11] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [12] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [13] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [14] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [15] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [16] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [17] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [18] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [19] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [20] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [21] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [22] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [23] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [24] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [25] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
    (II) Active PCI resource ranges after removing overlaps:
        [0] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [1] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [2] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [3] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [4] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [5] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [6] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [7] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [8] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [9] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [10] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [11] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [12] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [13] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [14] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [15] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [16] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [17] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [18] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [19] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [20] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [21] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [22] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [23] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [24] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [25] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
    (II) OS-reported resource ranges after removing overlaps with PCI:
        [0] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [1] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [2] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [3] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [4] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [5] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
    (II) All system resource ranges:
        [0] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [1] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [2] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [3] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [4] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [5] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [6] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [7] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [8] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [9] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [10] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [11] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [12] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [13] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [14] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [15] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [16] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
        [17] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [18] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [19] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [20] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [21] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [22] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [23] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [24] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [25] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [26] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [27] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [28] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [29] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [30] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [31] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
    (II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
    (II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
    (II) "glx" will be loaded. This was enabled by default and also specified in the config file.
    (II) "freetype" will be loaded. This was enabled by default and also specified in the config file.
    (II) "type1" will be loaded. This was enabled by default and also specified in the config file.
    (II) "record" will be loaded. This was enabled by default and also specified in the config file.
    (II) "dri" will be loaded. This was enabled by default and also specified in the config file.
    (II) LoadModule: "ddc"(II) Module "ddc" already built-in
    (II) LoadModule: "dbe"
    (II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
    (II) Module dbe: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 0.3
    (II) Loading extension DOUBLE-BUFFER
    (II) LoadModule: "dri"
    (II) Loading /usr/lib/xorg/modules/extensions//libdri.so
    (II) Module dri: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.3
    (II) Loading extension XFree86-DRI
    (II) LoadModule: "extmod"
    (II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
    (II) Module extmod: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 0.3
    (II) Loading extension SHAPE
    (II) Loading extension MIT-SUNDRY-NONSTANDARD
    (II) Loading extension BIG-REQUESTS
    (II) Loading extension SYNC
    (II) Loading extension MIT-SCREEN-SAVER
    (II) Loading extension XC-MISC
    (II) Loading extension XFree86-VidModeExtension
    (II) Loading extension XFree86-Misc
    (II) Loading extension XFree86-DGA
    (II) Loading extension DPMS
    (II) Loading extension TOG-CUP
    (II) Loading extension Extended-Visual-Information
    (II) Loading extension XVideo
    (II) Loading extension XVideo-MotionCompensation
    (II) Loading extension X-Resource
    (II) LoadModule: "glx"
    (II) Loading /usr/lib/xorg/modules/extensions//libglx.so
    (II) Module glx: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        ABI class: X.Org Server Extension, version 0.3
    (**) AIGLX enabled
    (II) Loading extension GLX
    (II) LoadModule: "type1"
    (II) Loading /usr/lib/xorg/modules/fonts//libtype1.so
    (II) Module type1: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.2
        Module class: X.Org Font Renderer
        ABI class: X.Org Font Renderer, version 0.5
    (II) Loading font Type1
    (II) LoadModule: "freetype"
    (II) Loading /usr/lib/xorg/modules/fonts//libfreetype.so
    (II) Module freetype: vendor="X.Org Foundation & the After X-TT Project"
        compiled for 1.4.0, module version = 2.1.0
        Module class: X.Org Font Renderer
        ABI class: X.Org Font Renderer, version 0.5
    (II) Loading font FreeType
    (II) LoadModule: "record"
    (II) Loading /usr/lib/xorg/modules/extensions//librecord.so
    (II) Module record: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.13.0
        Module class: X.Org Server Extension
        ABI class: X.Org Server Extension, version 0.3
    (II) Loading extension RECORD
    (II) LoadModule: "vbe"
    (II) Loading /usr/lib/xorg/modules//libvbe.so
    (II) Module vbe: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.1.0
        ABI class: X.Org Video Driver, version 2.0
    (II) LoadModule: "synaptics"
    (II) Loading /usr/lib/xorg/modules/input//synaptics_drv.so
    (II) Module synaptics: vendor="X.Org Foundation"
        compiled for 4.3.99.902, module version = 1.0.0
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.0
    (II) LoadModule: "int10"
    (II) Loading /usr/lib/xorg/modules//libint10.so
    (II) Module int10: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        ABI class: X.Org Video Driver, version 2.0
    (II) LoadModule: "intel"
    (II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
    (II) Module intel: vendor="X.Org Foundation"
        compiled for 7.2.0, module version = 2.1.1
        Module class: X.Org Video Driver
        ABI class: X.Org Video Driver, version 2.0
    (II) LoadModule: "kbd"
    (II) Loading /usr/lib/xorg/modules/input//kbd_drv.so
    (II) Module kbd: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.2.2
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.0
    (II) LoadModule: "mouse"
    (II) Loading /usr/lib/xorg/modules/input//mouse_drv.so
    (II) Module mouse: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.2.3
        Module class: X.Org XInput Driver
        ABI class: X.Org XInput driver, version 2.0
    (II) LoadModule: "synaptics"
    (II) Reloading /usr/lib/xorg/modules/input//synaptics_drv.so
    (II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
        i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
        E7221 (i915), 915GM, 945G, 945GM, 945GME, 965G, 965G, 965Q, 946GZ,
        965GM, 965GME/GLE, G33, Q35, Q33
    (II) Primary Device is: PCI 00:02:0
    (WW) intel: No matching Device section for instance (BusID PCI:0:2:1) found
    (--) Chipset 915GM found
    (II) resource ranges after xf86ClaimFixedResources() call:
        [0] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [1] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [2] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [3] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [4] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [5] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [6] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [7] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [8] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [9] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [10] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [11] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [12] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [13] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [14] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [15] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [16] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
        [17] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [18] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [19] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [20] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [21] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [22] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [23] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [24] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [25] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [26] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [27] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [28] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [29] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [30] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [31] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
    (II) resource ranges after probing:
        [0] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [1] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [2] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [3] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [4] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [5] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [6] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [7] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [8] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [9] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [10] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [11] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [12] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [13] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [14] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [15] 0    0    0x000a0000 - 0x000affff (0x10000) MS[b]
        [16] 0    0    0x000b0000 - 0x000b7fff (0x8000) MS[b]
        [17] 0    0    0x000b8000 - 0x000bffff (0x8000) MS[b]
        [18] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [19] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
        [20] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [21] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [22] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [23] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [24] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [25] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [26] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [27] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [28] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [29] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [30] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [31] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [32] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [33] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [34] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
        [35] 0    0    0x000003b0 - 0x000003bb (0xc) IS[b]
        [36] 0    0    0x000003c0 - 0x000003df (0x20) IS[b]
    (II) Setting vga for screen 0.
    (II) Loading sub module "int10"
    (II) LoadModule: "int10"
    (II) Reloading /usr/lib/xorg/modules//libint10.so
    (II) Loading sub module "vbe"
    (II) LoadModule: "vbe"
    (II) Reloading /usr/lib/xorg/modules//libvbe.so
    (II) Loading sub module "vgahw"
    (II) LoadModule: "vgahw"
    (II) Loading /usr/lib/xorg/modules//libvgahw.so
    (II) Module vgahw: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 0.1.0
        ABI class: X.Org Video Driver, version 2.0
    (**) intel(0): Depth 24, (--) framebuffer bpp 32
    (==) intel(0): RGB weight 888
    (==) intel(0): Default visual is TrueColor
    (**) intel(0): Option "DRI" "true"
    (**) intel(0): Option "XVideo" "true"
    (II) intel(0): Integrated Graphics Chipset: Intel(R) 915GM
    (--) intel(0): Chipset: "915GM"
    (--) intel(0): Linear framebuffer at 0xC0000000
    (--) intel(0): IO registers at addr 0xDFF00000
    (II) intel(0): 2 display pipes available.
    (==) intel(0): Using XAA for acceleration
    (--) intel(0): Will try to allocate texture pool for old Mesa 3D driver.
    (II) intel(0): Will try to reserve 32768 kiB of AGP aperture space
        for the DRM memory manager.
    (II) Loading sub module "ddc"
    (II) LoadModule: "ddc"(II) Module "ddc" already built-in
    (II) Loading sub module "i2c"
    (II) LoadModule: "i2c"(II) Module "i2c" already built-in
    (II) intel(0): Output VGA using monitor section generic
    (**) intel(0): Option "Enable" "true"
    (II) intel(0): I2C bus "CRTDDC_A" initialized.
    (II) intel(0): Output LVDS has no monitor section
    (II) intel(0): I2C bus "LVDSDDC_C" initialized.
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0.
    (II) intel(0): EDID vendor "LCD", prod id 22528
    (II) intel(0): DDCModeFromDetailedTiming: 1280x768 Warning: We only handle seperate sync.
    (II) Loading sub module "int10"
    (II) LoadModule: "int10"
    (II) Reloading /usr/lib/xorg/modules//libint10.so
    (II) intel(0): initializing int10
    (WW) intel(0): Bad V_BIOS checksum
    (II) intel(0): Primary V_BIOS segment is: 0xc000
    (II) intel(0): VESA BIOS detected
    (II) intel(0): VbeVersion is 768, OemStringPtr is 0x00002100,
        OemVendorNamePtr is 0x0000213d, OemProductNamePtr is 0x0000214f,
        OemProductRevPtr is 0x0000217d
    (II) intel(0): VESA VBE Version 3.0
    (II) intel(0): VESA VBE Total Mem: 7872 kB
    (II) intel(0): VESA VBE OEM: Intel(r)915GM/910ML/915MS Graphics Chip Accelerated VGA BIOS
    (II) intel(0): VESA VBE OEM Software Rev: 1.0
    (II) intel(0): VESA VBE OEM Vendor: Intel Corporation
    (II) intel(0): VESA VBE OEM Product: Intel(r)915GM/910ML/915MS Graphics Controller
    (II) intel(0): VESA VBE OEM Product Rev: Hardware Version 0.0
    (II) intel(0): I2C bus "SDVOCTRL_E for SDVOB" initialized.
    (II) intel(0): I2C device "SDVOCTRL_E for SDVOB:SDVO Controller B" registered at address 0x70.
    (II) intel(0): No SDVO device found on SDVOB
    (II) intel(0): I2C device "SDVOCTRL_E for SDVOB:SDVO Controller B" removed.
    (II) intel(0): I2C bus "SDVOCTRL_E for SDVOB" removed.
    (II) intel(0): I2C bus "SDVOCTRL_E for SDVOC" initialized.
    (II) intel(0): I2C device "SDVOCTRL_E for SDVOC:SDVO Controller C" registered at address 0x72.
    (II) intel(0): No SDVO device found on SDVOC
    (II) intel(0): I2C device "SDVOCTRL_E for SDVOC:SDVO Controller C" removed.
    (II) intel(0): I2C bus "SDVOCTRL_E for SDVOC" removed.
    (II) intel(0): Output TV has no monitor section
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): I2C device "CRTDDC_A:ddc2" registered at address 0xA0.
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (II) intel(0): Printing DDC gathered Modelines:
    (II) intel(0): Modeline "1600x1024"x0.0  108.00  1600 1616 1656 1704  1024 1027 1030 1056 -hsync -vsync (63.4 kHz)
    (II) intel(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 -hsync -vsync (60.0 kHz)
    (II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)
    (II) intel(0): Modeline "640x480"x0.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz)
    (II) intel(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz)
    (II) intel(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz)
    (II) intel(0): Modeline "640x480"x59.4   23.75  640 664 720 800  480 483 487 500 -hsync +vsync (29.7 kHz)
    (II) intel(0): Modeline "800x600"x59.9   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync (37.4 kHz)
    (II) intel(0): Modeline "1024x768"x59.9   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync (47.8 kHz)
    (II) intel(0): Modeline "1280x960"x59.9  101.25  1280 1360 1488 1696  960 963 967 996 -hsync +vsync (59.7 kHz)
    (II) intel(0): Modeline "1280x1024"x59.9  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync (63.7 kHz)
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): EDID vendor "LCD", prod id 22528
    (II) intel(0): DDCModeFromDetailedTiming: 1280x768 Warning: We only handle seperate sync.
    (II) intel(0): Output VGA enabled by config file
    (II) intel(0): Output LVDS connected
    (II) intel(0): Output TV disconnected
    (II) intel(0): Output VGA using initial mode 1600x1024
    (II) intel(0): Output LVDS using initial mode 1280x768
    (II) intel(0): Monitoring connected displays enabled
    (II) intel(0): detected 256 kB GTT.
    (II) intel(0): detected 7932 kB stolen memory.
    (==) intel(0): video overlay key set to 0x101fe
    (==) intel(0): Will not try to enable page flipping
    (==) intel(0): Triple buffering disabled
    (==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
    (**) intel(0): Display dimensions: (370, 240) mm
    (**) intel(0): DPI set to (140, 216)
    (II) Loading sub module "fb"
    (II) LoadModule: "fb"
    (II) Loading /usr/lib/xorg/modules//libfb.so
    (II) Module fb: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.0.0
        ABI class: X.Org ANSI C Emulation, version 0.3
    (II) Loading sub module "xaa"
    (II) LoadModule: "xaa"
    (II) Loading /usr/lib/xorg/modules//libxaa.so
    (II) Module xaa: vendor="X.Org Foundation"
        compiled for 1.4.0, module version = 1.2.0
        ABI class: X.Org Video Driver, version 2.0
    (II) Loading sub module "ramdac"
    (II) LoadModule: "ramdac"(II) Module "ramdac" already built-in
    (II) intel(0): Comparing regs from server start up to After PreInit
    (WW) intel(0): Register 0x61200 (PP_STATUS) changed from 0xc0000008 to 0xd000000a
    (WW) intel(0): PP_STATUS before: on, ready, sequencing idle
    (WW) intel(0): PP_STATUS after: on, ready, sequencing on
    (WW) intel(0): Register 0x68000 (TV_CTL) changed from 0x400c0c00 to 0x000c0c00
    (WW) intel(0): Register 0x68080 (TV_FILTER_CTL_1) changed from 0x80000d63 to 0x800010bb
    (WW) intel(0): Register 0x68084 (TV_FILTER_CTL_2) changed from 0x0001e1e2 to 0x00028283
    (WW) intel(0): Register 0x68088 (TV_FILTER_CTL_3) changed from 0x0000f0f1 to 0x00014141
    (II) Loading sub module "dri"
    (II) LoadModule: "dri"
    (II) Reloading /usr/lib/xorg/modules/extensions//libdri.so
    (==) Depth 24 pixmap format is 32 bpp
    (II) do I need RAC?  No, I don't.
    (II) resource ranges after preInit:
        [0] 0    0    0xdfec0000 - 0xdfefffff (0x40000) MS[b]
        [1] 0    0    0xc0000000 - 0xcfffffff (0x10000000) MS[b]
        [2] 0    0    0xdff00000 - 0xdff7ffff (0x80000) MS[b]
        [3] -1    0    0x00100000 - 0x3fffffff (0x3ff00000) MX[b]E(B)
        [4] -1    0    0x000f0000 - 0x000fffff (0x10000) MX[b]
        [5] -1    0    0x000c0000 - 0x000effff (0x30000) MX[b]
        [6] -1    0    0x00000000 - 0x0009ffff (0xa0000) MX[b]
        [7] -1    0    0xdfcff000 - 0xdfcfffff (0x1000) MX[b]
        [8] -1    0    0xdfcfe700 - 0xdfcfe7ff (0x100) MX[b]
        [9] -1    0    0xdfcfe800 - 0xdfcfefff (0x800) MX[b]
        [10] -1    0    0xdfdf0000 - 0xdfdfffff (0x10000) MX[b]
        [11] -1    0    0xdfebfd00 - 0xdfebfdff (0x100) MX[b]
        [12] -1    0    0xdfebfe00 - 0xdfebffff (0x200) MX[b]
        [13] -1    0    0xffa80800 - 0xffa80bff (0x400) MX[b]
        [14] -1    0    0xdff80000 - 0xdfffffff (0x80000) MX[b](B)
        [15] -1    0    0xdfec0000 - 0xdfefffff (0x40000) MX[b](B)
        [16] -1    0    0xc0000000 - 0xcfffffff (0x10000000) MX[b](B)
        [17] -1    0    0xdff00000 - 0xdff7ffff (0x80000) MX[b](B)
        [18] 0    0    0x000a0000 - 0x000affff (0x10000) MS[b](OprD)
        [19] 0    0    0x000b0000 - 0x000b7fff (0x8000) MS[b](OprD)
        [20] 0    0    0x000b8000 - 0x000bffff (0x8000) MS[b](OprD)
        [21] 0    0    0x0000ec38 - 0x0000ec3f (0x8) IS[b]
        [22] -1    0    0x0000ffff - 0x0000ffff (0x1) IX[b]
        [23] -1    0    0x00000000 - 0x000000ff (0x100) IX[b]
        [24] -1    0    0x000010c0 - 0x000010df (0x20) IX[b]
        [25] -1    0    0x0000bfa0 - 0x0000bfaf (0x10) IX[b]
        [26] -1    0    0x00000374 - 0x00000374 (0x1) IX[b]
        [27] -1    0    0x00000170 - 0x00000177 (0x8) IX[b]
        [28] -1    0    0x000003f4 - 0x000003f4 (0x1) IX[b]
        [29] -1    0    0x000001f0 - 0x000001f7 (0x8) IX[b]
        [30] -1    0    0x0000ec80 - 0x0000ecff (0x80) IX[b]
        [31] -1    0    0x0000ee00 - 0x0000eeff (0x100) IX[b]
        [32] -1    0    0x0000ec40 - 0x0000ec7f (0x40) IX[b]
        [33] -1    0    0x0000ed00 - 0x0000edff (0x100) IX[b]
        [34] -1    0    0x0000bf20 - 0x0000bf3f (0x20) IX[b]
        [35] -1    0    0x0000bf40 - 0x0000bf5f (0x20) IX[b]
        [36] -1    0    0x0000bf60 - 0x0000bf7f (0x20) IX[b]
        [37] -1    0    0x0000bf80 - 0x0000bf9f (0x20) IX[b]
        [38] -1    0    0x0000ec38 - 0x0000ec3f (0x8) IX[b](B)
        [39] 0    0    0x000003b0 - 0x000003bb (0xc) IS[b](OprU)
        [40] 0    0    0x000003c0 - 0x000003df (0x20) IS[b](OprU)
    (WW) intel(0): VideoRam configuration found, which is no longer recommended.
    (II) intel(0): Continuing with default 262144kB VideoRam instead of 131072 kB.
    (II) intel(0): Kernel reported 301312 total, 1 used
    (II) intel(0): I830CheckAvailableMemory: 1205244 kB available
    (**) intel(0): VideoRam: 262144 KB
    (II) intel(0): Attempting memory allocation with tiled buffers and
               large DRI memory manager reservation:
    (II) intel(0): Allocating 7164 scanlines for pixmap cache
    (II) intel(0): Success.
    (II) intel(0): Memory allocation layout:
    (II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB)
    (II) intel(0): 0x00020000-0x00029fff: HW cursors (40 kB, 0x        4f820000 physical)
    (II) intel(0): 0x0002a000-0x00031fff: logical 3D context (32 kB)
    (II) intel(0): 0x00032000-0x00032fff: overlay registers (4 kB, 0x        4f832000 physical)
    (II) intel(0): 0x00040000-0x04837fff: front buffer (73696 kB)
    (II) intel(0): 0x007bf000:            end of stolen memory
    (II) intel(0): 0x04838000-0x04847fff: xaa scratch (64 kB)
    (II) intel(0): 0x05000000-0x05ffffff: back buffer (16384 kB)
    (II) intel(0): 0x06000000-0x06ffffff: depth buffer (16384 kB)
    (II) intel(0): 0x07000000-0x08ffffff: DRI memory manager (32768 kB)
    (II) intel(0): 0x09000000-0x0affffff: textures (32768 kB)
    (II) intel(0): 0x10000000:            end of aperture
    (II) intel(0): front buffer is not tiled
    (II) intel(0): back buffer is tiled
    (II) intel(0): depth buffer is tiled
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenByBusid: Searching for BusID pci:0000:00:02.0
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 10, (OK)
    drmOpenByBusid: drmOpenMinor returns 10
    drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
    (II) [drm] DRM interface version 1.3
    (II) [drm] DRM open master succeeded.
    (II) intel(0): [drm] Using the DRM lock SAREA also for drawables.
    (II) intel(0): [drm] framebuffer handle = 0xc0040000
    (II) intel(0): [drm] added 1 reserved context for kernel
    (II) intel(0): X context handle = 0x1
    (II) intel(0): [drm] installed DRM signal handler
    (II) intel(0): Unable to use TTM-based memory manager with DRM version 1.6
    (II) intel(0): [drm] Registers = 0xdff00000
    (II) intel(0): [drm] ring buffer = 0xc0000000
    (II) intel(0): [drm] init sarea width,height = 2048 x 2048 (pitch 2048)
    (II) intel(0): [drm] Mapping front buffer
    (II) intel(0): [drm] Front Buffer = 0x28008000
    (II) intel(0): [drm] Back Buffer = 0xc5000000
    (II) intel(0): [drm] Depth Buffer = 0xc6000000
    (II) intel(0): [drm] textures = 0xc9000000
    (II) intel(0): [drm] Initialized kernel agp heap manager, 33554432
    (II) intel(0): [dri] visual configs initialized
    (II) intel(0): Page Flipping disabled
    (==) intel(0): Write-combining range (0xc0000000,0x10000000)
    (II) intel(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
    (**) intel(0): Option "XaaNoOffscreenPixmaps"
    (II) intel(0): Using XFree86 Acceleration Architecture (XAA)
        Screen to screen bit blits
        Solid filled rectangles
        8x8 mono pattern filled rectangles
        Indirect CPU to Screen color expansion
        Solid Horizontal and Vertical Lines
        Setting up tile and stipple cache:
            32 128x128 slots
            32 256x256 slots
            16 512x512 slots
    (==) intel(0): Backing store disabled
    (==) intel(0): Silken mouse enabled
    (II) intel(0): Initializing HW Cursor
    (II) intel(0): xf86BindGARTMemory: bind key 0 at 0x007bf000 (pgoffset 1983)
    (II) intel(0): xf86BindGARTMemory: bind key 1 at 0x04838000 (pgoffset 18488)
    (II) intel(0): xf86BindGARTMemory: bind key 2 at 0x05000000 (pgoffset 20480)
    (II) intel(0): xf86BindGARTMemory: bind key 3 at 0x06000000 (pgoffset 24576)
    (II) intel(0): xf86BindGARTMemory: bind key 4 at 0x09000000 (pgoffset 36864)
    (II) intel(0): Output configuration:
    (II) intel(0):   Pipe A is on
    (II) intel(0):   Display plane A is now enabled and connected to pipe A.
    (II) intel(0):   Pipe B is on
    (II) intel(0):   Display plane B is now enabled and connected to pipe B.
    (II) intel(0):   Output VGA is connected to pipe A
    (II) intel(0):   Output LVDS is connected to pipe B
    (II) intel(0):   Output TV is connected to pipe none
    (**) Option "dpms"
    (**) intel(0): DPMS enabled
    (II) intel(0): Set up textured video
    (II) intel(0): Set up overlay video
    (II) intel(0): [DRI] installation complete
    (II) intel(0): [drm] dma control initialized, using IRQ 16
    (II) intel(0): direct rendering: Enabled
    (II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
    (WW) intel(0): Option "Enable" is not used
    (--) RandR disabled
    (II) Initializing built-in extension MIT-SHM
    (II) Initializing built-in extension XInputExtension
    (II) Initializing built-in extension XTEST
    (II) Initializing built-in extension XKEYBOARD
    (II) Initializing built-in extension XC-APPGROUP
    (II) Initializing built-in extension XAccessControlExtension
    (II) Initializing built-in extension SECURITY
    (II) Initializing built-in extension XINERAMA
    (II) Initializing built-in extension XFIXES
    (II) Initializing built-in extension XFree86-Bigfont
    (II) Initializing built-in extension RENDER
    (II) Initializing built-in extension RANDR
    (II) Initializing built-in extension COMPOSITE
    (II) Initializing built-in extension DAMAGE
    (II) Initializing built-in extension XEVIE
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 11, (OK)
    drmOpenByBusid: Searching for BusID pci:0000:00:02.0
    drmOpenDevice: node name is /dev/dri/card0
    drmOpenDevice: open result is 11, (OK)
    drmOpenByBusid: drmOpenMinor returns 11
    drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
    (WW) AIGLX: 3D driver claims to not support visual 0x23
    (WW) AIGLX: 3D driver claims to not support visual 0x24
    (WW) AIGLX: 3D driver claims to not support visual 0x25
    (WW) AIGLX: 3D driver claims to not support visual 0x26
    (WW) AIGLX: 3D driver claims to not support visual 0x27
    (WW) AIGLX: 3D driver claims to not support visual 0x28
    (WW) AIGLX: 3D driver claims to not support visual 0x29
    (WW) AIGLX: 3D driver claims to not support visual 0x2a
    (WW) AIGLX: 3D driver claims to not support visual 0x2b
    (WW) AIGLX: 3D driver claims to not support visual 0x2c
    (WW) AIGLX: 3D driver claims to not support visual 0x2d
    (WW) AIGLX: 3D driver claims to not support visual 0x2e
    (WW) AIGLX: 3D driver claims to not support visual 0x2f
    (WW) AIGLX: 3D driver claims to not support visual 0x30
    (WW) AIGLX: 3D driver claims to not support visual 0x31
    (WW) AIGLX: 3D driver claims to not support visual 0x32
    (II) AIGLX: Loaded and initialized /usr/lib/xorg/modules/dri/i915_dri.so
    (II) GLX: Initialized DRI GL provider for screen 0
    (II) intel(0): Setting screen physical size to 370 x 237
    select returned 1
    (II) USB Mouse: ps2EnableDataReporting: succeeded
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (II) intel(0): Printing DDC gathered Modelines:
    (II) intel(0): Modeline "1600x1024"x0.0  108.00  1600 1616 1656 1704  1024 1027 1030 1056 -hsync -vsync (63.4 kHz)
    (II) intel(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 -hsync -vsync (60.0 kHz)
    (II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)
    (II) intel(0): Modeline "640x480"x0.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz)
    (II) intel(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz)
    (II) intel(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz)
    (II) intel(0): Modeline "640x480"x59.4   23.75  640 664 720 800  480 483 487 500 -hsync +vsync (29.7 kHz)
    (II) intel(0): Modeline "800x600"x59.9   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync (37.4 kHz)
    (II) intel(0): Modeline "1024x768"x59.9   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync (47.8 kHz)
    (II) intel(0): Modeline "1280x960"x59.9  101.25  1280 1360 1488 1696  960 963 967 996 -hsync +vsync (59.7 kHz)
    (II) intel(0): Modeline "1280x1024"x59.9  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync (63.7 kHz)
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): EDID vendor "LCD", prod id 22528
    (II) intel(0): DDCModeFromDetailedTiming: 1280x768 Warning: We only handle seperate sync.
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (II) intel(0): Printing DDC gathered Modelines:
    (II) intel(0): Modeline "1600x1024"x0.0  108.00  1600 1616 1656 1704  1024 1027 1030 1056 -hsync -vsync (63.4 kHz)
    (II) intel(0): Modeline "1280x960"x0.0  108.00  1280 1376 1488 1800  960 961 964 1000 -hsync -vsync (60.0 kHz)
    (II) intel(0): Modeline "800x600"x0.0   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz)
    (II) intel(0): Modeline "640x480"x0.0   25.20  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz)
    (II) intel(0): Modeline "720x400"x0.0   28.32  720 738 846 900  400 412 414 449 -hsync +vsync (31.5 kHz)
    (II) intel(0): Modeline "1024x768"x0.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz)
    (II) intel(0): Modeline "640x480"x59.4   23.75  640 664 720 800  480 483 487 500 -hsync +vsync (29.7 kHz)
    (II) intel(0): Modeline "800x600"x59.9   38.25  800 832 912 1024  600 603 607 624 -hsync +vsync (37.4 kHz)
    (II) intel(0): Modeline "1024x768"x59.9   63.50  1024 1072 1176 1328  768 771 775 798 -hsync +vsync (47.8 kHz)
    (II) intel(0): Modeline "1280x960"x59.9  101.25  1280 1360 1488 1696  960 963 967 996 -hsync +vsync (59.7 kHz)
    (II) intel(0): Modeline "1280x1024"x59.9  109.00  1280 1368 1496 1712  1024 1027 1034 1063 -hsync +vsync (63.7 kHz)
    (II) intel(0): EDID vendor "SGX", prod id 1601
    (**) intel(0): Option "ddc" "true"
    (II) intel(0): EDID vendor "LCD", prod id 22528
    (II) intel(0): DDCModeFromDetailedTiming: 1280x768 Warning: We only handle seperate sync.
    select returned 0
    select returned 0
    (II) AIGLX: Suspending AIGLX clients for VT switch
    (II) intel(0): xf86UnbindGARTMemory: unbind key 0
    (II) intel(0): xf86UnbindGARTMemory: unbind key 1
    (II) intel(0): xf86UnbindGARTMemory: unbind key 2
    (II) intel(0): xf86UnbindGARTMemory: unbind key 3
    (II) intel(0): xf86UnbindGARTMemory: unbind key 4
    (II) Open ACPI successful (/var/run/acpid.socket)
    (II) AIGLX: Resuming AIGLX clients after VT switch
    (II) intel(0): xf86BindGARTMemory: bind key 0 at 0x007bf000 (pgoffset 1983)
    (II) intel(0): xf86BindGARTMemory: bind key 1 at 0x04838000 (pgoffset 18488)
    (II) intel(0): xf86BindGARTMemory: bind key 2 at 0x05000000 (pgoffset 20480)
    (II) intel(0): xf86BindGARTMemory: bind key 3 at 0x06000000 (pgoffset 24576)
    (II) intel(0): xf86BindGARTMemory: bind key 4 at 0x09000000 (pgoffset 36864)
    Error in I830WaitLpRing(), timeout for 2 seconds
    pgetbl_ctl: 0x4ffc0001 pgetbl_err: 0x0
    ipeir: 0 iphdr: 7dc41ddc
    LP ring tail: 8 head: 0 len: 1f001 start 0
    eir: 0 esr: 0 emr: ffff
    instdone: ffc1 instpm: 0
    memmode: 108 instps: 14cf
    hwstam: ffff ier: 2 imr: ffff iir: 0
    Ring at virtual 0xa79b1000 head 0x0 tail 0x8 count 2
        0001ff80: 00000000
        0001ff84: 00000000
        0001ff88: 00000000
        0001ff8c: 00000000
        0001ff90: 00000000
        0001ff94: 00000000
        0001ff98: 00000000
        0001ff9c: 00000000
        0001ffa0: 00000000
        0001ffa4: 00000000
        0001ffa8: 00000000
        0001ffac: 00000000
        0001ffb0: 00000000
        0001ffb4: 00000000
        0001ffb8: 00000000
        0001ffbc: 00000000
        0001ffc0: 00000000
        0001ffc4: 00000000
        0001ffc8: 00000000
        0001ffcc: 00000000
        0001ffd0: 00000000
        0001ffd4: 00000000
        0001ffd8: 00000000
        0001ffdc: 00000000
        0001ffe0: 00000000
        0001ffe4: 00000000
        0001ffe8: 00000000
        0001ffec: 00000000
        0001fff0: 00000000
        0001fff4: 00000000
        0001fff8: 00000000
        0001fffc: 00000000
        00000000: 02000011
    Ring end
    space: 131056 wanted 131064
    (II) intel(0): [drm] removed 1 reserved context for kernel
    (II) intel(0): [drm] unmapping 8192 bytes of SAREA 0xf8c8a000 at 0xb7b25000
    (II) intel(0): [drm] Closed DRM master.
    Fatal server error:
    lockup
    (II) AIGLX: Suspending AIGLX clients for VT switch
    Error in I830WaitLpRing(), timeout for 2 seconds
    pgetbl_ctl: 0x4ffc0001 pgetbl_err: 0x0
    ipeir: 0 iphdr: 7dc41ddc
    LP ring tail: 10 head: 0 len: 1f001 start 0
    eir: 0 esr: 0 emr: ffff
    instdone: ffc1 instpm: 0
    memmode: 108 instps: 14cf
    hwstam: ffff ier: 2 imr: ffff iir: 0
    Ring at virtual 0xa79b1000 head 0x0 tail 0x10 count 4
        0001ff80: 00000000
        0001ff84: 00000000
        0001ff88: 00000000
        0001ff8c: 00000000
        0001ff90: 00000000
        0001ff94: 00000000
        0001ff98: 00000000
        0001ff9c: 00000000
        0001ffa0: 00000000
        0001ffa4: 00000000
        0001ffa8: 00000000
        0001ffac: 00000000
        0001ffb0: 00000000
        0001ffb4: 00000000
        0001ffb8: 00000000
        0001ffbc: 00000000
        0001ffc0: 00000000
        0001ffc4: 00000000
        0001ffc8: 00000000
        0001ffcc: 00000000
        0001ffd0: 00000000
        0001ffd4: 00000000
        0001ffd8: 00000000
        0001ffdc: 00000000
        0001ffe0: 00000000
        0001ffe4: 00000000
        0001ffe8: 00000000
        0001ffec: 00000000
        0001fff0: 00000000
        0001fff4: 00000000
        0001fff8: 00000000
        0001fffc: 00000000
        00000000: 02000011
    Ring end
    space: 131048 wanted 131064
    FatalError re-entered, aborting
    lockup
    -----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----|-----

    Thanks to several remarks and suggestions I have found in this forum, I have been
    able to fix this problem. Commenting out the VBE section of my /etc/hibernate/common.conf
    file did it. That is, after commenting the following lines,
    ### vbetool
    #EnableVbetool yes
    #RestoreVbeStateFrom /var/lib/vbetool/vbestate
    #VbetoolPost yes
    #RestoreVCSAData yes
    hibernation works as it used to. Suspend to disk and suspend to ram are both
    operational (with a vanilla kernel 2.6.23.1).
    Manuel

  • Problem in hibernate mapping

    Hi,
    I am new to hibernate and found some problem in mapping for a simple example. Kindly have a look at my code and stack trace and help me fix the problem.
    Mobile.hbm.xml
    <?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="com.mindtree.entity.MobileInvoice" table="MOBILE">
              <property name="model" column="MODEL"/>
              <property name="make" column="MAKE"/>
              <property name="price" column="PRICE"/>
              <property name="date" column="DATE1" />
              <property name="csex" column="CSEX" />
              <property name="cage" column= "CAGE" />
              <id name="id" column="ID">
                   <generator class="increment"/>
              </id>
         </class>
    </hibernate-mapping>Stacktrace:
    org.hibernate.MappingException: Could not read mappings from resource: Mobile.hbm.xml
         at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
         at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
         at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
         at com.mindtree.dao.MobileDAOImpl.addInvoice(MobileDAOImpl.java:25)
         at com.mindtree.dao.Test.main(Test.java:18)
    Caused by: org.hibernate.MappingException: invalid mapping
         at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:425)
         at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
         ... 8 more
    Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:465)
         at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:422)
         ... 9 moreThanks :)

    for ex:
    hibernate.cfg.xml
    <mapping resource="com/spm/dao/Login.hbm.xml" />
    login.hbm.xml
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
         <class name="com.dao.Login" table="login">
              <id name="id" type="java.lang.Short">
                   <column name="id" />
                   <generator class="increment" />
              </id>
              <property name="username" type="java.lang.String">
                   <column name="username" length="15" not-null="true" />
              </property>
         </class>
    </hibernate-mapping>

  • Exception setting property value with CGLIB ( in hibernate)

    My hbm.xml file is:
    <hibernate-mapping>
    <class name="com.dst.fourx.model.codeModel.CodeGroupDisplay" table="CODE_GROUP_DISPAY1">
    <composite-id name="codeGroupDisplayKey" class="com.dst.fourx.model.codeModel.CodeGroupDisplayKey">
    <key-property name="nlsLanguage" type="java.lang.String" column="LANG_CD" />
    <key-many-to-one name="codeGroupCode" class="com.dst.fourx.model.codeModel.CodesGroup" column="CD_GRP_CD" />
    </composite-id>
    <property name="createDate" column="CREATE_DT" type="java.util.Date" not-null="true"/>
    <property name="createUserCode" column="CREATE_USER_CD" type="java.lang.String" not-null="true"/>
    <property name="updateDate" column="LAST_MOD_DT" type="java.util.Date"/>
    <property name="updateUserCode" column="LAST_MOD_USER_CD" type="java.lang.String"/>
    <property name="displayText" column="DISPLAY_TXT" type="java.lang.String" not-null="true"/>
    </class>
    <query name="findAllEditableCodeGroups">
    <![CDATA[from CodeGroupDisplay]]>
         </query>
    </hibernate-mapping>
    I m getting the following error while running the above query:
    org.hibernate.PropertyAccessException: exception setting property value with CGLIB (set hibernate.cglib.use_reflection_optimizer=false for more info) setter of com.dst.fourx.model.codeModel.CodeGroupDisplayKey.setCodeGroupCode
         at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:63)
         at org.hibernate.type.ComponentType.setPropertyValues(ComponentType.java:262)
         at org.hibernate.type.ComponentType.resolve(ComponentType.java:447)
         at org.hibernate.type.ComponentType.nullSafeGet(ComponentType.java:182)
         at org.hibernate.loader.Loader.getKeyFromResultSet(Loader.java:759)
         at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:292)
         at org.hibernate.loader.Loader.doQuery(Loader.java:412)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
         at org.hibernate.loader.Loader.doList(Loader.java:1593)
         at org.hibernate.loader.Loader.list(Loader.java:1577)
         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
         at com.dst.fourx.core.impl.ao.dao.actions.HibernateNamedQueryAction.execute(HibernateNamedQueryAction.java:79)
         at com.dst.fourx.core.impl.ao.dao.BaseDAOHibernate.execute(BaseDAOHibernate.java:129)
         at com.dst.fourx.core.impl.ao.dao.AddEditCodeDAO.getAllFundingTypes(AddEditCodeDAO.java:47)
         at com.dst.fourx.core.impl.ao.dao.AddEditDAOTest.testGetCreditBankAccts(AddEditDAOTest.java:29)
         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:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
         at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
    Caused by: net.sf.cglib.beans.BulkBeanException: com.dst.fourx.model.codeModel.CodesGroup$$EnhancerByCGLIB$$fd9c7e4e
         at com.dst.fourx.model.codeModel.CodeGroupDisplayKey$$BulkBeanByCGLIB$$ae2c0401_2.setPropertyValues(<generated>)
         at org.hibernate.tuple.PojoComponentTuplizer.setPropertyValues(PojoComponentTuplizer.java:59)
         ... 32 more
    Caused by: java.lang.ClassCastException: com.dst.fourx.model.codeModel.CodesGroup$$EnhancerByCGLIB$$fd9c7e4e
         ... 34 more

    check the setter method for the property LANG_CD in com.dst.fourx.model.codeModel.CodeGroupDisplay.
    it must be like -
    setNlsLanguage(CodesGroup xyz) { ... }
    The paremeters must be objects, not the type of the database column. We can specify the actual field in CodesGroup which acts as the foreign key in CodeGroupDisplay in the "property-ref" attribute of <many-to-one> element in the mapping file for CodeGroupDisplay.
    This worked for me. Hope it works for you too.

  • Problem with composite id

    hello frnds,
    i hava an table with four primary key.
    i want to fetch records which are composited with these four keys.
    so any one has idea that how to use hibernate for composite id then pls help me.....
    thanx in advance,,,
    regards
    Pandev84

    hello frnd,I'm not your friend. Nor am I your "frnd".
    can u give me any sample code for composite-id
    mapping in our mapping file??No. You take a shot at it, then I'll help you fix it. Do some work first - like reading the documentation.

  • Question on Persistence (Entity Beans, Hibernate, JDBC)

    Hi everybody!
    Until now, I have read a lot about persistence in the J2EE-sector, but I am still confused about which technology to used in my case.
    I hope, that maybe you can give me some hints, by telling me which technology is good or bad regarding my requirements:
    I want to build a customer- and order-management system fullfilling the following requirements:
    1. The client is a Java application, the server is a JBOSS 4.0.1
    2. The databasa scheme exists already and I'm not allowed to change it.
    Some data, that logically belongs together and which shall be presented together to the client is distributed over 2 database tables.
    3. The user cannot just create new and view data, but will also edit existing data quite often.
    4. The user can assign products to an order. Often, there will be more than 1000 products assigned to an order, which will be presented to the user as a table (e.g. JTable). The user can then edit each cell of that 1000-row table, which of course will lead to an update in the db.
    5. The user can also assign customers to a specific role in an order-process. On the other hand, each customer can make many orders.
    So, we have a n:m relation here with the db-tables Customer, Order, OrderCustomer.
    6. A complex search functionality has to be implemented, where the db-query is created dynamically at runtime.
    7. The application is a multi-user application (about 10 users). It will be very rare, that users will work on the same data at the same time, but it might happen.
    8. The database type (SAP DB) will not be changed in the near future.
    With these 8 requirements in mind, I dealed a lot with EntityBeans, Hibernate and JDBC with SesseionBeans during the last 2 weeks.
    Until now, I came to the following conclusions.
    Hibernate is too slow. That'S bad, for data is edited very often and sometimes I want to edit just a single cell in 1000-row table.
    Hibernate's biggest advantage - that it makes your application independent of the database type - is not even required (see point 8).
    JDBC with SessioBeans: Very fast (I tried a simple query and it was about 10 times faster than Hibernate).
    The disadvantage is, that I have to take care about all the transaction, concurrency control etc. things.
    If I use JDBC, I want to do it that way: A SessionFacade accesses a DAO-object which executes the DB-query and returns the result to the SessionFacade which in the last step will pass the result to the client.
    Entity Beans: I am completely confused with Entity Beans.
    I read a lot about the CompositeEntity-Pattern for BMP. But on sun's J2EE Pattern page (http://java.sun.com/blueprints/corej2eepatterns/Patterns/CompositeEntity.html)
    they said, that it's just useful when using the EJB 1.1 specification, because from EJB 2.0. the container or whatever will take care about lazy loading and store optimization.
    So, from EJB 2.0. you should prefer using CMP-Beans with Container Managed Relationships (CMR), but as I heard, the dependent objects cannot be accessed and changed by the client when using CMPBeans with CMR.
    However, a simple DB/Entity-mapping will not work in my case, because as mentioned above, there are thousands of products from the db to be managed at the same time. So here, I thought, the Composite pattern with its lazy loading strategy would be useful.
    Furthermore, I have an n:m relationship in my database scheme, which is not trivial to map to entity beans. And don't forget that some related data is spread over 2 databse tables.
    To sum it up, it would be very nice if some of you could clarify this perisistence nightmare, especially some clarification about if and how to use EntityBeans when having n:m relationships, editing data a lot, managing lots of table rows at once and having related data distributed over 2 database tables.
    So, which technology would you prefer with the 8 requirements in mind? Hibernate, Entity Beans or JDBC with SessionBeans? Or would you prefer a mixed solution?
    Thanx for every hint.
    Regards,
    egon

    Here the requested information about the test:
    Goal:
    Find all customers, who's branches have the String "Branch" in their name.
    Both times, a simple client accesses the same SessionBean in a JBOSS-Container.
    This Bean has 2 methods. One accesses the DB via Hibernate (executeCriteria), the other one via JDBC (executeCriteriaJDBC).
    The code to count the seconds of computation is as follows:
    long startTime = System.currentTimeMillis();
    List customerList = bean.executeCriteria(dc);
    System.out.println("Hibernate: "+((System.currentTimeMillis()-startTime)/1000.0f)+" sek");
    startTime = System.currentTimeMillis();
    List customerListJDBC = bean.executeCriteriaJDBC(query);
    System.out.println("JDBC: "+((System.currentTimeMillis()-startTime)/1000.0f)+" sek");
    HIBERNATE:
    CODE:
    Branch Branch = new Branch();
    Branch.setName("%Branch%");
    Example example = Example.create(Branch);     
    DetachedCriteria dc = DetachedCriteria.forClass(Customer.class)
    .createCriteria("branches").add(example.enableLike()).setResultTransformer(Criteria.DISTINCT_ROOT_ENTITY);
    QUERY:
    select
            this_.UUID as UUID1_1_,
            this_.NAME as NAME1_1_,
            this_.CUSTOMERNO as CUSTOMERNO1_1_,
            this_.SHORTDESC as SHORTDESC1_1_,
            this_.LONGDESC as LONGDESC1_1_,
            this_.TAXNUMBER as TAXNUMBER1_1_,
            this_.SALESTAXID as SALESTAXID1_1_,
            this_.ACCOUNTHOLDER as ACCOUNTH8_1_1_,
            this_.BANKACCOUNT as BANKACCO9_1_1_,
            this_.BANKCODE as BANKCODE1_1_,
            this_.BANKNAME as BANKNAME1_1_,
            this_.AREA1TEXT as AREA12_1_1_,
            this_.AREA2TEXT as AREA13_1_1_,
            this_.AREA3TEXT as AREA14_1_1_,
            this_.AREA4TEXT as AREA15_1_1_,
            this_.AREA5TEXT as AREA16_1_1_,
            this_.CH_UUID as CH17_1_1_,
            this_.REFTEXT1 as REFTEXT18_1_1_,
            this_.REFTEXT2 as REFTEXT19_1_1_,
            this_.REFTEXT3 as REFTEXT20_1_1_,
            branch1_.UUID as UUID0_0_,
            branch1_.NAME as NAME0_0_,
            branch1_.ILN as ILN0_0_,
            branch1_.BRANCHID as BRANCHID0_0_,
            branch1_.SHORTDESC as SHORTDESC0_0_,
            branch1_.LONGDESC as LONGDESC0_0_,
            branch1_.BAGSRECEIVED as BAGSRECE7_0_0_,
            branch1_.CUSTOMER_UUID as CUSTOMER8_0_0_
        from
            CUSTOMER this_,
            BRANCH branch1_
        where
            this_.UUID=branch1_.CUSTOMER_UUID
            and (
                branch1_.NAME like ?
    RESULT:
    Customername: Customer_A
    Customername: Customer_F
    Customername: Customer_D
    Customername: Customer_R
    Customername: Customer_S
    TIME:
    Hibernate: 1.343 sek
    JDBC:
    QUERY:
    Select distinct c.* from Customer c, Branch b where b.id=b.Customer_id and b.name like '%Branch%'
    // After getting the result of the query: Create a list of Customer-objects. Set all attributes of each Customer-object.
    RESULT:
    Customername: Customer_R
    Customername: Customer_A
    Customername: Customer_S
    Customername: Customer_D
    Customername: Customer_F
    TIME:
    JDBC: 0.125 sek
    The Customer.hbm.xml (auto-generated in Eclipse with Middlegen)
    <?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>
    <!--
        Created by the Middlegen Hibernate plugin 2.2
        http://boss.bekk.no/boss/middlegen/
        http://www.hibernate.org/
    -->
    <class
        name="hibernate.hibernate.Customer"
        table="CUSTOMER"
        lazy="false"
    >
        <id
            name="uuid"
            type="java.lang.String"
            column="UUID"
        >
            <generator class="assigned" />
        </id>
        <property
            name="name"
            type="java.lang.String"
            column="NAME"
            length="100"
        />
        <property
            name="customerno"
            type="java.lang.Integer"
            column="CUSTOMERNO"
            length="5"
        />
        <property
            name="shortdesc"
            type="java.lang.String"
            column="SHORTDESC"
            length="50"
        />
        <property
            name="longdesc"
            type="java.lang.String"
            column="LONGDESC"
            length="100"
        />
        <property
            name="taxnumber"
            type="java.lang.String"
            column="TAXNUMBER"
            length="50"
        />
        <property
            name="salestaxid"
            type="java.lang.String"
            column="SALESTAXID"
            length="50"
        />
        <property
            name="accountholder"
            type="java.lang.String"
            column="ACCOUNTHOLDER"
            length="50"
        />
        <property
            name="bankaccount"
            type="java.lang.String"
            column="BANKACCOUNT"
            length="50"
        />
        <property
            name="bankcode"
            type="java.lang.String"
            column="BANKCODE"
            length="50"
        />
        <property
            name="bankname"
            type="java.lang.String"
            column="BANKNAME"
            length="50"
        />
        <property
            name="area1text"
            type="java.lang.String"
            column="AREA1TEXT"
            length="50"
        />
        <property
            name="area2text"
            type="java.lang.String"
            column="AREA2TEXT"
            length="50"
        />
        <property
            name="area3text"
            type="java.lang.String"
            column="AREA3TEXT"
            length="50"
        />
        <property
            name="area4text"
            type="java.lang.String"
            column="AREA4TEXT"
            length="50"
        />
        <property
            name="area5text"
            type="java.lang.String"
            column="AREA5TEXT"
            length="50"
        />
        <property
            name="chUuid"
            type="java.lang.String"
            column="CH_UUID"
            length="50"
        />
        <property
            name="reftext1"
            type="java.lang.String"
            column="REFTEXT1"
            length="50"
        />
        <property
            name="reftext2"
            type="java.lang.String"
            column="REFTEXT2"
            length="50"
        />
        <property
            name="reftext3"
            type="java.lang.String"
            column="REFTEXT3"
            length="50"
        />
        <!-- Associations -->
        <!-- bi-directional one-to-many association to Branch -->
        <set
            name="branches"
            lazy="true"
            inverse="true"
           cascade="all"
        >
            <key>
                <column name="CUSTOMER_UUID" />
            </key>
            <one-to-many
                class="hibernate.hibernate.Branch"
            />
        </set>
    </class>
    </hibernate-mapping>So, seems to me like Hibernate is also getting the data from the Branch-Table related to each Customer. Maybe this is the reason, why Hibernate is slower.
    But as you can see in the mapping-File of the customer, I wanted Branches to be lazy loaded.
    Do you have any ideas, why Hibernate is so much slower? Any hints for optimizing that code?
    Do you have any further tricks to optimize Hibernate? Unfortunately I am not allowed to make changes at the database, so I cannot e.g. set indices for optimization.
    However, I�m a Hibernate-Newbie. In fact, I just made this test and was very disappointed about its result, so I didn�t keep on working with Hibernate.
    But maybe you can proof me, that Hibernate is a good choice. If so, do you have any good resources (links, books) that help working with Hibernate in connection with JBOSS, describe how to map n:m relationships, show how to work with large results and so forth?
    Thanx for help,
    egon

  • (EJB-3) Can a many-to-one/one-to-may join field be part of a composite key?

    I've been setting up my first set of EJB-3 entites and I'm hitting an error I can't see the reason for. I don't have the code with me here- I'll add it to the thread tomorrow if there isn't a simple answer in the meantime.
    Two entity classes, Invoice and VatTotal. Invoice has a synthetic key, VatTotal is keyed on invoive id and vat code. VatTotals are children of the Invoice.
    So I code a Key class for the VatTotal entity, with Invoice and VatCode fields (VatCode is just a String). I define a ManyToOne property called invoice in VatCode and mark it @Id and a OneToMany field in Invoice called totals with type List<VatCode>
    Netbeans seems to accept it, but when I try and create the EntityManagerFactory (using Hibernate) it rejects the mappedBy=invoice on the OneToMany in Invoice.
    Does Hibernate accept ManyToOne properties as part of a composite key? Is there a problem using such a property in a OneToMany? Maybe I've done something dumb, but I can't see it.

    I don't think so. And I've seen some anomolies in the print preview (parts of messages getting cut off or munged up).

  • Org.hibernate.MappingException: invalid configuration  in hibernate

    hi,
    i am new to hibernate.
    while i am executing small program, below error occur.
    what can i do to solve this problem, plz help me.
    Error Code
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception occur:invalid configuration
    org.hibernate.MappingException: invalid configuration+
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1493)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
    at FirstExample.main(FirstExample.java:12)
    Caused by: org.xml.sax.SAXParseException: Document is invalid: no grammar found.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:465)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1490)
    ... 3 more
    Exception in thread "main" java.lang.NullPointerException
    at FirstExample.main(FirstExample.java:26)

    Thank u .
    I did all configuration properly by some guideline.
    But i got new error in my program.
    please reply me.
    This is my program
    *{color:#3366ff}Test.java{color}*
    import org.hibernate.HibernateException;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.Configuration;
    import event.Sample;
    public class Test {
    public static void main(String a[])throws HibernateException
    Session session=null;
    try
    SessionFactory sessionFactory=new Configuration().configure().buildSessionFactory();
    session=sessionFactory.openSession();
    System.out.println("Insert record ");
    Sample s=new Sample();
    s.setId(3);
    s.setName("Sundar");
    session.save(s);
    System.out.println("Sucessfully Saved");
    }catch(Exception e)
    System.out.println("Exception occur:"+e.getMessage());
    e.printStackTrace();
    }finally
    session.flush();
    session.close();
    *{color:#3366ff}Java Bean Sample.java{color}*
    package event;
    public class Sample {
    private int id;
    private String name;
    public int getId() {
    return id;
    public void setId(int id) {
    this.id = id;
    public String getName() {
    return name;
    public void setName(String name) {
    this.name = name;
    *{color:#3366ff}{color:#ff0000}hibernate.cfg.xml file{color}*
    *<?xml version="1.0" encoding="utf-8"?>*
    *<!DOCTYPE hibernate-configuration PUBLIC*
    *"-//Hibernate/Hibernate Configuration DTD 3.0//EN"*
    *"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">*
    *<hibernate-configuration>*
    * <session-factory>*
    * <!-- local connection properties -->*
    * <property name="hibernate.connection.url">*
    * jdbc:mysql://localhost:3306/test*
    * </property>*
    * <property name="hibernate.connection.driver_class">*
    * com.mysql.jdbc.Driver*
    * </property>*
    * <property name="hibernate.connection.username">root</property>*
    * <property name="hibernate.connection.password">server</property>*
    * <!-- property name="hibernate.connection.pool_size"></property -->*
    * <!-- dialect for MySQL -->*
    * <property name="dialect">*
    * org.hibernate.dialect.MySQLDialect*
    * </property>*
    * <property name="hibernate.show_sql">false</property>*
    * <property name="hibernate.transaction.factory_class">*
    * org.hibernate.transaction.JDBCTransactionFactory*
    * </property>*
    * <mapping resource="event/Sample.hbm.xml" />*
    * </session-factory>*
    *</hibernate-configuration>*
    *{color:#ff0000}{color:#000000}Sample.hbm.xml file{color}*
    *<?xml version="1.0" encoding="utf-8"?>*
    *<!DOCTYPE hibernate-mapping PUBLIC*
    * "-//Hibernate/Hibernate Mapping DTD//EN"*
    * "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >*
    *<hibernate-mapping package="event">*
    * <class name="Sample" table="sample" >*
    * <meta attribute="sync-DAO">true</meta>*
    * <property name="Id" column="id" type="integer" not-null="false" length="11" />*
    * <property name="Name" column="name" type="string" not-null="false" length="50" />*
    * </class>*
    *</hibernate-mapping>*
    *{color}{color}*
    *{color:#3366ff}
    This is my error.{color}*
    log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
    log4j:WARN Please initialize the log4j system properly.
    Exception occur:Could not parse mapping document from resource event/Sample.hbm.xml
    org.hibernate.InvalidMappingException: Could not parse mapping document from resource event/Sample.hbm.xml
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:575)
    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1593)
    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1561)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1540)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1514)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1434)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1420)
    at Test.main(Test.java:15)
    Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:508)
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:572)
    ... 7 more
    Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:465)
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:505)
    ... 8 more
    Exception in thread "main" java.lang.NullPointerException
    at Test.main(Test.java:29)

  • Write Behind HibernateCacheStore with Composite id entity

    I am creating a cache map whose key is the primary key of a table, and it is composite. Coherence is not letting me store these composite objects using HibernateCacheStore, and throws the following error.
    Conflicting identifier information between entity IntradayMarketData@1784427 and id IntradayMarketDataPK@ad455e8d
    Coherence document says the following.
    Hibernate entities accessed via the HibernateCacheStore module must use the "assigned" ID generator and also have a defined ID property.
    When I remove the composite key, and keep a single column as pk, it works fine.
    Any help regarding this would be appreciated.
    Thanks in advance
    Booshan

    Hi Booshan,
    I believe, you mix things up a bit.
    It is required by Coherence that the cache key must be the primary key as Hibernate uses it, so that when Coherence tries to resolve a cache miss (you request the value for a key which is not already in the cache, it will request that object from Hibernate by the cache key used where Hibernate expects the primary key. From what you write, this requirement is satisfied.
    The HibernateCacheStore requires that an assigned ID generator should be used only means that you must assign the new primary key value to an object yourself, you cannot rely on Hibernate to do so. This is required so that you are able to satisfy the previous requirement, and the primary key fields must be set within the cached value to the same value represented by the primary key object.
    So all you need is to set the primary key attributes in the entity to the same value as contained in the composite primary key object as used by Hibernate. Also this class must implement java.io.Serializable, but that is required by Hibernate, too.
    Also, for being able to use the key class as a key in a hash-based collection, the key class must properly override hashCode() and equals(). Please look at the requirements for this in the Javadoc of java.lang.Object.
    For performance reasons it is recommended for the key class to also implement com.tangosol.io.ExternalizableLite.
    E.g. in your case, using what I can from your example, your key class would look something like:
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.util.ExternalizableHelper;
    public class IntradayMarketDataPK implements ExternalizableLite
        private String left;
        private long right;
         * Parameterless constructor required by implementing ExternalizableLite
        public IntradayMarketDataPK() {
        public String getLeft()
            return left;
        public void setLeft(String left)
            this.left = left;
        public long getRight()
            return right;
        public void setRight(long right)
            this.right = right;
        @Override
        public void readExternal(DataInput input) throws IOException
            left = ExternalizableHelper.readSafeUTF(input);
            right = ExternalizableHelper.readLong(input);
        @Override
        public void writeExternal(DataOutput output) throws IOException
            ExternalizableHelper.writeSafeUTF(output, left);
            ExternalizableHelper.writeLong(output, right);
        @Override
        public boolean equals(Object obj)
            if (obj == this) {
                return true;
            if (obj == null) {
                return false;
            if (obj.getClass() == this.getClass()) {
                IntradayMarketDataPK other = (IntradayMarketDataPK)obj;
                if (other.right != right) {
                    return false;
                if (left == null) {
                    return other.left == null;
                } else {
                    return left.equals(other.left);
            return false;
        @Override
        public int hashCode()
            int hash = (int)(right ^ (right >>> 32));
            if (left != null) {
                hash ^= left.hashCode();
            return hash;
    }Your entity mapping should contain something like the following:
    <class name="IntradayMarketData" table="INTRADAY_MARKET_DATA">
      <composite-id name="pk" class="IntradayMarketDataPK">
        <key-property name="left" column="LEFT" />
        <key-property name="right" column="RIGHT" />
      </composite-id>
    </class>Your entity class should be something like:
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.io.Serializable;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.util.ExternalizableHelper;
    public class IntradayMarketData implements ExternalizableLite
        private IntradayMarketDataPK pk;
         * Public parameterless constructor required by implementing ExternalizableLite
        public IntradayMarketData() {
        public IntradayMarketDataPK getPk()
            return pk;
        public void setPk(IntradayMarketDataPK pk)
            this.pk = pk;
        @Override
        public void readExternal(DataInput input) throws IOException
            IntradayMarketDataPK pk = new IntradayMarketDataPK();
            pk.readExternal(input);
            this.pk = pk;
        @Override
        public void writeExternal(DataOutput output) throws IOException
            pk.writeExternal(output);
    }You should always ensure that if you put an IntradayMarketData object to the cache, then the pk attribute on it must already be set to the object used as a cache key.
    Best regards,
    Robert

  • ApplicationContext-hibernate.xml    con't  load

    My configuration is Spring2.5 netbeans6.0 Tomcat6.0.14 not having any single jar
    when i start my application it gives an error that applicationContext-hibernate.xml
    <code>
    SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [WEB-INF/applicationContext_1.xml]: Invocation of init method failed; nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1362)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:485)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:455)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:169)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:170)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:407)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:735)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:369)
    at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:251)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:190)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
    at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
    at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
    at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
    at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1138)
    at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
    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:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from invalid mapping
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:502)
    at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:595)
    at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1390)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1359)
    ... 38 more
    Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
    at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
    at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
    at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
    at org.dom4j.io.SAXReader.read(SAXReader.java:465)
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:499)
    </code>
    my applicationContext-hibernate.xml file is here
    <code>
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <!--
    - Application context definition for RoseIndia Login Application on Hibernate.
         -->
    <beans>
         <!-- ========================= RESOURCE DEFINITIONS ========================= -->
         <!-- Configurer that replaces ${...} placeholders with values from a properties file -->
         <!-- (in this case, JDBC-related settings for the dataSource definition below) -->
         <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
              <property name="location"><value>/WEB-INF/jdbc.properties</value></property>
         </bean>
         <!-- Local DataSource that works in any environment -->
         <!-- Note that DriverManagerDataSource does not pool; it is not intended for production -->
         <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
              <property name="driverClassName"><value>${jdbc.driverClassName}</value></property>
              <property name="url"><value>${jdbc.url}</value></property>
              <property name="username"><value>${jdbc.username}</value></property>
              <property name="password"><value>${jdbc.password}</value></property>
         </bean>
         <!-- JNDI DataSource for J2EE environments -->
         <!-- Hibernate SessionFactory -->
         <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
              <property name="dataSource"><ref local="dataSource"/></property>
              <property name="mappingResources">
              <list>
                   <value>roseindia/dao/hibernate/Login.hbm.xml</value>
              </list>
              </property>
              <property name="hibernateProperties">
                   <props>
                        <prop key="hibernate.dialect">${hibernate.dialect}</prop>
                        <prop key="hibernate.show_sql">true</prop>
                   </props>
              </property>
         </bean>
         <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
         <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
              <property name="sessionFactory"><ref local="sessionFactory"/></property>
         </bean>
         <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->
         <!--
         Data access object: Hibernate implementation.
    -->
         <bean id="HibernateSpringDaoTarget" class="roseindia.dao.SpringHibernateDAOImpl">
              <property name="sessionFactory"><ref local="sessionFactory"/></property>
         </bean>
         <!--
              - Transactional proxy for Login Application central data access object.
              - Defines specific transaction attributes with "readOnly" markers,
              - which is an optimization that is particularly valuable with Hibernate
              - (to suppress unnecessary flush attempts for read-only operations).
              - Note that in a real-life app with multiple transaction proxies,
              - you will probably want to use parent and child bean definitions
              - as described in the manual, to reduce duplication.
    -->
         <bean id="SpringHibernateDao" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
              <property name="transactionManager"><ref local="transactionManager"/></property>
              <property name="target"><ref local="HibernateSpringDaoTarget"/></property>
              <property name="transactionAttributes">
                   <props>
                        <prop key="get*">PROPAGATION_REQUIRED,readOnly</prop>
                        <prop key="find*">PROPAGATION_REQUIRED,readOnly</prop>
                        <prop key="load*">PROPAGATION_REQUIRED,readOnly</prop>
                        <prop key="store*">PROPAGATION_REQUIRED</prop>
                   </props>
              </property>
         </bean>
         <!-- Email Service-->
         <bean id="mailbean" class="roseindia.web.common.SendMail">
              <property name="strSmtp"><value>mail.waproductsuite.com</value></property>
         </bean>
    </beans>
    </code>

    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
    String jdbcURL="jdbc:oracle:thin:@"
    +"192.168.0.96"//jdbcHost
    +":1521"//port
    +":db12"//service name
    //Another format: DriverManager.getConnection("jdbc:oracle:oci8:@","user", "passwd");
    should work normally. If not, try to download a JDBC packag from Oracle site.

  • Anybody using Hibernate Synchronizer with NitroX?

    Anybody using Hibernate Synchronizer with NitroX?
    Does it work?
    Any problems?

    Hi Florian,
    Please check out this blog: Using Hibernate in SAP NetWeaver Composition Environment
    HTH!
    -- Vladimir

  • Hibernate doubt when make search

    Hello,
    yesterday I have got this problem:
    I have my java app that use Hibernate (3.0) for make search on DB (MySQl 5.0).
    If I sent a search method (with hibernate method "session.createCriteria"), sometimes it worked good, and sometime it gives me this error:
    org.hibernate.MappingException: Could not read mappings from resource: basket.hbm.xml
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
    at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
    at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
    at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
    at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
    at it.eminds.data.Basket.searchBasketInfo(Basket.java:406)
    at it.eminds.ws.basket.Basket.BasketWs.OTA_SearchBasketRQ(BasketWs.java:8926)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
    at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
    at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
    at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
    at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:834)
    at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
    at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1286)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.hibernate.MappingException: Could not parse mapping document in input stream
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:431)
    at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
    ... 36 more
    Caused by: org.dom4j.DocumentException: Connection timed out: connect Nested exception: Connection timed out: connect
    at org.dom4j.io.SAXReader.read(SAXReader.java:484)
    at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:422)
    I don't understand why I have this error "Could not read mappings from resource: basket.hbm.xml" if sometimes it works!.
    Can you please helpme to understand the problem (or cause)?? It's very URGENT!!
    Thanks,
    Francesco
    These are my hibernate xml file:
    hibernate.cfg.xml
    <?xml version='1.0' encoding='utf-8'?>
    <!DOCTYPE hibernate-configuration PUBLIC
    "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
    <session-factory>
    <property name="hibernate.connection.driver_class">com.sybase.jdbc3.jdbc.SybDriver</property>
    <property name="hibernate.connection.datasource">java:comp/env/jdbc/lmt</property>
    <property name="show_sql">true</property>
    <property name="dialect">org.hibernate.dialect.SybaseDialect</property>
    <property name="hibernate.hbm2ddl.auto">update</property>
    <!-- Mapping files -->
    <mapping resource="basket.hbm.xml"/>
    </session-factory>
    </hibernate-configuration>
    basket.hbm.xml :
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
         "-//Hibernate/Hibernate Mapping DTD 2.0//EN"
         "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
    <hibernate-mapping>
         <!-- it.eminds.data.Basket root -->
         <class name="it.eminds.data.Basket" table="Basket">
              <composite-id>
                   <key-property name="id" column="id" />
                   <key-property name="bookID" column="bookID"/>
              </composite-id>     
              <property name="utente" type="string" >
                   <column name="utente" not-null="false" sql-type="text"/>
              </property>
              <property name="carteDiCredito" type="string" >
                   <column name="carteDiCredito" not-null="false" sql-type="text"/>
              </property>
              <property name="cliente" type="string" >
                   <column name="cliente" not-null="false" sql-type="text"/>
              </property>
              <property name="spedizione" type="string" >
                   <column name="spedizione" not-null="false" sql-type="text"/>
              </property>
              <!--<property name="bookID" column="bookID" type="string" length="16"/>-->
              <property name="dataBooking" column="dataBooking" type="timestamp"/>
              <property name="bookId_Gest" column="bookId_Gest" type="string" length="16"/>
              <property name="pos" type="string" >
                   <column name="pos" not-null="false" sql-type="text"/>
              </property>
              <!-- tabella Array servizi type="boolean" -->
              <bag name="servizi" cascade="all">
    <key>
         <column name="uid" />
         <column name="ubookID" />
    </key>
    <one-to-many class="it.eminds.data.ServiceBasket"/>
    </bag>
         </class>
    <class name="it.eminds.data.ServiceBasket" table="serviceBasket">
              <id name="id" unsaved-value="0">
    <generator class="increment"/>
    </id>
         <property name="pax" type="string" >
         <column name="pax" not-null="false" sql-type="text"/>
         </property>
         <property name="RQBook" type="string" >
              <column name="RQBook" not-null="false" sql-type="text"/>
         </property>      
         <property name="RSBook" type="string">
              <column name="RSBook" not-null="false" sql-type="text"/>
         </property>
         <property name="RSPrev" type="string">
              <column name="RSPrev" not-null="false" sql-type="text"/>
         </property>
         <property name="Type" column="Type" type="integer"/>
                   <property name="idServizio" column="idServizio" type="integer"/>
                   <property name="failed" column="failed" type="string" length="12" />
                   <property name="invoiceNumber" column="invoiceNumber" type="string" length="12" />
                   <property name="notaNumber" column="notaNumber" type="string" length="12" />
                   <property name="startDate" column="startDate" type="timestamp"/>
                   <property name="correlation" column="correlation" type="string" length="10" />
    </class>
    </hibernate-mapping>

    Hi,
    you can override the query listener on the af:query component and if your complex condition is not met, show an error message (either you show an FacesMessage message or open a popup dialog) and don't execute the query
    See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf
    and
    "http://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf" (page 15) http://www.oracle.com/technetwork/developer-tools/adf/learnmore/85-querycomponent-fieldvalidation-427197.pdf
    The latter document is needed as af:query supports switching view criterias (and thus searches) in which case your field dependencies may change
    Frank

Maybe you are looking for

  • How do I reduce the size of photos to use on website?

    Thanks to the helpful person who recommended I use Rapidweaver to build a website, I am slowly getting somewhere. It is so simple and just like Apple applications that I think I can do this. My problem now is that when I tried to transfer a photo fro

  • XSLT mapping tools

    Hi all I have a scenario in which i have to map from xsd to wsdl,but client requirements are as such that I have to use XSLT mapping.To the best of knowledge I have stylus studio does not support mapping in which wsdl is involved.What are the tools t

  • Which Aggregation Rule to be followed?

    I have a logical Fact table A with logical table sources B,C,D B,C are Dimension and D is the Fact. And they are joined as follows Dim B---> Dim C---->Fact D So whenever i choose a metric from the Fact D its has to compulsorily go through these joins

  • Edit data using OEM grid

    Hi Friends, I want to edit tale data using the grid (view-edit contents) of tables of OEM 10g(cleant console) but the update/edit button is disabled. How do I enable it please. You know its very handy for dba/apps dev to use this feature (like toad).

  • Images displayed strangely in Firefox

    So, I have this bizarre issue with firefox.  Some images (but not all) get displayed with very strange colours. For example: And how this image should look: This only occurs in firefox.  I have tried removing the ~/.mozilla directory, to no effect.