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

Admin REST jvm-options error "is invalid because it does not start with a '-'"

$
0
0

Hello,

I have been playing with admin rest services and almost everything works except setting jvm-options. When I try to set an option first of all the option is not set second all existing JVM options are cleared from configuration.

These are the examples that I have tried against the 3.1.2.2 and 4.0.b89

curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d id=-test http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d id=\-test http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d "id=-test" http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d "id=--test" http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d "id=%2Dtest" http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d "id=%97test" http://localhost:4848/management/domain/configs/config/server-config/jav... -v
curl -X POST -H "X-Requested-By: GlassFish REST HTML interface" -d "id=-%2Dtest" http://localhost:4848/management/domain/configs/config/server-config/jav... -v

The same happens if I try to set the option from rest admin through http://localhost:4848/management/domain/configs/config/server-config/jav....

Are you having the same problem? Is it a bug ?

Thanks


Database Connection not working in my application

$
0
0

Hello everyone,

I am coming from jboss and there it was kind of easy to install the database connection for my enterprise application.

I followed the instructions from this site
http://dev.mysql.com/doc/refman/5.0/en/connector-j-usagenotes-glassfish-...

and everything seems to be ok. The ping is also working.

Then I created the persistence.xml inside my ejb project under META-INF
with this content:

<?xml version="1.0" encoding="UTF-8"?>

xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">

jdbc/houseautomation

But when I start the server, nothing happens. On Jboss the tables will be created. I don't get any errors or exceptions but also nothing happens.

Did I forget something?

I am not quite sure about the name:

jdbc/houseautomation

Inside glassfish I named it also jdbc/houseautomation. Do I need to add a prefix like java: ? I tried that also without any luck.

Many greetings,
Hauke

"unable to start application" / FileNotFoundException after webstart app is redeployed

$
0
0

I'm trying to deploy a webstart app and have problems with a changed jar module file name.

The app works fine when it is deploy for the first time but whenever I deploy a new version, I cannot start it via webstart anymore (FileNotFoundException). The reason seems to be the changed filename of the jar module.

glassfish-application-client.xml:

<glassfish-application-client>
<java-web-start-access>
<context-root>/my-client</context-root>
<eligible>true</eligible>
</java-web-start-access>
</glassfish-application-client>

application.xml:

<?xml version="1.0" encoding="UTF-8"?>
<application>
<display-name>My Client</display-name>
<module>
<java>${swing-app-module}</java>
</module>
<library-directory>lib</library-directory>
</application>

$swing-app-module is e.g. 'swing-app-1.0.jar' (set via maven)

Glassfish generates the following JNLP:

<jnlp spec="1.0+" codebase="http://localhost:8080/___JWSappclient/___app/my-client/"
    href="http://localhost:8080/___JWSappclient/___app/my-client/___dyn/lib/swing-app-1.0.jarClient/___main.jnlp">
...

For a new release, I increment the version number to 'swing-app-1.1.jar' and redeploy the EAR. When I try to start the app via webstart afterwards, I get the following Exception:

java.io.FileNotFoundException: http://localhost:8080/___JWSappclient/___app/my-client/___dyn/lib/swing-app-1.0.jarClient/___main.jnlp

Why does the URL of the JNLP points to a location inside the jar module? How can I keep webstart running (without removing the version number from the JAR) after a redeploy?

where alias password saved

$
0
0

Hi All,

I am trying to find out where the password aliases saved and if there is a way to
reveal these password true values?

thanks,

-HL

HttpSession null with tracking-mode URL

$
0
0

Our customer doesn't want to have session tracking with cookies, so i tried to use tracking-mode URL set from the web.xml. This throws a ViewExpiredException on postback on my login page because the HttpSession is always null. Login is done via HttpServletRequest.login() in an action method which returns "Home.xhtml?faces-redirect=true".
I'm on Servlet 3.0, so as far as i understand the documentation everything should work.

Any ideas? Anything i'm still missing?

