Quantcast
Channel: GlassFish Related Items on Java.net
Viewing all 1091 articles
Browse latest View live

GF4 + Hibernate4.2.2 => WELD-001408 problem

0
0

Hi,

I have an webapp that runs fine in GF3.1.1 using Weld1.1 + JPA2 + Hibernate4.2.2 + JSF2 + RichFaces4.3.3.
Then, when I try to deploy in GF4, server.log arises this error:

<br />
[2013-07-29T10:44:42.206-0400] [glassfish 4.0] [SEVERE] [NCLS-CORE-00026] [javax.enterprise.system.core] [tid: _ThreadID=36 _ThreadName=admin-listener(5)] [timeMillis: 1375109082206] [levelValue: 1000] [[<br />
  Exception during lifecycle processing<br />
org.glassfish.deployment.common.DeploymentException: CDI deployment failure:WELD-001408 Unsatisfied dependencies for type [Validator] with qualifiers [@Default] at injection point [[UnbackedAnnotatedField] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator]<br />
	at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:225)<br />
	at org.glassfish.kernel.event.EventsImpl.send(EventsImpl.java:131)<br />
	at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:328)<br />
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:493)<br />
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)<br />
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:527)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:523)<br />
	at java.security.AccessController.doPrivileged(Native Method)<br />
	at javax.security.auth.Subject.doAs(Subject.java:356)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:522)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:546)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1423)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1500(CommandRunnerImpl.java:108)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1762)<br />
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1674)<br />
	at org.glassfish.admin.rest.resources.admin.CommandResource.executeCommand(CommandResource.java:396)<br />
	at org.glassfish.admin.rest.resources.admin.CommandResource.execCommandSimpInMultOut(CommandResource.java:234)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br />
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)<br />
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)<br />
	at java.lang.reflect.Method.invoke(Method.java:601)<br />
	at org.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)<br />
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:125)<br />
	at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$ResponseOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:152)<br />
	at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:91)<br />
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:346)<br />
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:341)<br />
	at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:101)<br />
	at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:224)<br />
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)<br />
	at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)<br />
	at org.glassfish.jersey.internal.Errors.process(Errors.java:315)<br />
	at org.glassfish.jersey.internal.Errors.process(Errors.java:297)<br />
	at org.glassfish.jersey.internal.Errors.process(Errors.java:267)<br />
	at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:317)<br />
	at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:198)<br />
	at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:946)<br />
	at org.glassfish.jersey.grizzly2.httpserver.GrizzlyHttpContainer.service(GrizzlyHttpContainer.java:331)<br />
	at org.glassfish.admin.rest.adapter.JerseyContainerCommandService$3.service(JerseyContainerCommandService.java:165)<br />
	at org.glassfish.admin.rest.adapter.RestAdapter.service(RestAdapter.java:181)<br />
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:246)<br />
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)<br />
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)<br />
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)<br />
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)<br />
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)<br />
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)<br />
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)<br />
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)<br />
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)<br />
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)<br />
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)<br />
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)<br />
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)<br />
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)<br />
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)<br />
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)<br />
	at java.lang.Thread.run(Thread.java:722)<br />
Caused by: org.jboss.weld.exceptions.DeploymentException: WELD-001408 Unsatisfied dependencies for type [Validator] with qualifiers [@Default] at injection point [[UnbackedAnnotatedField] @Inject private org.hibernate.validator.internal.cdi.interceptor.ValidationInterceptor.validator]<br />
	at org.jboss.weld.bootstrap.Validator.validateInjectionPointForDeploymentProblems(Validator.java:403)<br />
	at org.jboss.weld.bootstrap.Validator.validateInjectionPoint(Validator.java:325)<br />
	at org.jboss.weld.bootstrap.Validator.validateInterceptor(Validator.java:554)<br />
	at org.jboss.weld.bootstrap.Validator.validateInterceptors(Validator.java:530)<br />
	at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:479)<br />
	at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:536)<br />
	at org.glassfish.weld.WeldDeployer.event(WeldDeployer.java:216)<br />
	... 58 more<br />
]]</p><p>[2013-07-29T10:44:42.208-0400] [glassfish 4.0] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=36 _ThreadName=admin-listener(5)] [timeMillis: 1375109082208] [levelValue: 1000] [[<br />
  Exception while loading the app]]<br />

