One of the ways to learn middleware (EJB)-struggling

Source: Internet
Author: User
Tags jboss jboss server

It has been nearly a month since we officially started using the middleware concept. The effect is not good. Although there are some problems in the middle, the overall efficiency is very low. The process of instance development and learning has slowed down in the last week. This is what I have always been weak, but it is a good opportunity to learn and exercise. There is a clear clue about the video, and there are many other problems.

The first problem is that all development tools need to be downloaded by themselves, and the resources for downloading these things have been searched for half a day. The next step is to build eclipse + JBoss + jbosside. Although there are a lot of articles on the establishment process that have been written on the Internet, the video is also very smooth, and here I am going to have one question:

Let's talk about the development tools you need:

Apache-ant-1.8;

Jboss4.0.4 (server );

Jboss-ejb3.0-RC9

1. Development versions do not cause any problems.

The first is jboss5.0, which was originally thought to be backward compatible with the later version and can be applied to jdk1.6. So I didn't care much about it. The result was not compiled when ant compiled the JBoss server. When an error is thrown (jboss_home/Server/All/lib/JBoss. Jar cannot be found), I do not know the version. Therefore, Baidu and Google have no response. There is a kind of call for Baidu. Finally, I started my head and changed to jboss4.2.3 because versions earlier than 4.2 are not compatible with jdk1.6. The error continues, but the error message is changed (an XML file does not exist ). In desperation, I changed jboss4.0.0 and finally the ant compilation passed. Later, when I was writing code for instance testing, I always reported an error and finally switched to jboss4.0.4.

The second is jboss-ejb3.0-RC9, thought this thing is almost rc9 on the line. So I found the jboss-EJB-3.0_RC9_Patch_1 version on the Internet and compiled JBoss through it ant various servers are passed, so I feel no problem. Always report errors when writing code to do instance testing, and solve the problem after changing to jboss-EJB-3.0_RC9-FD.

The third is the JDK issue. Since I started to install JDK 1.6, jboss4.0 is only compatible with JDK. When I started reporting various errors, I didn't know what the problem was, baidu and Google did not have any results. Finally, they carefully observed the error message stack and prompted that ** jdk1.5 ** could not be loaded. Suddenly they understood that it was a JDK problem, so they installed jdk1.5, after some hard work, the problem was finally solved.

(Note: the last step of the above three versions is to solve the problem only when the instance is created. The three final problems must all be solved before they can be run .)

The fourth is jbosside. Because jbosside is integrated with eclipse, and there is a lot of information on how to integrate online, eclipse I use version 3.7, I thought it was okay, however, after integration is completed step by step, the desired results cannot be achieved or the ejb3.0 project cannot be developed. Although there is no final confirmation, it is still predicted that this version is related to the eclipse version. The version 3.7 is a little high. Therefore, jbosside is used rather than integration.

These version problems have caused me a lot of trouble. I have gone a long way and cannot go around, various download materials, various Environment Variables change, and restart your computer. After a variety of tossing, the first example was successfully run. Of course, the learning experience is also huge. After this round, I am no longer afraid of all kinds of errors. In addition, we can draw a conclusion: if the error stack is printed on the console, and with the accumulation of common sense about exceptions, most of the problems can be obtained from the stack, so as to achieve the effect of getting rid of disease by needle. Of course, this still requires experience accumulation.

 

The following are some of the problems encountered and the main websites for troubleshooting:

Use eclipse3.2.1 + JBoss + ejb3.0 for development:

Http://hi.baidu.com/297913156/blog/item/a5e3acfe6679f554d6887dd8.html

Eclipse integrates jbosside

Http://download.csdn.net/download/zfk_j2ee/269856

 

Download jboss4:

Http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.0.0/jboss-4.0.0.zip/download

 

Http://sourceforge.net/projects/jboss/files/JBoss/JBoss-4.2.3.GA/

 

Download jbosside:

Http://sourceforge.net/projects/jboss/files/JBossIDE/JBossIDE%202.0.0.Beta2/

 

Download jboss-ejb-3.0_Embeddable_ALPHA_9.zip:

Http://sourceforge.net/projects/jboss/files/EJB%203.0/JBoss%20EJB%203.0%20Preview%20RC9/

 

Question 1: caused by: Java. Lang. nosuchmethoderror: org. JBoss. ejb3.ejb3deployer. setsuffixes ([ljava/lang/string;) V

At org. JBoss. ejb3.ejb3deployer. <init> (Ejb3deployer. Java: 88)

 

15:01:08, 454 error [maindeployer] cocould not create deployment: file:/E:/javaprogram/jboss-4.0.0/Server/All/deploy/jboss-aop-jdk50.deployer/

Org. JBoss. Deployment. deploymentexception:-Nested throwable :( java. Lang. Reflect. undeclaredthrowableexception)

 

Caused:Javax. Management. instancenotfoundexception: JBoss. remoting: TYPE = connector, name = defaultejb3connector, Handler = ejb3 is notregistered.

 

 

Caused:Java. Lang. classnotfoundexception: No classloaders found for: org. JBoss. ejb3.cache. Tree. passivationtreecache

Solution: To solve the JDK version problem, replace jdk1.6 with jdk1.5.

Question 2: Java. Io. invalidclassexception: Org. jnp. Interfaces. marshalledvaluepair; Local classincompatible: stream classdesc serialversionuid =-3403843515711139134, localclass serialversionuid =-6485622724173581497:

Http://blog.sina.com.cn/s/blog_4b6de6bb010007qz.html

 

Solution:

Http://www.docin.com/p-142948291.html

The reason is that two projects are deployed on the JBoss server (all), both of which have the same entity class, and the serial numbers of the two projects are inconsistent. In the same JVM, deserialization may fail, change the serial number to the same one.

 

 

2. Oracle problems. N has not installed the system for a long time, and N has not installed a variety of software for a long time. It was very smooth before oracle was installed. I have not encountered any problems and finally exposed the problem two days ago, and it's strange. The installation process is not very smooth. After XXXX, it is installed, but there is a problem: If sqlplus is used in DOS to connect to the database, the connection from PLSQL is successful, otherwise, PLSQL cannot be connected, and clicking the network configurator does not respond. To enter the network configurator, you must use the DOS command to access it. The problem is still being solved. First, let's summarize this stage.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.