Cannot narrow remot 怎么用...

下次自动登录
现在的位置:
& 综合 & 正文
Error 500–Internal Server Error 及404,找不到url
eclipse里面出错信息:
& 上午10时43分14秒 CST& &Error& &HTTP& &BEA-101020& &[weblogic.servlet.internal.WebAppServletContext@7baddd - name: 'testclient', context-path: '/testclient'] Servlet failed with Exceptionjava.lang.ClassCastException: Cannot narrow remote object ClusterableRemoteRef(-7126614S::bank:AdminServer [-7126614S::bank:AdminServer/297])/297 to com.login.interfaces.LoginHome at weblogic.corba.server.naming.ReferenceHelperImpl.narrow(ReferenceHelperImpl.java:206) at weblogic.rmi.extensions.PortableRemoteObject.narrow(PortableRemoteObject.java:88) at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:32) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) at com.login.interfaces.LoginUtil.lookupHome(LoginUtil.java:25) Truncated. see log file for complete stacktrace&
页面出错信息:Error 500--Internal Server Error
错误原因:
多个catch定义参数错误, catch (NamingException e) {
e.printStackTrace();
} catch (CreateException e) {
e.printStackTrace();
把其中一个e改为el就OK了,
这个错两天才解决,很郁闷!!!
另:测试时还出了一个404的错误,提示找不到url,是因为web.xml里面出错!
&servlet-mapping&
&servlet-name&ClientServlet&/servlet-name&
&url-pattern&/servlet/ClientServlet&/url-pattern&
&/servlet-mapping&改成:
&servlet-mapping&
&servlet-name&ClientServlet&/servlet-name&
&url-pattern&/ClientServlet&/url-pattern&
&/servlet-mapping&
&&&&推荐文章:
【上篇】【下篇】2004年6月 Java大版内专家分月排行榜第二2004年5月 Java大版内专家分月排行榜第二2004年3月 Java大版内专家分月排行榜第二
本帖子已过去太久远了,不再提供回复功能。Mercurial vs Git: Why Mercurial? | Atlassian Blogs
> This is a guest blog post by Steve Losh focusing on the primary reasons a team may choose Mercurial as their (distributed) version control system. Check out Steve’s projects to see some of the cool things he has worked on around Distributed Version Control, or jump over to his Bitbucket account and fork one of his many projects. In our previous posts, we talked about the history of version control and why it’s a good thing, as well as why distributed version control systems are better than centralized systems. There are two major distributed version control systems in widespread use today: Mercurial (Hg) and Git. There are many reasons (and opinions) why one would choose Git or Hg, and the next two blog posts in this series aim to explain some of these Whys. A Sane Command Line Interface The command line interface is the first thing many programmers will see when using a new version control system. Mercurial’s CLI is full-featured, stable, and elegant. It follows the UNIX philosophy: “each command should do one thing and do it well.” Git’s CLI is designed to be extremely flexible. Each command has many options that can change its behavior. This makes for less typing, but requires you to remember all of the various options and how they interact with each other. Git’s documentation must detail all the interactions between options, which makes it more verbose and difficult to skim. Mercurial’s simple approach leads to documentation which is sleek and concise. It’s easy to find what you’re looking for — using hg help, so you can spend less time looking at docs and get back to coding. It favors clarity over “cleverness”, which makes for an easier-to-use tool. Mercurial tries to be helpful by anticipating some of the more common aliases for commands and just making them work. For example, the hg rename command can also be run with hg move or hg mv. Git simply gives you a git mv command. You can create your own git move alias if you like, but that’s yet another step to try to make Git’s CLI pleasant to use while Mercurial’s is pleasant by default. Mercurial’s CLI is also quite similar to Subversion’s, which can help ease the transition between the two tools. Here’s a comparison of some of the most common commands. Mercurial/Git commands that are the same as their Subversion equivalents are bold. Subversion (SVN) Mercurial (Hg) Git svn add hg add git add svn blame hg blame git blame svn cat hg cat git show svn checkout hg clone git clone s hg push git commit - git push svn delete/remove hg remove git rm svn diff hg diff git diff, git diff –cached svn help hg help git help svn log hg log git log svn revert hg revert git checkout -f svn status hg status git status svn update hg pull –update git pull svn move/rename hg move/rename git mv & As you can see, Git makes less of &" />
> This is a guest blog post by Steve Losh focusing on the primary reasons a team may choose Mercurial as their (distributed) version control system. Check out Steve’s projects to see some of the cool things he has worked on around Distributed Version Control, or jump over to his Bitbucket account and fork one of his many projects. In our previous posts, we talked about the history of version control and why it’s a good thing, as well as why distributed version control systems are better than centralized systems. There are two major distributed version control systems in widespread use today: Mercurial (Hg) and Git. There are many reasons (and opinions) why one would choose Git or Hg, and the next two blog posts in this series aim to explain some of these Whys. A Sane Command Line Interface The command line interface is the first thing many programmers will see when using a new version control system. Mercurial’s CLI is full-featured, stable, and elegant. It follows the UNIX philosophy: “each command should do one thing and do it well.” Git’s CLI is designed to be extremely flexible. Each command has many options that can change its behavior. This makes for less typing, but requires you to remember all of the various options and how they interact with each other. Git’s documentation must detail all the interactions between options, which makes it more verbose and difficult to skim. Mercurial’s simple approach leads to documentation which is sleek and concise. It’s easy to find what you’re looking for — using hg help, so you can spend less time looking at docs and get back to coding. It favors clarity over “cleverness”, which makes for an easier-to-use tool. Mercurial tries to be helpful by anticipating some of the more common aliases for commands and just making them work. For example, the hg rename command can also be run with hg move or hg mv. Git simply gives you a git mv command. You can create your own git move alias if you like, but that’s yet another step to try to make Git’s CLI pleasant to use while Mercurial’s is pleasant by default. Mercurial’s CLI is also quite similar to Subversion’s, which can help ease the transition between the two tools. Here’s a comparison of some of the most common commands. Mercurial/Git commands that are the same as their Subversion equivalents are bold. Subversion (SVN) Mercurial (Hg) Git svn add hg add git add svn blame hg blame git blame svn cat hg cat git show svn checkout hg clone git clone s hg push git commit - git push svn delete/remove hg remove git rm svn diff hg diff git diff, git diff –cached svn help hg help git help svn log hg log git log svn revert hg revert git checkout -f svn status hg status git status svn update hg pull –update git pull svn move/rename hg move/rename git mv & As you can see, Git makes less of [&]" />
Act fast! Take advantage of Early Bird passes to Atlassian Summit Europe and AtlasCamp 2017.
Subscribe to Dev Tools by email
Subscribe by RSS
Popular Posts
Local Blogs
Subscribe to our .
Please enter a valid email address.java - Should I use PortableRemoteObject.narrow() for EJB 2.1 session bean in wildfly - Stack Overflow
to customize your list.
Join the Stack Overflow Community
Stack Overflow is a community of 6.7 million programmers, just like you, helping each other.
J it only takes a minute:
I'm using EJB 2.1 stateless session bean in wildfly 9.
TestService testServiceLocal = (TestService) context.lookup("java:app/WildEarEJB/TestService!in.hinote.ejb.TestService");
testServiceLocal.someMethod();
While the above code works, but I was wondering if this is ok? As I'm not following the old practice of:
Get ejb home object reference using JNDI
Use PortableRemoteObject.narrow and typecast it to home interface.
Use Home interface.create() to get the bean instance.
Is what I'm doing ok? Or should I find some way to follow the old practices. BTW, I tried using the home jndi and PortableRemoteObject.narrow(). But that seems to be giving a typecast error saying com.sun.proxy.$Proxy39 cannot be cast to org.omg.CORBA.Object.
A strict reading of the EJB spec says that if TestService extends EJBHome, then you must use PortableRemoteObject.narrow.
You said you're using EJB 2.1, but TestService is an unusual it sounds more like an EJB 3 style remote business interface.
If TestSession extends EJBHome, then I would say yes, you must use PortableRemoteObject.narrow, and your application server should support narrow for it.
27.4k25570
Your Answer
Sign up or
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Post as a guest
By posting your answer, you agree to the
Not the answer you're looking for?
Browse other questions tagged
rev .25081
Stack Overflow works best with JavaScript enabledFrom Terraria Wiki
Player versus Player brings a unique type of play to the world of Terraria. This is a game mode where one player or a team of players can defeat another player or team of players. This is done by joining a multiplayer world, and enabling the PvP option by clicking on the swords in the upper right hand corner of the screen. The only way a player can damage another player is if both have the PvP option enabled. There is also the option of joining a team. Teams are represented by the colored shields in the upper right corner of the screen as well. Once you select a team there is an onscreen notification of how far away they are, as well as how much health they have. PvP is not an overly useful game mode as it does not help game progression in any particular way. However it allows a very fun and challenging form of gameplay. Teamwork is usually the key factor in PvP combat, as it is also the key factor in Terraria. Below is a general guide as well as some tips, tricks, and hints that can help the average player become knowledgeable about the PvP factors in Terraria.
In PvP the window of invincibility after taking damage is greatly reduced if it came from another player. Normally, you would receive 2/3 of a second of invincibility (0.66). In PvP, however, you only receive 2/15 of a second (0.13). Additionally, the accessory
has no effect in PvP. Furthermore, various
and other items that normally apply debuffs do not apply these in PvP. Also homing weapons will not home in on players and minions do not target players. Last of all only people in your own team will be visible on the minimap and buffs from, for example
and , only affect your own team.
There are various types of PvP gameplay. You need to adjust your strategy accordingly. The most common types are:
Capture the Gem (CTG): Based on capture the flag. For more info see .
Using new characters: Often it is required to start a new character in a PvP world. This means that you need to progress quickly, so your gear doesn't fall behind on that of your enemies. It may be wise to choose an easy obtainable weapon over a harder to obtain one that is stronger. See also .
Using existing characters: If you are allowed to bring an existing character over it is safe to assume everyone has the strongest gear available. Make sure you do so as well if you want to have a chance to compete.
Hardcore: Sometimes it is required that your character is in
mode. Usually, this is combined with using new characters. In this case, people tend to die more often from enemies and traps than from players. Be very careful and do not rush through the game.
Controlled PvP: a PvP game with sets such as classes. Sometimes teams will have a set time to build defenses. This mode is often combined with other types, such as CTG.
War: an all-out pvp mode with no mercy. Destroy buildings, fight enemies. 20-30 min with a grace period at the beginning to build, as in Controlled PvP. Usually 7v7, but can be whittled down to 2v2 or expanded to 25v25!
Everyone has his (or her) own favorite equipment, so those will not be listed below. Instead, only equipment that for some reason is more or less useful in PvP than in single player are listed, so you can use this knowledge to gain an advantage. Also remember to reforge your weapons, should you be given the opportunity to use an existing character, because your enemies will certainly do so!
There is the saying "Don't bring a knife to a gunfight". Unlike most enemies, people will try to evade your attacks and run away while attacking with ranged weapons. This may mean you can have a rough time when using melee, but there are plenty of weapons that work well.
Any melee weapon shooting projectiles, this will overcome the range advantage other players have. However dedicated ranged weapons may perform better.
- A Very fast, projectile firing sword which comes with great damage, with enough skill and accuracy this may serve you well as you charge into the enemy's base.
- A long range flail to overcome the range disadvantage, while also dealing good damage and piercing through walls. Does NOT apply , however.
- A relatively spam able weapon that creates a wall of bubbles (however the bubbles won't home in on the player). Good when retreating.
- Close to medium range throwing blades that heal you. With Vampire Knives, high DPS loadout and a Greater Healing potion, you can get back into the fight quickly.
- Even if the weapon does not home in on enemies, the projectiles are likely to hit multiple enemies.
- Capable of stealthing players regardless of what armor their wearing. You can also quickly change weapons to use the other one, just as you reveal yourself. Note: though the Invisibility Potion is better than this in many ways, and less servers ban this item.
- Confusion disorients players, opening a window of opportunity to kill or wound the enemy player.
- A very high damage sword that shoots bouncing projectiles, with the right bonuses this weapon can 2-hit a player. Due to this, servers may ban this item.
- One of the highest damage weapons before Moonlord, One to two shots a player with low defense despite not homing on players.
A very high damage, high speed weapon that can 2-hit low defence players and is very difficult to dodge making it a good choice for close-ranged encounters.
- A very high damage javelin-like weapon which has high velocity but is affected by gravity. It doesn't inflict Daybroken debuff like the Solar Eruption.
Any explosive weapon will make it much easier to hit players, which usually try to evade attacks. A good example is the , which not only explodes, but also leaves exploding shrapnel behind. Additionally
can be used.
is also a good weapon.
Homing weapons on the other hand, are much less useful, as they do not home in on players.
Weapons with fast moving ammunition, for example . This will make it much harder for people to evade your shots.
- Allows you to see people coming from further away and deal a high damage shot before people start reacting to your attack.
- Allows you to quickly place traps on the map.
- Does NOT apply the debuff during PvP.
- Paired with , this can finish off players within seconds even with high armor.
Weapons with bouncing projectile such as
are hard to evade.
Many magic weapons are useful due to their homing effect. However due to the loss of this effect in PvP these weapons are far less useful.
(and ) - Allows you to hit players that are hiding behind blocks (which players tend to do).
also allows you to hit players underground.
- A short range weapon that creates a wall of bubbles, useful against melee players.
- Although there are enough other bounding weapons, this one instantly travels to it maximum range, which makes it a very effective weapon underground.
- Allows attacks through the terrain, which players tend to hide behind.
- Does NOT work during PvP, be warned!
- Does NOT apply debuff during PvP.
- This weapon has a high damage output and sometimes shoots out larger projectiles with 3 times the damage, effectively killing low-defense players in a single hit. Like the , servers may ban this for use in PvP.
Unfortunately, Minions do not target players. They can still be used to keep normal enemies away while fighting, however, you are better off using another weapon against players.
- Does NOT work during PvP.
- Normally only usable as novelty, it actually serves a purpose during PvP.
Usually players use strong weapons that will kill you in a few hits. As armors provide a flat reduction it usually doesn't help much and you are better of choosing an armor that provides a damage bonus instead.
- Actually give a percentage based damage reduction (for the first few hits), increasing your survivability a bit. They may interfere with invisibility however.
- Has a sweet stealth bonus but makes you move slowly.
- Makes you invisible while not moving.
(with Hood) - Will heal the player with the least amount of health in your team.
- The crystal will not target players unless they take damage from another source first!
You can use vanity to confuse your enemy, for example wearing a melee set while being ranged. Or wearing a low level set so people don't expect you to be a threat.
You can wear Shroomite armor in your vanity set to become invisible while not moving.
You can wear , which in combination with an
makes you truly invisible. HOWEVER, some accessories are not completely invisible when you're invisible, such as .
As players usually use strong hitting weapons and ends quickly accessories providing a defense or regeneration bonus are far less useful. On the other hand, movement accessories will help you evade attacks, becoming far more useful.
Accessories that protect you from the Confused debuff, which players may use against you. Most notably .
- Both a blessing and a curse. Although knockback can be severely annoying, especially for melee characters, it will also knock you out of the way when a row of bullets comes at you greatly reducing the damage received.
- Provides the biggest defense bonus of all accessories without prefixes or other special modifiers, at +6 defense. It also protects against knockback and reduces damage taken by allies (by taking the damage yourself) when the wearer is above 25% HP. When taking damage from others, you still react as if you took damage, activating effects such as the Star Cloak's stars. An excellent choice in team-based PvP.
- Assuming the enemy is not using a Cobalt Shield it is very effective in keeping melee enemies away from you.
- Provides a percentage based reduction, which is rather useful during PvP.
- Allows you to see enemies from further away.
- Does NOT work in PvP.
Healing and Mana potions - So you can stay in the fight longer.
- Good idea to carry on you in case of a lava moat/trap.
- Useful for when you need to hide in water and/or lava (you can also breathe in lava with this potion, and if you have Obsidian Skin, not take damage from it).
- To actually become invisible with this potion, a player would either be required to remove all armor or to wear the full set of
in the social slot (which is much wiser). Wings also should be equipped, just turned visibly off, as of 1.2.3. There is a great benefit in being able to move around without being seen, although your weapon can be seen when you use it. Some servers ban this item.
- When you are attacked with melee, this potion deals 1/3 of the resulting damage back to your attacker! They'll be beating themselves up!
- Good to avoid sneak attacks.
- Maneuverability to evade attacks is the best way to win a PvP fight. Can also be a suitable replacement for Rocket Boots/Wings, freeing up an accessory slot.
- Very useful to counter player placed traps.
- Does NOT apply debuffs in PvP.
The strategies will depend on the type of PvP gameplay (see above). The strategies described below may not work if enemies already have end game gear or it may simply be too time-consuming to perform.
Although it may be fun to just charge at the opponents' base until it's left as a pile of rubble, it's not all that effective. Your enemies (if they're really worth attacking) most likely have set up traps and other defenses to counter anyone who gets too close. Instead, get some information on the opposing base before jumping at it. Take an invisibility potion or two and head to their base. Learn what you can, then figure out a way to suppress or completely neutralize the defences... then charge ahead mindlessly!
Attacking the enemy base constantly will make it hard for your enemies to build up a camp and repair defenses. Furthermore, by looting enemy resources (even just crafting stations) will slow down enemy progression, while advancing your own. You can also, for example, summon a boss in the enemy camp, which if they are unprepared can make quick work of them. On the other, hand if they can beat the boss you may be giving them valuable resources instead!
if you've got enough defenses set up, it'll take ages for the enemy to get to your base! In turn, you can simply send a few guys to chip away at the opposing base!
Although it's tempting to just give yourself the best of everything and powerhouse through whatever situation comes your way, in reality, you're just robbing yourself of potential. Most armor and accessories improve a single attribute, and the few "rounded" pieces have reduced potency [example: ranger emblem gives plus 15% ranged damage, while the avenger emblem improves all attacks, but only by 12%]. Many weapon load outs are only good for a few select tasks as well.
Exception: if you're relying on magic weapons, it's not a bad idea to bring a melee weapon in case you run out of mana.
The most important aspect is to have a good battle strategy. People are far less predictable than normal enemies and use different weapons and strategies. Below some general tips can be found to help you win the battle
Sometimes using stealth (be it from , , ,
or simply standing in a dark spot) will allow you to attack other players by surprise. Also using a
allows you to attack players first. This way you can properly get a few hits in before they attack back, however, it will require you to wait for a player to get near you, rather than attacking the player.
As important it is to hit your enemies it is equally important to prevent getting hit. Having good maneuverability is the key to evading enemy attacks or quickly dealing damage in case you use melee. Potions can be of great help for this. Furthermore, it is equally important to limit your opponents maneuverability. For example, early game you can stand on top of a hill, making it harder for your opponent to reach you or at least slowing him down.
Standing behind a wall will ensure that most no-one can hit you. As a melee player you can use this to force ranged users to get close to you and as a ranged user, you can shoot and quickly duck behind cover again. Of course, this can be countered by using explosives that will either destroy the blockade or damage the person behind it. This method is useless when your enemies have weapons that can travel through blocks such as Solar Eruption.
Not all tactics need to directly be about fighting. Using more passive tactics such as spying on foes or using Spectre armor to heal allies could be just as effective in the long run.
Just spam bosses in enemy bases, the best way to wreak havoc is to spawn
just as day is about to break...
will effectively counter most of these traps.
are properly the easiest obtainable , that will prevent your base (and defenses) from being destroyed by someone using explosives. In case explosives are not banned on the server consider using those.
Some small pits, hills and barriers, combined with some
over a large area will considerably slow down anyone trying to charge through the base at full speed.
Counter: use
or / to fly over the obstacles.
Pit trap - click to view summary for details.
A pit trap is seen when a player digs multiple holes that are 4ft (2 blocks) wide and about 40ft (20 blocks) deep. At the bottom of the pit, spikes are usually placed. In some occurrence, lava may be placed at the bottom in small puddles. Alternatively, if a player gets trapped in a pit trap, the owner of the trap can drop mass amounts of sand on the trapped player to defeat them.
The pit trap becomes more efficient if lined with , as this will likely burn players attempting to get out. One can also place a one-block floor and remove it from range with the . This is efficient at night if there isn't light around because this is impossible to see under the floor in such case.
Another variant of this is to place an
ceiling (or using ) to the trap, which can be as thick as you want, and have it all wired to a singular pressure plate on the centre of the ceiling. When the pressure plate is stood on, it will deactivate the stone blocks, leaving the victim to fall to their death. The downsides of this are that it can take a long time to reset, uses a lot of wire and can be spotted by holding a wire-related device.
Counter: Fly over the traps with Rocket Boots or escape with a
equipped. By using the Hook, a player can also slingshot himself out quickly if their timing is right. If the enemy is using a Dirt Rod as visibility is low, one can cast a , throw some
or use a ranged weapon that emits light to detect a hidden trap.
A spike trap is seen when a player has raided a dungeon of its spikes and mindfully put them in locations that are effective in whittling away health. These spikes can be used to damage other players. Spikes are often best used when they are out of sight of the player and placed on walls or ceilings. When a player puts spikes on the wall or ceiling a player will hesitate to grapple, leaving the target open for a sand trap.
Counter: Look for an alternative way around, or use the
to latch in between two walls without touching either of them.
Lava trap - view summary for details.
A lava trap is seen when a player takes lava from the -2100ft level and uses buckets to move it up to his or her fortress. This lava is then held in place in a funnel-shaped container, which is corked off by a web/sand cork. A player using cobweb should also consider using dart traps connected to pressure plates near the place where lava falls. This way, the poison darts will tear the cobweb and the trap will be activated. This technique coupled with the sand trap is a sure way to deal good amounts of damage, and the player can also become trapped.
Counter: Keep water handy to temporarily stave off the lava, or have a Lava Charm or Lava Waders equipped.
This is a very simple
recommended for beginner players. Place
in a vertical line with
connecting them all to a
at the bottom. When players approach, simply flip the switch and every player within range of the traps is poisoned. Though players can easily remove the traps once they get close, they will still have taken some damage, which can help greatly in the long run. You may want to put blocks like
(or, even better, ) in the way so it's harder to reach the traps. Also, if you have access to the , using Super Dart, Flame, Spear, or Spiked Ball Traps would be immensely more effective. This trap can also be helpful against goblin/ pirate invasions.
Counter: If you see one of these built, find another way around it or simply destroy it if it's unmanned. Also, a bezoar/ medicated bandage/ ankh charm/ ankh shield will protect from the effects of the poison, and if you have a high defense along with that, the dart traps should do next to nothing. However, if stronger traps are used, avoid them to the best of your ability, or as before, destroy them. Placing blocks can block the darts.
Make a path of either Dungeon Bricks or Hardmode Metal, place a long line of Explosives Blocks underneath, wire it to a lot of Pressure Plates, and then you run. For even more effect, you can make a Lava Lake on top of the trap, or add some Inactive Stone Blocks to the entrances, and the link them with the Explosives. The Lava Lake gets blown apart, filling up the crater, and the Inactive Stone Blocks activate, trapping the target.
A simple concept, have a room with monster spawning
(preferably mimics) hooked up to a timer. Create a door with
hooked to a switch. Then when enemies come flip the switch and let the monsters do the work for you. If you set it up well, you can even put your base in the middle of the trap!
Note: this is an incredibly dangerous trap, even to your own team! Be sure that everyone has set their spawn in the base!
Counter: use sentry turrets, preferably lunar tiered ones, and wait until the room is empty enough that you don't die the instant you set foot in it!
 ·  ·  
 •  •  •  •  •  •  • 
 •  •  •  •  • 
 •  •  •  •  •  •  •  • 
 •  •  •  •  • 
 •  •  •  •  •  •   •   • 
 •  • 
 •  •  •  () •  •  • 
 •  •  •  •  •  •  • 
 •  •  • 
Multiplayer
 •  •  • PvP

我要回帖

更多关于 remot 怎么用 的文章

 

随机推荐