Glassfish 4 filter with @EJB

0
0

Hi guys.

I'm developing an REST application using Glassfish 4.0. I'm using JAX-RS filters and I'm trying to use an EJB in the filter. The bean with @EJB annotation works on any REST resource in the project, except on the filter.

See code below:

######### MyBean #########

@Remote
public interface MyBeanInterface {
String getStuff();
}

-----

@Stateless
public class MyBean implements MyBeanInterface {

@Override
public String getStuff() {
return "stuff done";
}
}

######### Filter #########

@Provider
public class UpdateFilter implements ContainerRequestFilter {

@EJB
private MyBeanInterface doStuffBean;

@Override
public void filter(ContainerRequestContext requestContext) {
....
}
}

####################

"doStuffBean" is always null.

Can anyone help me?

JMS Exception on Cluster

0
0

Hi all,
I'm creating a cluster that contains application with JMS.

I've create the resources:

${ASADMIN_HOME} create-jms-resource --target gfCluster --restype
javax.jms.QueueConnectionFactory --description "connection factory for
process plugin project" --property jdni_name=jms/QueueConnectionFactory
jms/QueueConnectionFactory;
${ASADMIN_HOME} create-jms-resource --target gfCluster --restype
javax.jms.Queue --property Name=PluginMetricsQueue jms/PluginMetricsQueue;

And I have this snip of code

connection = connectionFactory.createConnection();
session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);

When the session is created I got:

SEVERE: Exception occurred, reason: {}
com.sun.messaging.jms.JMSException: MQRA:CA:createSession failed-Only one
JMS Session allowed when managed connection is involved in a transaction
at
com.sun.messaging.jms.ra.ConnectionAdapter.createSession(ConnectionAdapter.java:338)

Can you help me?

Thanks in advance,
Mauricio

Glassfish 4.0 JAX-RS empty HTTP POST MultivaluedMap form parameters

0
0

Hi All,

I'd like to ask a question related to an issue I encountered with Glassfish 4.0 Web application deployment.

I created a REST Web service application with JAX-RS and deployed it on Glassfish 3.1.2 with no issue. Recently I tried deploying it on Glassfish 4.0 and encountered a warning as follows.

A servlet request to the URI http://localhost:8080/IipDev3/root/provider/publication/info:647254662 contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters. Only resource methods using @FormParam will work as expected. Resource methods consuming the request body by other means will not work as expected.

I use javax.ws.rs.core.MultivaluedMap to store the form parameters, but it is indeed empty for HTTP POST requests. Strangely, it is not empty for HTTP PUT requests. I have tried searching for solutions on the Internet but got stuck (in the worst case I can fallback to Glassfish 3.1.2 deployment of course).

Code snippets:

@POST
@Path("publication/{infoId}")
@Consumes("application/x-www-form-urlencoded")
@Produces("application/xml")
public String publishToAnInformationChannel(@PathParam("infoId") String infoId,
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams empty + warning
}
,>

@PUT
@Path("registration/information/{infoId}")
@Consumes("application/x-www-form-urlencoded")
@Produces("application/xml")
public String updateAnInformationChannel(@PathParam("infoId") String infoId,
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams filled in + no warning
}
,>

If anyone knows how to solve this issue, please let me know. Thanks a lot.

Best regards,
Dafferianto

Glassfish 4.0 JAX-RS empty HTTP POST MultivaluedMap form parameters

0
0

Hi All,

I'd like to ask a question related to an issue I encountered with
Glassfish 4.0 Web application deployment.

