OC4J Server startup classes and JNDI
Hi,
I have been using server startup classes in standalone OC4J provided with BPEL developer install to populate data from the server.xml into the JNDI server.
Now I am deploying the BP to 10gAS and am unable to identify the configuration files that affect the contents of the JNDI server which is accessible from BPEL.
Can anyone advise?
Thanks,
Toby
Clemens,
What we would like to do is to lookup configuration details in OC4J's JNDI server.
As an example, we have an ftp web service that is used for functionality not available in the FTP adapters, deleting files, executing remote commands etc.
We need to store the details of ftp connections somewhere centrally, and jndi looks like a good option. Something slightly different we would like to do here is to be able to access the configuration details that the FTP Adapters use, but if that's not possible, seperate entries in the jndi server would be good.
To populate the JNDI server, we have written a server startup class which loads our custom configuration details at OC4J startup.
This works fine under the OC4J supplied with a developer install, but when we deploy our code to a full blown 10g AS we cannot access the config information.
Similar Messages
-
Startup Classes and JMS - Suggestions Please!
I'm in serious need of having several resources initialized before beans
start handling requests.
I tried implementing a Weblogic Startup Class, and it works fine - as long
as it's the first thing
to run! -- the problem is, when my Message Driven Beans deploy, if there are
messages waiting
for them in their durable subscriptions, they immediately start
processing... then about 30 seconds
later Weblogic (6.0sp1) gets around to starting my startup class. If I put
code in each MDB that
kicks off the initialization when they are invoked I still run into
problems, because my initialization
takes a LONG time (more than 2 minutes) - so I end up with lots of
transaction rollbacks... which
are very annoying and clutter up the log files, and scare customers of the
product.
Is there anyway to make a startup class/servlet/something that runs and
completes before any
other processing occurs?
Thanks,
JamesYes, Startup servlet has the same problem - it doesn't 'startup' until after
jms messages are already being delivered. :( aside from this, there are
class loader issues -servlet space and ejb space are not the same...
Thanks though,
James
"minjiang" <[email protected]> wrote in message
news:[email protected]...
Hi, did you ever try startup servlet? not startup class?
mj
James House wrote:
The only problem with creating a base class to extend is the fact that
Java only supports single inheritance, -- and I'm already inheriting...
>>
I've been involved with many projects that use WLServer, and in
almost every one of them, there has been a need for a startup class
that fires before the server starts handling requests.... strange that
I'd be the only one to need this, when the need has recurred so often.
James
"Raja Mukherjee" <[email protected]> wrote in message
news:[email protected]...
James,
If you have common initialization tasks to be shared by multiple MDBs,
I
would create an abstract class (a.k.a BeanAdapter class) where you canhave
all your initialization logics and have your MDB extend from it.
I am not convinced that the Startup class needs to run first. In fact,
I
have the same view that Startup class should run last. My only wishlist
for
startup class was that I should be able to specify order, which isaddressed
in 6.1.
I am also getting the feeling from different posts that MDB deploymentwould
have a re-try logic in 6.1, which I am beginning to look into. Check
(or
post) in JMS news group.
.raja
"James House" <[email protected]> wrote in message
news:[email protected]...
Thanks for the help... I like the pattern you pointed me to better
than
anything else... ... but in all cases (your method, Gene's, and whatI'm
currently doing) I still have to put some code in every MDB that
I deploy... : (
Put in a good word for me there at BEA and convince the appropriate
developer that startup classes should run first!
James
"Raja Mukherjee" <[email protected]> wrote in message
news:[email protected]...
James,
There are several ways to solve your problem. I normally use
setMessageDrivenContext to do all my initialization. There are two
types
of
initialization that I have performed here, first, reading theconfiguration
file and then load some utility classes in specific order. The
problem
with
the second was that you will have to use synchronized block
w/HotSpot
2.0
to
keep the order, which is ok. I don't use static block to do the
initialization, instead use an init() metod. Hopefully you got the
idea.
Recently, Gene Chuang created a pattern which esentially does the
same
and
I
liked the pattern because it was a nicer way of doing what I
needed to
do.
I
have changed all my examples to customer to use the new pattern.
You
can
find it in
http://theserverside.com/patterns/thread.jsp?thread_id=7270.
The
only think I do not use of this pattern is
initializeEveryContextSwap()
method. I am not convinced yet that I would need it (of course
that
might
change over the time).
Hope this helps, and thanks Gene.
.raja
"James House" <[email protected]> wrote in message
news:[email protected]...
Ok... here's some more detail:
The application is largely JMS based, and most of my Session
EJBs
are
invoked only my Message Driven Beans.
I have a large set of properties that need to be read from a
config
file,
and stored somewhere "globally". I also have a number of
utilities
that
need to get "warmed up" before I start doing any real processing(before
I start receiving messages from the JMS Topics). These
utilities
take
a
long time to warm up (a long time being about 45-60 seconds) -
because
they are loading hundereds of classes, and creating variousconnections
to external resources.
Currently I'm creating a Singleton object that reads the
configuration
file
name from an environment property, and it then parses the file,
and
starts
configuring all of these utilities. Since the "Startup Class"
didn't
work
(weblogic invokes it after I'm already receiving messages), I
put
code
at
the beginning of all of my MDB's onMessage() methods that calls
the
singleton's "getInstance()" method - which synchronizes on alock
object,
and does all of it's work.
I don't like this solution because:
1- I have to put code in EVERY message-driven bean that I
create -
if
I
forget one, everything is broken.
2- I have to increase the transaction time out of the entire
server
to
be over 60 seconds since the beans hang that long while theconfiguration
is
happening.
It seems very obvious that a "Startup Class" should be invoked
after
the
server has come completely up, but before it starts listening
for
requests -- isn't the whole point of a "startup class" to getthings
ready
that need to be done as soon as the server comes up? but alas,
the
person
who designed this at BEA apparently didn't agree with me on this
point!
Any suggestion on better solutions would be greatly appreciated.
James
"Raja Mukherjee" <[email protected]> wrote in message
news:[email protected]...
You can do it this way, but I would not recommend it, unless
that's
the
only
way to attack the problem at hand. But that's just me.
I have seen this problem with multiple clients and in most
cases
there
is
a
better way to handle it. If James give us a little more
information
on
what
type of configuration is he talking about and some background
of
his
application, we as a group can think and may be able to come
up
with
some
idea.
.raja
"Joel Nylund" <[email protected]> wrote in message
news:[email protected]...
you could wrap the starting of weblogic in your own class
and do
initialization
there. You have to be careful because of the way weblogic
classloaders
work, but
you may be able to do what you want. Weblogic is just a java
class,
so
you
can
start your class, then once your done initializing, just
call
weblogic.Server.main
-Joel
James House wrote:
I'm in serious need of having several resources
initialized
before
beans
start handling requests.
I tried implementing a Weblogic Startup Class, and it
works
fine -
as
long
as it's the first thing
to run! -- the problem is, when my Message Driven Beans
deploy,
if
there
are
messages waiting
for them in their durable subscriptions, they immediately
start
processing... then about 30 seconds
later Weblogic (6.0sp1) gets around to starting my startupclass.
If
I
put
code in each MDB that
kicks off the initialization when they are invoked I still
run
into
problems, because my initialization
takes a LONG time (more than 2 minutes) - so I end up with
lots
of
transaction rollbacks... which
are very annoying and clutter up the log files, and scarecustomers
of
the
product.
Is there anyway to make a startup class/servlet/something
that
runs
and
completes before any
other processing occurs?
Thanks,
James -
Weblogic startup class and EAR file
Hi,
I am using WL 8.1.5.
I have a weblogic starup class MyStartup that implements T3StartupDef. (it does not specify package).
I jar-ed it. And I placed MyStartup.jar file into the MyEA.ear file. And I placed that into applications dir.
With WL Console I defined the startup class and for the ClassName specified MyStartup.
Yet I get the java.lang.ClassNotFoundException.
I also have a Manifest.mf file with
Class-Path: MyStartup.jar
Please help me solve this problem, I literally don't know what to do next.
MBHi,
thanks.
This seems like a completely opposite method of the depplying startup class with weblogic console.
Does my class still need to implement T3StartupDef?
I get this exception. And my classnotfound is still there.
Exception:weblogic.management.ApplicationException: startup.MyStartup
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2484)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2396)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:883)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:591)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:500)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
Regards,
MB -
Problems with Deployment, Startup classes and MBeanHome
Hello,
we have the following problem: How to initialize our application
correctly???
We are using MDBs as message consumers but have to guarantee the order of
incoming
messages. Due to a shortcoming in the JMS implementation (Order of
redelivered messages
is not guaranteed before WLS 8.1!!!) we are using a singleton class to keep
the health state
of the different message queues within the application (controlling whether
the MDBs are
supposed to proceed with processing or to discard any incoming messages).
Thus the MDBs
have to access this singleton, what implies latter has to be initialized
prior to the application
deployment. That's what we are using a startup class for, which is marked to
be loaded before
appplication deployment...
Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
loaded, but we are
not able to access the MBeanHome interface (We like to register MBean to
provide
adminstrative access to the health state)!!!
javax.naming.NameNotFoundException: Unable to resolve
'weblogic.management.home.localhome' Resolved: 'weblogic.management'
Unresolved:'home' ; remaining name 'home.localhome'
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
So when is the MBeanServer started???
Before application deployment??? After??? Is there any way to tell WLS not
to load the startup
class before the MBeanServer is available respectively the MBeanHome is
accessible via JNDI
but before application deployment???
Any hints are welcome!!!
Regards,
CKthis seems like a bug. the mbeanhome should be available for lookup in
startup classes. also posting to system management newsgroup.
"Carsten Kaiser" <[email protected]> wrote in message
news:[email protected]..
Hello,
we have the following problem: How to initialize our application
correctly???
We are using MDBs as message consumers but have to guarantee the order of
incoming
messages. Due to a shortcoming in the JMS implementation (Order of
redelivered messages
is not guaranteed before WLS 8.1!!!) we are using a singleton class tokeep
the health state
of the different message queues within the application (controllingwhether
the MDBs are
supposed to proceed with processing or to discard any incoming messages).
Thus the MDBs
have to access this singleton, what implies latter has to be initialized
prior to the application
deployment. That's what we are using a startup class for, which is markedto
be loaded before
appplication deployment...
Fortunately the according bug is fixed with WLS 7.0.2.0, so the class is
loaded, but we are
not able to access the MBeanHome interface (We like to register MBean to
provide
adminstrative access to the health state)!!!
javax.naming.NameNotFoundException: Unable to resolve
'weblogic.management.home.localhome' Resolved: 'weblogic.management'
Unresolved:'home' ; remaining name 'home.localhome'
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
So when is the MBeanServer started???
Before application deployment??? After??? Is there any way to tell WLS not
to load the startup
class before the MBeanServer is available respectively the MBeanHome is
accessible via JNDI
but before application deployment???
Any hints are welcome!!!
Regards,
CK -
Server Startup Class Exception - Where do the startup classes go?
Trying to get the server to run a class at startup. It complains it
can't find my startup class. I have it in a jar file in the app-inf
directory. Should it go someplace else?
thanksAdd the startup classes jar file to the APP-INF/lib directory.
Jay Zimmett <[email protected]> wrote:
Trying to get the server to run a class at startup. It complains it
can't find my startup class. I have it in a jar file in the app-inf
directory. Should it go someplace else?
thanks -
Sequence of startup classes and EJB deployment
The default sequence when WLS is starting is deploying EJB first and then startUpClasses. Could someone tell me if it's possible to change the sequence.
Thanks a lot in advance.Sure have your startup class do its work and then hot-deploy the EJB.
-- Rob
Jack wrote:
>
The default sequence when WLS is starting is deploying EJB first and then startUpClasses. Could someone tell me if it's possible to change the sequence.
Thanks a lot in advance. -
JNDI lookup couldn't find any objects in MBean class and -userThreads issue
Hi,
We had used some MBean classes in a jboss j2ee project. Now we need to migrate it to oc4j. We also need to use Thread class and jndi looking up in these MBean classes.
I encountered two problems when I migrate these MBeans.
1. The first problem is:
If I create a InitialContext object just like the following:
InitialContext result = new InitialContext();
Then I lookup an ejb,I can't find anything from this InitialContext.
However,If I create a InitialContext object just like below:
Properties props = new Properties();
props.put( Context.PROVIDER_URL, "***" );
props.put( Context.INITIAL_CONTEXT_FACTORY, "***");
//props.put( Context.URL_PKG_PREFIXES, "***" );
props.put( Context.SECURITY_PRINCIPAL, "***");
props.put( Context.SECURITY_CREDENTIALS, "***" );
InitialContext result = new InitialContext(props);
I can find that ejb. Why?
Is it possible to get InitialContext just like InitialContext result = new InitialContext()?
2. The second problem is:
I had used a thread class to do the above mentioned jndi looking up in one MBean method. This method is not be invoked by oc4j EM. It is invoked by another class. There is an exception throws just like below:
javax.naming.NamingException: Not in an application scope - start OC4J with the -userThreads switch if using user-created threads
I had add -userThreads argument in the startup command just like below:
java -Xdebug -Xnoagent -Djava.compiler=NONE -Doc4j.jmx.security.proxy.off=true -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -Dnl=en_US %JAVA_OPTS% %JAVA_SYSPROP% -jar %ORACLE_HOME%/j2ee/home/oc4j.jar
-userThreads
Does anyone know why there is an jndi problem in MBean class?
Thanks,
EternalHi,
We had used some MBean classes in a jboss j2ee project. Now we need to migrate it to oc4j. We also need to use Thread class and jndi looking up in these MBean classes.
I encountered two problems when I migrate these MBeans.
1. The first problem is:
If I create a InitialContext object just like the following:
InitialContext result = new InitialContext();
Then I lookup an ejb,I can't find anything from this InitialContext.
However,If I create a InitialContext object just like below:
Properties props = new Properties();
props.put( Context.PROVIDER_URL, "***" );
props.put( Context.INITIAL_CONTEXT_FACTORY, "***");
//props.put( Context.URL_PKG_PREFIXES, "***" );
props.put( Context.SECURITY_PRINCIPAL, "***");
props.put( Context.SECURITY_CREDENTIALS, "***" );
InitialContext result = new InitialContext(props);
I can find that ejb. Why?
Is it possible to get InitialContext just like InitialContext result = new InitialContext()?
2. The second problem is:
I had used a thread class to do the above mentioned jndi looking up in one MBean method. This method is not be invoked by oc4j EM. It is invoked by another class. There is an exception throws just like below:
javax.naming.NamingException: Not in an application scope - start OC4J with the -userThreads switch if using user-created threads
I had add -userThreads argument in the startup command just like below:
java -Xdebug -Xnoagent -Djava.compiler=NONE -Doc4j.jmx.security.proxy.off=true -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -Dnl=en_US %JAVA_OPTS% %JAVA_SYSPROP% -jar %ORACLE_HOME%/j2ee/home/oc4j.jar
-userThreads
Does anyone know why there is an jndi problem in MBean class?
Thanks,
Eternal -
Startup Classes w/ Arguments and Startup Order
Hi,
I know we can control the order of startup classes by specifying them in a
comma delimited list like this:
weblogic.system.startupClass.a=class1,class2,class3
Now what if class1 and class2 have several startup arguments that I need to
pass??? I would hate to think that I'll have to write my own startup
manager just to do this one simple thing?
So... if anyone knows how to specify startup arguments AND control the order
of startup classes please let me know...
Thanks in advance,
Stephen Earl
SmartPoint, Inc.Hi Don,
I've attempted to mirror the functionality of the Weblogic startup system
with no success. Basically I have an xml document specifying the startup
specifications much like the WL startup system (ie. Description, ClassName,
Args). To mirror the WL system I apparently need access to StartupThread
which, like most other WL classes, is undocumented and unexposed for use.
How would you suggest implementing such functionality??? Considering that
I'd like to have similar functionality to the current system (ie.
T3StartupDefs, RMI Servers, etc.) how can I and any other BEA customer
achieve this short of rewriting the startup mechanism???
Stephen Earl
SmartPoint, Inc.
"Don Ferguson" <[email protected]> wrote in message
news:[email protected]...
I have looked over the source code for startup classes and how thearguments
are processed, and I'm afraid I don't see any mechanism to accomplish what
you want, i.e., to specify the order that startup classes are executed,
and provide names-value pairs that are associated with each class.
You might have to come up with your own mechanism for associating
arguments with startup classes.
Anne-Katrin Schroeder-Lanz wrote:
well, if you absolutely must have identically named args for each class,
then you're stumped. should you be able to extract any kind of support
from
BEA here, I'd appreciate a notification, since we've got the sameproblem to
deal with.
happy hacking, anne
Anne-Katrin Schroeder-Lanz
Development
memIQ AG
T: +49-89-45639-19385
F: +49-89-45639-33-385
mailto:[email protected]
"Stephen Earl" <[email protected]> wrote in message
news:[email protected]...
OK... and now say that I have a startup argument called RETRIES. This
argument needs to be 10 for startup class A and 20 for startup class
B.
Now
way I can see to handle this situation.
BEA... I've logged a production 3 case regarding this issue and have
not
even received an initial response from support. Hello... Hello...
Steve...
"Anne-Katrin Schroeder-Lanz" <[email protected]> wrote in message
news:[email protected]...
hi,
just use the startArgs as documented on the list of startup classes
and
pass
a collective list of args, e.g.:
weblogic.system.startupClass.<logical_name>= xxx.yyy.Foo,
xxx.yyy.Bar
weblogic.system.startupArgs.<logical_name>= arg4Foo=some_value,
arg4Bar=another_value
hth,
cheers, anne
Anne-Katrin Schroeder-Lanz
Development
memIQ AG
T: +49-89-45639-19385
F: +49-89-45639-33-385
mailto:[email protected]
"Stephen Earl" <[email protected]> wrote in message
news:[email protected]...
Hi,
I know we can control the order of startup classes by specifying
them
in
a
comma delimited list like this:
weblogic.system.startupClass.a=class1,class2,class3
Now what if class1 and class2 have several startup arguments that
I
need
to
pass??? I would hate to think that I'll have to write my own
startup
manager just to do this one simple thing?
So... if anyone knows how to specify startup arguments AND controlthe
order
of startup classes please let me know...
Thanks in advance,
Stephen Earl
SmartPoint, Inc. -
DataSource information in Startup Class
Hi,
I have a startup class and I want to access the database using jdbc and get connection
using the datasource. In case of an EJB, the jndi name and datasource name can be
specified in the deployment descriptor. Is there a way to specify this information
in a startup class?
Thanks,
PatrickHi Patric,
You may use custom -Dmy.env.param=my.env.value when start
weblogic. Then you can use standart Java API to access system properties.
Regards,
Slava Imeshev
"Patrick" <[email protected]> wrote in message
news:3d2d241e$[email protected]..
>
Hi Sree,
Thanks. Actually, I do have a data access class which does thedatasource lookup
and gets the connection. The startup class just calls the methods in thisclass.
I would like to have the DSN string as an enviroment variable in thestartup class
which can then be accessed in the data access class, something like this
String dsn = "java:comp/env/jdbc/myds"
Any ideas on how to achieve this?
Thanks,
Patrick
"Sree Bodapati" <[email protected]> wrote:
Hi Patrick
here is how you do it.
import java.util.Hashtable;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
import weblogic.common.*;
import weblogic.jndi.*;
public class DoSQLStartup implements T3StartupDef {
private T3ServicesDef services;
public void setServices(T3ServicesDef services) {
this.services = services;
public String startup(String name, Hashtable args) throws Exception {
// Write your startup code here...
Context ctx = new InitialContext();
DataSource myds = (DataSource)ctx.lookup("myDataSource");
Connection conn = myds.getConnection();
System.out.println("Got connection!!!!!!!!!!!!!!!!!!!!");
// do some db work here
return "ok";
hth
sree
"Patrick" <[email protected]> wrote in message
news:3d2c7435$[email protected]..
Hi,
I have a startup class and I want to access the database using jdbcand get connection
using the datasource. In case of an EJB, the jndi name and datasourcename
can be
specified in the deployment descriptor. Is there a way to specify thisinformation
in a startup class?
Thanks,
Patrick -
Configure weblogic startup class in deployment jar
We need to invoke a class during weblogic startup that is part of application deployment jar...
It works if startup class is added to server classpath ( Weblogic documentation also insists that). But our startup class uses application logic and needs to be part of application jar..
We are getting java.lang.ClassNotFoundException for the class during start up. setting LoadBeforeAppDeployments to false also does not help...
Is there any other way to invoke a application class during weblogic startup...?
Any help would be appreciated.
Thanks,
Rajasekar.here is the solution to this:
in the conventional method of implementing a startup class, one needs to impletent the T3STartupDef interface and register the class as a startup class in the console / config.xml
in this method, the startup class need not implement the T3STartupDef interface, it just needs to have a "main" method that will be called. the process of registeration is also simple, if you have an application ear.
while making the application ear, add a weblogic-application.xml along with the application.xml. the weblogic-application.xml should contain :
<startup>
<startup-class>myStartup</startup-class>
<startup-uri>myStartupArchive.jar</startup-uri>
</startup>
the myStartupArchive.jar should contain the startup class and all classes used by it
also, use a "manifest" file to point to other library jars within the ear
hope this helps someone !
going, going, ... gone. -
Hi. I am trying to create one startup class. It is in mine classpath and I declared
it in console. I registated it with my server but in the start up the system returns
one java.lang.ClassNotFoundException. Is necessary to initiate some classpath specific
for the classes of startup?
Thanks in Advance
jjsStartup classes is not described in J2EE specs, hence is handled independently by vendors and is
very awkward.
You can, however, create a startup servlet, that mimics a startup class and is J2EE-portable.
Search interest.ejb; info has been posted there about this.
Gene
"Andreas Ebbert" <[email protected]> wrote in message news:[email protected]..
Gene Chuang wrote:
Yes, it needs to be in the CLASSPATH of startWeblogic.sh.Is there perhaps the posibility to define startup classes in enterprise
applications? Or do you have to edit the config.xml by hand or by the
console for that?
Andreas -
Refering to startup class in EJB
Hi,
In our application we send exception stacktrace as email to
System Admin.The mails are sent from both Web App and EJB.
The emails have to be buffered and can be sent only after a
limit say 5 stacktraces have been reached. Also in case the
buffer is not full,then the mail should be sent only after a
specific time.
To achieve this I am planning to use a Startup class and start
a thread inside the class to wait for a specified time. The questions are:
1)How to refer to a startup class in EJB or Web (Our
application is deployed as an EAR)
2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
the thread
created by startup class be in the context of the EJB.
ManiStartup classes have the following deficiences:
- they (and all application classes they use) have to be in the system
classpath, which makes them non-redeployable
- they are executed only once when server starts - if your application can be
hot-redeployed and it depends on startup/shutdown logic things can break.
An easy workaround is to use load-on-startup servlet init() and destroy()
methods (or 2.3 servletcontext listener) instead of startup classes - it makes
application redeployable and portable.
Mani <[email protected]> wrote:
Hi,
In our application we send exception stacktrace as email to
System Admin.The mails are sent from both Web App and EJB.
The emails have to be buffered and can be sent only after a
limit say 5 stacktraces have been reached. Also in case the
buffer is not full,then the mail should be sent only after a
specific time.
To achieve this I am planning to use a Startup class and start
a thread inside the class to wait for a specified time. The questions are:
1)How to refer to a startup class in EJB or Web (Our
application is deployed as an EAR)
2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
the thread
created by startup class be in the context of the EJB.
Mani--
Dimitri -
Package zzz not found in import (server side classes)
Hi,
I'm trying to use the "Web Application" feature in WL 5.10
(with no service pack). My application contains a couple of
servlets, a couple of server side classes, and a couple of
jsp pages.
I created the WEB-INF\classes directory structure both in
public_html and in my application's root directory. I
modified setEnv.bat to contain the two directories in
ClassPath and compilation of my servlets from the command
line completes OK (the servlets import a package that sits in
public_html\WEB-INF\classes).
However, when I try to import the same package from a jsp
file, I get the "package zzz not found in import" error
message. The trace shows that the java compiler invoked
after the servlet has been generated does not contain
public_html\WEB-INF\classes in the ClassPath, but contains
public_html\my_app\WEB-INF\classes.
How can I specify that the java compiler should look under
public_html\WEB-INF\classes for server side classes? Is there
another solution and am I even using the right approach?
Thanks,
Vladimir
Vladimir wrote:
>
> Hi,
>
> I'm trying to use the "Web Application" feature in WL 5.10
> (with no service pack). My application contains a couple of
You should install the service packs, your problem will probably
disappear then.
Web Apps are better supported with service packs.
> servlets, a couple of server side classes, and a couple of
> jsp pages.
>
> I created the WEB-INF\classes directory structure both in
> public_html and in my application's root directory. I
> modified setEnv.bat to contain the two directories in
> ClassPath and compilation of my servlets from the command
> line completes OK (the servlets import a package that sits in
> public_html\WEB-INF\classes).
>
> However, when I try to import the same package from a jsp
> file, I get the "package zzz not found in import" error
> message. The trace shows that the java compiler invoked
> after the servlet has been generated does not contain
> public_html\WEB-INF\classes in the ClassPath, but contains
> public_html\my_app\WEB-INF\classes.
>
> How can I specify that the java compiler should look under
> public_html\WEB-INF\classes for server side classes? Is there
> another solution and am I even using the right approach?
>
Setting the WEBLOGIC_CLASSPATH should do the trick. Look in weblogic
start file (On NT startWeblogic.cmd)
> Thanks,
> Vladimir
-
Initiating Quartz from a startup class
Has anyone implemented quartz in a server startup class for scheduling?
Would this be a potential way of using quartz or is it not recommended?
Thanks for any thoughts on the subject.
TobyI was mistaken in this posting. I was able to access the EJB from the startup class so there must be something else that I am doing to cause this problem. I'd still like to know why I get those invalid guid errors though.
By the way, please forgive me for using the gender-specific gentlemen in my posting. That was accidental. -
Oc4j startup classes - please help!
I am trying to create a startup class for my Oc4j container. I have created a new class with all the required code. However when I come to update my server.xml config file like so:
<startup-classes>
<startup-class classname="MyStartupClass" failure-is-fatal="true">
<execution-order>0</execution-order>
</startup-class>
</startup-classes>
The container on initialisation says that the class cannot be found. I have also tried giving the fully qualified package name as the class name i.e. com.blah.blahh.MyStartupClass. However still no success.
Anyone know why this is happening and how I can get the container to find my startup class?make a jar of ur classes and put it in(u can put single class also)
jdev--\j2ee\home\applib
put this line in the server.xml file
<init-library path="../applib" />
try this...
Hope this helps
N@vin
Maybe you are looking for
-
How do i contact or give the request to the seller if my ipad is in active screen?
i bough an ipad mini from a person (2nd bough the ipad), when he give me the ipad mini has fw 7.0.4 and didnt have icloud or appstore id, but when i bring it home, i try to reset all settings and it ask me pin code (i ask the 2nd user and he said he
-
Blue Screen of Death - Memory Management
I have gotten the blue screen of death twice now. The screen went by really fast but I think it said something about memory, like memory management. I copied the problem details: Problem signature: Problem Event Name: BlueScreen OS Version: 6.1.7601.
-
11g installation on Windows XP Pro SP2
Hi! The 11g database installation, unfortunately, does not work "out-of-the-box", like it does with 10g. The question is: Why can't the EM be installed with the DBCA? Scenario: 1) I had to install the EM Agent first, before installing the database so
-
Hi, Is it possible to handle errors in LSMW if so how? Advantages of LSMW over Function Module. Is it possible to create multiple structures in LSMW to accept multiple Flat files. Thanks in Advance.
-
How to set default date in IT15
Hi Dear Experts, We need default IT15 date as last day of each payroll period, is there any standard configuration for this requirement? Thank you so much for the help. Xiaoli