HTMLUnit and GWT

After developing on an other aspect of a project, I realized later that all my GWT testcases didn’t work anymore. I got the following strange Exception:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
java.lang.NoSuchFieldError: FIREFOX_17
	at com.google.gwt.junit.RunStyleHtmlUnit.<clinit>(RunStyleHtmlUnit.java:200)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:264)
	at com.google.gwt.junit.JUnitShell.createRunStyle(JUnitShell.java:1181)
	at com.google.gwt.junit.JUnitShell.doStartup(JUnitShell.java:942)
	at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:982)
	at com.google.gwt.junit.JUnitShell.getUnitTestShell(JUnitShell.java:698)
	at com.google.gwt.junit.JUnitShell.runTest(JUnitShell.java:672)
	at com.google.gwt.junit.client.GWTTestCase.runTest(GWTTestCase.java:421)
	at junit.framework.TestCase.runBare(TestCase.java:141)
	at junit.framework.TestResult$1.protect(TestResult.java:122)
	at junit.framework.TestResult.runProtected(TestResult.java:142)
	at junit.framework.TestResult.run(TestResult.java:125)
	at junit.framework.TestCase.run(TestCase.java:129)
	at com.google.gwt.junit.client.GWTTestCase.run(GWTTestCase.java:247)
	at junit.framework.TestSuite.runTest(TestSuite.java:255)
	at junit.framework.TestSuite.run(TestSuite.java:250)
	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
</clinit>

The exception also occurred via Maven and not only in IntelliJ, so I knew it has something to do with my Maven-Project.

After checking the dependencies of my project with mvn dependency:tree, I found a new transitive dependency of a new added dependency. Because I didn’t need the htmlunit-part of this component I excluded the htmlunit-dependency with the following directive in my pom.xml:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
<dependencies>
....
    <dependency>
        <groupdid>my.dependency
        <artifactid>mydependency
        <exclusions>
            <exclusion>
                <groupid>net.sourceforge.htmlunit</groupid>
                <artifactid>htmlunit</artifactid>
            </exclusion>
        </exclusions>
    </artifactid></groupdid></dependency>
....
</dependencies>

A deeper analysis of the problem shows, that the transitive dependency was too new, because the field FIREFOX_17 is not available any more, but the newer one like FIREFOX_38.

GWT-Hidden-Feature: code coverage

In July 2012 a until now rarely documented feature was added to GWT (related Git-Commit). It’s code coverage on the client side.

How it works

You can activate it via the System-Property “gwt.coverage”. The property-value must contain either all named Java source files separated by comma, or it must point to a text file containing all Java source files; one per line. Now the GWT compiler will instrument the corresponding JavaScript which is based on the named Java source files. Additionally the compiler registers an onUnLoad-Event, which stores the code coverage into LocalStorage of the browser.

Maven-Example

I have a simple GWT-Project which is build via Maven. In the main source (src/main/java/org/jajax/gwt/test/client/MyEntryPoint.java) I have the following file:

1
2
3
4
5
6
7
8
9
10
11
12
package org.jajax.gwt.test.client;
 
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
 
public class MyEntryPoint implements EntryPoint {
 
   @Override
   public void onModuleLoad() {
       Window.alert("Hello world");
   }
}

Additionally I created a Textfile (target/gwt-coverage-sources.txt) with the following content:

1
org/jajax/gwt/test/client/MyEntryPoint.java

Now only the configuration of GWT is missing. You have to add the Parameter gwt.coverage=target/gwt-coverage-sources.txt.

1
2
3
4
5
6
7
8
<plugin>
    <groupid>org.codehaus.mojo</groupid>
    <artifactid>gwt-maven-plugin</artifactid>
    <version>2.7.0</version>
    <configuration>
        <extrajvmargs>-Dgwt.coverage=target/gwt-coverage-sources.txt</extrajvmargs>
    </configuration>
</plugin>

Now if you run you application, you can access the code coverage via JavaScript

?View Code JAVASCRIPT
1
localStorge.getItem("gwt_coverage");

You will get a JSON with the following content:

1
{"org/jajax/gwt/test/client/MyEntryPoint.java":{"6":1,"10":1}}

The inner object has for every line as key a value of 0 for a missing coverage or 1 for covered code.

Conclusion