I created a REST Web service application with JAX-RS and deployed it on
Glassfish 3.1.2 with no issue. Recently I tried deploying it on
Glassfish 4.0 and encountered a warning as follows.

A servlet request to the URI
http://localhost:8080/IipDev3/root/provider/publication/info:647254662
contains form parameters in the request body but the request body has
been consumed by the servlet or a servlet filter accessing the request
parameters. Only resource methods using @FormParam will work as
expected. Resource methods consuming the request body by other means
will not work as expected.

I use javax.ws.rs.core.MultivaluedMap to store the form parameters, but
it is indeed empty for HTTP POST requests. Strangely, it is not empty
for HTTP PUT requests. I have tried searching for solutions on the
Internet but got stuck (in the worst case I can fallback to Glassfish
3.1.2 deployment of course).

Code snippets:

@POST
@Path("publication/{infoId}")
@Consumes("application/x-www-form-urlencoded")
@Produces("application/xml")
public String publishToAnInformationChannel(@PathParam("infoId") String
infoId,
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams empty + warning
}

@PUT
@Path("registration/information/{infoId}")
@Consumes("application/x-www-form-urlencoded")
@Produces("application/xml")
public String updateAnInformationChannel(@PathParam("infoId") String
infoId,
MultivaluedMap formParams, @Context SecurityContext sc) {
// formParams filled in + no warning
}

If anyone knows how to solve this issue, please let me know. Thanks a
lot.

Best regards,
Dafferianto

Looking for assistance with tuning Glassfish 3.1 production system

0
0

We have a production Glassfish system and are looking to hire someone with skills in production tuning. Our deployment is currently a single Windows server with SQL Server DB. Our site serves the following types of traffic/requests:
- high volume simple http stateless requests
- SOAP web services
- jsf user interface
- long running jobs from queue

System usage has been increasing and we are looking to get the most out of our current setup as we look to move to a clustered environment.

@EJB(name = "foo") injection question (in a @ManagedBean)

Disabling embedded OpenMQ authentication

0
0

Hello,

I would appreciate it if someone could point me in the right direction with regards to a setup problem I'm having, starting up and connecting to an embedded OpenMQ broker.

Firstly, apologies if this isn't the correct forum for this question. All of the links for OpenMQ-specific forums I found were dead, but please direct me elsewhere if you know better.

The scenario:
I am attempting to create an in-VM, standalone OpenMQ server to run maven / Junit tests against, so that we can test our JMS integration during the test phase of our builds.

I am able to startup the embedded broker, but I get authentication errors when I try to connect to it (i.e. using com.sun.messaging.ConnectionFactory.createConnection()).

Firstly, is it expected behavior for authentication to be required when connecting to a local broker? I only ask because this differs from other JMS vendors I have used, where only remote connections required authentication?

Regardless, authentication isn't required for our particular scenario. I've tried disabling authentication on the broker, following the instructions in the documentation, but without success.
-I have added imq.accesscontrol.enabled=false to both $IMQ_HOME\lib\props\broker\ properties files and the $VAR_HOME\instances\imqbroker\props\config.properties file.
-The behavior doesn't change, authentication errors are still thrown on connection.

So my questions are, how do I disable authentication on my embedded broker (and should I have to with local connections)?

If there is no way to disable authentication, what recommendations would you have for my scenario?

A zip file of a test project and the output I'm getting are attached.

Thanks, Andrew Scully.

AttachmentSize
openmq-issue.zip6.11 KB
console_output.txt9.02 KB

@EJB and the name() attribute

0
0

