How to handle "xsd:anyAttributes" with jaxb
Need help for how to handling "xsd:anyAttribute" with jaxb!
Here is part of my xml schema.
<xsd:attributeGroup name="DataAttributes">
<xsd:anyAttribute namespace="##local" processContents="lax"/>
</xsd:attributeGroup>
<xsd:element name="Data">
<xsd:complexType>
<xsd:attributeGroup ref="DataAttributes"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="MA_Verify">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="Data" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
<xsd:attributeGroup ref="verifyAttributes"/>
</xsd:complexType>
</xsd:element>
I have an application which only knows the attribute names and values at runtime. (Thest attributes are string.) Therefore, I cannot define attribute names in the schema and have to use xsd:anyAttribute.
I was able to generate all jaxb code. However, the interfaces generated for Data and DataType are basically all empty. The impl classes are empty too, since no get or set methods exist for the attribute.
Some thoughts for handling this case, but do not know if it will work.
(1) write some derive classes on top of the generated jaxb classes.
(2) write customized method to handle the 'Data' element level and its attributes. Similar to parseMethod or printMethod for the javaType.
(if there is a way)
Can anyone give me suggestions, directions or an laternate way to handle the situation?
Your help will be greatly appreciated.
Ruth
xsd:anyAttribute is not supported by JAXB.
http://java.sun.com/xml/jaxb/users-guide/jaxb-works.html#unsupported
Similar Messages
-
How to handle Table controls with XD01 in BDC
How to handle Table controls with XD01 in BDC - If there are more than 5/6 records in Table control. - Can any one explain it with a piece of code plz..
Thanks & Regards,
Krishna ChaitanyaHi
check this code...viz for xko1....
DATA: BEGIN OF it_xk01 OCCURS 0,
f1(1),
f2(5),
f3(5),
f4(9),
f5(9),
END OF it_xk01.
DATA: v_count(2) VALUE '00',
v_koinh(14),
v_banks(14),
v_bankn(14),
v_bankl(14),
it_bdcdata TYPE STANDARD TABLE OF bdcdata WITH HEADER LINE,
wa_ctuparams type ctu_params.
PARAMETERS: p_file TYPE rlgrap-filename OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
PERFORM get_f4.
START-OF-SELECTION.
PERFORM upload_data.
END-OF-SELECTION.
LOOP AT it_xk01.
IF it_xk01-f1 = 'H'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0100'.
PERFORM bdc_field USING 'BDC_CURSOR'
'RF02K-KTOKK'.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING 'RF02K-KTOKK'
it_xk01-f2.
ENDIF.
IF it_xk01-f1 = 'N'.
PERFORM bdc_dynpro USING 'SAPMF02K' '0110'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-PSTLZ'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
PERFORM bdc_field USING 'LFA1-ANRED'
'Mr'.
PERFORM bdc_field USING 'LFA1-NAME1'
it_xk01-f2.
PERFORM bdc_field USING 'LFA1-SORTL'
it_xk01-f3.
PERFORM bdc_field USING 'LFA1-PSTLZ'
it_xk01-f4.
PERFORM bdc_field USING 'LFA1-LAND1'
it_xk01-f5.
PERFORM bdc_dynpro USING 'SAPMF02K' '0120'.
PERFORM bdc_field USING 'BDC_CURSOR'
'LFA1-KUNNR'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=VW'.
ENDIF.
IF it_xk01-f1 = 'I'.
v_count = v_count + 1.
IF v_count le 5.
CONCATENATE 'LFBK-KOINH(' v_count ')' INTO v_koinh.
CONCATENATE 'LFBK-BANKS(' v_count ')' INTO v_banks.
CONCATENATE 'LFBK-BANKN(' v_count ')' INTO v_bankn.
CONCATENATE 'LFBK-BANKL(' v_count ')' INTO v_bankl.
CONDENSE v_koinh NO-GAPS.
CONDENSE v_banks NO-GAPS.
CONDENSE v_bankl NO-GAPS.
CONDENSE v_bankn NO-GAPS.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
v_koinh.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
PERFORM bdc_field USING v_banks
it_xk01-f2.
PERFORM bdc_field USING v_bankl
it_xk01-f3.
PERFORM bdc_field USING v_bankn
it_xk01-f4.
PERFORM bdc_field USING v_koinh
it_xk01-f5.
else.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
v_koinh.
PERFORM bdc_field USING 'BDC_OKCODE'
'=P+'.
v_count = 1.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
v_koinh.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
CONCATENATE 'LFBK-KOINH(' v_count ')' INTO v_koinh.
CONCATENATE 'LFBK-BANKS(' v_count ')' INTO v_banks.
CONCATENATE 'LFBK-BANKN(' v_count ')' INTO v_bankn.
CONCATENATE 'LFBK-BANKL(' v_count ')' INTO v_bankl.
CONDENSE v_koinh NO-GAPS.
CONDENSE v_banks NO-GAPS.
CONDENSE v_bankl NO-GAPS.
CONDENSE v_bankn NO-GAPS.
PERFORM bdc_field USING v_banks
it_xk01-f2.
PERFORM bdc_field USING v_bankl
it_xk01-f3.
PERFORM bdc_field USING v_bankn
it_xk01-f4.
PERFORM bdc_field USING v_koinh
it_xk01-f5.
ENDIF.
ENDIF.
CLEAR it_xk01.
ENDLOOP.
PERFORM bdc_dynpro USING 'SAPMF02K' '0130'.
PERFORM bdc_field USING 'BDC_CURSOR'
v_koinh.
PERFORM bdc_field USING 'BDC_OKCODE'
'/00'.
perform bdc_dynpro using 'SAPLSPO1' '0300'.
perform bdc_field using 'BDC_OKCODE'
'=YES'.
wa_ctuparams-DISMODE = 'A'.
wa_ctuparams-UPDMODE = 'S'.
wa_ctuparams-DEFSIZE = 'X'.
CALL TRANSACTION 'XK01' USING it_bdcdata MODE 'A'
UPDATE 'S'.
options from wa_ctuparams.
MODE 'A'
UPDATE 'S'.
*& Form upload_data
text
FORM upload_data .
DATA: lv_infile TYPE string.
lv_infile = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_infile
filetype = 'ASC'
has_field_separator = 'X'
TABLES
data_tab = it_xk01.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " upload_data
*& Form get_f4
text
FORM get_f4 .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
FIELD_NAME = ' '
IMPORTING
file_name = p_file.
ENDFORM. " get_f4
Start new screen *
FORM bdc_dynpro USING program dynpro.
CLEAR it_bdcdata.
it_bdcdata-program = program.
it_bdcdata-dynpro = dynpro.
it_bdcdata-dynbegin = 'X'.
APPEND it_bdcdata.
ENDFORM. "BDC_DYNPRO
Insert field *
FORM bdc_field USING fnam fval.
IF FVAL <> NODATA.
CLEAR it_bdcdata.
it_bdcdata-fnam = fnam.
it_bdcdata-fval = fval.
APPEND it_bdcdata.
ENDIF.
ENDFORM. "BDC_FIELD
*H 0302
*N sdng dddsj 500020 IN
*I IN ICICI 734897597 xyz
*I IN SBH 768346687 abc
*I IN SBI 345687346 fgh
*I IN SBH 763846878 ujhgf
*I IN HSBC 797893778 fvdg
*I IN HDFC 723678638 fdgf
*I IN 4444 435645646 fgfg
*I IN 3400 763468768 gfgfg -
How to handle multiple clients with DatagramSocket
I am trying to handle multiple clients with 1 datagramSocket bind to one port (basically I have only one port to use, and I can not use TCP or any other ports). At the server side I have two threads one for receiving packets and buffering them, another for processing the packets in the buffer and sending replies.
I can have multiple clients sending datagramPackets to me and I will have to process the packets and send them to DIFFERENT clients. Ex. Client 1 sends datagramPacket to Server which sends the processed packet to Client 2. Also Client 2 sends a datagramPacket to Server which again processes the packet and sends it to Client1. May have Client 3 and 4 doing the same thing at the same time... and so on...
My root class is creating the datagramSocket(somePort) and two threads (receiver and sender). How can I use the socket that I created in these two threads??
I have done the following and I am getting "java.net.bindexception". When I am sending stuff from Client1 to Client2 everything is fine but when I start sending something from Client2 to Client 1, I get the bindexception... Client 1 is using port 3000, Client 2 is using port 4000.
I really don't have a lot of experience in socket programming so I am not sure if there is a much simpler way to do this. I appreciate all the tips and help that I can get...
Thanks...
class UDP_serv
static DatagramSocket udpSocket;
final static int SERVER_PORT = 2000;
public static void main(String[] args) throws SocketException
udpSocket= new DatagramSocket(SERVER_PORT);
new DataReceiver().start ();
new DataSender().start ();
static class DataReceiver extends Thread
DataReceiver()
Thread.currentThread().setName("DataReceiver");
public void run()
while (true)
byte pckt[] = new byte [MaxMsgSize];
DatagramPacket dp = new DatagramPacket (pckt, pckt.length);
try
udpSocket.receive (dp);
//PUSH TO RECEIVE BUFFER
catch(Exception e)
e.printStackTrace();
static class DataSender extends Thread
DataSender()
Thread.currentThread().setName("DataSender");
public void run()
while (true)
processDataMsg();
static void processDataMsg()
DatagramPacket op;
InetAddress DA = null;
int DP = 0;
byte [] outPacket = null;
// POP FROM RECEIVE BUFFER
// SOME PROCESSING HERE
// Set Destination Address (DA)
// Set Destination Port (DP)
// DA and DP are the forwarding IP and Port addresses
// not the addresses original packet was sent from.
try
op = new DatagramPacket (outPacket, outPacket.length,DA, DP);
udpSocket.send(op);
catch (IOException e)
e.printStackTrace();
}Also for development and testing purposes, I am running the two clients and the server on the same machine (windows xp-32b) so all of the Destination IP Addresses are 127.0.0.1. and as I said Ports that I am using are 2000, 3000, 4000 (Server, Client1, Client2).Hmm I have minimized the code and it seems to be working now.
I think I have an error in the header portion of the data I am sending, where I am storing the source IP/Port and destination IP/Port. I think the server in the middle is messing these values up while sending them to the destination Client. Because the destination client actually receives the stuff and sends the reply back to the server, but the reply packet's headers has 0/0 as the dest IP / Port...
Server is giving me java.net.BindException: Cannot assign requested address error when it tries to forward the reply it received from the client2 as the address it is trying to send is 0!
I guess it doesnt just give this error when you try to open two sockets to the same port...
Paul, Thanks for the direction on how to proceed... took me a while get the minimized code but at least figured out the problem. Well still have to make sure that is THE problem though :)
As far as the statics goes how can I change those to non static ones? Where do I make an instance of the top level class that creates the threads? and how do I pass the DatagramSocket to the threads/ if I dont need to pass how do I call or use the datagramSocket I created in the top level class? I mean do I still kinda have it like a global variable on the top?? A very simple example would be much appreciated...
I think these might be really basic questions but I am having a rough time with the hierarchy in java... -
How to handle fieldnames ending with # in JDBC receiver?
Hello Experts,
I am developing a scenario JDBC to IDOC. I have 2 tables for header & line item. I have to retrieve a header record first using sender JDBC & then for that header need to fetch the corresponding lineitems from second table.
We cannot have data types defined in XI with fieldnames containing # or any other special charecter. Both DB tables contain fieldnames ending with #.
For Sender JDBC, I managed it in SQL query using :
Select abc, xyz# as xyz .... from tbname
But for receiver JDBC we need to define a data type with the typical format ( Doccument format required for JDBC receiver).
Please let me know how to handle this for JDBC receiver.
Thanks in Advance & hope for a quick replies.
Abhijeet.Hi Abhijeet,
If you can write a query with join( you can call join query using JDBC adapter), i think this would be a fastest way and good approch rather than having 2 JDBC call.
Another approch would be writing SP( stored procedure and then you can have your complete logic here). You can call SP using JDBC adapter.
Eventhough query would be complex...it will be one time job.:)...I am not sure about data type for handling field names with special characters.
Let me know if you need more details.
Nilesh -
How to handle multiple reports with single hyperlink parameter
Please suggest in my drill down report
i have two reports linked with one hyperlink
parameter, how to handle this?
please suggest for popup window with sample solution.
for example
report A--->B--->Chosse Report c or D
based on parameter hyperlink at report B.
Thanks in advance
RajYes U R correct, that
I'm using srw.set_hyperlink in plsql format trigger
to open other reports , now the problem is
how to carry over the hyperlink parameter to popup window
and allow user to choose any reports based on the
parameter value.
for example
report A (Sales person summmary report)
|
| (choose sales person drilled to orders report B)
|
B (report has the hyperlink on order no)
|
|
C,D,E (many reports based on order no
customer,order details,pending items
to be shipped)
Now how to handle the situation from b to c,d,e
I suggest use hyperlink at B to open popup to show
reports C,D,E with the order no has parameter.
please suggest for javascript to open popup window
for reports c,d,e.
Thanks
Raj -
How to generate .xsd file using jaxb generated java files
Hi,
We need to upgrade our applicatio to jdk1.6 which has jaxb2.0 class files in it. Our application has java files generated from .xsd using jaxb1.0.2 version. At present we dont have .xsd or .xml file with us.
We decide to generate .xsd file by using jaxb1.0.2 generated java files. I tried using schemagen.exe given by jdk1.6 to generate .xsd file. It error out. Is there any other way to generate .xsd file ?
pls let me know.
thanks,
ThiruObject-XML mapping is a new feature in JAXB 2.0. Classes generated with JAXB 1.0 won't generate a schema.
Generate Java classes with JAXB 2.0 xjc.
http://www.theregister.co.uk/2006/09/22/jaxb2_guide/ -
How to Handle Dynamic Pivoting with a single SQL?
I was searching for a single SQL who can dynamically understands the pivoting members in the data, I saw several ways of doing Pivoting depending on the version, some are really hard to understand but just two options upto now seams to be flexable enough to do dynamic pivoting, right?
1- For this option you have to write PL/SQL block to build up the dynamic single SQL query, I also find this approach very easy to understand. :)
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::NO::P11_QUESTION_ID:766825833740
2- 11.1 's PIVOT new feature with PIVOT XML and ANY clause, a SINGLE SQL and easy to understand but returns XMLTYPE data, another step to parse to produce the report is needed.
http://www.oracle-developer.net/display.php?id=506
Below is a 10g Model Clause example, but here instead of pivoting by A1-A2-A3 staticly I want to have these values by a distinc subquery for example;
create table test(id varchar2(2), des varchar2(4), t number);
INSERT INTO test values('A','a1',12);
INSERT INTO test values('A','a2',3);
INSERT INTO test values('A','a3',1);
INSERT INTO test values('B','a1',10);
INSERT INTO test values('B','a2',23);
INSERT INTO test values('C','a3',45);
commit;
SELECT * FROM test;
ID DES T
A a1 12
A a2 3
A a3 1
B a1 10
B a2 23
C a3 45
select distinct i, A1, A2, A3
from test c
model
ignore nav
dimension by(c.id i,c.des d)
measures(c.t t, 0 A1, 0 A2, 0 A3)
rules(
A1[any,any] = t[cv(i),d = 'a1'],
A2[any,any] = t[cv(i),d = 'a2'],
A3[any,any] = t[cv(i),d = 'a3']
I A1 A2 A3
C 0 0 45
B 10 23 0
A 12 3 1 Any advice is appreciated, thank you.Hi,
You can do dynamic SQL in SQL*Plus, also.
[Thid thread|http://forums.oracle.com/forums/thread.jspa?messageID=2744039�] shows how to pivot a table with a dynamic number of columns. -
How to handle palm keyboard with midp?
Hello,
I'm developing a custom made textbox component with the midp low level apis. It's targeted for a palm os application. When I run tests with the emulator I cannot make the little keyboard appear ( it beeps ).
Is there some way to handle this keyboard with midp? Any examples?
Thanks in advance,
Estanis.You can utilize the pointerPressed(int x, int y) event of the Canvas to implement the functionality you have in mind.
Of course, this means you'll have to create your own on-screen keyboard and either ignore the loss of height or handle the Canvas resize on your own (define a new method within your Canvas-extending class to override getHeight(), and have it return super.getHeight()-KBD_HEIGHT if the keyboard is up), but at least you have something.
Jouster -
How to handle flat file with variable delimiters in the file sender adapter
Hi friends,
I have some flat files in the ftp server and hope to poll them into XI, but before processing in XI, I hope to do some content conversion in the file sender adapter, according to the general solution, I just need to specify the field names, field seperator, end seperator, etc. But the questions is:
The fileds in the test data may have different amount of delimiters (,), for example:
ORD01,,,Z4XS,6100001746,,,,,2,1
OBJ01,,,,,,,,,,4,3
Some fileds only have 1 ',' as the delimiter, but some of them have multiple ','.
How can I handle it in the content conversion?
Regards,
BeanHi Bing,
Plz do refer the following blogs u will get an idea:
File content conversion Blogs
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Vinod. -
How to handle one HU with more batches?
Dear Experts,
Could you tell me how to solve this? Is it possible to realize it?
if it's one HU with one batch, I can confirm the TO, but if it's one HU with more batch, it always gives error message"No stocks from HU storage locations can be managed on SU 7000023417" Message no. L3804.
Thanks!
xinling zhangHello,
this message " stocks from HU storage locations can be managed" Message no. L3804. is because the amount of the storage unit is greater than the amount of picking, the solution is:
spro-> logistic General -> handling units -> basic-> warehouse management-> Control automatic pick HU creation.
must create a line with the information necessary
this allows confirmation in LT12, will automatically generate a HU, and there can select the lower HU
REGARDS -
How to handle Oracle BLOBs with WebLogic 10.3
We have code that has been running for a long time to handle blobs in Oracle. We have never had a problem running inside of WebLogic, including WLS 10.0 and WLS 11. Recently, we had a customer that had a problem after they upgraded to WLS 10.3. Indeed, we downloaded that specific version and see the same issue. The issue is our Oracle db specific code is now causing an IllegalAccessException after we get the ResultSet vendor obj, by calling getVendorObj() on the WebLogic managed result set, and try to cast to an OracleResultSet. We need to do this in order to call OracleResultSet.getBLOB(), which returns an oracle.sql.BLOB. The code we use to update the blob is shown below. getOracleBLOB is our own method. It basically gets the OracleResultSet by calling getVendorObj on the managed WLS ResultSet, casting to an OracleResultSet, and calling getBLOB(colname) on it. Casting to the OracleResultSet causes the exception shown below. OK, so I understand WLS not wanting us to fiddle with the underlying db ResultSet, but what's our alternative. How can we do this without relying on the underlying OracleResultSet? After 10 years, working with many different versions of WebLogic as well as JBOSS and WebSphere, this is the first time we are seeing this.
Thanks in advance.
oracle.sql.BLOB blob = getOracleBLOB(rset,_columns.name);
OutputStream os = blob.getBinaryOutputStream();
ObjectOutputStream oos = new ObjectOutputStream(os);
oos.writeObject(_columns[i].paramObj);
oos.close();
java.rmi.RemoteException: EJB Exception: ; nested exception is:
javax.ejb.EJBException: nested exception is: javax.transaction.TransactionRolledbackException: Exception in ejbCreate(): java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleResultSet from class com.armanta.ejb.gen.DefaultASHelper
at com.armanta.ejb.gen.DefaultASHelper.getOracleBLOB(DefaultASHelper.java:183)
at com.armanta.ejb.PreparedStatementWithBlobs.getOracleBLOB(PreparedStatementWithBlobs.java:180)
at com.armanta.ejb.PreparedStatementWithBlobs.executeUpdate(PreparedStatementWithBlobs.java:141)
at com.armanta.ejb.SimpleJDBCAbstractionWithBlobs.insert(SimpleJDBCAbstractionWithBlobs.java:57)
at com.armanta.ejb.ValueContainerBean.create(ValueContainerBean.java:230)
at com.armanta.ejb.tree.BranchBean.ejbCreate(BranchBean.java:42)
at com.armanta.ejb.tree.Branch_y1m5sk_Impl.ejbCreate(Branch_y1m5sk_Impl.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.manager.ExclusiveEntityManager.create(ExclusiveEntityManager.java:775)
at weblogic.ejb.container.manager.ExclusiveEntityManager.remoteCreate(ExclusiveEntityManager.java:746)
at weblogic.ejb.container.internal.EntityEJBHome.create(EntityEJBHome.java:272)
at com.armanta.ejb.tree.Branch_y1m5sk_HomeImpl.create(Branch_y1m5sk_HomeImpl.java:79)
at com.armanta.ejb.tree.TreeMasterBean.addBranchesToTree(TreeMasterBean.java:430)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl.addBranchesToTree(TreeMaster_n4wp5c_EOImpl.java:800)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
; nested exception is:
java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleResultSet from class com.armanta.ejb.gen.DefaultASHelper
at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:290)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:247)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl_1030_WLStub.addBranchesToTree(Unknown Source)
at com.armanta.datamodel.EntityTreePool.addBranchesToTree(EntityTreePool.java:773)
at com.armanta.app.permission.MemberModel.add(MemberModel.java:233)
at com.armanta.app.permission.MemberPanel.actionPerformed(MemberPanel.java:248)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:5517)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3135)
at java.awt.Component.processEvent(Component.java:5282)
at java.awt.Container.processEvent(Container.java:1966)
at java.awt.Component.dispatchEventImpl(Component.java:3984)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1791)
at java.awt.Component.dispatchEvent(Component.java:3819)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Caused by: javax.ejb.EJBException: nested exception is: javax.transaction.TransactionRolledbackException: Exception in ejbCreate(): java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleResultSet from class com.armanta.ejb.gen.DefaultASHelper
at com.armanta.ejb.gen.DefaultASHelper.getOracleBLOB(DefaultASHelper.java:183)
at com.armanta.ejb.PreparedStatementWithBlobs.getOracleBLOB(PreparedStatementWithBlobs.java:180)
at com.armanta.ejb.PreparedStatementWithBlobs.executeUpdate(PreparedStatementWithBlobs.java:141)
at com.armanta.ejb.SimpleJDBCAbstractionWithBlobs.insert(SimpleJDBCAbstractionWithBlobs.java:57)
at com.armanta.ejb.ValueContainerBean.create(ValueContainerBean.java:230)
at com.armanta.ejb.tree.BranchBean.ejbCreate(BranchBean.java:42)
at com.armanta.ejb.tree.Branch_y1m5sk_Impl.ejbCreate(Branch_y1m5sk_Impl.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.manager.ExclusiveEntityManager.create(ExclusiveEntityManager.java:775)
at weblogic.ejb.container.manager.ExclusiveEntityManager.remoteCreate(ExclusiveEntityManager.java:746)
at weblogic.ejb.container.internal.EntityEJBHome.create(EntityEJBHome.java:272)
at com.armanta.ejb.tree.Branch_y1m5sk_HomeImpl.create(Branch_y1m5sk_HomeImpl.java:79)
at com.armanta.ejb.tree.TreeMasterBean.addBranchesToTree(TreeMasterBean.java:430)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl.addBranchesToTree(TreeMaster_n4wp5c_EOImpl.java:800)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
; nested exception is:
java.lang.IllegalAccessError: tried to access class oracle.jdbc.driver.OracleResultSet from class com.armanta.ejb.gen.DefaultASHelper
at com.armanta.ejb.tree.TreeMasterBean.addBranchesToTree(TreeMasterBean.java:442)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl.addBranchesToTree(TreeMaster_n4wp5c_EOImpl.java:800)
at com.armanta.ejb.tree.TreeMaster_n4wp5c_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)We ultimately found out what the issue was. Turns out that OracleResultSet moved from oracle.jdbc.driver into oracle.jdbc starting with ojdbc6.jar. We were referencing the oracle.jdbc.driver package.
-
How to marshal XML fragments with JAXB
Hello,
I have Object unashamed from XML. I would like to insert part of this object in another XML document. I�m using Cocoon Transformer for this. In startElement then I detect element which I would like replace I would like to write something like this:
Marshaller m = jc.createMarshaller();
m.marshal(myElem, contentHandler);
However this method try to marshal it as whole document with: <?xml version="1.0" encoding="UTF-8" ?> This probably case problems for next Transformer.
I have this problem in Cocoon and with SAX, but there should be some general solution to marshal JAXB objects as XML fragments, not whole documents. However I can�t found it.
Thanks for any help
Arek StryjskiIn JAXB mailing list I got this answer:
It currently doesn't have any explicit support for fragment marshalling,
but like you said, you can easily write an XMLFilter that blocks
start|endDocument. In your case, you just need to:
Marshaller m = jc.createMarshaller();
m.marshal(myElem, new FragmentFilter(contentHandler));
where FragmentFilter is:
class FragmentFilter extends XMLFilterImpl {
FragmentFilter( ContentHandler handler ) {
setContentHandler(handler);
public void startDocument() {}
public void endDocument() {}
Perhaps this could be another example.
regards,
Kohsuke KAWAGUCHI -
How would this work, in the situation below ...
Everyone has their own iCloud account (for their own syncing purposes).
But we (family) ALL share the same iTunes account (for purchasing).
How will this work, since we all have our own iTunes libraries?One person sets up Match on their computer using the iTunes account. Uploads everything to match.
I would recommend waiting until that person is done, and do computers one at a time. No particular reason, just seems sensible.
Next person sets up match using same iTunes account details. Uploads their stuff. They will then see everything the previous user put into the system, unless you select "Hide music not on this computer" in the view menu. Previous user will now see their stuff too.
Rinse and repeat.
This is how it worked with my multiple machines anyway... As long as every computer uses the same iTunes account for the store, you all get access to the same Match account. -
How to handle blob data with java and mysql and hibernate
Dear all,
I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql database . Can anybody give me the source code for blob handling with java+Mysql+Hibernate
now my code is :--
==================================================
*.hbm.xml :--
<property name="image" column="IMAGE" type="com.shrisure.server.usertype.BinaryBlobType" insert="true" update="true" lazy="false"/>
===================================================
*.java :--
package com.shrisure.server.usertype;
import java.io.OutputStream;
import java.io.Serializable;
import java.sql.Blob;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import javax.naming.InitialContext;
import javax.sql.DataSource;
import oracle.sql.BLOB;
import org.hibernate.HibernateException;
import org.hibernate.usertype.UserType;
import org.jboss.resource.adapter.jdbc.WrappedConnection;
import com.google.gwt.user.client.rpc.IsSerializable;
public class BinaryBlobType implements UserType, java.io.Serializable, IsSerializable {
private static final long serialVersionUID = 1111222233331231L;
public int[] sqlTypes() {
return new int[] { Types.BLOB };
public Class returnedClass() {
return byte[].class;
public boolean equals(Object x, Object y) {
return (x == y) || (x != null && y != null && java.util.Arrays.equals((byte[]) x, (byte[]) y));
public void nullSafeSet(PreparedStatement st, Object value, int index) throws HibernateException, SQLException {
BLOB tempBlob = null;
WrappedConnection wc = null;
try {
if (value != null) {
Connection oracleConnection = st.getConnection();
if (oracleConnection instanceof oracle.jdbc.driver.OracleConnection) {
tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
if (oracleConnection instanceof org.jboss.resource.adapter.jdbc.WrappedConnection) {
InitialContext ctx = new InitialContext();
DataSource dataSource = (DataSource) ctx.lookup("java:/DefaultDS");
Connection dsConn = dataSource.getConnection();
wc = (WrappedConnection) dsConn;
// with getUnderlying connection method , cast it to Oracle
// Connection
oracleConnection = wc.getUnderlyingConnection();
tempBlob = BLOB.createTemporary(oracleConnection, true, BLOB.DURATION_SESSION);
tempBlob.open(BLOB.MODE_READWRITE);
OutputStream tempBlobWriter = tempBlob.getBinaryOutputStream();// setBinaryStream(1);
tempBlobWriter.write((byte[]) value);
tempBlobWriter.flush();
tempBlobWriter.close();
tempBlob.close();
st.setBlob(index, tempBlob);
} else {
st.setBlob(index, BLOB.empty_lob());
} catch (Exception exp) {
if (tempBlob != null) {
tempBlob.freeTemporary();
exp.printStackTrace();
st.setBlob(index, BLOB.empty_lob());
// throw new RuntimeException();
} finally {
if (wc != null) {
wc.close();
public Object nullSafeGet(ResultSet rs, String[] names, Object owner) throws HibernateException, SQLException {
final Blob blob = rs.getBlob(names[0]);
return blob != null ? blob.getBytes(1, (int) blob.length()) : null;
public Object deepCopy(Object value) {
if (value == null)
return null;
byte[] bytes = (byte[]) value;
byte[] result = new byte[bytes.length];
System.arraycopy(bytes, 0, result, 0, bytes.length);
return result;
public boolean isMutable() {
return true;
public Object assemble(Serializable arg0, Object arg1) throws HibernateException {
return assemble(arg0, arg1);
public Serializable disassemble(Object arg0) throws HibernateException {
return disassemble(arg0);
public int hashCode(Object arg0) throws HibernateException {
return hashCode();
public Object replace(Object arg0, Object arg1, Object arg2) throws HibernateException {
return replace(arg0, arg1, arg2);
=================================================================
can anyone give me the source code for this BinaryBlobType.java according to mysql blob handling ..Moderator action: crosspost deleted.
-
How to handle Fact tables with different granularity in OBIEE 11g RPD
Hello Everyone,
I have got stuck here and need your help.
I have two fact tables (Say F1 and F2... F1 is containing data at month-level and F2 is containing data at day level) and one Date DIMENSION TABLE. Date_Code is the PK of Date dimension table.I need to use time-series functions also.
Can anyone tell me how to model this requirement in the RPD.
Can we use a single dimension table(Here Date dimension table) with two fact table of different grainularity? What would be the best way to implement this requirement?
Thanks in advance :)Hi Veeravalli,
Thanks for your reply :)
Let me explain the problem in more detail. I have one Date dimension(Date_Code,Month_Code,Quarter_Code,Half_Year_Code,Year_Code). Here Date_Code is the PK.
In F1---->Date (Using Month_Code key)
F2-------->Date (Using Date_Code Key)
Level based hierarchy is there starting from Year to Date.Each level has PK defined and chronological key selected.
F1 has level set to Month and F2 has level set to Day.
Now if i am using ago() function on measure of F2 (having day level data) then it's working fine but if i am using ago() function on measure of F1...I am getting an error at Presentation service: Date_code must be projected for time-series functions.
So the whole issue is with time-series functions. As per my research...I think for time series the tables in the physical model containing the time dimension cannot join to other data sources, except at the most detailed level but here i am joining with F1(using Month_Code which is not the most detailed level).
So kindly let me know how to achieve this in rpd?
Maybe you are looking for
-
Following error i am getting after i chnaged the Path in Config File from \\vs01\d$\\Deployment\Files\temp.txt to C:\Deployment\Files\temp.txt [Bulk Insert Task] Error: An error occurred with the following error message: "Cannot bulk load because the
-
hi, i have an old imac g4 running 10 .3.9,it has 2 partitions,1st partition has os9 and osx,but would like to put ubuntu on my empty partition,can it be done if so how,thanks for reading,
-
Directory specification for File Adapter
Hello, I would like to ask if it is possible to determine a directory where message is saved for file adapter based on message content. E.g. I have general directory (GD) under which I would like to save a messages in directories with are called base
-
How to choose between two subscriptions
I have Office 365 World Minutes AND a 60 minute subscription to landlines in Brazil. When I call a number in Brazil, from Dallas TX, where I am now, I want to choose that subscription and use those minutes instead of the world minutes. I only want to
-
Unhandled exception at 0x380ef547 in crw32.exe: 0xC0000005:
Hi, I have a report, with basic data in the page header, 3 fields ( name, number, status). Then in the details section I have an OLE DB object, where the graphic location is a formula, combining the urlroot and urloffset. The formula is correct bec