This feature is very interesting, because the alternatives are very rare. The old option to use Emma / Jacoco is not functional anymore with the current versions of Java (1.8), GWT (2.7.0 / 2.8.0-SNAPSHOT), etc. So this feature seems to be a good alternative. Unfortunately there is no tool to extract the code coverage of Unit-Tests or Integration-Tests, but I will release a Tool, which connects the GWT code coverage with Jacoco Reports. So stay tuned!

position:fixed and translate3d

Actually, I thought I understood position:fixed in HTML/CSS, but then I had some trouble in combination with transform:translate3d.  Generally position:fixed of an element means, you will have this element relative to the viewport (the browser window) fixed positioned, regardless any scroll-position.

For example the following HTML-Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<div style="position:absolute; left: 20px; top: 20px; width: 150px;  background-color: #7FDBFF">
<h1>positioned Box</h1>
<p>
Lorem ipsum ...
</p>
<div style="position:fixed; background-color:#FF851B; left: 50px; top:50px;width:100px;height: 30px;">
Fixed Box
</div>
</div>
<div style="position:absolute; left: 250px; top: 20px; width: 150px;  background-color: #2ECC40">
<h1>translated Box</h1>
<p>
Lorem ipsum...</p>
<div style="position:fixed; background-color:#FF4136; left: 50px; top:90px;width:100px;height: 30px;">
Fixed Box
</div>
</div>

You will see two absolute positioned boxes (an aqua and a green one) and two fixed boxes (orange and red), which are children of the absolute positioned boxes.

boxes1

The CSS-transform API gives now the possibility to use translate3d as a fast left/top replacement. So we can rewrite the green box to:

1
2
3
4
5
6
7
8
<div style="position:absolute; transform: translate3d(250px, 20px, 0px); width: 150px;  background-color: #2ECC40">
<h1>translated Box</h1>
<p>
Lorem ipsum...</p>
<div style="position:fixed; background-color:#FF4136; left: 50px; top:90px;width:100px;height: 30px;">
Fixed Box
</div>
</div>

We would expect the same result, but got a different one:

boxes2

You see that the red box is jumped to the right. The reason for this result is due to the fact, that translate3d moves the virtual viewport and so the root of the fixed position-relation. Unfortunately the common function getClientBoundingRect, which gives you the rectangle in the viewport, did not respect the translate3d transformation, so that common elements like Polymers iron-dropdown did not work properly anymore.

Until now I have no common solution for that problem, comments are welcome!

You can see, and play around, with my example on JSFiddle.

And also the polymer example shows the problem.

Resources for Quickstart with GWT and Polymer

Today I would like to give some resources for a quick start in development with GWT and Polymer components. Polymer components are an implementation of basic components with the Webcomponents technology.

  1. The first point is an overview of the Polymer components in GWT. So you have an overview what is possible. You can click through the show case of the gwt-polymer-elements library.
  2. The second point is the official documentation from the GWT-Project. This is a good start to see how you will consume webcomponents with GWT.
  3. As described there you will use the gwt-polymer-elements library from vaadin. This library provides standard polymer (paper and iron elements and some vaadin elements) ready for use with GWT. Currently the Version 1.2.3.0 is the latest release and you will need to use the 2.8.0-SNAPSHOT version of the GWT project.

With these resources and the provided demos you will be able to start your development and play a little bit with the technologies. In the next days I will write some more Howtos about concerning points. If you have some problems with the setup, feel free to write a comment.

Client-Certificate Exception “Cannot recover key”

Today I tried to use a SSL with a Client-Certficate. I used the keytool to create a keystore and imported a PKCS12 – Certifcate with:

1
keytool -v -importkeystore -srckeystore client.p12 -srcstoretype PKCS12 -destkeystore mykeystore -deststoretype JKS

After using it with Java I got the following error:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:311)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:121)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:38)
at java.security.KeyStore.getKey(KeyStore.java:763)
at com.sun.net.ssl.internal.ssl.SunX509KeyManagerImpl.&lt;init&gt;(SunX509KeyManagerImpl.java:113)
at com.sun.net.ssl.internal.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:48)
at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:239)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.getDefaultKeyManager(DefaultSSLContextImpl.java:170)
at com.sun.net.ssl.internal.ssl.DefaultSSLContextImpl.&lt;init&gt;(DefaultSSLContextImpl.java:40)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:357)
at java.lang.Class.newInstance(Class.java:310)
at java.security.Provider$Service.newInstance(Provider.java:1221)
... 21 more