This link (
http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#EJB_ejb-ref_ejb_local...)
says that the name() attribute is relative to "java:comp/env/".

This link (
http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#How_do_I_define_my_ow...)
says that you can "absolutize" the name() attribute, i.e. that the value of
the name() attribute is relative to "java:comp/env/" only when it does not
start with "java:comp/", "java:module/", "java:app/" or "java:global/".

The EJB 3.1 specification is silent on the matter. So is the Java EE 6
specification. Both hint at the idea that the name() attribute might not
*have* to be relative to java:comp/env/ if it is appropriately constructed,
but neither says so outright.

The Javadoc for the @EJB element says "The logical name of the ejb
reference within the declaring component's (e.g., java:comp/env)
environment.""E.g." means "for example" so I don't know whether this is
prescriptive or not.

Is this link (
http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#How_do_I_define_my_ow...)
really correct? Can I do this, for example:

@EJB(name = "java:app/ejb/Foobar")
private Foobar foobar;

...and have it automatically injected provided there is only one
implementation of Foobar? Please tell me this does not define a name of
java:comp/env/java:app/ejb/Foobar. That would make me weep.

I know that I can do this:

@EJB(lookup = "java:app/ejb/Foobar")
private Foobar foobar;

...which is really equivalent to this:

@EJB(lookup = "java:app/ejb/Foobar", name =
"the.fully.qualified.name.of.ThisClass/foobar")
private Foobar foobar;

...but that requires the assembler to explicitly put a bean in that slot.
I don't want to use mappedName(), beanName() or lookup() for this reason
(if there's only one EJB that could "fit" in this slot, I don't want anyone
to have to configure anything).

I *do* want to use name(), so that the assembler can easily change the
linkage of several @EJB references all at once. If I have 30 instances of
@EJB(name = "foo/bar"), then a single
foo/bar... at
the root of an application that has several candidates for injection into
that slot will suffice.

I need to be able to count on the fact that name() can behave like
http://glassfish.java.net/javaee5/ejb/EJB_FAQ.html#How_do_I_define_my_ow...
it should, because when injecting @EJBs into JAX-RS resource classes,
those resource classes are required to be @ManagedBeans, and @ManagedBeans
have no component environment, so a simple "foo/bar" name won't cut it.

Thanks for any and all clarification in this area.

Best,
Laird

--
http://about.me/lairdnelson

Injecting Remote EJB in to MDB

0
0

I have a legacy, EJB 2 application that is deployed on GF v3. All of the beans are Remote.I am adding a new MDB to it, and trying to inject one of the existing Session Bean in to the MDB.
The ejb-jar.xml entry for the Session Bean looks like this:

        &lt;session&gt;
            &lt;ejb-name&gt;ProfileSession&lt;/ejb-name&gt;
            &lt;mapped-name&gt;ProfileSession&lt;/mapped-name&gt;

            &lt;home&gt;com.example.ecms.as.ProfileSessionHome&lt;/home&gt;
            &lt;remote&gt;com.example.ecms.as.ProfileSession&lt;/remote&gt;
            &lt;ejb-class&gt;com.example.ecms.as.ProfileSessionEJB&lt;/ejb-class&gt;
            &lt;session-type&gt;Stateless&lt;/session-type&gt;
            &lt;transaction-type&gt;Container&lt;/transaction-type&gt;
        &lt;/session&gt;

In my MDB, I have this:

@EJB(name = "ejb/ProfileSession", beanInterface=ProfileSessionHome.class, beanName = "ProfileSession")

The exception I am getting when the MDB is created is:

com.sun.enterprise.container.common.spi.util.InjectionException: Exception attempting to inject Remote ejb-refname=ejb/ProfileSession,Remote 2.x home=com.example.ecms.as.ProfileSessionHome,Remote 2.x component
interface=com.example.ecms.as.ProfileSession resolved to intra-app
EJB ProfileSession in module
AppServerCode.jar,ejb-link=ProfileSession,lookup=,mappedName=,jndi-name=ProfileSession,refType=Session
into class com.example.ecms.as.ExampleMDB: Can not set
com.example.ecms.as.ProfileSession field
com.example.ecms.as.ExampleMDB.psb to
com.example.ecms.as._ProfileSessionHome_DynamicStub

Both the Session Bean and MDB are deployed within the same EAR artifact.

Any insight to this would be appreciated.

Migration Weblogic to Glassfish EJB 3.0

0
0

I am trying to migrate Weblogic to Glassfish, than I have a problem with EJB 3.0 ,
This error appear on the glassfish log file,

[#|2013-08-01T12:02:02.817+0300|SEVERE|oracle-glassfish3.1.2|org.apache.catalina.core.StandardContext|_ThreadID=25;_ThreadName=Thread-2;|PWC1305: Exception during cleanup after start failed
org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started

[#|2013-08-01T12:02:01.010+0300|SEVERE|oracle-glassfish3.1.2|global|_ThreadID=25;_ThreadName=Thread-2;|The annotation symbol defined in super-class is not compatible with Session ejb BlockListDaoImpl.
symbol: TYPE location: class com.netas.vas.tic.db.dao.BlockListDaoImpl

Is there any way to solve this problems?

GF v4 JSF view scoped managed bean problem

0
0

I am currently making my GF v3 webapp work on GF v4. I have a JSF page that has a view scoped JSF managed bean. Only it's lifecyple is being managed by the container and I have not declared any managed properties on my bean. It is referenced from various EL expressions in my .xhtml faces page. In this case the relevant page contents have a commandLink, that referenced the bean and rerenders the page using a ajax request.


This works as expected on GF v3 but on GF v4, the JSF managed bean is removed and recreated, after a completely randomly number of clicks on the commandLink. Since I am not navigating to a different page. I would expect "view scoped" beans to be recreated only when the view is changed by a navigation action, and therefore keep its state during any number of ajax page updates.

Are there any additional requirements on the bean for GFv4/JSF2.2 or do I miss something in the JSF scoping rules?

Glassfish v4 with JBI

0
0

Hi

I installed Glassfish server version 4.0. I wanted to deploy BPEL which I created using glassfish ESB.

In the update tool, I don't see the 'Java EE Service Engine' add on component to install.

Could anyone tell me how to install this component in glassfish v4.

I saw in google that this component is avalable in glassfish server 3.1. and it is available in the repository stable.glassfish.org

but this repositoy is not available in glassfish v4.I tried adding it under images in the updat tool but it was asking for certificates and I could not download the certificates with my login from the oracle web site.

I am following the below link

http://docs.oracle.com/cd/E26576_01/doc.312/e24928/extending-updating.htm

Please let me know how can I add JBI component in glassfish v4.

Thanks in advance...

Re: Cassadra Data Stax core driver and Glassfish - Was: Experience with Easy-Cassandra in Glassfish?

0
0

Hi Jan,

Check out the JCA[1] spec (the Maintenance Release is part of EE7/GF4, the FR is EE6/GF3.1.x) and if you need to support transactions then look at the JTA[2] spec too.

Also, the Oracle EE samples project has a sample JCA connector for bi-directional EE server to IMAP.

-Noah

[1] - http://jcp.org/en/jsr/detail?id=322
[2] - http://jcp.org/en/jsr/detail?id=907

On Aug 4, 2013, at 5:39 AM, Jan Algermissen wrote:

>
> On 02.08.2013, at 20:31, Jan Algermissen wrote:
>
>> Hi,
>>
>> has anyone used Cassandra together with Glassfish and can share experiences?
>
> For the moment I have settled for this driver:
>
> https://github.com/datastax/java-driver
>
> One question regarding its use in Glassfish: The driver does its own thread management and connection pooling. AFAIU this is - going by the book - forbidden for Java EE applications.
>
> Do you think I will run into problems due to conflicts between GF's thread management and the driver's?
>
> Can you point me to some references where I could start digging into how to adjust the driver for compliant use in Java EE? At the moment I do not really have a clue where to start.
>
> Jan
>
>
>
>
>>
>> Specifically I am looking at using Easy-Cassandra wich is supposed to integrate with JPA. Does anyone have production experience with it?
>>
>> Basically, I wonder whether some Cassandradriver (doing its own thread pooling) will interfere with a JavaEE.
>>
>> Jan
>

EJB Lookup: Nothing Happens

0
0

Hello all!

I'm constantly having troubles when trying to look up an EJB from a remote Application Server. I spent the last 3 Days trying to solve this without success. (I am new to EJB).

First of all, i was doing the same before with an application server in the same JVM and everything worked fine.
Application Server is Glassfish 3.1.2 (build 23) and is running on 10.1.15.202.

Somehow i do not see the formatting Toolbar, so i'm trying to keep my text clear with some lines.

First I'm setting the Properties for the initialContext:
=======================================

props = new Properties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", "10.1.15.202");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");

initialContext = new InitialContext(props);

=======================================

After this I'm trying to lookup my Remote EJB:

========================================

qib = (GetQueueInfoBeanRemote) initialContext.lookup("java:global/odin-core-maven-ear-0.5-new/odin-core-maven-ejb/GetQueueInfoBean");

========================================

If I run my Code now, nothing happens. By Debugging i found out that everything works fine until the lookup of the Bean. At this point the IDE keeps working and working... Even after half an hour there was no result.
If I change the Port to 8080 (even though the orb-listener-1 in the admin gui is configured to 3700) I receive following error:

========================================

org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe
at $Proxy17.connectionAbort(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1425)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doWork(ConnectionImpl.java:984)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
JNDI Lookup of GetQueueInfoBean failed.
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410011: IOException received when reading from connection SocketOrChannelConnectionImpl[ java.nio.channels.SocketChannel[connected local=/127.0.0.1:1560 remote=10.1.15.202/10.1.15.202:8080] ESTABLISHED true true] vmcid: OMG minor code: 11 completed: No
at $Proxy17.ioexceptionWhenReadingConnection(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1600)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1379)
... 3 more
Caused by: java.io.IOException: End-of-stream
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1593)
... 4 more
javax.naming.NamingException: Lookup failed for 'java:global/odin-core-maven-ear-0.5-new/odin-core-maven-ejb/GetQueueInfoBean!de.aco.odin.gui.GetQueueInfoBeanRemote' in SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:491)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:438)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at acodyn_gui.CoreConnection.lookupGetQueueInfoBean(CoreConnection.java:185)
at acodyn_gui.Acodyn_GUI.main(Acodyn_GUI.java:47)
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext[myEnv={org.omg.CORBA.ORBInitialPort=8080, java.naming.factory.initial=com.sun.enterprise.naming.SerialInitContextFactory, org.omg.CORBA.ORBInitialHost=10.1.15.202, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:334)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:477)
... 4 more
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410008: Connection abort vmcid: OMG minor code: 8 completed: Maybe
at $Proxy17.connectionAbort(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1425)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doWork(ConnectionImpl.java:984)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: org.omg.CORBA.COMM_FAILURE: Fein: 00410011: IOException received when reading from connection SocketOrChannelConnectionImpl[ java.nio.channels.SocketChannel[connected local=/127.0.0.1:1560 remote=10.1.15.202/10.1.15.202:8080] ESTABLISHED true true] vmcid: OMG minor code: 11 completed: No
at $Proxy17.ioexceptionWhenReadingConnection(Unknown Source)
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1600)
at com.sun.corba.ee.impl.transport.ConnectionImpl.doOptimizedReadStrategy(ConnectionImpl.java:1379)
... 3 more
Caused by: java.io.IOException: End-of-stream
at com.sun.corba.ee.impl.transport.ConnectionImpl.nonBlockingRead(ConnectionImpl.java:1593)
... 4 more
BUILD SUCCESSFUL (total time: 52 seconds)

