[Beginner's Corner] - Hot deploying to a local jBoss
by Kevin Sheedy
Kevin Sheedy [http://community.jboss.org/people/kevinsheedy] created the discussion
"Hot deploying to a local jBoss"
To view the discussion, visit: http://community.jboss.org/message/578658#578658
--------------------------------------------------------------
Hi
I'm new to jBoss. I want to know the best approach for deploying code to a local jBoss while doing day to day development. ie change 1 jsp file, test it in my browser. Change a line of java, deploy, test. Repeat ad lib.
At the moment, the team's approach is to change one line, compile the whole project, build a full war and copy it into the deploy folder to be picked up by the hot deploy scanner. This is really slow.
What approach have people taken to deploying java code? Multiple smaller wars? Jars? Deploying the changed .class files?
Anyone know how to make jBoss read jsp files straight out of a source controlled folder?
(I got it to read js & css straight out of source control by changing the server.xml, Host -> Context -> docBase="C:/dev/web")
Thanks
Hi
I'm new to jBoss. I want to know the best approach for deploying code to a local jBoss while doing day to day development. ie change 1 jsp file, test it in my browser. Change a line of java, deploy, test. Repeat ad lib.
At the moment, the team's approach is to change one line, compile the *whole project*, build a huge war and copy it into the deploy folder to be picked up by the hot deploy scanner. This is really slow.
What approach have people taken to deploying java code? Multiple smaller wars? Jars? Deploying the changed .class files?
Also, I want to make jBoss read jsp files straight out of a source controlled folder? (so that I can just change a jsp file and refresh my browser without having to explicitly deploy the jsp. I got jBoss to read js & css straight out of source control by changing server.xml -> Host -> Context -> docBase="C:/dev/web")
Thanks
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578658#578658]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Portal] - Problem with importing a simple Java project on an Ejb
by momsse momsse
momsse [http://community.jboss.org/people/momsse] created the discussion
"Problem with importing a simple Java project on an Ejb"
To view the discussion, visit: http://community.jboss.org/message/578785#578785
--------------------------------------------------------------
Hello and happy new year,
Please excuse me for my English (i am French).
I'm new to JBoss (AS version 4.4 GA), I work on a project with EJB 3.0, and am having a problem to import a project (a simple java project) in my EJB:
My project contains an EJB module:
- DemoEJB
an WAR:
- DemoWAR
and an EAR that includes them:
-DemoEAR
I want to use a Java project that contains the example for this simple class:
public class Hello {
public String hello(){
return "Hello";
}
}
When I made it like that:
@Entity
@Table(name = "addresses")
public class Address implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private int ID;
private String name;
public Address() {
}
public Address(Hello h) {
}
//...
}
I get the following error:
18:40:37,464 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: persistence.units:ear=DemoEAR.ear,jar=DemoEJB.jar,unitName=DemoPU
State: FAILED
Reason: java.lang.RuntimeException: java.lang.NoClassDefFoundError: hello/Hello
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DemoDS
Depends On Me:
jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoDB,service=EJB3
ObjectName: jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoDB,service=EJB3
State: NOTYETINSTALLED
I Depend On:
persistence.units:ear=DemoEAR.ear,jar=DemoEJB.jar,unitName=DemoPU
Depends On Me:
jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoRemoteImpl,service=EJB3
ObjectName: jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoRemoteImpl,service=EJB3
State: NOTYETINSTALLED
I Depend On:
jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoDB,service=EJB3
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: persistence.units:ear=DemoEAR.ear,jar=DemoEJB.jar,unitName=DemoPU
State: FAILED
Reason: java.lang.RuntimeException: java.lang.NoClassDefFoundError: hello/Hello
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=DemoDS
Depends On Me:
jboss.j2ee:ear=DemoEAR.ear,jar=DemoEJB.jar,name=DemoDB,service=EJB3
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578785#578785]
Start a new discussion in JBoss Portal at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Petr H
Petr H [http://community.jboss.org/people/hostalp] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578782#578782
--------------------------------------------------------------
> You are controlling this by the before-filter config.
> If it's AFTER_BUT_JAVA_ONLY then it's the same as what you get with parent-first=false.
>
> jb-cl-domain.xml is by default java-se compliant, meaning parent-first=true.
> It could be debated what should be the default, but I think this is more natural.
before-filter? Didn't you mean parent-policy instead? Because what could be simply done is:
<?xml version="1.0" encoding="UTF-8"?>
<classloading-domain xmlns="urn:jboss:classloading-domain:1.0" name="jboss.j2ee:extension=LoaderRepository,service=EARDeployment,url='ibs.ear'" parent-domain="DefaultDomain">
<parent-policy name="AFTER_BUT_JAVA_BEFORE">
<before-filter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.NegatingClassFilter">
<constructor>
<parameter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.spi.filter.RecursivePackageClassFilter">
<constructor>
<parameter>org.hibernate</parameter>
</constructor>
</javabean>
</parameter>
</constructor>
</javabean-->
</before-filter>
<after-filter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.NegatingClassFilter">
<constructor>
<parameter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.spi.filter.RecursivePackageClassFilter">
<constructor>
<parameter>org.hibernate</parameter>
</constructor>
</javabean>
</parameter>
</constructor>
</javabean>
</after-filter>
</parent-policy>
</classloading-domain>
but then only parent policy is set to AFTER_BUT_JAVA_BEFORE and additional filters have no effect.
Equivalent to AFTER_BUT_JAVA_BEFORE parent policy via filters would be that already posted:
<?xml version="1.0" encoding="UTF-8"?>
<classloading-domain xmlns="urn:jboss:classloading-domain:1.0" name="jboss.j2ee:extension=LoaderRepository,service=EARDeployment,url='myapp.ear'" parent-domain="DefaultDomain">
<parent-policy>
<before-filter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.JavaOnlyClassFilter" />
</before-filter>
<after-filter>
<javabean xmlns="urn:jboss:javabean:2.0" class="org.jboss.classloader.plugins.filter.EverythingClassFilter" />
</after-filter>
</parent-policy>
</classloading-domain>
but that of course doesn't work because of private constructors (and even if it would work it wouldn't be of much help when multiple filters can't be specified in each (before/after) section).
As a quick solution I've currently removed the hibernate-validator-legacy.jar from JBoss libs which got us further, but I'll try to look at some solution with combining filters. but generally I was hoping that this jboss-classloading-domain.xml approach would bring an easy solution right away - at least for this case which is probably to be used most - I believe.
And yes, I too think that parent-first is more natural, but the weirdness here is that "plain default" is false while adding classloading config turns it automatically into true. Then if you want to use filters the previous behavior changes significantly just because of that. The optimal target would be either to allow for multiple filters directly, or at least alllow change the parent-first state and let filters work over it.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578782#578782]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[Beginner's Corner] - Sha-2 ssl certificates
by jenna albertson
jenna albertson [http://community.jboss.org/people/jalbertson] created the discussion
"Sha-2 ssl certificates"
To view the discussion, visit: http://community.jboss.org/message/578775#578775
--------------------------------------------------------------
Hi.
I am a support rep for an application that uses jboss as its web app. I am looking into the affect of Sha-2 ssl certifictes. Its new ssl technology that some government agencies are required to use. I have done some preliminary research on it so far, so do not know too much about it. I found some information on ms technet blog that certain os versions will not have support for this type of ssl while others will require patches. I wasn't sure if this would affect web servers and thought I would post a question here. Not sure if I am in the right location for the question. Also, I do not know too much about jboss, just enough to support my product. The versions we use are 4.0.4, 4.0.5, 5.0.1,
Thanks in advance for any info you can provide.
Jenna
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578775#578775]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578638#578638
--------------------------------------------------------------
> I've found out that if I specify an ear file name as domain name in jboss-classloading-domain.xml then I see two classloaders in JMX view:
> domain: "jboss.j2ee:extension=LoaderRepository,service=EARDeployment,url='myapp.ear'" - the default one created by ear deployer, with parent policy: "AFTER_BUT_JAVA_BEFORE" and parent domain "DefaultDomain"
>
> domain: "myapp.ear" - created from jboss-classloading-domain.xml, with parent policy: "(before=EXCLUDE [org.hibernate.validator] after=)" and no parent domain (null).
>
> So it looks like I'll have to either add jboss-classloading.xml to change the domain name to the same valuse which is in jboss-classloading-domain.xml or modify jboss-classloading-domain.xml to use the default one.
> I quickly tried both but it broke the app - it couldn't load javax.servlet.http.HttpServlet (using negated recursive package filter for org.hibernate.validator as before-filter). With some other filter it couldn't start for other reasons so I'll try figure out a bit more about what actually happens..
Ah, another thing I missed -- EARClassLoaderDeployer. ;-(
Same issue as WebCLDeployer, it also sets some defaults, if no CLMetaData exists.
Let me check what gets used if you don't define any parent-domain in jb-cl-domain.xml.
> Also I noticed that war classloaders don't show up any parent domain (null).
How do you see this?
Didn't we fix this with explicit jb-cl.xml in each of the wars? (until WebCLDeployer is fixed)
> So do you think that NothingClassFilter combined with RecursivePackageFilter (the same way as NegatingClassFilter) would do the desired blocking?
If you use NothingFilter then there is nothing to combine. ;-)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578638#578638]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Web Services] - jboss6 final and jbossws 3.4.0
by Antoine Brun
Antoine Brun [http://community.jboss.org/people/abr] created the discussion
"jboss6 final and jbossws 3.4.0"
To view the discussion, visit: http://community.jboss.org/message/578425#578425
--------------------------------------------------------------
Hello,
I'm currently trying to migrate our application from jboss5 to jboss6 and I'm running into some issues.
My first try was with jboss6 CR1:
We have some web services (EJB3 endpoints) and they all have @HandlerChain declaration (we use this to do the XML validation since the built-in SOAP validation didn't work on Jboss5) and it all worked fine with jboss5 and jbossws native 3.3.1 GA.
Now with jboss6 CR1, since it is shipped with jbossws-CXF 3.4.1 my @HandlerChain declaration does not seem to be valid any more (btw, I was not able to find any clear document on own to declare a handler chain with CXF).
So I've decided to use *jbossws-native-3.4.0* (the latest version available) and I worked fine: I was able to have my web services running just like with jboss5
Today, I've downloded *jboss6 Final with CXF 3.4.1*
18:32:43,489 INFO [AbstractServerConfig] JBoss Web Services - Stack CXF Server 3.4.1.GA
and just like for jboss6 CR1, I tried to deploy jbossws native.
But this time I get:
18:34:46,515 INFO [AbstractServerConfig] JBoss Web Services - Native Server 3.4.0.GA
18:34:46,523 ERROR [AbstractKernelController] Error installing to PreInstall: name=WSDescriptorDeployer state=Real: java.lang.NoClassDefFoundError: org/jboss/wsf/spi/metadata/DescriptorParser
at java.lang.Class.getDeclaredConstructors0(Native Method) [:1.6.0_23]
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) [:1.6.0_23]
at java.lang.Class.getDeclaredConstructors(Class.java:1836) [:1.6.0_23]
.....
Caused by: *java.lang.ClassNotFoundException: org.jboss.wsf.spi.metadata.DescriptorParser*
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) [:1.6.0_23]
So, jboss6 CR1 comes with Stack CXF Server 3.4.0.CR3 and I can install Native Server 3.4.0.GA
But, jboss6 Final comes with CXF 3.4.1 and I cannot install Native Server 3.4.0.GA...
Can someone please explain me:
- *how to install jbossws native in jboss6?*
- *where do I get jbossws native 3.4.1 (is it available? 3.4.0 native or CXF are the latest available at http://www.jboss.org/jbossws/downloads http://www.jboss.org/jbossws/downloads )?*
- *how do I declare HandlerChain with CXF?*
my EJB have @HandlerChain(file = "/META-INF/soapHandler/handler-chain.xml")
and the handler-chain.xml is as follow:
<?xml version="1.0" encoding="UTF-8"?>
<handler-config>
<handler-chain>
<handler-chain-name>SoapHandler</handler-chain-name>
<handler>
<handler-name>SoapMessageValidationHandler</handler-name>
<handler-class>com.ubiqube.api.ws.soapHandler.MessageValidationSoapHandler</handler-class>
</handler>
</handler-chain>
</handler-config>
thanks,
Antoine
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578425#578425]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years
[JBoss Microcontainer] - Re: How to stop my WAR loading JBoss's provided 3rd party classes?
by Ales Justin
Ales Justin [http://community.jboss.org/people/alesj] created the discussion
"Re: How to stop my WAR loading JBoss's provided 3rd party classes?"
To view the discussion, visit: http://community.jboss.org/message/578573#578573
--------------------------------------------------------------
> > Perhaps filter out the "org.hibernate.validator"?
> I'll try something, but I'm not sure what to try exactly. Looks like adding NegatingClassFilter for org.hibernate as after-filter isn't the way so I'm not sure which way to go to block some packages/classes completely regardless their presence anywhere or not.
> There should really be some "fully blocking" approach possible (and simply).
The same negating filter should also work for after phase.
The fully blocking filter is NothingClassFilter.
> EDIT: I tried to setup filters on org.hibernate.validator package several ways - before-filter was always NegatingClassFilter on that package, after-filter was once NegatingClassFilter, once just PackageClassFilter, also tried RecursivePackageFilter for both before-filter and after-filter in the end but to no avail.
Hmm, yeah, I think that was a typo on my end, we need RecursivePackageFilter.
But apart from that I don't see what can go wrong.
Could you debug a bit more?
Or do you have some test case / example to share?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/578573#578573]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years