The solution here is to correct the password of the Java-Keystore. The password of the P12-Certifcate and the password of the Keystore has to be the same.

Loading TTF-Fonts with Java

It is very easy to load some TrueType-Fonts (TTF) with Java.

1
java.awt.Font.createFont(Font.TRUETYPE_FONT, new File("font.ttf"));

But with some files I got the following Exception:

1
java.awt.FontFormatException: Font name not found

You can correct this with a font-editor to add the font names. For Linux I can advise the tool fontforge. It is very powerful also for convertions of fonts. For Debian you can simply install with the following command:

1
apt-get install fontforge

Get the right dependencies for JBoss 5 Client and Maven

The last days my task was to port a very complex JBoss-Application from JBoss 4.2 to 5.1.0 GA. The Application has a couple of EJBs and many logic (Stateless-Beans, Stateful-Beans, Service-MBeans, etc.), a complex Web-Application built on top of Seam 2.1 and some simple Java-Clients accessing the provided businesslogic as a JBoss Client.

The whole application is built with maven.

In the past I imported the jbossall-client.jar directly into my Maven Repository. But I thought JBoss.org provides the used JARs via the repository http://repository.jboss.org/maven2/. The right package would be:

1
2
3
4
5
<dependency>
    <groupid>org.jboss.jbossas</groupid>
    <artifactid>jboss-as-client</artifactid>
    <version>5.1.0.GA</version>
</dependency>

But this sounds better as it really is. Because of the transitive dependencies of some used packages, nearly the whole JBoss-Server is included. The developers of the JBoss-Servers sometimes using classifiers instead of splitting a mega-jar into several sub-jars. For example the org.jboss.jbossas:jboss-as-server artifact.
One solution would be to repackage all needed JARs to one JAR.
For me the solution was to build my own jboss-as-client, using a self-made pom with all needed dependencies. Because this is more the maven-way. But what is needed? This is quite easy. I tried to find the correct artifacts of the jar-files which are referenced by the jbossall-client.jar, delivered with the JBoss 5.1.0 release.

All transitive dependencies are excluded, to avoid the described problem.

If you have any suggestions how to optimize it or if I have something missed, please let me know.

And here is the result:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
<dependency>
	<groupid>org.jboss.javaee</groupid>
	<artifactid>jboss-javaee</artifactid>
	<version>5.0.1.GA</version>
</dependency>
<dependency>
	<groupid>org.hibernate</groupid>
	<artifactid>hibernate-annotations</artifactid>
	<version>3.4.0.GA</version>
	<exclusions>
		<exclusion>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-commons-annotations</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-core</artifactid>
		</exclusion>
		<exclusion>
			<groupid>dom4j</groupid>
			<artifactid>dom4j</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.naming</groupid>
	<artifactid>jnp-client</artifactid>
	<version>5.0.3.GA</version>
</dependency>
<dependency>
	<groupid>oswego-concurrent</groupid>
	<artifactid>concurrent</artifactid>
	<version>1.3.4-jboss-update1</version>
</dependency>
<dependency>
	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-proxy-clustered</artifactid>
	<version>1.0.1</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-impl</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-api</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-proxy-spi</artifactid>
	<version>1.0.0</version>
	<classifier>client</classifier>
</dependency>
<dependency>
 	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-proxy-impl</artifactid>
	<version>1.0.2</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.aspects</groupid>
			<artifactid>jboss-remoting-aspects</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-common</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-interceptors</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.naming</groupid>
			<artifactid>jnpserver</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
 	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-core</artifactid>
	<version>1.1.5</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>javassist</groupid>
			<artifactid>javassist</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.hibernate</groupid>
			<artifactid>hibernate-entitymanager</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-jca-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jboss-vfs</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.aop</groupid>
			<artifactid>jboss-aop</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.aop</groupid>
			<artifactid>jboss-aop-aspects</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cache</groupid>
			<artifactid>jbosscache-core</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-cache</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-endpoint</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-security</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-timerservice-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-ext-api-impl</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-clustered</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-transactions</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-ejb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jacc-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jca-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jms-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jpa</groupid>
			<artifactid>jboss-jpa-deployers</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-kernel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.security</groupid>
			<artifactid>jbosssx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ws</groupid>
			<artifactid>jbossws-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>quartz</groupid>
			<artifactid>quartz</artifactid>
		</exclusion>
		<exclusion>
			<groupid>sun-jaxws</groupid>
			<artifactid>jaxws-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>sun-jaxws</groupid>
			<artifactid>jsr181-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>trove</groupid>
			<artifactid>trove</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.aspects</groupid>
			<artifactid>jboss-remoting-aspects</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-common</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-interceptors</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-impl</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-proxy-spi</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.remoting</groupid>
	<artifactid>jboss-remoting</artifactid>
	<version>2.5.1</version>