=======================================

I've experimented serveral hours with different settings. Now i don't know what to do.
As far as I know is the error message very similar to the one you receive when you forget to add the gf-client.jar to the classpath of your Client. I get this message even after adding it (I added the one from my local glassfish installation). Am i not allowed to use port 8080 for EJB Lookup? When using 3700 i dont get an answer at all.
Could somebody give me a hint? Thank you very much in advance!


Bytecode Preprocessor

0
0

Hi All!

I have tried for few days already to enable the bytecode preprocessor in the Glassfish jvm settings.
But I was unable to get it to work.

This is the value for bytecode preprocessor i have set "com.idb.bytecodePreprocessor.BytecodePreprocessorImp.class".

Bellow is my preprocessor class.

Hope to get some help. Thanks first!

//-----------------------------------------------------------------------------------------------------
package com.idb.bytecodePreprocessor;

import com.sun.appserv.BytecodePreprocessor;
import java.util.Hashtable;

/**
*
* @author kblim
*/
public class BytecodePreprocessorImp implements BytecodePreprocessor{
public boolean initialize(Hashtable parameters){
System.out.print("initialize");
return true;
}

public byte[] preprocess(String classname, byte[] classBytes){
System.out.print(classname);

return classBytes;

}
}

//-----------------------------------------------------------------------------------------------------

