Proper JPA mapping for MySQL SET type?

If I have a MySQL ENUM type, it seems straightforward to map it to "int" in Java. However, what about a MySQL SET type? I don't see an obvious way that that should be mapped to Java. I looked for examples of this, but I couldn't find any.
if there's a better place to ask questions about this, please direct me.

Hi Vinod,
due to performance improvement when using forward only cursor we changed the default for the resultset type from TYPE_SCROLL_SENSITIVE to TYPE_FORWARD_ONLY starting with JDBC driver version 7.6. So I guess the exception comes from a statement where you didn't set the resultset type while creating it. Please check if all of the statements that you want to be scrollable have set the correct resultset type.
Regards,
Marco

Similar Messages

  • The operation is not allowed for result set type FORWARD_ONLY

    Hi,
    I am trying to use scroll insensitive resultset in following manner-
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
    ResultSet rs = stmt.executeQuery("some sql here");
    rs.last();
    but the rs.last() throws this exception-
    com.sap.dbtech.jdbc.exceptions.SQLExceptionSapDB: The operation is not allowed for result set type FORWARD_ONLY.
         at com.sap.dbtech.jdbc.ResultSetSapDB.assertNotForwardOnly(ResultSetSapDB.java:2725)
         at com.sap.dbtech.jdbc.ResultSetSapDB.last(ResultSetSapDB.java:557)
    Database version: Kernel    7.5.0    Build 019-121-082-363
    Driver Version: MaxDB JDBC Driver, MySQL MaxDB, 7.6.0    Build 030-000-005-567
    This used to work with 7.5 version driver. Why this is failing with 7.6 driver, any clues?
    Thanks,
    Vinod

    Hi Vinod,
    due to performance improvement when using forward only cursor we changed the default for the resultset type from TYPE_SCROLL_SENSITIVE to TYPE_FORWARD_ONLY starting with JDBC driver version 7.6. So I guess the exception comes from a statement where you didn't set the resultset type while creating it. Please check if all of the statements that you want to be scrollable have set the correct resultset type.
    Regards,
    Marco

  • SMW01 - A key was used twice for multirow set type COMM_PR_CATEGORY

    Hi experts!
    I'm facing with next problem:
    - after we delete product by program COM_PRODUCT_DELETE_SINGLE.
    - now we using r3ar2-r3ar4 for replicate existing materials from r/3
    and receive followng error in bdoc's (smw01)
    "A key was used twice for multirow set type COMM_PR_CATEGORY" COM_PRODUCT 512
    "Validation error occurred: Module COM_PRODUCT_MAT_VALIDATE, BDoc type PRODUCT_MAT." SMW3 18
    Can anybody help me?
    Thanks.

    Hi Hon,
    In my scenario there was a customizing error regarding TAXes, I solved it checking mlan registries.
    Have a close look on the error mine was: A key was used twice for multirow set type CRMM_PR_TAX.
    Then check on SMW01 the segment that stores this info. and look for inconsistencies.
    Regards,
    Pedro

  • Best Practices to update Cascading Picklist mapping for Account record type

    1. Most of the existing picklist values name in parent and related picklist has been modified in external app master list, so the same needs to be updated in CRMOD.
    2. If we need to update picklist value, do we need to DISABLE the existing value and CREATE a new picklist.
    3. Is there any Best Practices to avoid doing Manual Cascading picklist mapping for Account record type? because we have around 500 picklist values to be mapped with parent and related picklist.
    Thanks!

    Mahesh, I would recommend disabling the existing values and create new ones. This means manually remapping the cascading picklists.

  • GL Mapping for Loan Wage Types

    I want to understand the mapping of Loan Wage types. We have only 3 situations(Payment Payroll, Repayment Payroll, Special Repayment Payroll) in Loans
    /LOP   Loan payment - payroll
    Dr 3200     ER loans     F
    /LRP     Regular repayment
    Cr  3200     ER loans     F
    /LEP   Special Payroll Repayment
    Cr  3200     ER loans     F
    /LEP   Special Payroll Repayment
    Cr  3200     ER loans     F
    Balance Sheet Account:
    3200             210000
    Is this done or I am suppose to do more?
    Thanks

    I hope 3 wagetypes assigned to one symbolic a/c 3200 and this is assigned to one GL a/c 210000.
    Check the configuration once again in tables V_T52EK symbolic a/c , V_T52EL for assignment of symbolic a/c to WT and transaction OBYG for assignment of symbolic a/c to GL account.
    Run payroll for one employee in Development server with Loans and check the results and postings...
    Mohan

  • How to main multiple attributes for set type R E W ARD_PRO_LOY using IDOC?

    Hi,
    I'm now trying to add the set type and attributes to my products existing in the CRM system. I decided to use LSMW and IDOC CRMXIF_PRODUCT_MATERIAL_SAVE to maintain the set type and attributes.
    I successfully maintained the categories for the products and also assigned the set type. Now I need to add the attributes for this set type, where there are 3:
    LMPRODUCT_TYPE
    LOYPRODUCT_UNIT
    LMPRODUCT_VALUE
    But because in the IDOC structure only one attribute can be maintained at one time, how can I input all those 3 attributes together? Thanks a lot.

    I tried to insert one data field first then update it by the second attributes, but then the system assigned two separated lines of data to my set type....

  • WS 3.2, Kodo 4, JPA mapping of CLOB

    The problem that I have is related to JPA CLOB mapping. Underlying oracle table has a CLOB field. DbXplorer correctly recognize the type of the column as CLOB but when I generate JPA mapping for the table, the CLOB column is mapped to Object without @Lob annotation.
    <i>
    private Object payload;
    @Basic()
    @Column(name="PAYLOAD", length=4000)
    public Object getPayload() {
    return this.payload;
    public void setPayload(Object payload) {
    this.payload = payload;
    </i>
    Such a class is compiled but not ENHANCED (I opened .class file in editor and it did not implemented kodo.enhance.PeristenceCapable). No errors at all. When I manually added @Lob() annotation and changed Object to String, it was enhanced, but when I read the data, CLOB field was ‘null’ and the rest of columns populated with correct data. I updated such an object with a new data and it was written to database. The next read was the same – gived me a ‘null’ value for CLOB field.
    Am I missing something? Please help.

    Download the latest 10g oracle jdbc driver (supports 9.2 database), mapping still DOES NOT work (doesn't generate @Lob annotation but java.sql.Clob object), running is OK.

  • How to add Z set types in Web UI

    Hello ,
    We have created Z set types with 4/5 attributes & assigned it into a Z category. The Z set types are showing in GUI in individual objects but when trying to add these set types in Web UI it;s not showing either in BSP component PRD01OV or PRDIOOV as available AB's.
    Performed following activities
    1.  identifying enhancement set.
    2.  Assignement of set types to OV page
    3. create config for the set types.
    Note: Also tried with enhanced view --> PRDIOOV/CustomHeader for the set types but not showing the AB's.
    Please Advice.
    Regards
    DB

    Hi,
    in the IMPL class of PRDIOOV there is a method:
    REATTACH_STATIC_OVW_VIEWS
    I do not know why SAP requires this - but you have to redefine this method to attach your Z settype assignmentblock like this:
    CALL METHOD SUPER->REATTACH_STATIC_OVW_VIEWS
      RECEIVING
        RT_RETURN = RT_RETURN
    DATA: LS_REATTACH TYPE  BSP_DLC_OVW_STAT_VIEW_ATTACH.
    ls_reattach-viewid = 'ZOBJECTS.Z_BPKASTOVIEWS/ObjTicketsW'.
    APPEND ls_reattach TO rt_return.
    *add Service contract view as well
    ls_reattach-viewid = 'ZOBJVERTRAG.Z_BPKASTOVIEWS/ObjVertragW'.
    APPEND ls_reattach TO rt_return.
    Kind regards
    Manfred

  • Getting a set type data to CRMD_ORDER

    Hi Experts,
      I have created a new settype which has 2 attributes .I need to show these attributes in Sales Order Line Item level.
    I know there is a BADI CRM_CUSTOMER_I_BADI which gives me the freedom to show my own screen in the sales order screen(additiional tab).
    I need to show the details in an existing tab. Is there a way to acheive this?
    Please help.
    Thanks

    Hi,
    For Example Enhancing product workbench Commpr01 in CRM for any Product category or somthing, we will use set type concept in CRM,for creating set types we need to go EEWB workbench  and create .while creation of set types in EEWB itself it will  have one option "Create BW extractor".So just we need to select that option system will create set type data source for the same.Delta will be based on Change pointer and it will use push technology.so just u need to ask your CRM IT team to select that option .u dont need to create data source in RSO2.
    See the properties of Set type data source
    Extraction Methods -  F1
    Extractor           - COM_GENERIC_FULL_UPLOAD(its common for all data sources generated through set type concept)
    Extract Structure    ZZSET*
    Gen. Interface       X.
    Delta Process        AIM
    Delta Test Possible  X
    DeltaInit Simu       1
    U can see these propeties in RSA2
    Regards,
    Jyothi

  • Set Type Extractor

    Hi all ,
       I have a custom set type ZSETTYPE1 which has custom attributes ZCUST1 ,  
       ZCUST2.And all of the attributes are checked as "BW Relevant".Now the issue
       is when i see the datasource for this set type it doesnot have any source from
       which it would fetch data , none of (DB View , Function Module , Infoset).
       Now i want to know where should i write the code (BADI) from which this
       datasource based on the set type would get the data.
    Regards
    Suraj

    dude can u tell how did u create a user defined set type apart from standard govern by SAP
    i even tried to create attributes through comm_attribute
    best regards
    madhup

  • Set Types not in IDOC

    Dear Experts,
    Currently I am working on an interface between CRM 6.0 and XI to deliver product specific information, including customer fields.
    I am using the BDOC type PRODUCT_MAT.
    The customer fields have been implemented through set types in transaction comm_attrset. For each set type an API append was created successfully through function u201CSet types/attributesu201D > u201CTransportu201D > u201CSet Typeu201D.
    The set types are available in the API structure of the BDOC PRODUCT_MAT (structure COMT_PROD_MATERIAL_BDOC_TAB). But the set types are not available in the generated IDOC (I use the function module CRMXIF_PRODUCT_MATERIAL_SAVE to generate the IDOC...).
    Has anybody of you an idea why the set types are not in the IDOC / how to get the set types into the IDOC?
    Thanks in advance,
    Alex

    Dear Vamsi,
    Thanku2019s for your reply. I checked the module CRMXIF_PRODUCT_MATERIAL_SAVE, but it has no output structure named CUSTOMER_SET_DATA which could hold the set types.
    Any other hints?
    At the moment I am wondering what might be the general process to add set types to IDOCs? Are set types generally also added to IDOCs as soon as they are generated and added to BDOCS, or is there a different mechanism like generating the IDOC structure from the BDOC structure?
    Thanks for any answers in advance!
    Regards,
    Alex

  • Not assigned set type to category

    Hi, GURU!
    I want to assign set type COMM_PR_MAT to my category in transactional COMM_HIERARCHY, but i don't see this set type in the list. I find this set type (COMM_PR_MAT) in transaction COMM_ATTRSET (Search for predefined set types).
    How to assign set type COMM_PR_MAT to my category?

    Hi,
    You must ensure that the product type for both the category as well as set type. Only then will the set type appear in the list for selection in the category tab in COMM_HIERARCHY.
    Set types cannot be assigned to a hierarchy directly as mentioned in your post.

  • Issue with xsd Data type mapping for collection of user defined data type

    Hi,
    I am facing a issue with wsdl for xsd mapping for collection of user defined data type.
    Here is the code snippet.
    sample.java
    @WebMethod
    public QueryPageOutput AccountQue(QueryPageInput qpInput)
    public class QueryPageInput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class QueryPageOutput implements Serializable, Cloneable
    protected Account_IO fMessage = null;
    public class Account_IO implements Serializable, Cloneable {
    protected ArrayList <AccountIC> fintObjInst = null;
    public ArrayList<AccountIC>getfintObjInst()
    return (ArrayList<AccountIC>)fintObjInst.clone();
    public void setfintObjInst(AccountIC val)
    fintObjInst = new ArrayList<AccountIC>();
    fintObjInst.add(val);
    Public class AccountIC
    protected String Name;
    protected String Desc;
    public String getName()
    return Name;
    public void setName(String name)
    Name = name;
    For the sample.java code, the wsdl generated is as below:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    name="SimpleService"
    targetNamespace="http://example.org"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:tns="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    >
    <wsdl:types>
    <xs:schema version="1.0" targetNamespace="http://examples.org" xmlns:ns1="http://example.org/types"
    xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://example.org/types"/>
    <xs:element name="AccountWSService" type="ns1:accountEMRIO"/>
    </xs:schema>
    <xs:schema version="1.0" targetNamespace="http://example.org/types" xmlns:ns1="http://examples.org"
    xmlns:tns="http://example.org/types" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:import namespace="http://examples.org"/>
    <xs:complexType name="queryPageOutput">
    <xs:sequence>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="accountEMRIO">
    <xs:sequence>
    <xs:element name="fIntObjectFormat" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageType" type="xs:string" minOccurs="0"/>
    <xs:element name="fMessageId" type="xs:string" minOccurs="0"/>
    <xs:element name="fIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fOutputIntObjectName" type="xs:string" minOccurs="0"/>
    <xs:element name="fintObjInst" type="xs:anyType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="queryPageInput">
    <xs:sequence>
    <xs:element name="fPageSize" type="xs:string" minOccurs="0"/>
    <xs:element name="fSiebelMessage" type="tns:accountEMRIO" minOccurs="0"/>
    <xs:element name="fStartRowNum" type="xs:string" minOccurs="0"/>
    <xs:element name="fViewMode" type="xs:string" minOccurs="0"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://example.org"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://example.org" xmlns:ns1="http://example.org/types">
    <import namespace="http://example.org/types"/>
    <xsd:complexType name="AccountQue">
    <xsd:sequence>
    <xsd:element name="arg0" type="ns1:queryPageInput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQue" type="tns:AccountQue"/>
    <xsd:complexType name="AccountQueResponse">
    <xsd:sequence>
    <xsd:element name="return" type="ns1:queryPageOutput"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="AccountQueResponse" type="tns:AccountQueResponse"/>
    </schema>
    </wsdl:types>
    <wsdl:message name="AccountQueInput">
    <wsdl:part name="parameters" element="tns:AccountQue"/>
    </wsdl:message>
    <wsdl:message name="AccountQueOutput">
    <wsdl:part name="parameters" element="tns:AccountQueResponse"/>
    </wsdl:message>
    <wsdl:portType name="SimpleService">
    <wsdl:operation name="AccountQue">
    <wsdl:input message="tns:AccountQueInput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    <wsdl:output message="tns:AccountQueOutput" xmlns:ns1="http://www.w3.org/2006/05/addressing/wsdl"
    ns1:Action=""/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="SimpleServiceSoapHttp" type="tns:SimpleService">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="AccountQue">
    <soap:operation soapAction=""/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="SimpleService">
    <wsdl:port name="SimpleServicePort" binding="tns:SimpleServiceSoapHttp">
    <soap:address location="http://localhost:7101/WS-Project1-context-root/SimpleServicePort"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>
    In the above wsdl the collection of fintObjInst if of type xs:anytype. From the wsdl, I do not see the xsd mapping for AccountIC which includes Name and Desc. Due to which, when invoking the web service from a different client like c#(by creating proxy business service), I am unable to set the parameters for AccountIC. I am using JAX-WS stack and WLS 10.3. I have already looked at blog http://weblogs.java.net/blog/kohlert/archive/2006/10/jaxws_and_type.html but unable to solve this issue. However, at run time using a tool like SoapUI, when this wsdl is imported, I am able to see all the params related to AccountIC class.
    Can some one help me with this.
    Thanks,
    Sudha.

    Did you try adding the the XmlSeeAlso annotation to the webservice
    @XmlSeeAlso({<package.name>.AccountIC.class})
    This will add the schema for the data type (AccountIC) to the WSDL.
    Hope this helps.
    -Ajay

  • Error message "Data cannot be maintained for set type COMM_PR_PUR_1

    Hi
    While replicating the material master through R3AS I am getting an error for which the details to be checked in SMW01. In SMW01 when I selected the record for error details I am getting above error message.  How to resolve ? Pls guide me stepwise. For your information I has cleared SMQ1 in R3 & SMQ2 in SRM
    For curioisity next I selected all such error logs & deleted. It gave me one warning (some inconstinecies error) which I ignored. After that I checked SMQ1 of R3 & SMQ2 of SRM. No log
    But I observed a strange thing. Whatever material codes I am creating it is going straightway to SRM without running R3AS transaction. I checked R3AM1, selected the row and cancelled. But still going without any interferrance. Why ? How shall I stop this.
    Thanks

    Hello,
    >
    BNR wrote:
    > Hi
    > While replicating the material master through R3AS I am getting an error for which the details to be checked in SMW01. In SMW01 when I selected the record for error details I am getting above error message.  How to resolve ? Pls guide me stepwise. For your information I has cleared SMQ1 in R3 & SMQ2 in SRM
    >(...)
    Have a look at OSS note 1049693 - Data cannot be maintained for set type COMM_PR_PUR_1.
    Regards.
    Laurent.

  • How to set class path for mysql

    hai, I have been trying to make a java program read from mysql database. but i don't know how to set the class path for mysql-connector-java-5_1_.0.6-bin. i set the class path in system variable as C:\Program Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-java-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java and run java abc.
    when run it come out error java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.

    hai, I have been trying to make a java program read
    from mysql database. but i don't know how to set the
    class path for mysql-connector-java-5_1_.0.6-bin. i
    set the class path in system variable as C:\Program
    Files\Java\jdk1.5.0_08\jre\lib\ext\mysql-connector-jav
    a-5_1_.0.6-bin.
    in the command prompt, i compile C:\javac abc.java
    and run java abc.
    when run it come out error
    java.lang.ClassNotFoundException:
    com.mysql.jdbc.Driver
    i am using Window xp. can anybody help me??? TQ.Right click on my computer icon,
    Goto properties->advanced->environment variables.
    Look for 'classpath' under system variable.
    Select it and click edit.
    put ';' and path of the mysql connector jar at the end
    suppose if u have jar file under d:/driver/mysqlconnector.jar
    thn put this value in variable value text box
    ;d:/driver/mysqlconnector.jar
    or simply put ur driver jar file in jre/lib/ext folder
    D:\j2sdk1.4.2_03\jre\lib\ext
    [Servlet tutorial|http://www.jsptube.com]

Maybe you are looking for

  • Fast busy signal with incoming calls and unable to connect to voice mail

    We are using CISCO 2821. The system started to have problem connecting to voice mailbox (when dialing internally to the VM extension) and it used to take a reboot to bring it back. Now it will not connect to voice mail (gets fast busy signal), plus i

  • How to merge data in BW from R3 and a legacy source

    Hi I would like to combine data from R3 and from a legacy system in BW as follows: I have two similar info objects: One info object contains the stuff from R3 (which contains some history but basically the data is just really well maintained starting

  • ALV LIST with few checkboxes fields

    Hi everyone, I want to create an ALV with 2 fields that are checkboxes. I am succeeding to create an ALV with one checkbox field. How do we do in order to create an ALV with 2 checkboxes fields using ALV LIST ? I know that we have to specify in the l

  • TREX installation problems

    I have EP 6.0.2.4.7 on MSS 8.0, J2EE pl 22 The Portal is up. I tried to install TREX on the same server. However I had not installed the IIS before I started. I got an error during the TREX install about creating a site in IIS. So I decided to uninst

  • Installer labview RT sur pxi 8106

    Bonjour, Je possède un contrôlleur PXI 8106 sur lequel est installé Linux. Je souhaiterai installer à la place un Labview RT dessus. Quelle est la procédure ? Merci