</dependency>
<dependency>
	<groupid>org.jboss.deployers</groupid>
	<artifactid>jboss-deployers-core-spi</artifactid>
	<version>2.0.7.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.deployers</groupid>
	<artifactid>jboss-deployers-core</artifactid>
	<version>2.0.7.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-main</artifactid>
	<version>5.1.0.GA</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>gnu-getopt</groupid>
			<artifactid>getopt</artifactid>
		</exclusion>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.logbridge</groupid>
			<artifactid>jboss-logbridge</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-j2se</artifactid>
	<version>5.1.0.GA</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-classloading-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>apache-xerces</groupid>
			<artifactid>xml-apis</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-ext-api</artifactid>
	<version>1.0.0</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-ejb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-server</artifactid>
	<version>5.1.0.GA</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>sun-jaxb</groupid>
			<artifactid>jaxb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-deployment</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-deployment-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jpa</groupid>
			<artifactid>jboss-jpa-deployers</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.security</groupid>
			<artifactid>jbosssx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-security</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-transaction-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jacc-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jms-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ws.native</groupid>
			<artifactid>jbossws-native-saaj</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ws.native</groupid>
			<artifactid>jbossws-native-jaxws</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.security</groupid>
			<artifactid>jaas</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jca-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>bcel</groupid>
			<artifactid>bcel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jpl-util</groupid>
			<artifactid>jpl-util</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jpl-pattern</groupid>
			<artifactid>jpl-pattern</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jbossxb</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.naming</groupid>
			<artifactid>jnp-server</artifactid>
		</exclusion>
		<exclusion>
			<groupid>gnu-getopt</groupid>
			<artifactid>getopt</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-ejb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.naming</groupid>
			<artifactid>jnpserver</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-security</artifactid>
	<version>1.0.0</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.aspects</groupid>
			<artifactid>jboss-current-invocation-aspects</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-interceptors</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.security</groupid>
			<artifactid>jbosssx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jacc-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-ext-api-impl</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.aop</groupid>
			<artifactid>jboss-aop</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ejb3</groupid>
			<artifactid>jboss-ejb3-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.security</groupid>
	<artifactid>jbosssx-client</artifactid>
	<version>2.0.3.SP1</version>