Http write timeout & chunked encoding can corrupt proxy cache

0
0

Hello GF users,

I encounter a problem with a caching proxy (in front of GF 3.1.2.2), in case the first client request times out and transfer is chunked.
From my observations, it appears that GF correctly detects client hangs [ from GF point of view it is a write timeout ; note that the effective value -- default = 2 minutes -- is equal to the configuration value multiplied by 4 ; see grizzly OutputWriter.flushChannel() ], but in any case it finishes the chunked stream nicely (with the ChunkedOutputFilter.END_CHUNK = "0\r\n\r\n").
- This might create a problem for the client, if it is still connected, as it will receive a truncated resource.
- But it is a real problem for all intermediate proxy cache servers, as in any case they will cache a truncated copy of the resource (because nothing is wrong from their point of view : http response is well formed).

I tried to modify my code (not closing servlet outputStream, in hope it would not send END_CHUNK) but did not succeed.
I have harvested the web on this topic without any result. Is this a known bug ? How can it be avoided ?

Thank you for your feedback,

  M.

GlassFish Security Patches

0
0

Hi,

I've been supporting GlassFish Server Open Source Edition 3.1.2.2 (build 5) for just over 4 months now and I'm struggling to find information regarding security/defects. Is there such a community support/patch release process for this software or is it a case of reviewing release notes and updating to a newer version.