(I also asked about this problem on stackoverflow, but i guess this is the more appropriate place. For referecne: http://stackoverflow.com/questions/16812111/viewexpiredexception-with-tr...)

GF 3.1 ActiveMQ Resource Adapter - TransportFactory ClassCastException

$
0
0

Hello, I have GF 3.1.2.2 on linux server. It has 2 connections on remotes ActiveMQ servers (ActiveMQ 5.7.0).

I deployed the ActiveMQ RARs like this http://codelevain.wordpress.com/2012/12/21/glassfish_activemq/ :
* I deployed 1 rar with this name activemq-rar-fb and an resource adapter config named activemq-rar-fb (with the property ServerURL=tcp://ipOfFb:61616)
* I deployed 1 rar with this name activemq-rar-fus and an resource adapter config named activemq-rar-fus (with the property ServerURL=tcp://ipOfFus:61616)
* I defined all parameters properly (connection pools, factories, queues, ...)

I deployed my EAR with NO jar like activemq-core.jar. My EAR application work well, it can receive and send messages on both servers. The EJB project inner this EAR has a glassfish-ejb-jar.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-jar PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-jar>
   <enterprise-beans>
   <ejb>
     <ejb-name>MyMDB</ejb-name>
     <mdb-resource-adapter>
<resource-adapter-mid>activemq-rar-fb</resource-adapter-mid>
</mdb-resource-adapter>
   </ejb>
   </enterprise-beans>
</glassfish-ejb-jar>

But when I restart the Glassfish server, I have this errors every 5 seconds:
ERROR ActiveMQEndpointWorker - Failed to connect to broker [tcp://xxx:61616]: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [tcp]
javax.jms.JMSException: Could not create Transport. Reason: java.io.IOException: Transport scheme NOT recognized: [tcp]
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:191)
at org.apache.activemq.ra.ActiveMQResourceAdapter.makeConnection(ActiveMQResourceAdapter.java:133)
at org.apache.activemq.ra.ActiveMQEndpointWorker$1.run(ActiveMQEndpointWorker.java:107)
at com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:114)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.performWork(ThreadPoolImpl.java:497)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:540)
Caused by: java.io.IOException: Transport scheme NOT recognized: [tcp]
at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:27)
at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:196)
at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:66)
at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
... 7 more
Caused by: java.lang.ClassCastException: org.apache.activemq.transport.tcp.TcpTransportFactory cannot be cast to org.apache.activemq.transport.TransportFactory
at org.apache.activemq.transport.TransportFactory.findTransportFactory(TransportFactory.java:193)
... 9 more

If I come on web console and I ping related pools, the pings fail. I must disable each RAR connectors in web console and reenable each and then the pings succeeded.

I read that is a classloader problem but I don't know how to fix :
https://community.jboss.org/thread/206590
http://ourcraft.wordpress.com/2008/07/17/something-works/
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-4-2-RA-fails-to-connect...

Thanks

GF 3.1.2.2 new DCOM issue

$
0
0

We are running GF 3.1.2.2 b5 on Windows 2008 R2 SP1. We've setup DCOM between the DAS and several nodes. I've run through all the previous postings regarding DCOM and it validates succesfully using a domain account which has admin priveledges on all the machines.

Our issue is that if i start an instance from the admin server on a remote node using DCOM it appears to ignore the domain account i've configured. If i run a JVM report on the instance its says the user.name is MACHINENAME$ (which im guessing is the local node's system account) - unfortunately this account does not have any network access so any applications fail to start.

Everything else seems to work from DCOM (config changes etc) - its just the starting of an instance from the admin server that shows this issue.

Using a windows service wrapper directly from the node host does start the instance with the correct account but does not pull any conifguration changes down.

Anyone experienced the same issue or have any tips on how i can get this fixed? Thanks

ORB - IIOP Message body size

$
0
0

Hi,

we have an application where the frontend layer makes EJB calls to the backend. Analysis of performance problems showed that the message body size of IIOP messages is quite huge. The strange thing is that every message also includes data of all the codebase contexts (which is a lot), e.g. (obfuscated our code):

GIOP Message Body

Total length (ByteBuffer position) : 26740
Byte Buffer capacity : 26740

