[JBoss JIRA] Created: (JBAS-8575) @EJB injection into JAX-RS resource not working
by Radai Rosenblatt (JIRA)
@EJB injection into JAX-RS resource not working
-----------------------------------------------
Key: JBAS-8575
URL: https://jira.jboss.org/browse/JBAS-8575
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3, Weld/CDI
Affects Versions: 6.0.0.M5
Environment: jboss 6.0.0.M5 on JDK 6U18 / windows XP
Reporter: Radai Rosenblatt
Assignee: Carlo de Wolf
i have a simple JAX-RS Resource bean:
@Path("/demo")
public class DemoResource {
@EJB
private ServiceInterface service;
public DemoResource() {
int forBreakPoint = 42;
}
@GET
@Produces("application/xml")
public StreamingOutput doSomething() {
service.doSomething();
// more code ...
which references a stateless session bean. the JAX-RS resource is inside a war module, the SLSB in an eab module, both under the same ear.
injection of the SLSB into the JAX-RS Resource is not working - field is null.
from looking ta the server log this is not an order of init. issue since the jax-rs bean is deployed after the SLSB has been bound to JNDI:
09:29:48,410 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:
ear-1.0-SNAPSHOT/serviceImpl/local - EJB3.x Default Local Business Interface
ear-1.0-SNAPSHOT/serviceImpl/local-demo.ServiceInterface - EJB3.x Local Business Interface
09:29:49,159 INFO [TomcatDeployment] deploy, ctxPath=/jax-rs
im attaching the maven project as well the the ear for anyone who wants to reproduce.
steps to reproduce:
1. build ear (mvn clean install)
2. deploy ear on jboss 6 M5
3. access http://localhost:8080/jax-rs/demo/ with a web browser
4. watch the fireworks
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-7957) Ejb3ClientDeployer should ignore non-.jar deployments
by Mike Clark (JIRA)
Ejb3ClientDeployer should ignore non-.jar deployments
-----------------------------------------------------
Key: JBAS-7957
URL: https://jira.jboss.org/jira/browse/JBAS-7957
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Deployers
Affects Versions: JBossAS-5.1.0.GA
Reporter: Mike Clark
Assignee: Ales Justin
The org.jboss.ejb3.deployers.Ejb3ClientDeployer attempts to deploy based on the existence of a Main-Class attribute in an archive's META-INF/MANIFEST.MF. This deployment only makes sense for jar archives and for non-.jar archives an IllegalArgumentException is thrown:
2010-04-21 08:44:54,261 DEBUG [org.jboss.ejb3.deployers.Ejb3ClientDeployer] (main) Error during deploy: vfszip:/bin/jboss-5.0.0.GA/server/default/deploy/mydeployment.rar
java.lang.IllegalStateException: Expected either '.jar' or '.jar/' at the end of mydeployment.rar
at org.jboss.ejb3.deployers.Ejb3ClientDeployer.getDeploymentJndiName(Ejb3ClientDeployer.java:214)
at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:104)
at org.jboss.ejb3.deployers.Ejb3ClientDeployer.deploy(Ejb3ClientDeployer.java:61)
at org.jboss.deployers.vfs.spi.deployer.AbstractSimpleVFSRealDeployer.deploy(AbstractSimpleVFSRealDeployer.java:56)
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
Instead of throwing such an exception, the deployer should ignore other types of archives such as .rar archives that happen to have a Main-Class attribute defined.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-7980) Dependency Injection inconsistent with EJB3.1/JAX-RS
by Jon Kennedy (JIRA)
Dependency Injection inconsistent with EJB3.1/JAX-RS
----------------------------------------------------
Key: JBAS-7980
URL: https://jira.jboss.org/jira/browse/JBAS-7980
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: JBossAS-6.0.0.M2
Environment: Redhat Linux 4.1.2-41
Reporter: Jon Kennedy
Assignee: Carlo de Wolf
I'm making use of the recent EJB3.1 support in JBoss6M2 to deploy a stateless session bean within a war. This bean also implements a JAX-RS annotated interface and is called as a web service.
The session bean uses dependency injection to get a JPA EntityManager and the EJB SessionContext:
@Resource
private SessionContext context;
@PersistenceContext(unitName="drs2_services")
private EntityManager em;
The problem is that calling my service sometimes fails with a NullPointerException where I make use of the EntityManager or the SessionContext. This behavior is inconsistent and sometimes works.
To add more detail:
If I call the service and I get a NullPointerException on the EntityManager, I can work around the issue by restarting the service until the call succeeds. After it succeeds once, I won't see the NullPointerException again (until, perhaps, I restart the JBoss again).
The SessionContext issue is a little trickier. I am able to call my webservice from the browser successfully, but when using Java's HttpUrlConnection class, I consistently get a NullPointerException on the SessionContext.
I followed the RestEasy 1.2 guide for configuring and annotating my project, specifically chapter 38 "EJB Integration." I didn't bundle the ReastEasy jars in my war since they are bundled with JBoss 6.
Any help is appreciated, I'm happy to provide more details/code if desired.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-8777) "jar-file" entry in persistence.xml
by Eugene Romanenko (JIRA)
"jar-file" entry in persistence.xml
-----------------------------------
Key: JBAS-8777
URL: https://issues.jboss.org/browse/JBAS-8777
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: 6.0.0.CR1
Environment: Windows XP, JDK 1.6.0_23
Reporter: Eugene Romanenko
Assignee: Carlo de Wolf
If entity classes packed in separate jar and then we deploy ejb jar with persistence.xml, which have "jar-file" entry, entity classes from specified jar not loaded by JPA in JBoss 6.0.0 CR1 and 6.0.0 Final.
JBoss 5.1 works ok, JBoss 6.0.0 M3 works ok (not tested with milestones 4 and 5).
Adding "exclude-unlisted-classes" entry and setting it to "false" doesn't help.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-8557) JBSER is currently the default for EJB deployments and causes server faults on even simple running apps - probably should using a more stable default.
by Lincoln Baxter III (JIRA)
JBSER is currently the default for EJB deployments and causes server faults on even simple running apps - probably should using a more stable default.
------------------------------------------------------------------------------------------------------------------------------------------------------
Key: JBAS-8557
URL: https://jira.jboss.org/browse/JBAS-8557
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: 6.0.0.M5
Environment: JBAS Hudson Snapshot from 10/23/2010
Reporter: Lincoln Baxter III
Assignee: Carlo de Wolf
Error: http://pastebin.com/yadmfQR1
(05:07:40 PM) lincolnthree1: Hey folks - got an interesting issue:
(05:07:57 PM) lincolnthree1: I'm deploying an app with JSF, EJB, JPA, ets... pretty simple app, not much to it.
(05:08:21 PM) lincolnthree1: If I access a page, and start a session, then let the server sit for a few minutes/seconds, I get that error.
(05:08:27 PM) lincolnthree1: Repeated about a thousand times in the log.
(05:08:35 PM) lincolnthree1: And the deployment is hosed, I have to reboot the server.
(05:09:53 PM) dmlloyd: looks like the EJB is trying to passivate
(05:10:05 PM) dmlloyd: however it is doing so using JBSER which is far from spec-compliant
(05:10:33 PM) dmlloyd: 1) you could just disable passivization
(05:10:41 PM) lincolnthree1: It's pretty much a vanilla jboss install that I got from hudson 2 days ago
(05:10:42 PM) dmlloyd: 2) you could possibly configure it to use java serialization instead
(05:10:53 PM) dmlloyd: yeah, I agree it's a terrible default
(05:11:03 PM) dmlloyd: I'd call it a bug, even
(05:11:18 PM) lincolnthree1: it feels like a bug to me
(05:11:22 PM) lincolnthree1: it's a seam test-app
(05:11:24 PM) lincolnthree1: nothing fancy
(05:11:29 PM) lincolnthree1: shouldn't be crashing on people
(05:11:40 PM) dmlloyd: JBSER is only useful in a narrow range of circumstances where its non-spec compliance is offset by the marginal perf gains it gives
(05:11:51 PM) lincolnthree1: ah ha
(05:11:53 PM) dmlloyd: so I'd open a JBAS bug saying it shouldn't be hte default
(05:11:59 PM) lincolnthree1: thanks much!
(05:12:04 PM) dmlloyd: no prob :)
(05:12:27 PM) dmlloyd: also it's really wacky that it's printing this to stderr
(05:12:31 PM) dmlloyd: I'd open an EJB bug for that :)
(05:12:40 PM) dmlloyd: it should be logging it to a regular logger
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-8687) JPA2 persistence.xml in WEB-INF\classes\META-INF\ not allways deployed before Web context initialisation
by Geert Pante (JIRA)
JPA2 persistence.xml in WEB-INF\classes\META-INF\ not allways deployed before Web context initialisation
--------------------------------------------------------------------------------------------------------
Key: JBAS-8687
URL: https://jira.jboss.org/browse/JBAS-8687
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: EJB3
Affects Versions: 6.0.0.CR1
Environment: JBossAS [6.0.0.20101110-CR1 "Neo"]
Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java VM: Java HotSpot(TM) 64-Bit Server VM 17.1-b03,Sun Microsystems Inc.
OS-System: Windows 7 6.1,amd64
Unchanged default profile, with Oracle DataSource.
Reporter: Geert Pante
Assignee: Carlo de Wolf
I'm trying to run JASig CAS (http://www.jasig.org/cas) using the JpaTicketRegistry. This is done by putting a persistence.xml in WEB-INF\classes\META-INF with:
<property name="jboss.entity.manager.factory.jndi.name" value="java:jpa/CasEntityManagerFactory"/>
I refer to it from my Spring applicationContext
<jee:jndi-lookup id="entityManagerFactory" jndi-name="java:jpa/CasEntityManagerFactory"/>.
Most of the times this starts up correctly: first deploying and binding the Persistence Unit, and then starting the WebApplicationContext.
But once every 5 times, it starts in the wrong order: we first get
13:13:55,150 INFO [TomcatDeployment] deploy, ctxPath=/cas
13:13:55,204 INFO [[/cas]] Initializing Spring root WebApplicationContext
13:13:55,204 INFO [ContextLoader] Root WebApplicationContext: initialization started
13:13:55,208 INFO [XmlWebApplicationContext] Refreshing Root WebApplicationContext: startup date [Tue Nov 30 13:13:55 CET 2010]; root of context hierarchy
13:13:56,039 ERROR [ContextLoader] Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory': Invocation of init method failed; nested exception is javax.naming.NameNotFoundException: jpa not bound
[...]
13:13:56,088 ERROR [StandardContext] Error filterStart
13:13:56,088 ERROR [StandardContext] Context [/cas] startup failed due to previous errors
13:13:56,089 INFO [[/cas]] Closing Spring root WebApplicationContext
13:13:56,095 ERROR [AbstractKernelController] Error installing to Start: name=jboss.web.deployment:war=/cas state=Create mode=Manual requiredState=Installed: org.jboss.deployers.spi.DeploymentException: URL file:/D:/Applications/jboss-6.0.0.CR1/server/mbip/deploy/cas-server-webapp-3.4.2.BAYER_7-SNAPSHOT.war/ deployment failed
And only after this we get:
13:13:56,113 INFO [PersistenceUnitDeployment] Starting persistence unit persistence.unit:unitName=cas-server-webapp-3.4.2.EBIT_7-SNAPSHOT.war#CasPersistence
13:13:56,287 INFO [Version] Hibernate Commons Annotations 3.2.0.Final
13:13:56,294 INFO [Environment] Hibernate 3.6.0.Final
13:13:56,296 INFO [Environment] hibernate.properties not found
13:13:56,300 INFO [Environment] Bytecode provider name : javassist
13:13:56,304 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
13:13:56,393 INFO [Version] Hibernate EntityManager 3.6.0.Final
13:13:56,421 INFO [Ejb3Configuration] Processing PersistenceUnitInfo [
name: CasPersistence
...]
13:13:56,928 INFO [SessionFactoryImpl] building session factory
13:13:57,137 INFO [SessionFactoryObjectFactory] Factory name: persistence.unit:unitName=cas-server-webapp-3.4.2.EBIT_7-SNAPSHOT.war#CasPersistence
13:13:57,139 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
13:13:57,141 INFO [SessionFactoryObjectFactory] Bound factory to JNDI name: persistence.unit:unitName=cas-server-webapp-3.4.2.EBIT_7-SNAPSHOT.war#CasPersistence
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBAS-7921) OSGiBundleManager should get its address/port configuration from ServiceBindingManager
by Brian Stansberry (JIRA)
OSGiBundleManager should get its address/port configuration from ServiceBindingManager
--------------------------------------------------------------------------------------
Key: JBAS-7921
URL: https://jira.jboss.org/jira/browse/JBAS-7921
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: OSGi integration
Reporter: Brian Stansberry
Fix For: JBossAS-6.0.0.M3
It includes a number of hard-coded ports, which won't be correct if a server is started with something other than ports-default:
<!-- Husky socket connector properties -->
<entry><key>org.jboss.osgi.husky.runtime.connector.host</key><value>${jboss.bind.address}</value></entry>
<entry><key>org.jboss.osgi.husky.runtime.connector.port</key><value>5401</value></entry>
<!-- HTTP Service Port -->
<entry><key>org.osgi.service.http.port</key><value>8090</value></entry>
<!-- Config Admin Service -->
<entry><key>felix.cm.dir</key><value>${jboss.server.data.dir}/osgi-configadmin</value></entry>
<!-- JMX bundle properties -->
<entry><key>org.jboss.osgi.jmx.host</key><value>${jboss.bind.address}</value></entry>
<entry><key>org.jboss.osgi.jmx.port</key><value>1098</value></entry>
<!-- JNDI bundle properties -->
<entry><key>org.jboss.osgi.jndi.host</key><value>${jboss.bind.address}</value></entry>
<entry><key>org.jboss.osgi.jndi.rmi.port</key><value>1098</value></entry>
<entry><key>org.jboss.osgi.jndi.port</key><value>1099</value></entry>
Documentation of SBM usage can be found at http://community.jboss.org/docs/DOC-9038. Unfortunately the conversion to Clearspace resulted in random parts of that doc disappearing. As an example, the deploy/naming-jboss-beans.xml file shows how the naming service itself is getting its ports from SBM; the same would be applied to the 1098/1099 entries above.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months
[JBoss JIRA] Created: (JBRULES-2099) Example source.
by gitae yang (JIRA)
Example source.
---------------
Key: JBRULES-2099
URL: https://jira.jboss.org/jira/browse/JBRULES-2099
Project: JBoss Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.0.1.FINAL
Environment: Windows XP,eclipse
Reporter: gitae yang
Assignee: Mark Proctor
Fix For: 5.0.1.FINAL
Hi! We are studying Drools 5.0 in order to use..
But a curious problem has happened, while executeing an example in documentation.
It is 3.1.3. Defining Processes Using the Process API in drools-5.0-docs\drools-flow\html_single\index.html.
Actually, 3.1.3.1. Example 1 is working normally, but 3.1.3.2. Example 2 and 3.1.3.3. Example 3 occur error.
I 'll tell you what we grasp the reason for error, so far.
When it's working normal, <ActionNode> exists.
The other way, when it is not working normal, <ActionNode> doesn't exist.
For example, in case of 3.1.3.2. Example 2
RuleFlowProcessFactory factory =
RuleFlowProcessFactory.createProcess("org.drools.HelloWorldJoinSplit");
factory
// Header
.name("HelloWorldJoinSplit")
.version("1.0")
.packageName("org.drools")
// Nodes
.startNode(1).name("Start").done()
.splitNode(2).name("Split").type(Split.TYPE_AND).done()
.actionNode(3).name("Action 1")
.action("mvel", "System.out.println(\"Inside Action 1\")").done() < -here, NullPointerException occurs.
.actionNode(4).name("Action 2")
.action("mvel", "System.out.println(\"Inside Action 2\")").done()
.joinNode(5).type(Join.TYPE_AND).done()
.endNode(6).name("End").done()
// Connections
.connection(1, 2)
.connection(2, 3)
.connection(2, 4)
.connection(3, 5)
.connection(4, 5)
.connection(5, 6);
RuleFlowProcess process = factory.validate().getProcess();
Please, let me know entire source I can execute this example well.
Thank you for your consideration.
I am waiting for you answer.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 2 months