</dependency>
<dependency>
	<groupid>org.jboss.deployers</groupid>
	<artifactid>jboss-deployers-client</artifactid>
	<version>2.0.7.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.deployers</groupid>
	<artifactid>jboss-deployers-client-spi</artifactid>
	<version>2.0.7.GA</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.man</groupid>
			<artifactid>jboss-managed</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-system-jmx</artifactid>
	<version>5.1.0.GA</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>apache-xerces</groupid>
			<artifactid>xml-apis</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jboss-vfs</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jbossxb</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-impl</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-structure-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-vfs</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-vfs-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-dependency</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-kernel</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.slf4j</groupid>
	<artifactid>slf4j-jboss-logging</artifactid>
	<version>1.0.2.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.logging</groupid>
	<artifactid>jboss-logging-jdk</artifactid>
	<version>2.1.0.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.logging</groupid>
	<artifactid>jboss-logging-log4j</artifactid>
	<version>2.1.0.GA</version>
	<exclusions>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.logging</groupid>
	<artifactid>jboss-logging-spi</artifactid>
	<version>2.1.0.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.ejb3</groupid>
	<artifactid>jboss-ejb3-common</artifactid>
	<version>1.0.0</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-kernel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-spi</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-server</artifactid>
	<version>5.1.0.GA</version>
	<classifier>jmx-invoker-adaptor-client</classifier>
	<exclusions>
		<exclusion>
			<groupid>sun-jaxb</groupid>
			<artifactid>jabx-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-deployment</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-deployment-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jpa</groupid>
			<artifactid>jbopss-jpa-deployers</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.security</groupid>
			<artifactid>jbosssx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-ejb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-security</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-transaction-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jacc-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-jms-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ws.native</groupid>
			<artifactid>jbossws-native-saaj</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.ws.native</groupid>
			<artifactid>jbossws-native-jaxws</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.security</groupid>
			<artifactid>jaas</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jca-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>bcel</groupid>
			<artifactid>bcel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jpl-util</groupid>
			<artifactid>jpl-util</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jpl-pattern</groupid>
			<artifactid>jpl-pattern</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jbossxb</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.naming</groupid>
			<artifactid>jnpserver</artifactid>
		</exclusion>
		<exclusion>
			<groupid>gnu-getopt</groupid>
			<artifactid>getopt</artifactid>
		</exclusion>
		<exclusion>
			<groupid>sun-jaxb</groupid>
			<artifactid>jaxb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jpa</groupid>
			<artifactid>jboss-jpa-deployers</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-jms-api</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-management</artifactid>
	<version>5.1.0.GA</version>
	<classifier>jsr77-client</classifier>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.deployers</groupid>
			<artifactid>jboss-deployers-vfs</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-kernel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cl</groupid>
			<artifactid>jboss-classloading-vfs</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-server</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-connector</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-cluster</artifactid>
		</exclusion>
		<exclusion>
			<groupid>apache-xerces</groupid>
			<artifactid>xml-apis</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-iiop</artifactid>
	<version>5.1.0.GA</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>apache-avalon</groupid>
			<artifactid>avalon-framework</artifactid>
		</exclusion>
		<exclusion>
			<groupid>apache-xerces</groupid>
			<artifactid>xml-apis</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jacorb</groupid>
			<artifactid>jacorb</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.security</groupid>
			<artifactid>jaas</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.transcation</groupid>
			<artifactid>jta</artifactid>
		</exclusion>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-classloading-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-corba-ots-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.integration</groupid>
			<artifactid>jboss-transaction-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.javaee</groupid>
			<artifactid>jboss-ejb-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-main</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-server</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-security</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.metadata</groupid>
			<artifactid>jboss-metadata</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.transaction</groupid>
			<artifactid>jta</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.cluster</groupid>
	<artifactid>jboss-ha-client</artifactid>
	<version>1.1.1.GA</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.aspects</groupid>
			<artifactid>jboss-remoting-aspects</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.jbossas</groupid>
	<artifactid>jboss-as-cluster</artifactid>
	<version>5.1.0.GA</version>
	<classifier>jboss-ha-legacy-client</classifier>
	<exclusions>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-server</artifactid>
		</exclusion>
		<exclusion>
			<groupid>jgroups</groupid>
			<artifactid>jgroups</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-api</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-cache-spi</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-jbc</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.cluster</groupid>
			<artifactid>jboss-ha-server-cache-jbc</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system-jmx</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.jbossas</groupid>
			<artifactid>jboss-as-system</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.bootstrap</groupid>
			<artifactid>jboss-bootstrap</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javax.transaction</groupid>
			<artifactid>jta</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.slf4j</groupid>
	<artifactid>slf4j-api</artifactid>
	<version>1.5.6</version>
</dependency>
<dependency>
	<groupid>org.jboss.aop</groupid>
	<artifactid>jboss-aop</artifactid>
	<version>2.1.1.GA</version>
	<classifier>client</classifier>
	<exclusions>
		<exclusion>
			<groupid>apache-xerces</groupid>
			<artifactid>xml-apis</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.apache.ant</groupid>
			<artifactid>ant</artifactid>
		</exclusion>
		<exclusion>
			<groupid>javassist</groupid>
			<artifactid>javassist</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jboss-reflect</artifactid>
		</exclusion>
		<exclusion>
			<groupid>qdox</groupid>
			<artifactid>qdox</artifactid>
		</exclusion>
		<exclusion>
			<groupid>trove</groupid>
			<artifactid>trove</artifactid>
		</exclusion>
		<exclusion>
			<groupid>log4j</groupid>
			<artifactid>log4j</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss</groupid>
	<artifactid>jboss-common-core</artifactid>
	<version>2.2.14.GA</version>