47 49 4f 50 01 02 00 00 00 00 68 68 00 00 00 66 GIOP......hh...f
03 00 00 00 00 00 00 00 00 00 00 a5 af ab cb 00 ...........ᆬᆵᆱï¿.
00 00 00 26 00 00 00 64 00 00 00 09 53 31 41 53 ...&...d....S1AS
2d 4f 52 42 00 00 00 00 00 00 00 03 00 00 00 08 -ORB............
52 6f 6f 74 50 4f 41 00 00 00 00 0a 23 52 46 4d RootPOA.....#RFM
42 61 73 65 23 00 00 00 00 00 00 4f 38 39 36 30 Base#......O8960
33 35 37 32 33 33 34 37 38 39 30 34 35 5f 52 42 3572334789045_RB
75 73 69 6e 65 73 73 5f 63 6f 6d 2e 69 6e 66 6f usiness_com.---
6e 6f 76 61 2e 6e 65 77 73 66 6c 61 73 68 2e 5f ---
4e 65 77 73 66 6c 61 73 68 5f 52 65 6d 6f 74 65 ---
2d 45 4a 42 4f 62 6a 65 63 74 00 00 00 00 00 10 -EJBObject......
01 3e 55 f9 6b 9f 01 b5 00 00 00 04 00 00 00 01 .>U.kï¾.ï¾µ........
14 00 00 00 00 00 00 15 67 65 74 41 6c 6c 41 63 ........someMethod
74 69 76 65 4d 65 73 73 61 67 65 73 00 00 00 00 ---....
00 00 00 05 00 00 00 11 00 00 00 02 00 02 00 00 ................
00 00 00 01 00 00 00 0c 00 00 00 00 00 01 00 01 ................
00 01 01 09 4e 45 4f 00 00 00 00 02 00 14 00 00 ....NEO.........
53 55 4e 01 00 00 00 29 31 30 2e 31 2e 33 30 2e SUN....)---
31 39 37 3a 3a 3a 2d 31 32 34 64 62 66 37 38 3a ---:::-124dbf78:
31 33 66 31 33 35 35 66 64 30 66 3a 2d 38 30 30 13f1355fd0f:-800
30 00 00 00 00 00 00 0f 00 00 00 20 00 00 00 00 0...............
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00 00 00 01 01 00 00 00 00 00 00 00 00 00 00 00 ................
7f ff ff 03 00 00 63 fb 66 69 6c 65 3a 2f 6f 70 ......c.file:/op
74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 2d t/app/glassfish-
33 2e 31 2e 32 2e 32 2f 67 6c 61 73 73 66 69 73 3.1.2.2/glassfis
68 2f 6e 6f 64 65 73 2f 6c 6f 63 61 6c 68 6f 73 h/nodes/localhos
74 2d 72 36 64 61 69 6c 79 2d 63 6c 75 73 74 65 t-cluste
72 2f 72 36 64 61 69 6c 79 2d 66 72 6f 6e 74 65 r/fronte
6e 64 2d 69 6e 73 74 61 6e 63 65 31 2f 61 70 70 nd-instance1/app
6c 69 63 61 74 69 6f 6e 73 2f 77 65 62 61 63 2d lications/...
76 73 6f 30 31 2f 57 45 42 2d 49 4e 46 2f 6c 69 /WEB-INF/li
62 2f 74 72 61 6e 73 61 63 74 69 6f 6e 73 2d 33 b/transactions-3
2e 38 2e 30 2e 6a 61 72 20 66 69 6c 65 3a 2f 6f .8.0.jar.file:/o
70 74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 pt/app/glassfish
2d 33 2e 31 2e 32 2e 32 2f 67 6c 61 73 73 66 69 -3.1.2.2/glassfi
73 68 2f 6e 6f 64 65 73 2f 6c 6f 63 61 6c 68 6f sh/nodes/localho
73 74 2d 72 36 64 61 69 6c 79 2d 63 6c 75 73 74 st-clust
65 72 2f 72 36 64 61 69 6c 79 2d 66 72 6f 6e 74 er/front
65 6e 64 2d 69 6e 73 74 61 6e 63 65 31 2f 61 70 end-instance1/ap
70 6c 69 63 61 74 69 6f 6e 73 2f 77 65 62 61 63 plications/
2d 76 73 6f 30 31 2f 57 45 42 2d 49 4e 46 2f 6c ---/WEB-INF/l
69 62 2f 6a 61 63 6b 73 6f 6e 2d 78 63 2d 31 2e ib/jackson-xc-1.
39 2e 32 2e 6a 61 72 20 66 69 6c 65 3a 2f 6f 70 9.2.jar.file:/op
74 2f 61 70 70 2f 67 6c 61 73 73 66 69 73 68 2d t/app/glassfish-
...
and so on.