Regards,

Richard.

Accessing Glassfish configuration values from domain.xml

0
0

I want to create an application-server-agnostic configuration service which provides common configuration values to our applications and services.

In JBoss I managed to do so using their Model Controller service; executing appropriate cli commands in order to obtain the values; host name, http port, https port, etc.

I see some of the Glassfish values are accessible as System properties in Glassfish, but still some important ones, like http port, https port, jms port, and clustering bind address are not.

Is there a service available at runtime which I can use to query such values ?

RE: Accessing Glassfish configuration values from domain.xml

0
0

Here is one suggestion. You use org.glassfish.embeddable.GlassFish service to execute asadmin commands. It's part of a public interface. Just Google for its javadocs. It's available as a service in osgi service registry. So, you can use it easily from uour bundle that is installed using felix fileinstall.

Thanks,
Sahoo

Sent from my Android phone, please excuse me for its brevity.

-----Original Message-----
From: forums@java.net [forums@java.net]
Received: Tuesday, 06 Aug 2013, 23:26
To: users@glassfish.java.net [users@glassfish.java.net]
Subject: Re: Accessing Glassfish configuration values from domain.xml

Hi Tim, Valid point. Currently I am deploying my configuration service OSGi
bundle to the Felix FileInstall location domain1/autodeploy/bundles. Are you
saying that by simply deploying my OSGi bundle to the modules/autostart
folder, I then have an OSGi module and can start to use the @inject
annotation ? Thanks Ed

--

[Message sent by forum member 'ejroberts']

View Post: http://forums.java.net/node/898130

Viewing all 1091 articles
Browse latest View live




Latest Images