</dependency>
<dependency>
	<groupid>org.jboss.security</groupid>
	<artifactid>jboss-security-spi</artifactid>
	<version>2.0.3.SP1</version>
</dependency>
<dependency>
	<groupid>org.jboss</groupid>
	<artifactid>jboss-mdr</artifactid>
	<version>2.0.1.GA</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss</groupid>
			<artifactid>jboss-reflect</artifactid>
		</exclusion>
	</exclusions>
</dependency>
<dependency>
	<groupid>org.jboss.client</groupid>
	<artifactid>jboss-client</artifactid>
	<version>5.1.0.CR1</version>
</dependency>
<dependency>
	<groupid>org.apache</groupid>
	<artifactid>xmlsec</artifactid>
	<version>1.4.2</version>
</dependency>
<dependency>
	<groupid>commons-logging</groupid>
	<artifactid>commons-logging</artifactid>
	<version>1.1.0.jboss</version>
</dependency>
<dependency>
	<groupid>org.jboss.integration</groupid>
	<artifactid>jboss-integration</artifactid>
	<version>5.1.0.GA</version>
</dependency>
<dependency>
	<groupid>jboss</groupid>
	<artifactid>jboss-serialization</artifactid>
	<version>1.0.3.GA</version>
</dependency>
<dependency>
	<groupid>org.hibernate</groupid>
	<artifactid>ejb3-persistence</artifactid>
	<version>1.0.2.GA</version>
</dependency>
<!-- andere libs -->
<dependency>
	<groupid>org.jboss.aspects</groupid>
	<artifactid>jboss-remoting-aspects</artifactid>
	<version>1.0.2</version>
	<exclusions>
		<exclusion>
			<groupid>org.jboss.aop</groupid>
			<artifactid>jboss-aop</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.microcontainer</groupid>
			<artifactid>jboss-kernel</artifactid>
		</exclusion>
		<exclusion>
			<groupid>org.jboss.security</groupid>
			<artifactid>jbosssx</artifactid>
		</exclusion>
	</exclusions>
</dependency>	
<dependency>
	<groupid>javassist</groupid>
	<artifactid>javassist</artifactid>
	<version>3.10.0.GA</version>
</dependency>

Maven: “Error installing metadata”

Today I had a problem compiling and installing a simple maven project.
Every time I ran “mvn install” I received the following error:

Error installing artifact's metadata: Error installing metadata:
Error updating group repository metadata
input contained no data

The problem here was an empty maven-metadata-local.xml in my local repository of the artifact I wanted to install. After completely removing this artifact from my repository an install was possible.

Using reflection with arrays and primitive types

Sometimes it is necessary to handle a parameter of type object different for the real type. So you have to use instanceof to determine the type of an object. If you are need to check if it is an array, you can use the Reflection-API provided by the JRE. The Reflection API is a comfortable and rich functional API to inspect and manipulate Objects at runtime. One example could be to access private fields at runtime.

I had the problem to serialize some variables to JavaScript, so I wrote me a simple function:

1
public void objectToJavaScript(Object object, StringBuffer buf);

If the given object is primitive I would simple add it to the provided StringBuffer, but if it is an array I need to output ‘[‘ and ‘]’ with the given parameters. So I have to check if the object is an array:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
public void objectToJavaScript(Object object, StringBuffer buf) {
    if (object == null) {
        buf.append("null");
        return;
    }
    ... //other types
    if (object.getClass().isArray()) {
        buf.append('[');
        //TODO output array content
        buf.append(']');
        return;
    }
    ...
}

But how to access each entry of the array? One way could be to cast the object to Object[]. Unfortunately
if the array is an array of primtive types this would throw a ClassCastException. So we have to use the functions, provided by java.lang.reflect.Array. The full code looks like:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
public void objectToJavaScript(Object object, StringBuffer buf) {
    if (object == null) {
        buf.append("null");
        return;
    }
    ... //other types
    if (object.getClass().isArray()) {
        buf.append('[');
        int len = java.lang.reflect.Array.getLength(object);
        for(int i = 0; i &lt; len; i++) {
            if (i &gt; 0) buf.append(',');
            objectToJavaScript(java.lang.reflect.Array.get(object, i), buf);
        }
        buf.append(']');
        return;
    }
    ...
}