The only reason the body gets this large is because of all the codebase contexts. Is there a way to get rid of this information (e.g. via JVM property)?

Regards
Bernd


Glassfish with Apache Frontend

$
0
0

I have deployed web application in Glassfish 3.1.2. I am front ending it with Apache 2.2 and accessing it. I have observed that the access file of Apache .htaccess is not working with Glassfish hosted application though I am accessing it with Apache only. There is no problem with .htaccess file as I tested it with various other hosting. I have copied .htaccess file in document root of Glassfish deployed application. My queries are
1. Does .htaccess comes into the picture when we frontend Apache with Glassfish?If so , what else is required to work it with Glassfish? any setting in Glassfish?
2. What is .htaccess level equivalent availble in Glassfish?
3. How to protect Glassfish from bad bots ,web attacks etc even when it is frontened by Apache?
Thanks in Advance...

Glassfish 3.1.2.2 and maxParameterCount

$
0
0

We have a page on an application deployed in Glassfish 3.1.2.2 that has over 10,000 fields (both hidden and displayed) that get submitted via POST to the server. When the page is submitted, the server logs spit out:

WARNING: More than the maximum number of request parameters (GET plus POST) for a single request([10,000]) were detected. Any parameters beyond this limit have been ignored. To change this limit, set the maxParameterCount attribute on the Connector.

I've seen other posts on increasing it for JBoss using a system property on startup, but that doesn't work here. I've also tried setting that property on various connector XML attributes in domain.xml without any success, nor have I been able to find any UI control in the admin where that would be set.

Does anyone have any information where this parameter can be changed at so that this Post request works?

Fighting network latency : howto cache a JMS Connection/Session/MessageProducer?

$
0
0

Hi,
we use glassfish with a REMOTE JMS broker. When we were running in EMBEDDED we did not experienced this issue but now we do. Network latency adds a bad delay for each Connection/Session/Producer creation it's why we would like to cache those object and reuse them as much as possible.

Here is a code snippet to illustrate what I would like to do.
My question is : is it safe to do that, does connection/session in glassfish have been designed to be kept in possible long lived EJB?

@Stateful
public class ARSenderBean {
@EJB
private LegacyCorpusManagerAutoRecolte cman;

@Resource(mappedName = Messaging.LOCAL_JNDI_CONN_FACTORY)
private ConnectionFactory connectionFactory;

@Resource(mappedName = AutoRecolteIndexerConsumer.QUEUE_NAME)
private Queue arQueue;

@Resource(mappedName = LegacyDocumentARCommonConsumer.FILTER_QUEUE_NAME)
private Queue filterQueue;
@Resource(mappedName = AliasToCreateWorkflowConsumer.QUEUE_NAME)
private Queue atcQueue;

private Connection connection;
private Session session;
private MessageProducer arProd;
private MessageProducer filterProd;
private MessageProducer atcProd;

/**
* Initialize JMS objects
*/
@PostConstruct
public void init() {
try {
connection = connectionFactory.createConnection(); // 1-2 ms
session = connection.createSession(true, Session.SESSION_TRANSACTED); // 1-2 ms
arProd = session.createProducer(arQueue); // 1-2 ms
filterProd = session.createProducer(filterQueue); // 1-2 ms
atcProd = session.createProducer(atcQueue); // 1-2 ms
// total of 6 or 8 ms

arProd.setDisableMessageID(true);
filterProd.setDisableMessageID(true);
atcProd.setDisableMessageID(true);
} catch(JMSException jmse) {
throw new EJBException(jmse);
}
}

/**
* Return the connection to the pool
*/
@PreDestroy
public void destroy() {
try {if(connection != null) connection.close();} catch(JMSException jmse) {}
}

public void sendFilter(FilterMessage msg) {
try {
filterProd.send(msg.getJMSMessage(session));
} catch(JMSException jmse) {
throw new EJBException(jmse); // Shoud destroy this EJB instance and call PreDestroy?
}
}

public void sendIndex(AutoRecolteIndexerMessage msg) {
try {
arProd.send(msg.getJMSMessage(session));
} catch(JMSException jmse) {
throw new EJBException(jmse); // Shoud destroy this EJB instance and call PreDestroy?
}
}

public void sendAtc(LegacyDocumentDataMessage msg) {
try {
atcProd.send(msg.getJMSMessage(session));
} catch(JMSException jmse) {
throw new EJBException(jmse); // Shoud destroy this EJB instance and call PreDestroy?
}
}
}

Thanks

Remote EJB fails when trying to Save using JPA !?

$
0
0

I think I would like to do something that most people should be doing ?
My Project resides here ( an ear is present but not used ):
https://github.com/Inkimar/Media-3

Read about Jeffreys Onion Architecture ( http://jeffreypalermo.com/blog/the-onion-architecture-part-1/ ) and I am trying to let my project-structure reflect that Architecture :

a EJB-Servlet-JPA Maven project.
Using the latest Glassfish and MySQL ver 5.5

I would like to create everything in separate projects in Netbeans and minimize the dependency, no dependency between EJB and WEB - then link between those project is the Remote-interface ( Stored in a separate project ).

I want to be able to deploy the EJB and Web in different Glassfish on different machines.

First Shot :

1) EJB-Project ( 3 methods, one of them is 'save' using em.merge(object) )
- ( Bean with a remote interface )
2) WEB-Project
- ( 1 Servlet - with one util class ( IP-number to your EJB resides here )
- x number of entity classes )
3) Service-project
- ( The remote interface )

Dependencies :
1) EJB-Project depends on the Service-project
2) WEB-Project depends on the Service-project

The servlet is able to call 2 methods.
The ejb returns a text and the server-time.
it is not able to 'save'

i get an error then :
StandardWrapperValve[Testing]: PWC1406: Servlet.service() for servlet Testing threw exception javax.ejb.EJBException: java.rmi.RemoteException: CORBA UNKNOWN 1330446338 Maybe; nested exception is: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace---------- org.omg.CORBA.UNKNOWN: WARNING: IOP00010002: Unknown user exception thrown by the server - exception: java.lang.NullPointerException; message: null vmcid: OMG minor code: 2 completed: Maybe at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95) at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387) at

Is that a bug !?

Using another structure then it works: If I have 1 EJB-project and 1 WEB-project
I am able to make it work without using any interface,
but then the WEB is dependent on the EJB and EJB&WEB must be deployed in the same Glassfish Server ... do not want to do that ...

Best regards, I

Remote EJB fails when trying to Save using JPA !?

$
0
0

I think I would like to do something that most people should be doing ?
My Project resides here ( an ear is present but not used ):
https://github.com/Inkimar/Media-3

Read about Jeffreys Onion Architecture ( http://jeffreypalermo.com/blog/the-onion-architecture-part-1/ ) and I am trying to let my project-structure reflect that Architecture :

a EJB-Servlet-JPA Maven project.
Using the latest Glassfish and MySQL ver 5.5

I would like to create everything in separate projects in Netbeans and minimize the dependency, no dependency between EJB and WEB - then link between those project is the Remote-interface ( Stored in a separate project ).

I want to be able to deploy the EJB and Web in different Glassfish on different machines.

First Shot :

1) EJB-Project ( 3 methods, one of them is 'save' using em.merge(object) )
- ( Bean with a remote interface )
2) WEB-Project
- ( 1 Servlet - with one util class ( IP-number to your EJB resides here )
- x number of entity classes )
3) Service-project
- ( The remote interface )

Dependencies :
1) EJB-Project depends on the Service-project
2) WEB-Project depends on the Service-project

The servlet is able to call 2 methods.
The ejb returns a text and the server-time.
it is not able to 'save'

i get an error then :
StandardWrapperValve[Testing]: PWC1406: Servlet.service() for servlet Testing threw exception javax.ejb.EJBException: java.rmi.RemoteException: CORBA UNKNOWN 1330446338 Maybe; nested exception is: org.omg.CORBA.UNKNOWN: ----------BEGIN server-side stack trace---------- org.omg.CORBA.UNKNOWN: WARNING: IOP00010002: Unknown user exception thrown by the server - exception: java.lang.NullPointerException; message: null vmcid: OMG minor code: 2 completed: Maybe at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:248) at com.sun.corba.ee.spi.orbutil.logex.corba.CorbaExtension.makeException(CorbaExtension.java:95) at com.sun.corba.ee.spi.orbutil.logex.WrapperGenerator.handleFullLogging(WrapperGenerator.java:387) at

Is that a bug !?

Using another structure then it works: If I have 1 EJB-project and 1 WEB-project
I am able to make it work without using any interface,
but then the WEB is dependent on the EJB and EJB&WEB must be deployed in the same Glassfish Server ... do not want to do that ...

Best regards, I

Glassfish Virtual Server and JSF2 problem

Error Redeploying EJB Timer on Glassfish 3.1.1

$
0
0

Hi,

I have a sort of weird error when I try to redeploy an EJB Timer. I mean, I can deploy the timer application with no problem, and it works, but when I attempt to redeploy the EJB, Glassfish comes out with the error and I can't redeploy the application and thus I have to undeploy the ear and deploy the EJB again. Does anyone know about a similar problem?

Thanks

@Stateless
public class Timer1 {
</pre>
<pre>    /**

     * Default constructor.
     */
    public Timer1() {
        // TODO Auto-generated constructor stub
    }

@SuppressWarnings("unused")
@Schedule(second="*/10", minute="*", hour="8-23", dayOfWeek="Mon-Fri",
      dayOfMonth="*", month="*", year="*", info="MyTimer")
    private void scheduledTimeout(final Timer t) {
        System.out.println("@Schedule called at: " + new java.util.Date());
    }
}

Regards


Improving startup time for java web application in glassfish 3.1

$
0
0

I am trying to reduce the start up time of my web application deployed in glassfish 3.1.1 (build 12) application server. My web application is deployed as a war file containing multiple jar files for every module in the application. The jar files are located in the WEB-INF\lib directory.

On enabling detailed logs for glassfish, I saw that glassfish tries to search the class files in WEB-INF\classes and does not find it. Since there are more than 16K classes there is an error message for every class file.

|FINE   |org.apache.naming_.FileDirContext| 88|PWC4451: File cannot be read E:\glassfish3.1.1\glassfish\domains\domain1\applications\mywebapp\WEB-INF\classes\com.xxx.yyy.MyClass.class

I added a emtpy jar named all-jars.jar in WEB-INF\lib and it contains a MANIFEST.MF file with a classpath attribute. The Class-Path attribute looks as below.

Class-Path: WEB-INF/lib/a.jar WEB-INF/lib/b.jar WEB-INF/lib/c.jar

Adding this jar didn't help though.

How can I tell glassfish to not search in WEB-INF/classes directory? Also any other suggestions to reduce the start up time?

Weird error deploying EJB on Glassfish 3.1

$
0
0

Hi,

I've came across an NPE deploying an EJB project depending on whether the glassfish-ejb-jar.xml descriptor is present in the jar file. Removing the descriptor file from the project, the EJB is deployed successfully.

I've attached the server.log file from Glassfish 3.1.2. Also I've attached the EJB jar files where the MyEJB1.jar doesn't contain the descriptor and MyEJB2.jar that it does. The exception is thrown when I attempt to deploy MyEJB2.jar with the descriptor file. Does anybody knows how to solve the problem?.

This is happening to me when I updated the Eclipse plugin GlassFish Tools 5.2.2.201305291930

The content of the descriptor is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glassfish-ejb-app PUBLIC "-//GlassFish.org//DTD GlassFish Application Server 3.1 EJB 3.1//EN" "http://glassfish.org/dtds/glassfish-ejb-jar_3_1-1.dtd">
<glassfish-ejb-app/>

Cheers,

AttachmentSize
serverlog.txt5.99 KB
MyEJB1.jar785 bytes
MyEJB2.jar1.08 KB

Test forum email link

$
0
0

Ideally every new posting should result in an email being delivered to users email alias via the forum-to-email bridge. I am seeing that it's not happening for quite some time. Subsequent replies to a forum posting are picked up by the bridge though. I am posting this fake topic to prove this point.

Two domains on the same port GlassFish its possible ?

$
0
0

I have two domains registered and wanted each to have a separate domain in glassfish, where both domains registered will enter through port 80 (http) and 433 (https) on my server and my need is that glassfish could drive for domain correct. I got set up and this targeting applications where all were in a single domain, but now I need to differentiate the domains because each will be with your application.

Thank you!

Re: GF4: Cannot start batch job from @Startup EJB

$
0
0

It might be a bug, it might be not. Does it work in the servlet init()
method? Or a non-startup singleton EJB? How is the "jdbc/batch"
configured and registered?

thanks,
-marina

On 6/9/13 8:17 AM, Harald Wellmann wrote:
> I'm currently experimenting with the new javax.batch API in GlassFish
> 4.0b89.
>
> I'm getting exceptions when trying to start a batch job from a
> @PostConstruct method of a @Singleton @Startup EJB.
>
> However, the same code works fine when running within a servlet.
>
> It seems the batch runtime is not yet fully set up when the EJB
> startup methods are run.
>
> See the message about failed lookup of "jddb/batch" below.
>
> Is this a bug, or is it illegal to use the Batch API in this early phase?
>
> [#|2013-06-09T17:00:44.550+0200|INFO|glassfish
> 4.0|javax.enterprise.system.container.ejb.com.sun.ejb.containers|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790044550;_LevelValue=800;_MessageID=ejb.portable_jndi_names;|
> EJB5181:Portable JNDI names for EJB InitializerService:
> [java:global/batch-demo/InitializerService!com.blogspot.hwellmann.batch.init.InitializerService,
> java:global/batch-demo/InitializerService]|#]
>
> [#|2013-06-09T17:00:44.638+0200|INFO|glassfish
> 4.0|org.jboss.weld.Version|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790044638;_LevelValue=800;|
> WELD-000900 2.0.0 (SP1)|#]
>
> [#|2013-06-09T17:00:45.600+0200|WARNING|glassfish
> 4.0|org.jboss.weld.interceptor.util.InterceptionTypeRegistry|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790045600;_LevelValue=900;|
> Class 'javax.ejb.PostActivate' not found, interception based on it
> is not enabled|#]
>
> [#|2013-06-09T17:00:45.601+0200|WARNING|glassfish
> 4.0|org.jboss.weld.interceptor.util.InterceptionTypeRegistry|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790045601;_LevelValue=900;|
> Class 'javax.ejb.PrePassivate' not found, interception based on it
> is not enabled|#]
>
> [#|2013-06-09T17:00:46.130+0200|SEVERE|glassfish
> 4.0|com.ibm.jbatch.container.services.impl.JDBCPersistenceManagerImpl|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790046130;_LevelValue=1000;|
> Lookup failed for JNDI name: jdbc/batch. One cause of this could be
> that the batch runtime is incorrectly configured to EE mode when it
> should be in SE mode.|#]
>
> [#|2013-06-09T17:00:46.131+0200|SEVERE|glassfish
> 4.0|com.ibm.jbatch.container.servicesmanager.ServicesManagerImpl|_ThreadID=1;_ThreadName=main;_TimeMillis=1370790046131;_LevelValue=1000;|
> Could not instantiate service:
> com.ibm.jbatch.container.impl.BatchKernelImpl due to
> exception:java.lang.reflect.InvocationTargetException|#]
>
>
> Best regards,
> Harald
>

Viewing all 1091 articles
Browse latest View live